Class: CybridApiBank::TransferTypeBankModel

Inherits:
Object
  • Object
show all
Defined in:
lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb

Constant Summary collapse

FUNDING =
"funding".freeze
BOOK =
"book".freeze
CRYPTO =
"crypto".freeze
INSTANT_FUNDING =
"instant_funding".freeze
FUNDING_RETURN =
"funding_return".freeze
CRYPTO_RETURN =
"crypto_return".freeze
LOSS_RECOVERY =
"loss_recovery".freeze
INTER_ACCOUNT =
"inter_account".freeze
LIGHTNING =
"lightning".freeze
INSTANT_FUNDING_RETURN =
"instant_funding_return".freeze
LOSS_COVERAGE =
"loss_coverage".freeze
LOSS_RECLAIM =
"loss_reclaim".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



31
32
33
# File 'lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb', line 31

def self.all_vars
  @all_vars ||= [FUNDING, BOOK, CRYPTO, INSTANT_FUNDING, FUNDING_RETURN, CRYPTO_RETURN, LOSS_RECOVERY, , LIGHTNING, INSTANT_FUNDING_RETURN, LOSS_COVERAGE, LOSS_RECLAIM].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string



38
39
40
# File 'lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb', line 38

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



45
46
47
48
# File 'lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb', line 45

def build_from_hash(value)
  return value if TransferTypeBankModel.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #TransferTypeBankModel"
end