Class: CybridApiBank::TransferFailureCodeBankModel

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

Constant Summary collapse

NON_SUFFICIENT_FUNDS =
"non_sufficient_funds".freeze
REFRESH_REQUIRED =
"refresh_required".freeze
PARTY_NAME_INVALID =
"party_name_invalid".freeze
PAYMENT_RAIL_INVALID =
"payment_rail_invalid".freeze
COMPLIANCE_REJECTION =
"compliance_rejection".freeze
CANCELLED =
"cancelled".freeze
REVERSED =
"reversed".freeze
LIMIT_EXCEEDED =
"limit_exceeded".freeze
NETWORK_FEE_TOO_LOW =
"network_fee_too_low".freeze
AMOUNT_TOO_LOW =
"amount_too_low".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



32
33
34
# File 'lib/cybrid_api_bank_ruby/models/transfer_failure_code_bank_model.rb', line 32

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

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



39
40
41
42
43
# File 'lib/cybrid_api_bank_ruby/models/transfer_failure_code_bank_model.rb', line 39

def build_from_hash(value)
  constantValues = TransferFailureCodeBankModel.constants.select { |c| TransferFailureCodeBankModel::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #TransferFailureCodeBankModel" if constantValues.empty?
  value
end