Class: Worldline::Connect::SDK::V1::Domain::BankAccountBban

Inherits:
BankAccount show all
Defined in:
lib/worldline/connect/sdk/v1/domain/bank_account_bban.rb

Direct Known Subclasses

BankAccountBbanRefund

Instance Attribute Summary collapse

Attributes inherited from BankAccount

#account_holder_name

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#account_numberString

Returns the current value of account_number.

Returns:

  • (String)

    the current value of account_number



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

def 
  @account_number
end

#bank_codeString

Returns the current value of bank_code.

Returns:

  • (String)

    the current value of bank_code



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

def bank_code
  @bank_code
end

#bank_nameString

Returns the current value of bank_name.

Returns:

  • (String)

    the current value of bank_name



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

def bank_name
  @bank_name
end

#branch_codeString

Returns the current value of branch_code.

Returns:

  • (String)

    the current value of branch_code



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

def branch_code
  @branch_code
end

#check_digitString

Returns the current value of check_digit.

Returns:

  • (String)

    the current value of check_digit



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

def check_digit
  @check_digit
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



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

def country_code
  @country_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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_hHash

Returns:

  • (Hash)


33
34
35
36
37
38
39
40
41
42
# File 'lib/worldline/connect/sdk/v1/domain/bank_account_bban.rb', line 33

def to_h
  hash = super
  hash['accountNumber'] = @account_number unless @account_number.nil?
  hash['bankCode'] = @bank_code unless @bank_code.nil?
  hash['bankName'] = @bank_name unless @bank_name.nil?
  hash['branchCode'] = @branch_code unless @branch_code.nil?
  hash['checkDigit'] = @check_digit unless @check_digit.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash
end