Class: Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban

Inherits:
BankAccount show all
Defined in:
lib/ingenico/connect/sdk/domain/definitions/bank_account_bban.rb

Overview

Direct Known Subclasses

Refund::BankAccountBbanRefund

Instance Attribute Summary collapse

Attributes inherited from BankAccount

#account_holder_name

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#account_numberObject

String



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

def 
  @account_number
end

#bank_codeObject

String



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

def bank_code
  @bank_code
end

#bank_nameObject

String



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

def bank_name
  @bank_name
end

#branch_codeObject

String



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

def branch_code
  @branch_code
end

#check_digitObject

String



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

def check_digit
  @check_digit
end

#country_codeObject

String



30
31
32
# File 'lib/ingenico/connect/sdk/domain/definitions/bank_account_bban.rb', line 30

def country_code
  @country_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key?('accountNumber')
    @account_number = hash['accountNumber']
  end
  if hash.has_key?('bankCode')
    @bank_code = hash['bankCode']
  end
  if hash.has_key?('bankName')
    @bank_name = hash['bankName']
  end
  if hash.has_key?('branchCode')
    @branch_code = hash['branchCode']
  end
  if hash.has_key?('checkDigit')
    @check_digit = hash['checkDigit']
  end
  if hash.has_key?('countryCode')
    @country_code = hash['countryCode']
  end
end

#to_hObject



32
33
34
35
36
37
38
39
40
41
# File 'lib/ingenico/connect/sdk/domain/definitions/bank_account_bban.rb', line 32

def to_h
  hash = super
  add_to_hash(hash, 'accountNumber', @account_number)
  add_to_hash(hash, 'bankCode', @bank_code)
  add_to_hash(hash, 'bankName', @bank_name)
  add_to_hash(hash, 'branchCode', @branch_code)
  add_to_hash(hash, 'checkDigit', @check_digit)
  add_to_hash(hash, 'countryCode', @country_code)
  hash
end