Class: Ingenico::Direct::SDK::Domain::LoanRecipient

Inherits:
Ingenico::Direct::SDK::DataObject show all
Defined in:
lib/ingenico/direct/sdk/domain/loan_recipient.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Direct::SDK::DataObject

new_from_hash

Instance Attribute Details

#account_numberString

Returns the current value of account_number.

Returns:

  • (String)

    the current value of account_number



15
16
17
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 15

def 
  @account_number
end

#date_of_birthString

Returns the current value of date_of_birth.

Returns:

  • (String)

    the current value of date_of_birth



15
16
17
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 15

def date_of_birth
  @date_of_birth
end

#partial_panString

Returns the current value of partial_pan.

Returns:

  • (String)

    the current value of partial_pan



15
16
17
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 15

def partial_pan
  @partial_pan
end

#surnameString

Returns the current value of surname.

Returns:

  • (String)

    the current value of surname



15
16
17
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 15

def surname
  @surname
end

#zipString

Returns the current value of zip.

Returns:

  • (String)

    the current value of zip



15
16
17
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 15

def zip
  @zip
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 33

def from_hash(hash)
  super
  @account_number = hash['accountNumber'] if hash.key? 'accountNumber'
  @date_of_birth = hash['dateOfBirth'] if hash.key? 'dateOfBirth'
  @partial_pan = hash['partialPan'] if hash.key? 'partialPan'
  @surname = hash['surname'] if hash.key? 'surname'
  @zip = hash['zip'] if hash.key? 'zip'
end

#to_hHash

Returns:

  • (Hash)


23
24
25
26
27
28
29
30
31
# File 'lib/ingenico/direct/sdk/domain/loan_recipient.rb', line 23

def to_h
  hash = super
  hash['accountNumber'] = @account_number unless @account_number.nil?
  hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil?
  hash['partialPan'] = @partial_pan unless @partial_pan.nil?
  hash['surname'] = @surname unless @surname.nil?
  hash['zip'] = @zip unless @zip.nil?
  hash
end