Class: ThePlaidApi::OverrideAccountType
- Inherits:
-
Object
- Object
- ThePlaidApi::OverrideAccountType
- Defined in:
- lib/the_plaid_api/models/override_account_type.rb
Overview
‘investment:` Investment account. `credit:` Credit card `depository:` Depository account `loan:` Loan account `payroll:` Payroll account `other:` Non-specified account type See the [Account type schema](plaid.com/docs/api/accounts#account-type-schema) for a full listing of account types and corresponding subtypes.
Constant Summary collapse
- OVERRIDE_ACCOUNT_TYPE =
[ # TODO: Write general description for INVESTMENT INVESTMENT = 'investment'.freeze, # TODO: Write general description for CREDIT CREDIT = 'credit'.freeze, # TODO: Write general description for DEPOSITORY DEPOSITORY = 'depository'.freeze, # TODO: Write general description for LOAN LOAN = 'loan'.freeze, # TODO: Write general description for PAYROLL PAYROLL = 'payroll'.freeze, # TODO: Write general description for OTHER OTHER = 'other'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = INVESTMENT) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/the_plaid_api/models/override_account_type.rb', line 39 def self.from_value(value, default_value = INVESTMENT) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'investment' then INVESTMENT when 'credit' then CREDIT when 'depository' then DEPOSITORY when 'loan' then LOAN when 'payroll' then PAYROLL when 'other' then OTHER else default_value end end |
.validate(value) ⇒ Object
33 34 35 36 37 |
# File 'lib/the_plaid_api/models/override_account_type.rb', line 33 def self.validate(value) return false if value.nil? OVERRIDE_ACCOUNT_TYPE.include?(value) end |