class Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840SpecificOutput
@attr [Ingenico::Connect::SDK::Domain::Definitions::Address] billing_address
@attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount] customer_account
@attr [Ingenico::Connect::SDK::Domain::Definitions::Address] customer_address
@attr [Ingenico::Connect::SDK::Domain::Payment::ProtectionEligibility] protection_eligibility
Attributes
billing_address[RW]
customer_account[RW]
customer_address[RW]
protection_eligibility[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb, line 38 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 @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()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb, line 29 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