Class: Worldline::Connect::SDK::V1::Domain::PaymentProduct840SpecificOutput
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::PaymentProduct840SpecificOutput
- Defined in:
- lib/worldline/connect/sdk/v1/domain/payment_product840_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::PaymentProduct840CustomerAccount
The current value of customer_account.
-
#customer_address ⇒ Worldline::Connect::SDK::V1::Domain::Address
The current value of customer_address.
-
#protection_eligibility ⇒ Worldline::Connect::SDK::V1::Domain::ProtectionEligibility
The current value of protection_eligibility.
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.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product840_specific_output.rb', line 19 def billing_address @billing_address end |
#customer_account ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProduct840CustomerAccount
Returns the current value of customer_account.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product840_specific_output.rb', line 19 def customer_account @customer_account end |
#customer_address ⇒ Worldline::Connect::SDK::V1::Domain::Address
Returns the current value of customer_address.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product840_specific_output.rb', line 19 def customer_address @customer_address end |
#protection_eligibility ⇒ Worldline::Connect::SDK::V1::Domain::ProtectionEligibility
Returns the current value of protection_eligibility.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product840_specific_output.rb', line 19 def protection_eligibility @protection_eligibility end |
Instance Method Details
#from_hash(hash) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product840_specific_output.rb', line 39 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::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::ProtectionEligibility.new_from_hash(hash['protectionEligibility']) end end |
#to_h ⇒ Hash
30 31 32 33 34 35 36 37 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product840_specific_output.rb', line 30 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['customerAddress'] = @customer_address.to_h unless @customer_address.nil? hash['protectionEligibility'] = @protection_eligibility.to_h unless @protection_eligibility.nil? hash end |