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

#airline_dataObject



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

def airline_data
  @airline_data
end

#level3_summary_dataObject

Level3SummaryData

Deprecated; Use Order.shoppingCart instead



22
23
24
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 22

def level3_summary_data
  @level3_summary_data
end

#number_of_installmentsObject

Integer



25
26
27
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 25

def number_of_installments
  @number_of_installments
end

#order_dateObject

String



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

def order_date
  @order_date
end

#type_informationObject



31
32
33
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 31

def type_information
  @type_information
end

Instance Method Details

#from_hash(hash) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 43

def from_hash(hash)
  super
  if hash.has_key?('airlineData')
    if !(hash['airlineData'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']]
    end
    @airline_data = Ingenico::Connect::SDK::Domain::Definitions::AirlineData.new_from_hash(hash['airlineData'])
  end
  if hash.has_key?('level3SummaryData')
    if !(hash['level3SummaryData'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['level3SummaryData']]
    end
    @level3_summary_data = Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData.new_from_hash(hash['level3SummaryData'])
  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')
    if !(hash['typeInformation'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['typeInformation']]
    end
    @type_information = Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation.new_from_hash(hash['typeInformation'])
  end
end

#to_hObject



33
34
35
36
37
38
39
40
41
# File 'lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb', line 33

def to_h
  hash = super
  add_to_hash(hash, 'airlineData', @airline_data)
  add_to_hash(hash, 'level3SummaryData', @level3_summary_data)
  add_to_hash(hash, 'numberOfInstallments', @number_of_installments)
  add_to_hash(hash, 'orderDate', @order_date)
  add_to_hash(hash, 'typeInformation', @type_information)
  hash
end