Class: OnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput
- Defined in:
- lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb
Instance Attribute Summary collapse
-
#billing_address ⇒ OnlinePayments::SDK::Domain::Address
The current value of billing_address.
-
#customer_account ⇒ OnlinePayments::SDK::Domain::PaymentProduct840CustomerAccount
The current value of customer_account.
-
#customer_address ⇒ OnlinePayments::SDK::Domain::Address
The current value of customer_address.
-
#protection_eligibility ⇒ OnlinePayments::SDK::Domain::ProtectionEligibility
The current value of protection_eligibility.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#billing_address ⇒ OnlinePayments::SDK::Domain::Address
Returns the current value of billing_address.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb', line 16 def billing_address @billing_address end |
#customer_account ⇒ OnlinePayments::SDK::Domain::PaymentProduct840CustomerAccount
Returns the current value of customer_account.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb', line 16 def customer_account @customer_account end |
#customer_address ⇒ OnlinePayments::SDK::Domain::Address
Returns the current value of customer_address.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb', line 16 def customer_address @customer_address end |
#protection_eligibility ⇒ OnlinePayments::SDK::Domain::ProtectionEligibility
Returns the current value of protection_eligibility.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb', line 16 def protection_eligibility @protection_eligibility end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb', line 32 def from_hash(hash) super if hash.key? 'billingAddress' raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash @billing_address = OnlinePayments::SDK::Domain::Address.new_from_hash(hash['billingAddress']) end if hash.key? 'customerAccount' raise TypeError, "value '%s' is not a Hash" % [hash['customerAccount']] unless hash['customerAccount'].is_a? Hash @customer_account = OnlinePayments::SDK::Domain::PaymentProduct840CustomerAccount.new_from_hash(hash['customerAccount']) end if hash.key? 'customerAddress' raise TypeError, "value '%s' is not a Hash" % [hash['customerAddress']] unless hash['customerAddress'].is_a? Hash @customer_address = OnlinePayments::SDK::Domain::Address.new_from_hash(hash['customerAddress']) end if hash.key? 'protectionEligibility' raise TypeError, "value '%s' is not a Hash" % [hash['protectionEligibility']] unless hash['protectionEligibility'].is_a? Hash @protection_eligibility = OnlinePayments::SDK::Domain::ProtectionEligibility.new_from_hash(hash['protectionEligibility']) end end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 30 |
# File 'lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb', line 23 def to_h hash = super hash['billingAddress'] = @billing_address.to_h if @billing_address hash['customerAccount'] = @customer_account.to_h if @customer_account hash['customerAddress'] = @customer_address.to_h if @customer_address hash['protectionEligibility'] = @protection_eligibility.to_h if @protection_eligibility hash end |