Class: Ingenico::Connect::SDK::Domain::Payment::AdditionalOrderInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#account_funding_recipientIngenico::Connect::SDK::Domain::Payment::AccountFundingRecipient



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def 
  @account_funding_recipient
end

#airline_dataIngenico::Connect::SDK::Domain::Definitions::AirlineData



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def airline_data
  @airline_data
end

#installmentsIngenico::Connect::SDK::Domain::Payment::Installments



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def installments
  @installments
end

#level3_summary_dataObject

Deprecated.

Use Order.shoppingCart.amountBreakdown instead



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def level3_summary_data
  @level3_summary_data
end

#loan_recipientObject

Deprecated.

No replacement



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def loan_recipient
  @loan_recipient
end

#lodging_dataIngenico::Connect::SDK::Domain::Definitions::LodgingData



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def lodging_data
  @lodging_data
end

#number_of_installmentsObject

Deprecated.

Use installments.numberOfInstallments instead



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def number_of_installments
  @number_of_installments
end

#order_dateString



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def order_date
  @order_date
end

#type_informationIngenico::Connect::SDK::Domain::Payment::OrderTypeInformation



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 28

def type_information
  @type_information
end

Instance Method Details

#from_hash(hash) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 69

def from_hash(hash)
  super
  if hash.has_key? 'accountFundingRecipient'
    raise TypeError, "value '%s' is not a Hash" % [hash['accountFundingRecipient']] unless hash['accountFundingRecipient'].is_a? Hash
    @account_funding_recipient = Ingenico::Connect::SDK::Domain::Payment::AccountFundingRecipient.new_from_hash(hash['accountFundingRecipient'])
  end
  if hash.has_key? 'airlineData'
    raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']] unless hash['airlineData'].is_a? Hash
    @airline_data = Ingenico::Connect::SDK::Domain::Definitions::AirlineData.new_from_hash(hash['airlineData'])
  end
  if hash.has_key? 'installments'
    raise TypeError, "value '%s' is not a Hash" % [hash['installments']] unless hash['installments'].is_a? Hash
    @installments = Ingenico::Connect::SDK::Domain::Payment::Installments.new_from_hash(hash['installments'])
  end
  if hash.has_key? 'level3SummaryData'
    raise TypeError, "value '%s' is not a Hash" % [hash['level3SummaryData']] unless hash['level3SummaryData'].is_a? Hash
    @level3_summary_data = Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData.new_from_hash(hash['level3SummaryData'])
  end
  if hash.has_key? 'loanRecipient'
    raise TypeError, "value '%s' is not a Hash" % [hash['loanRecipient']] unless hash['loanRecipient'].is_a? Hash
    @loan_recipient = Ingenico::Connect::SDK::Domain::Payment::LoanRecipient.new_from_hash(hash['loanRecipient'])
  end
  if hash.has_key? 'lodgingData'
    raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash
    @lodging_data = Ingenico::Connect::SDK::Domain::Definitions::LodgingData.new_from_hash(hash['lodgingData'])
  end
  if hash.has_key? 'numberOfInstallments'
    @number_of_installments = hash['numberOfInstallments']
  end
  if hash.has_key? 'orderDate'
    @order_date = hash['orderDate']
  end
  if hash.has_key? 'typeInformation'
    raise TypeError, "value '%s' is not a Hash" % [hash['typeInformation']] unless hash['typeInformation'].is_a? Hash
    @type_information = Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation.new_from_hash(hash['typeInformation'])
  end
end

#to_hHash



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 55

def to_h
  hash = super
  hash['accountFundingRecipient'] = @account_funding_recipient.to_h unless @account_funding_recipient.nil?
  hash['airlineData'] = @airline_data.to_h unless @airline_data.nil?
  hash['installments'] = @installments.to_h unless @installments.nil?
  hash['level3SummaryData'] = @level3_summary_data.to_h unless @level3_summary_data.nil?
  hash['loanRecipient'] = @loan_recipient.to_h unless @loan_recipient.nil?
  hash['lodgingData'] = @lodging_data.to_h unless @lodging_data.nil?
  hash['numberOfInstallments'] = @number_of_installments unless @number_of_installments.nil?
  hash['orderDate'] = @order_date unless @order_date.nil?
  hash['typeInformation'] = @type_information.to_h unless @type_information.nil?
  hash
end