Class: MoneyKit::AccountType
- Inherits:
-
Object
- Object
- MoneyKit::AccountType
- Defined in:
- lib/moneykit/models/account_type.rb
Constant Summary collapse
- DEPOSITORY_CASH =
'depository.cash'.freeze
- DEPOSITORY_CHECKING =
'depository.checking'.freeze
- DEPOSITORY_SAVINGS =
'depository.savings'.freeze
- DEPOSITORY_PREPAID =
'depository.prepaid'.freeze
- DEPOSITORY_OTHER =
'depository.other'.freeze
- CREDIT_CARD =
'credit_card'.freeze
- LOAN_GENERAL =
'loan.general'.freeze
- LOAN_MORTGAGE =
'loan.mortgage'.freeze
- LOAN_OTHER =
'loan.other'.freeze
- INVESTMENT =
'investment'.freeze
- OTHER =
'other'.freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
28 29 30 31 |
# File 'lib/moneykit/models/account_type.rb', line 28 def self.all_vars @all_vars ||= [DEPOSITORY_CASH, DEPOSITORY_CHECKING, DEPOSITORY_SAVINGS, DEPOSITORY_PREPAID, DEPOSITORY_OTHER, CREDIT_CARD, LOAN_GENERAL, LOAN_MORTGAGE, LOAN_OTHER, INVESTMENT, OTHER].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
36 37 38 |
# File 'lib/moneykit/models/account_type.rb', line 36 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
43 44 45 46 47 |
# File 'lib/moneykit/models/account_type.rb', line 43 def build_from_hash(value) return value if AccountType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #AccountType" end |