Class: Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840SpecificOutput
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840SpecificOutput
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb
Instance Attribute Summary collapse
-
#customer_account ⇒ Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount
The current value of customer_account.
-
#customer_address ⇒ Ingenico::Connect::SDK::Domain::Definitions::Address
The current value of customer_address.
-
#protection_eligibility ⇒ Ingenico::Connect::SDK::Domain::Payment::ProtectionEligibility
The current value of protection_eligibility.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#customer_account ⇒ Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 17 def customer_account @customer_account end |
#customer_address ⇒ Ingenico::Connect::SDK::Domain::Definitions::Address
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 17 def customer_address @customer_address end |
#protection_eligibility ⇒ Ingenico::Connect::SDK::Domain::Payment::ProtectionEligibility
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 17 def protection_eligibility @protection_eligibility end |
Instance Method Details
#from_hash(hash) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 34 def from_hash(hash) super if hash.has_key? 'customerAccount' raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash @customer_account = Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount']) end if hash.has_key? 'customerAddress' raise TypeError, "value '%s' is not a Hash" % [hash['customerAddress']] unless hash['customerAddress'].is_a? Hash @customer_address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['customerAddress']) end if hash.has_key? 'protectionEligibility' raise TypeError, "value '%s' is not a Hash" % [hash['protectionEligibility']] unless hash['protectionEligibility'].is_a? Hash @protection_eligibility = Ingenico::Connect::SDK::Domain::Payment::ProtectionEligibility.new_from_hash(hash['protectionEligibility']) end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 26 def to_h hash = super hash['customerAccount'] = @customer_account.to_h unless @customer_account.nil? hash['customerAddress'] = @customer_address.to_h unless @customer_address.nil? hash['protectionEligibility'] = @protection_eligibility.to_h unless @protection_eligibility.nil? hash end |