Class: Worldline::Connect::SDK::V1::Domain::PaymentProduct806SpecificOutput
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::PaymentProduct806SpecificOutput
- Defined in:
- lib/worldline/connect/sdk/v1/domain/payment_product806_specific_output.rb
Instance Attribute Summary collapse
-
#billing_address ⇒ Worldline::Connect::SDK::V1::Domain::Address
The current value of billing_address.
-
#customer_account ⇒ Worldline::Connect::SDK::V1::Domain::TrustlyBankAccount
The current value of customer_account.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#billing_address ⇒ Worldline::Connect::SDK::V1::Domain::Address
Returns the current value of billing_address.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product806_specific_output.rb', line 16 def billing_address @billing_address end |
#customer_account ⇒ Worldline::Connect::SDK::V1::Domain::TrustlyBankAccount
Returns the current value of customer_account.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product806_specific_output.rb', line 16 def customer_account @customer_account end |
Instance Method Details
#from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product806_specific_output.rb', line 30 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 = Worldline::Connect::SDK::V1::Domain::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 @customer_account = Worldline::Connect::SDK::V1::Domain::TrustlyBankAccount.new_from_hash(hash['customerAccount']) end end |
#to_h ⇒ Hash
23 24 25 26 27 28 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product806_specific_output.rb', line 23 def to_h hash = super hash['billingAddress'] = @billing_address.to_h unless @billing_address.nil? hash['customerAccount'] = @customer_account.to_h unless @customer_account.nil? hash end |