Class: CheckoutSdk::Payments::PaymentsLinksClient
- Defined in:
- lib/checkout_sdk/payments/links/payments_links_client.rb
Constant Summary collapse
- PAYMENT_LINKS =
'payment-links'
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary collapse
- #create_payment_link(payment_link) ⇒ Object
- #get_payment_link(payment_link_id) ⇒ Object
-
#initialize(api_client, configuration) ⇒ PaymentsLinksClient
constructor
A new instance of PaymentsLinksClient.
Constructor Details
#initialize(api_client, configuration) ⇒ PaymentsLinksClient
Returns a new instance of PaymentsLinksClient.
10 11 12 |
# File 'lib/checkout_sdk/payments/links/payments_links_client.rb', line 10 def initialize(api_client, configuration) super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY end |
Instance Method Details
#create_payment_link(payment_link) ⇒ Object
15 16 17 |
# File 'lib/checkout_sdk/payments/links/payments_links_client.rb', line 15 def create_payment_link(payment_link) api_client.invoke_post(PAYMENT_LINKS, , payment_link) end |
#get_payment_link(payment_link_id) ⇒ Object
20 21 22 |
# File 'lib/checkout_sdk/payments/links/payments_links_client.rb', line 20 def get_payment_link(payment_link_id) api_client.invoke_get(build_path(PAYMENT_LINKS, payment_link_id), ) end |