class Ingenico::Connect::SDK::Domain::Services::BankData

@attr [String] new_bank_name @attr [String] reformatted_account_number @attr [String] reformatted_bank_code @attr [String] reformatted_branch_code

Attributes

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/services/bank_data.rb, line 35
def from_hash(hash)
  super
  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/services/bank_data.rb, line 26
def to_h
  hash = super
  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