Class: ThePlaidApi::AuthUpdateTypes
- Inherits:
-
Object
- Object
- ThePlaidApi::AuthUpdateTypes
- Defined in:
- lib/the_plaid_api/models/auth_update_types.rb
Overview
The possible types of auth data that may have changed.
Constant Summary collapse
- AUTH_UPDATE_TYPES =
[ # TODO: Write general description for ACCOUNT_NUMBER ACCOUNT_NUMBER = 'ACCOUNT_NUMBER'.freeze, # TODO: Write general description for ROUTING_NUMBER ROUTING_NUMBER = 'ROUTING_NUMBER'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ACCOUNT_NUMBER) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/the_plaid_api/models/auth_update_types.rb', line 23 def self.from_value(value, default_value = ACCOUNT_NUMBER) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'account_number' then ACCOUNT_NUMBER when 'routing_number' then ROUTING_NUMBER else default_value end end |
.validate(value) ⇒ Object
17 18 19 20 21 |
# File 'lib/the_plaid_api/models/auth_update_types.rb', line 17 def self.validate(value) return false if value.nil? AUTH_UPDATE_TYPES.include?(value) end |