Class: ThePlaidApi::ActivityType
- Inherits:
-
Object
- Object
- ThePlaidApi::ActivityType
- Defined in:
- lib/the_plaid_api/models/activity_type.rb
Overview
Types of consent activities
Constant Summary collapse
- ACTIVITY_TYPE =
[ # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze, # TODO: Write general description for ITEM_CREATE ITEM_CREATE = 'ITEM_CREATE'.freeze, # TODO: Write general description for ITEM_IMPORT ITEM_IMPORT = 'ITEM_IMPORT'.freeze, # TODO: Write general description for ITEM_UPDATE ITEM_UPDATE = 'ITEM_UPDATE'.freeze, # TODO: Write general description for ITEM_UNLINK ITEM_UNLINK = 'ITEM_UNLINK'.freeze, # TODO: Write general description for PORTAL_UNLINK PORTAL_UNLINK = 'PORTAL_UNLINK'.freeze, # TODO: Write general description for PORTAL_ITEMS_DELETE PORTAL_ITEMS_DELETE = 'PORTAL_ITEMS_DELETE'.freeze, # TODO: Write general description for ITEM_REMOVE ITEM_REMOVE = 'ITEM_REMOVE'.freeze, # TODO: Write general description for INVARIANT_CHECKER_DELETION INVARIANT_CHECKER_DELETION = 'INVARIANT_CHECKER_DELETION'.freeze, # TODO: Write general description for SCOPES_UPDATE SCOPES_UPDATE = 'SCOPES_UPDATE'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = UNKNOWN) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/activity_type.rb', line 47 def self.from_value(value, default_value = UNKNOWN) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'unknown' then UNKNOWN when 'item_create' then ITEM_CREATE when 'item_import' then ITEM_IMPORT when 'item_update' then ITEM_UPDATE when 'item_unlink' then ITEM_UNLINK when 'portal_unlink' then PORTAL_UNLINK when 'portal_items_delete' then PORTAL_ITEMS_DELETE when 'item_remove' then ITEM_REMOVE when 'invariant_checker_deletion' then INVARIANT_CHECKER_DELETION when 'scopes_update' then SCOPES_UPDATE else default_value end end |
.validate(value) ⇒ Object
41 42 43 44 45 |
# File 'lib/the_plaid_api/models/activity_type.rb', line 41 def self.validate(value) return false if value.nil? ACTIVITY_TYPE.include?(value) end |