Class: Worldline::Connect::SDK::V1::Domain::AdditionalOrderInput

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/additional_order_input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#account_funding_recipientWorldline::Connect::SDK::V1::Domain::AccountFundingRecipient

Returns the current value of account_funding_recipient.

Returns:



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

def 
  @account_funding_recipient
end

#airline_dataWorldline::Connect::SDK::V1::Domain::AirlineData

Returns the current value of airline_data.

Returns:



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

def airline_data
  @airline_data
end

#installmentsWorldline::Connect::SDK::V1::Domain::Installments

Returns the current value of installments.

Returns:



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

def installments
  @installments
end

#level3_summary_dataObject

Deprecated.

Use Order.shoppingCart.amountBreakdown instead



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

def level3_summary_data
  @level3_summary_data
end

#loan_recipientObject

Deprecated.

No replacement



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

def loan_recipient
  @loan_recipient
end

#lodging_dataWorldline::Connect::SDK::V1::Domain::LodgingData

Returns the current value of lodging_data.

Returns:



28
29
30
# File 'lib/worldline/connect/sdk/v1/domain/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/worldline/connect/sdk/v1/domain/additional_order_input.rb', line 28

def number_of_installments
  @number_of_installments
end

#order_dateString

Returns the current value of order_date.

Returns:

  • (String)

    the current value of order_date



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

def order_date
  @order_date
end

#type_informationWorldline::Connect::SDK::V1::Domain::OrderTypeInformation

Returns the current value of type_information.

Returns:



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

def type_information
  @type_information
end

Instance Method Details

#from_hash(hash) ⇒ Object



66
67
68
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
# File 'lib/worldline/connect/sdk/v1/domain/additional_order_input.rb', line 66

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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::OrderTypeInformation.new_from_hash(hash['typeInformation'])
  end
end

#to_hHash

Returns:

  • (Hash)


52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/worldline/connect/sdk/v1/domain/additional_order_input.rb', line 52

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