class Ingenico::Connect::SDK::Domain::Definitions::ValidationBankAccountOutput

@attr [Array<Ingenico::Connect::SDK::Domain::Definitions::ValidationBankAccountCheck>] checks @attr [String] new_bank_name @attr [String] reformatted_account_number @attr [String] reformatted_bank_code @attr [String] reformatted_branch_code

Attributes

checks[RW]
new_bank_name[RW]
reformatted_account_number[RW]
reformatted_bank_code[RW]
reformatted_branch_code[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb, line 40
def from_hash(hash)
  super
  if hash.has_key? 'checks'
    raise TypeError, "value '%s' is not an Array" % [hash['checks']] unless hash['checks'].is_a? Array
    @checks = []
    hash['checks'].each do |e|
      @checks << Ingenico::Connect::SDK::Domain::Definitions::ValidationBankAccountCheck.new_from_hash(e)
    end
  end
  if hash.has_key? 'newBankName'
    @new_bank_name = hash['newBankName']
  end
  if hash.has_key? 'reformattedAccountNumber'
    @reformatted_account_number = hash['reformattedAccountNumber']
  end
  if hash.has_key? 'reformattedBankCode'
    @reformatted_bank_code = hash['reformattedBankCode']
  end
  if hash.has_key? 'reformattedBranchCode'
    @reformatted_branch_code = hash['reformattedBranchCode']
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb, line 30
def to_h
  hash = super
  hash['checks'] = @checks.collect{|val| val.to_h} unless @checks.nil?
  hash['newBankName'] = @new_bank_name unless @new_bank_name.nil?
  hash['reformattedAccountNumber'] = @reformatted_account_number unless @reformatted_account_number.nil?
  hash['reformattedBankCode'] = @reformatted_bank_code unless @reformatted_bank_code.nil?
  hash['reformattedBranchCode'] = @reformatted_branch_code unless @reformatted_branch_code.nil?
  hash
end