Class: OnlinePayments::SDK::Domain::CreatePaymentLinkRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CreatePaymentLinkRequest
- Defined in:
- lib/onlinepayments/sdk/domain/create_payment_link_request.rb
Instance Attribute Summary collapse
-
#card_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputBase
The current value of card_payment_method_specific_input.
-
#description ⇒ Object
deprecated
Deprecated.
A note related to the created payment link. Use paymentLinkSpecificInput/description instead.
-
#expiration_date ⇒ Object
deprecated
Deprecated.
The date after which the payment link will not be usable to complete the payment. The date sent cannot be more than 6 months in the future or a past date. It must also contain the UTC offset. Use paymentLinkSpecificInput/expirationDate instead.
-
#feedbacks ⇒ OnlinePayments::SDK::Domain::Feedbacks
The current value of feedbacks.
-
#fraud_fields ⇒ OnlinePayments::SDK::Domain::FraudFields
The current value of fraud_fields.
-
#hosted_checkout_specific_input ⇒ OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput
The current value of hosted_checkout_specific_input.
-
#is_reusable_link ⇒ true/false
The current value of is_reusable_link.
-
#mobile_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput
The current value of mobile_payment_method_specific_input.
-
#order ⇒ OnlinePayments::SDK::Domain::Order
The current value of order.
-
#payment_link_order ⇒ OnlinePayments::SDK::Domain::PaymentLinkOrderInput
The current value of payment_link_order.
-
#payment_link_specific_input ⇒ OnlinePayments::SDK::Domain::PaymentLinkSpecificInput
The current value of payment_link_specific_input.
-
#recipient_name ⇒ Object
deprecated
Deprecated.
The payment link recipient name. Use paymentLinkSpecificInput/recipientName instead.
-
#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::SepaDirectDebitPaymentMethodSpecificInputBase
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::CardPaymentMethodSpecificInputBase
Returns the current value of card_payment_method_specific_input.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def card_payment_method_specific_input @card_payment_method_specific_input end |
#description ⇒ Object
A note related to the created payment link. Use paymentLinkSpecificInput/description instead.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def description @description end |
#expiration_date ⇒ Object
The date after which the payment link will not be usable to complete the payment. The date sent cannot be more than 6 months in the future or a past date. It must also contain the UTC offset. Use paymentLinkSpecificInput/expirationDate instead.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def expiration_date @expiration_date end |
#feedbacks ⇒ OnlinePayments::SDK::Domain::Feedbacks
Returns the current value of feedbacks.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def feedbacks @feedbacks end |
#fraud_fields ⇒ OnlinePayments::SDK::Domain::FraudFields
Returns the current value of fraud_fields.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def fraud_fields @fraud_fields end |
#hosted_checkout_specific_input ⇒ OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput
Returns the current value of hosted_checkout_specific_input.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def hosted_checkout_specific_input @hosted_checkout_specific_input end |
#is_reusable_link ⇒ true/false
Returns the current value of is_reusable_link.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def is_reusable_link @is_reusable_link end |
#mobile_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput
Returns the current value of mobile_payment_method_specific_input.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def mobile_payment_method_specific_input @mobile_payment_method_specific_input end |
#order ⇒ OnlinePayments::SDK::Domain::Order
Returns the current value of order.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def order @order end |
#payment_link_order ⇒ OnlinePayments::SDK::Domain::PaymentLinkOrderInput
Returns the current value of payment_link_order.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def payment_link_order @payment_link_order end |
#payment_link_specific_input ⇒ OnlinePayments::SDK::Domain::PaymentLinkSpecificInput
Returns the current value of payment_link_specific_input.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def payment_link_specific_input @payment_link_specific_input end |
#recipient_name ⇒ Object
The payment link recipient name. Use paymentLinkSpecificInput/recipientName instead.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def recipient_name @recipient_name end |
#redirect_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput
Returns the current value of redirect_payment_method_specific_input.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def redirect_payment_method_specific_input @redirect_payment_method_specific_input end |
#sepa_direct_debit_payment_method_specific_input ⇒ OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInputBase
Returns the current value of sepa_direct_debit_payment_method_specific_input.
35 36 37 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 35 def sepa_direct_debit_payment_method_specific_input @sepa_direct_debit_payment_method_specific_input end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 88 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::CardPaymentMethodSpecificInputBase.new_from_hash(hash['cardPaymentMethodSpecificInput']) end if hash.has_key? 'description' @description = hash['description'] end if hash.has_key? 'expirationDate' @expiration_date = DateTime.parse(hash['expirationDate']) 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? 'hostedCheckoutSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificInput']] unless hash['hostedCheckoutSpecificInput'].is_a? Hash @hosted_checkout_specific_input = OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput.new_from_hash(hash['hostedCheckoutSpecificInput']) end if hash.has_key? 'isReusableLink' @is_reusable_link = hash['isReusableLink'] 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::MobilePaymentMethodHostedCheckoutSpecificInput.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 = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order']) end if hash.has_key? 'paymentLinkOrder' raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkOrder']] unless hash['paymentLinkOrder'].is_a? Hash @payment_link_order = OnlinePayments::SDK::Domain::PaymentLinkOrderInput.new_from_hash(hash['paymentLinkOrder']) end if hash.has_key? 'paymentLinkSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkSpecificInput']] unless hash['paymentLinkSpecificInput'].is_a? Hash @payment_link_specific_input = OnlinePayments::SDK::Domain::PaymentLinkSpecificInput.new_from_hash(hash['paymentLinkSpecificInput']) end if hash.has_key? 'recipientName' @recipient_name = hash['recipientName'] 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::SepaDirectDebitPaymentMethodSpecificInputBase.new_from_hash(hash['sepaDirectDebitPaymentMethodSpecificInput']) end end |
#to_h ⇒ Hash
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 69 def to_h hash = super hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h unless @card_payment_method_specific_input.nil? hash['description'] = @description unless @description.nil? hash['expirationDate'] = @expiration_date.iso8601(3) unless @expiration_date.nil? hash['feedbacks'] = @feedbacks.to_h unless @feedbacks.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['isReusableLink'] = @is_reusable_link unless @is_reusable_link.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['paymentLinkOrder'] = @payment_link_order.to_h unless @payment_link_order.nil? hash['paymentLinkSpecificInput'] = @payment_link_specific_input.to_h unless @payment_link_specific_input.nil? hash['recipientName'] = @recipient_name unless @recipient_name.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 |