Class: Ingenico::Connect::SDK::Domain::Hostedcheckout::CreateHostedCheckoutRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#bank_transfer_payment_method_specific_inputIngenico::Connect::SDK::Domain::Payment::BankTransferPaymentMethodSpecificInputBase



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def bank_transfer_payment_method_specific_input
  @bank_transfer_payment_method_specific_input
end

#card_payment_method_specific_inputIngenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificInputBase



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def card_payment_method_specific_input
  @card_payment_method_specific_input
end

#cash_payment_method_specific_inputIngenico::Connect::SDK::Domain::Payment::CashPaymentMethodSpecificInputBase



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def cash_payment_method_specific_input
  @cash_payment_method_specific_input
end

#e_invoice_payment_method_specific_inputIngenico::Connect::SDK::Domain::Payment::EInvoicePaymentMethodSpecificInputBase



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def e_invoice_payment_method_specific_input
  @e_invoice_payment_method_specific_input
end

#fraud_fieldsIngenico::Connect::SDK::Domain::Definitions::FraudFields



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def fraud_fields
  @fraud_fields
end

#hosted_checkout_specific_inputIngenico::Connect::SDK::Domain::Hostedcheckout::HostedCheckoutSpecificInput



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def hosted_checkout_specific_input
  @hosted_checkout_specific_input
end

#merchantIngenico::Connect::SDK::Domain::Payment::Merchant



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def merchant
  @merchant
end

#mobile_payment_method_specific_inputIngenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentMethodSpecificInputHostedCheckout



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def mobile_payment_method_specific_input
  @mobile_payment_method_specific_input
end

#orderIngenico::Connect::SDK::Domain::Payment::Order



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def order
  @order
end

#redirect_payment_method_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificInputBase



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def redirect_payment_method_specific_input
  @redirect_payment_method_specific_input
end

#sepa_direct_debit_payment_method_specific_inputIngenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificInputBase



33
34
35
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 33

def sepa_direct_debit_payment_method_specific_input
  @sepa_direct_debit_payment_method_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 74

def from_hash(hash)
  super
  if hash.has_key? 'bankTransferPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankTransferPaymentMethodSpecificInput']] unless hash['bankTransferPaymentMethodSpecificInput'].is_a? Hash
    @bank_transfer_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::BankTransferPaymentMethodSpecificInputBase.new_from_hash(hash['bankTransferPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'cardPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
    @card_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificInputBase.new_from_hash(hash['cardPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'cashPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['cashPaymentMethodSpecificInput']] unless hash['cashPaymentMethodSpecificInput'].is_a? Hash
    @cash_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::CashPaymentMethodSpecificInputBase.new_from_hash(hash['cashPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'eInvoicePaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['eInvoicePaymentMethodSpecificInput']] unless hash['eInvoicePaymentMethodSpecificInput'].is_a? Hash
    @e_invoice_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::EInvoicePaymentMethodSpecificInputBase.new_from_hash(hash['eInvoicePaymentMethodSpecificInput'])
  end
  if hash.has_key? 'fraudFields'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash
    @fraud_fields = Ingenico::Connect::SDK::Domain::Definitions::FraudFields.new_from_hash(hash['fraudFields'])
  end
  if hash.has_key? 'hostedCheckoutSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificInput']] unless hash['hostedCheckoutSpecificInput'].is_a? Hash
    @hosted_checkout_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::HostedCheckoutSpecificInput.new_from_hash(hash['hostedCheckoutSpecificInput'])
  end
  if hash.has_key? 'merchant'
    raise TypeError, "value '%s' is not a Hash" % [hash['merchant']] unless hash['merchant'].is_a? Hash
    @merchant = Ingenico::Connect::SDK::Domain::Payment::Merchant.new_from_hash(hash['merchant'])
  end
  if hash.has_key? 'mobilePaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']] unless hash['mobilePaymentMethodSpecificInput'].is_a? Hash
    @mobile_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentMethodSpecificInputHostedCheckout.new_from_hash(hash['mobilePaymentMethodSpecificInput'])
  end
  if hash.has_key? 'order'
    raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
    @order = Ingenico::Connect::SDK::Domain::Payment::Order.new_from_hash(hash['order'])
  end
  if hash.has_key? 'redirectPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['redirectPaymentMethodSpecificInput']] unless hash['redirectPaymentMethodSpecificInput'].is_a? Hash
    @redirect_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificInputBase.new_from_hash(hash['redirectPaymentMethodSpecificInput'])
  end
  if hash.has_key? 'sepaDirectDebitPaymentMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebitPaymentMethodSpecificInput']] unless hash['sepaDirectDebitPaymentMethodSpecificInput'].is_a? Hash
    @sepa_direct_debit_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificInputBase.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput'])
  end
end

#to_hHash



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 58

def to_h
  hash = super
  hash['bankTransferPaymentMethodSpecificInput'] = @bank_transfer_payment_method_specific_input.to_h unless @bank_transfer_payment_method_specific_input.nil?
  hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil?
  hash['cashPaymentMethodSpecificInput'] = @cash_payment_method_specific_input.to_h unless @cash_payment_method_specific_input.nil?
  hash['eInvoicePaymentMethodSpecificInput'] = @e_invoice_payment_method_specific_input.to_h unless @e_invoice_payment_method_specific_input.nil?
  hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil?
  hash['hostedCheckoutSpecificInput'] = @hosted_checkout_specific_input.to_h unless @hosted_checkout_specific_input.nil?
  hash['merchant'] = @merchant.to_h unless @merchant.nil?
  hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h unless @mobile_payment_method_specific_input.nil?
  hash['order'] = @order.to_h unless @order.nil?
  hash['redirectPaymentMethodSpecificInput'] = @redirect_payment_method_specific_input.to_h unless @redirect_payment_method_specific_input.nil?
  hash['sepaDirectDebitPaymentMethodSpecificInput'] = @sepa_direct_debit_payment_method_specific_input.to_h unless @sepa_direct_debit_payment_method_specific_input.nil?
  hash
end