Class: Ingenico::Connect::SDK::Domain::Payment::PaymentProduct806SpecificOutput

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/payment_product806_specific_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#billing_addressIngenico::Connect::SDK::Domain::Definitions::Address

Returns the current value of billing_address.

Returns:



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product806_specific_output.rb', line 15

def billing_address
  @billing_address
end

#customer_accountIngenico::Connect::SDK::Domain::Payment::TrustlyBankAccount

Returns the current value of customer_account.

Returns:



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product806_specific_output.rb', line 15

def 
  
end

Instance Method Details

#from_hash(hash) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product806_specific_output.rb', line 29

def from_hash(hash)
  super
  if hash.has_key? 'billingAddress'
    raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash
    @billing_address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['billingAddress'])
  end
  if hash.has_key? 'customerAccount'
    raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash
     = Ingenico::Connect::SDK::Domain::Payment::TrustlyBankAccount.new_from_hash(hash['customerAccount'])
  end
end

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product806_specific_output.rb', line 22

def to_h
  hash = super
  hash['billingAddress'] = @billing_address.to_h unless @billing_address.nil?
  hash['customerAccount'] = .to_h unless .nil?
  hash
end