Class: ThePlaidApi::IdentityUpdateTypes
- Inherits:
-
Object
- Object
- ThePlaidApi::IdentityUpdateTypes
- Defined in:
- lib/the_plaid_api/models/identity_update_types.rb
Overview
The possible types of identity data that may have changed.
Constant Summary collapse
- IDENTITY_UPDATE_TYPES =
[ # TODO: Write general description for PHONES PHONES = 'PHONES'.freeze, # TODO: Write general description for ADDRESSES ADDRESSES = 'ADDRESSES'.freeze, # TODO: Write general description for EMAILS EMAILS = 'EMAILS'.freeze, # TODO: Write general description for NAMES NAMES = 'NAMES'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PHONES) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/the_plaid_api/models/identity_update_types.rb', line 29 def self.from_value(value, default_value = PHONES) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'phones' then PHONES when 'addresses' then ADDRESSES when 'emails' then EMAILS when 'names' then NAMES else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/the_plaid_api/models/identity_update_types.rb', line 23 def self.validate(value) return false if value.nil? IDENTITY_UPDATE_TYPES.include?(value) end |