Class: OnlinePayments::SDK::Domain::CreatePaymentRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CreatePaymentRequest
- Defined in:
- lib/onlinepayments/sdk/domain/create_payment_request.rb
Instance Attribute Summary collapse
-
#card_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInput
The current value of card_payment_method_specific_input.
-
#encrypted_customer_input ⇒ String
The current value of encrypted_customer_input.
-
#feedbacks ⇒ OnlinePayments::SDK::Domain::Feedbacks
The current value of feedbacks.
-
#fraud_fields ⇒ OnlinePayments::SDK::Domain::FraudFields
The current value of fraud_fields.
-
#hosted_fields_session_id ⇒ String
The current value of hosted_fields_session_id.
-
#hosted_tokenization_id ⇒ String
The current value of hosted_tokenization_id.
-
#mobile_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput
The current value of mobile_payment_method_specific_input.
-
#omnichannel_payment_specific_input ⇒ OnlinePayments::SDK::Domain::OmnichannelPaymentSpecificInput
The current value of omnichannel_payment_specific_input.
-
#order ⇒ OnlinePayments::SDK::Domain::Order
The current value of order.
-
#redirect_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput
The current value of redirect_payment_method_specific_input.
-
#sepa_direct_debit_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput
The current value of sepa_direct_debit_payment_method_specific_input.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#card_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInput
Returns the current value of card_payment_method_specific_input.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def card_payment_method_specific_input @card_payment_method_specific_input end |
#encrypted_customer_input ⇒ String
Returns the current value of encrypted_customer_input.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def encrypted_customer_input @encrypted_customer_input end |
#feedbacks ⇒ OnlinePayments::SDK::Domain::Feedbacks
Returns the current value of feedbacks.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def feedbacks @feedbacks end |
#fraud_fields ⇒ OnlinePayments::SDK::Domain::FraudFields
Returns the current value of fraud_fields.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def fraud_fields @fraud_fields end |
#hosted_fields_session_id ⇒ String
Returns the current value of hosted_fields_session_id.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def hosted_fields_session_id @hosted_fields_session_id end |
#hosted_tokenization_id ⇒ String
Returns the current value of hosted_tokenization_id.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def hosted_tokenization_id @hosted_tokenization_id end |
#mobile_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput
Returns the current value of mobile_payment_method_specific_input.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def mobile_payment_method_specific_input @mobile_payment_method_specific_input end |
#omnichannel_payment_specific_input ⇒ OnlinePayments::SDK::Domain::OmnichannelPaymentSpecificInput
Returns the current value of omnichannel_payment_specific_input.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def omnichannel_payment_specific_input @omnichannel_payment_specific_input end |
#order ⇒ OnlinePayments::SDK::Domain::Order
Returns the current value of order.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def order @order end |
#redirect_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput
Returns the current value of redirect_payment_method_specific_input.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def redirect_payment_method_specific_input @redirect_payment_method_specific_input end |
#sepa_direct_debit_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput
Returns the current value of sepa_direct_debit_payment_method_specific_input.
28 29 30 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 28 def sepa_direct_debit_payment_method_specific_input @sepa_direct_debit_payment_method_specific_input end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 69 def from_hash(hash) super 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 = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInput.new_from_hash(hash['cardPaymentMethodSpecificInput']) end if hash.has_key? 'encryptedCustomerInput' @encrypted_customer_input = hash['encryptedCustomerInput'] end if hash.has_key? 'feedbacks' raise TypeError, "value '%s' is not a Hash" % [hash['feedbacks']] unless hash['feedbacks'].is_a? Hash @feedbacks = OnlinePayments::SDK::Domain::Feedbacks.new_from_hash(hash['feedbacks']) end if hash.has_key? 'fraudFields' raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash @fraud_fields = OnlinePayments::SDK::Domain::FraudFields.new_from_hash(hash['fraudFields']) end if hash.has_key? 'hostedFieldsSessionId' @hosted_fields_session_id = hash['hostedFieldsSessionId'] end if hash.has_key? 'hostedTokenizationId' @hosted_tokenization_id = hash['hostedTokenizationId'] 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 = OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput']) end if hash.has_key? 'omnichannelPaymentSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelPaymentSpecificInput']] unless hash['omnichannelPaymentSpecificInput'].is_a? Hash @omnichannel_payment_specific_input = OnlinePayments::SDK::Domain::OmnichannelPaymentSpecificInput.new_from_hash(hash['omnichannelPaymentSpecificInput']) end if hash.has_key? 'order' raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash @order = OnlinePayments::SDK::Domain::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 = OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput.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 = OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput']) end end |
#to_h ⇒ Hash
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/onlinepayments/sdk/domain/create_payment_request.rb', line 53 def to_h hash = super hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil? hash['encryptedCustomerInput'] = @encrypted_customer_input unless @encrypted_customer_input.nil? hash['feedbacks'] = @feedbacks.to_h unless @feedbacks.nil? hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil? hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil? hash['hostedTokenizationId'] = @hosted_tokenization_id unless @hosted_tokenization_id.nil? hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h unless @mobile_payment_method_specific_input.nil? hash['omnichannelPaymentSpecificInput'] = @omnichannel_payment_specific_input.to_h unless @omnichannel_payment_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 |