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

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/customer_bank_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from 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



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 29

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

#to_hHash

Returns:

  • (Hash)


21
22
23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/customer_bank_account.rb', line 21

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