Class: ThePlaidApi::AssetType
- Inherits:
-
Object
- Object
- ThePlaidApi::AssetType
- Defined in:
- lib/the_plaid_api/models/asset_type.rb
Overview
A value from a MISMO prescribed list that specifies financial assets in a mortgage loan transaction. Assets may be either liquid or fixed and are associated with a corresponding asset amount.
Constant Summary collapse
- ASSET_TYPE =
[ # TODO: Write general description for CHECKINGACCOUNT CHECKINGACCOUNT = 'CheckingAccount'.freeze, # TODO: Write general description for SAVINGSACCOUNT SAVINGSACCOUNT = 'SavingsAccount'.freeze, # TODO: Write general description for INVESTMENT INVESTMENT = 'Investment'.freeze, # TODO: Write general description for MONEYMARKETFUND MONEYMARKETFUND = 'MoneyMarketFund'.freeze, # TODO: Write general description for OTHER OTHER = 'Other'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CHECKINGACCOUNT) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/the_plaid_api/models/asset_type.rb', line 34 def self.from_value(value, default_value = CHECKINGACCOUNT) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'checkingaccount' then CHECKINGACCOUNT when 'savingsaccount' then SAVINGSACCOUNT when 'investment' then INVESTMENT when 'moneymarketfund' then MONEYMARKETFUND when 'other' then OTHER else default_value end end |
.validate(value) ⇒ Object
28 29 30 31 32 |
# File 'lib/the_plaid_api/models/asset_type.rb', line 28 def self.validate(value) return false if value.nil? ASSET_TYPE.include?(value) end |