Class: Ingenico::Connect::SDK::Domain::Payment::PaymentProduct840SpecificOutput

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#billing_addressIngenico::Connect::SDK::Domain::Definitions::Address



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 18

def billing_address
  @billing_address
end

#customer_accountIngenico::Connect::SDK::Domain::Payment::PaymentProduct840CustomerAccount



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 18

def 
  
end

#customer_addressIngenico::Connect::SDK::Domain::Definitions::Address



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 18

def customer_address
  @customer_address
end

#protection_eligibilityIngenico::Connect::SDK::Domain::Payment::ProtectionEligibility



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/payment_product840_specific_output.rb', line 18

def protection_eligibility
  @protection_eligibility
end

Instance Method Details

#from_hash(hash) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 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
     = 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_hHash



29
30
31
32
33
34
35
36
# 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'] = .to_h unless .nil?
  hash['customerAddress'] = @customer_address.to_h unless @customer_address.nil?
  hash['protectionEligibility'] = @protection_eligibility.to_h unless @protection_eligibility.nil?
  hash
end