Class: Ingenico::Connect::SDK::Domain::Definitions::ValidationBankAccountOutput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#checksObject



15
16
17
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 15

def checks
  @checks
end

#new_bank_nameObject

String



18
19
20
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 18

def new_bank_name
  @new_bank_name
end

#reformatted_account_numberObject

String



21
22
23
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 21

def 
  @reformatted_account_number
end

#reformatted_bank_codeObject

String



24
25
26
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 24

def reformatted_bank_code
  @reformatted_bank_code
end

#reformatted_branch_codeObject

String



27
28
29
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 27

def reformatted_branch_code
  @reformatted_branch_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 39

def from_hash(hash)
  super
  if hash.has_key?('checks')
    if !(hash['checks'].is_a? Array)
      raise TypeError, "value '%s' is not an Array" % [hash['checks']]
    end
    @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_hObject



29
30
31
32
33
34
35
36
37
# File 'lib/ingenico/connect/sdk/domain/definitions/validation_bank_account_output.rb', line 29

def to_h
  hash = super
  add_to_hash(hash, 'checks', @checks)
  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