Class: Ingenico::Connect::SDK::Domain::Payment::CreatePaymentRequest
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::CreatePaymentRequest
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb
Instance Attribute Summary collapse
- #bank_transfer_payment_method_specific_input ⇒ Object
- #card_payment_method_specific_input ⇒ Object
- #cash_payment_method_specific_input ⇒ Object
- #direct_debit_payment_method_specific_input ⇒ Object
- #e_invoice_payment_method_specific_input ⇒ Object
-
#encrypted_customer_input ⇒ Object
String.
- #fraud_fields ⇒ Object
- #invoice_payment_method_specific_input ⇒ Object
- #mobile_payment_method_specific_input ⇒ Object
- #order ⇒ Object
- #redirect_payment_method_specific_input ⇒ Object
- #sepa_direct_debit_payment_method_specific_input ⇒ Object
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#bank_transfer_payment_method_specific_input ⇒ Object
25 26 27 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 25 def bank_transfer_payment_method_specific_input @bank_transfer_payment_method_specific_input end |
#card_payment_method_specific_input ⇒ Object
28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 28 def card_payment_method_specific_input @card_payment_method_specific_input end |
#cash_payment_method_specific_input ⇒ Object
31 32 33 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 31 def cash_payment_method_specific_input @cash_payment_method_specific_input end |
#direct_debit_payment_method_specific_input ⇒ Object
34 35 36 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 34 def direct_debit_payment_method_specific_input @direct_debit_payment_method_specific_input end |
#e_invoice_payment_method_specific_input ⇒ Object
37 38 39 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 37 def e_invoice_payment_method_specific_input @e_invoice_payment_method_specific_input end |
#encrypted_customer_input ⇒ Object
String
40 41 42 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 40 def encrypted_customer_input @encrypted_customer_input end |
#fraud_fields ⇒ Object
43 44 45 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 43 def fraud_fields @fraud_fields end |
#invoice_payment_method_specific_input ⇒ Object
46 47 48 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 46 def invoice_payment_method_specific_input @invoice_payment_method_specific_input end |
#mobile_payment_method_specific_input ⇒ Object
49 50 51 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 49 def mobile_payment_method_specific_input @mobile_payment_method_specific_input end |
#order ⇒ Object
52 53 54 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 52 def order @order end |
#redirect_payment_method_specific_input ⇒ Object
55 56 57 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 55 def redirect_payment_method_specific_input @redirect_payment_method_specific_input end |
#sepa_direct_debit_payment_method_specific_input ⇒ Object
58 59 60 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 58 def sepa_direct_debit_payment_method_specific_input @sepa_direct_debit_payment_method_specific_input end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 77 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::BankTransferPaymentMethodSpecificInput.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::CardPaymentMethodSpecificInput.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::CashPaymentMethodSpecificInput.new_from_hash(hash['cashPaymentMethodSpecificInput']) end if hash.has_key?('directDebitPaymentMethodSpecificInput') if !(hash['directDebitPaymentMethodSpecificInput'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['directDebitPaymentMethodSpecificInput']] end @direct_debit_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentMethodSpecificInput.new_from_hash(hash['directDebitPaymentMethodSpecificInput']) 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::EInvoicePaymentMethodSpecificInput.new_from_hash(hash['eInvoicePaymentMethodSpecificInput']) end if hash.has_key?('encryptedCustomerInput') @encrypted_customer_input = hash['encryptedCustomerInput'] 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?('invoicePaymentMethodSpecificInput') if !(hash['invoicePaymentMethodSpecificInput'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['invoicePaymentMethodSpecificInput']] end @invoice_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::InvoicePaymentMethodSpecificInput.new_from_hash(hash['invoicePaymentMethodSpecificInput']) end if hash.has_key?('mobilePaymentMethodSpecificInput') if !(hash['mobilePaymentMethodSpecificInput'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']] end @mobile_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput']) 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::RedirectPaymentMethodSpecificInput.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::SepaDirectDebitPaymentMethodSpecificInput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput']) end end |
#to_h ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb', line 60 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, 'directDebitPaymentMethodSpecificInput', @direct_debit_payment_method_specific_input) add_to_hash(hash, 'eInvoicePaymentMethodSpecificInput', @e_invoice_payment_method_specific_input) add_to_hash(hash, 'encryptedCustomerInput', @encrypted_customer_input) add_to_hash(hash, 'fraudFields', @fraud_fields) add_to_hash(hash, 'invoicePaymentMethodSpecificInput', @invoice_payment_method_specific_input) add_to_hash(hash, 'mobilePaymentMethodSpecificInput', @mobile_payment_method_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 |