Class: Ingenico::Connect::SDK::Domain::Payment::AdditionalOrderInput
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::AdditionalOrderInput
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb
Instance Attribute Summary collapse
-
#airline_data ⇒ Ingenico::Connect::SDK::Domain::Definitions::AirlineData
The current value of airline_data.
-
#level3_summary_data ⇒ Object
deprecated
Deprecated.
Use Order.shoppingCart.amountBreakdown instead
-
#loan_recipient ⇒ Ingenico::Connect::SDK::Domain::Payment::LoanRecipient
The current value of loan_recipient.
-
#number_of_installments ⇒ Integer
The current value of number_of_installments.
-
#order_date ⇒ String
The current value of order_date.
-
#type_information ⇒ Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation
The current value of type_information.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#airline_data ⇒ Ingenico::Connect::SDK::Domain::Definitions::AirlineData
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 21 def airline_data @airline_data end |
#level3_summary_data ⇒ Object
Deprecated.
Use Order.shoppingCart.amountBreakdown instead
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 21 def level3_summary_data @level3_summary_data end |
#loan_recipient ⇒ Ingenico::Connect::SDK::Domain::Payment::LoanRecipient
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 21 def loan_recipient @loan_recipient end |
#number_of_installments ⇒ Integer
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 21 def number_of_installments @number_of_installments end |
#order_date ⇒ String
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 21 def order_date @order_date end |
#type_information ⇒ Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 21 def type_information @type_information end |
Instance Method Details
#from_hash(hash) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 49 def from_hash(hash) super 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? '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? '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_h ⇒ Hash
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 38 def to_h hash = super hash['airlineData'] = @airline_data.to_h unless @airline_data.nil? hash['level3SummaryData'] = @level3_summary_data.to_h unless @level3_summary_data.nil? hash['loanRecipient'] = @loan_recipient.to_h unless @loan_recipient.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 |