Class: OnlinePayments::SDK::Domain::CreatePaymentLinkRequest
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::CreatePaymentLinkRequest
- Defined in:
- lib/onlinepayments/sdk/domain/create_payment_link_request.rb
Instance Attribute Summary collapse
-
#description ⇒ String
The current value of description.
-
#expiration_date ⇒ String
The current value of expiration_date.
-
#payment_link_order ⇒ OnlinePayments::SDK::Domain::PaymentLinkOrder
The current value of payment_link_order.
-
#recipient_name ⇒ String
The current value of recipient_name.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#description ⇒ String
Returns the current value of description.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 14 def description @description end |
#expiration_date ⇒ String
Returns the current value of expiration_date.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 14 def expiration_date @expiration_date end |
#payment_link_order ⇒ OnlinePayments::SDK::Domain::PaymentLinkOrder
Returns the current value of payment_link_order.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 14 def payment_link_order @payment_link_order end |
#recipient_name ⇒ String
Returns the current value of recipient_name.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 14 def recipient_name @recipient_name end |
Instance Method Details
#from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 30 def from_hash(hash) super @description = hash['description'] if hash.key? 'description' @expiration_date = hash['expirationDate'] if hash.key? 'expirationDate' if hash.key? 'paymentLinkOrder' raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkOrder']] unless hash['paymentLinkOrder'].is_a? Hash @payment_link_order = OnlinePayments::SDK::Domain::PaymentLinkOrder.new_from_hash(hash['paymentLinkOrder']) end @recipient_name = hash['recipientName'] if hash.key? 'recipientName' end |
#to_h ⇒ Hash
21 22 23 24 25 26 27 28 |
# File 'lib/onlinepayments/sdk/domain/create_payment_link_request.rb', line 21 def to_h hash = super hash['description'] = @description unless @description.nil? hash['expirationDate'] = @expiration_date unless @expiration_date.nil? hash['paymentLinkOrder'] = @payment_link_order.to_h if @payment_link_order hash['recipientName'] = @recipient_name unless @recipient_name.nil? hash end |