Class: OnlinePayments::SDK::Domain::CustomerBankAccount

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/customer_bank_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#account_holder_nameString

Returns the current value of account_holder_name.

Returns:

  • (String)

    the current value of account_holder_name



12
13
14
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 12

def 
  @account_holder_name
end

#bicString

Returns the current value of bic.

Returns:

  • (String)

    the current value of bic



12
13
14
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 12

def bic
  @bic
end

#ibanString

Returns the current value of iban.

Returns:

  • (String)

    the current value of iban



12
13
14
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 12

def iban
  @iban
end

Instance Method Details

#from_hash(hash) ⇒ Object



26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 26

def from_hash(hash)
  super
  @account_holder_name = hash['accountHolderName'] if hash.key? 'accountHolderName'
  @bic = hash['bic'] if hash.key? 'bic'
  @iban = hash['iban'] if hash.key? 'iban'
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
24
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 18

def to_h
  hash = super
  hash['accountHolderName'] = @account_holder_name unless @account_holder_name.nil?
  hash['bic'] = @bic unless @bic.nil?
  hash['iban'] = @iban unless @iban.nil?
  hash
end