Class: Ingenico::Connect::SDK::Domain::Services::BankData

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/services/bank_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#new_bank_nameObject

String



14
15
16
# File 'lib/ingenico/connect/sdk/domain/services/bank_data.rb', line 14

def new_bank_name
  @new_bank_name
end

#reformatted_account_numberObject

String



17
18
19
# File 'lib/ingenico/connect/sdk/domain/services/bank_data.rb', line 17

def 
  @reformatted_account_number
end

#reformatted_bank_codeObject

String



20
21
22
# File 'lib/ingenico/connect/sdk/domain/services/bank_data.rb', line 20

def reformatted_bank_code
  @reformatted_bank_code
end

#reformatted_branch_codeObject

String



23
24
25
# File 'lib/ingenico/connect/sdk/domain/services/bank_data.rb', line 23

def reformatted_branch_code
  @reformatted_branch_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ingenico/connect/sdk/domain/services/bank_data.rb', line 34

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_hObject



25
26
27
28
29
30
31
32
# File 'lib/ingenico/connect/sdk/domain/services/bank_data.rb', line 25

def to_h
  hash = super
  add_to_hash(hash, 'newBankName', @new_bank_name)
  add_to_hash(hash, 'reformattedAccountNumber', @reformatted_account_number)
  add_to_hash(hash, 'reformattedBankCode', @reformatted_bank_code)
  add_to_hash(hash, 'reformattedBranchCode', @reformatted_branch_code)
  hash
end