Class: FdxV660Api::AccountCategoryDepositType2

Inherits:
Object
  • Object
show all
Defined in:
lib/fdx_v660_api/models/account_category_deposit_type2.rb

Overview

The specific Account types which have Deposit Terms and Conditions

Constant Summary collapse

ACCOUNT_CATEGORY_DEPOSIT_TYPE2 =
[
  # TODO: Write general description for ANNUITY_ACCOUNT
  ANNUITY_ACCOUNT = 'ANNUITY_ACCOUNT'.freeze,

  # TODO: Write general description for COMMERCIAL_ACCOUNT
  COMMERCIAL_ACCOUNT = 'COMMERCIAL_ACCOUNT'.freeze,

  # TODO: Write general description for DEPOSIT_ACCOUNT
  DEPOSIT_ACCOUNT = 'DEPOSIT_ACCOUNT'.freeze,

  # TODO: Write general description for DIGITAL_WALLET
  DIGITAL_WALLET = 'DIGITAL_WALLET'.freeze,

  # TODO: Write general description for INSURANCE_ACCOUNT
  INSURANCE_ACCOUNT = 'INSURANCE_ACCOUNT'.freeze,

  # TODO: Write general description for INVESTMENT_ACCOUNT
  INVESTMENT_ACCOUNT = 'INVESTMENT_ACCOUNT'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ANNUITY_ACCOUNT) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/fdx_v660_api/models/account_category_deposit_type2.rb', line 35

def self.from_value(value, default_value = ANNUITY_ACCOUNT)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'annuity_account' then ANNUITY_ACCOUNT
  when 'commercial_account' then COMMERCIAL_ACCOUNT
  when 'deposit_account' then DEPOSIT_ACCOUNT
  when 'digital_wallet' then DIGITAL_WALLET
  when 'insurance_account' then INSURANCE_ACCOUNT
  when 'investment_account' then INVESTMENT_ACCOUNT
  else
    default_value
  end
end

.validate(value) ⇒ Object



29
30
31
32
33
# File 'lib/fdx_v660_api/models/account_category_deposit_type2.rb', line 29

def self.validate(value)
  return false if value.nil?

  true
end