Class: Ingenico::Connect::SDK::Domain::Payment::AccountFundingRecipient
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::AccountFundingRecipient
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb
Instance Attribute Summary collapse
-
#account_number ⇒ String
The current value of account_number.
-
#account_number_type ⇒ String
The current value of account_number_type.
-
#address ⇒ Ingenico::Connect::SDK::Domain::Definitions::Address
The current value of address.
-
#date_of_birth ⇒ String
The current value of date_of_birth.
-
#name ⇒ Ingenico::Connect::SDK::Domain::Payment::AfrName
The current value of name.
-
#partial_pan ⇒ String
The current value of partial_pan.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#account_number ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 20 def account_number @account_number end |
#account_number_type ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 20 def account_number_type @account_number_type end |
#address ⇒ Ingenico::Connect::SDK::Domain::Definitions::Address
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 20 def address @address end |
#date_of_birth ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 20 def date_of_birth @date_of_birth end |
#name ⇒ Ingenico::Connect::SDK::Domain::Payment::AfrName
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 20 def name @name end |
#partial_pan ⇒ String
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 20 def partial_pan @partial_pan end |
Instance Method Details
#from_hash(hash) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 46 def from_hash(hash) super if hash.has_key? 'accountNumber' @account_number = hash['accountNumber'] end if hash.has_key? 'accountNumberType' @account_number_type = hash['accountNumberType'] end if hash.has_key? 'address' raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash @address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['address']) end if hash.has_key? 'dateOfBirth' @date_of_birth = hash['dateOfBirth'] end if hash.has_key? 'name' raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash @name = Ingenico::Connect::SDK::Domain::Payment::AfrName.new_from_hash(hash['name']) end if hash.has_key? 'partialPan' @partial_pan = hash['partialPan'] end end |
#to_h ⇒ Hash
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ingenico/connect/sdk/domain/payment/account_funding_recipient.rb', line 35 def to_h hash = super hash['accountNumber'] = @account_number unless @account_number.nil? hash['accountNumberType'] = @account_number_type unless @account_number_type.nil? hash['address'] = @address.to_h unless @address.nil? hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil? hash['name'] = @name.to_h unless @name.nil? hash['partialPan'] = @partial_pan unless @partial_pan.nil? hash end |