Class: K2ConnectRuby::K2Entity::K2FinancialEntities::PaymentLinks::PaymentLinkRequest
- Inherits:
-
Object
- Object
- K2ConnectRuby::K2Entity::K2FinancialEntities::PaymentLinks::PaymentLinkRequest
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb
Overview
Request to create a payment link
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#callback_url ⇒ Object
Returns the value of attribute callback_url.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#note ⇒ Object
Returns the value of attribute note.
-
#payment_reference ⇒ Object
Returns the value of attribute payment_reference.
-
#till_number ⇒ Object
Returns the value of attribute till_number.
Instance Method Summary collapse
- #endpoint ⇒ Object
-
#initialize(kwargs) ⇒ PaymentLinkRequest
constructor
A new instance of PaymentLinkRequest.
- #request_body ⇒ Object
Constructor Details
#initialize(kwargs) ⇒ PaymentLinkRequest
Returns a new instance of PaymentLinkRequest.
16 17 18 19 20 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 16 def initialize(kwargs) kwargs.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def amount @amount end |
#callback_url ⇒ Object
Returns the value of attribute callback_url.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def callback_url @callback_url end |
#currency ⇒ Object
Returns the value of attribute currency.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def currency @currency end |
#metadata ⇒ Object
Returns the value of attribute metadata.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def @metadata end |
#note ⇒ Object
Returns the value of attribute note.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def note @note end |
#payment_reference ⇒ Object
Returns the value of attribute payment_reference.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def payment_reference @payment_reference end |
#till_number ⇒ Object
Returns the value of attribute till_number.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 11 def till_number @till_number end |
Instance Method Details
#endpoint ⇒ Object
36 37 38 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 36 def endpoint K2ConnectRuby::K2Utilities::Config::K2Config.endpoint("payment_links") end |
#request_body ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/payment_links/payment_link_request.rb', line 22 def request_body { till_number: till_number, currency: currency, amount: amount, payment_reference: payment_reference, note: note, metadata: , _links: { callback_url: callback_url, }, } end |