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_inputObject



23
24
25
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 23

def bank_transfer_payment_method_specific_input
  @bank_transfer_payment_method_specific_input
end

#card_payment_method_specific_inputObject



26
27
28
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 26

def card_payment_method_specific_input
  @card_payment_method_specific_input
end

#cash_payment_method_specific_inputObject



29
30
31
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 29

def cash_payment_method_specific_input
  @cash_payment_method_specific_input
end

#e_invoice_payment_method_specific_inputObject



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

def e_invoice_payment_method_specific_input
  @e_invoice_payment_method_specific_input
end

#fraud_fieldsObject



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

def fraud_fields
  @fraud_fields
end

#hosted_checkout_specific_inputObject



38
39
40
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 38

def hosted_checkout_specific_input
  @hosted_checkout_specific_input
end

#orderObject



41
42
43
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 41

def order
  @order
end

#redirect_payment_method_specific_inputObject



44
45
46
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 44

def redirect_payment_method_specific_input
  @redirect_payment_method_specific_input
end

#sepa_direct_debit_payment_method_specific_inputObject



47
48
49
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 47

def sepa_direct_debit_payment_method_specific_input
  @sepa_direct_debit_payment_method_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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

#to_hObject



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb', line 49

def to_h
  hash = super
  add_to_hash(hash, 'bankTransferPaymentMethodSpecificInput', @bank_transfer_payment_method_specific_input)
  add_to_hash(hash, 'cardPaymentMethodSpecificInput', @card_payment_method_specific_input)
  add_to_hash(hash, 'cashPaymentMethodSpecificInput', @cash_payment_method_specific_input)
  add_to_hash(hash, 'eInvoicePaymentMethodSpecificInput', @e_invoice_payment_method_specific_input)
  add_to_hash(hash, 'fraudFields', @fraud_fields)
  add_to_hash(hash, 'hostedCheckoutSpecificInput', @hosted_checkout_specific_input)
  add_to_hash(hash, 'order', @order)
  add_to_hash(hash, 'redirectPaymentMethodSpecificInput', @redirect_payment_method_specific_input)
  add_to_hash(hash, 'sepaDirectDebitPaymentMethodSpecificInput', @sepa_direct_debit_payment_method_specific_input)
  hash
end