Class: CheckoutSdk::Previous::Payments::PaymentsClient
- Inherits:
-
CheckoutSdk::Payments::BasePaymentsClient
- Object
- Client
- CheckoutSdk::Payments::BasePaymentsClient
- CheckoutSdk::Previous::Payments::PaymentsClient
- Defined in:
- lib/checkout_sdk/payments/previous/payments_client.rb
Constant Summary
Constants inherited from CheckoutSdk::Payments::BasePaymentsClient
CheckoutSdk::Payments::BasePaymentsClient::PAYMENTS_PATH
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary collapse
- #capture_payment(payment_id, capture_request = nil, idempotency_key = nil) ⇒ Object
-
#initialize(api_client, configuration) ⇒ PaymentsClient
constructor
A new instance of PaymentsClient.
- #request_payment(payment_request, idempotency_key = nil) ⇒ Object
- #request_payout(payout_request, idempotency_key = nil) ⇒ Object
Methods inherited from CheckoutSdk::Payments::BasePaymentsClient
#get_payment_actions, #get_payment_details, #get_payments_list, #refund_payment, #reverse_payment, #void_payment
Constructor Details
#initialize(api_client, configuration) ⇒ PaymentsClient
Returns a new instance of PaymentsClient.
9 10 11 |
# File 'lib/checkout_sdk/payments/previous/payments_client.rb', line 9 def initialize(api_client, configuration) super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH end |
Instance Method Details
#capture_payment(payment_id, capture_request = nil, idempotency_key = nil) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/checkout_sdk/payments/previous/payments_client.rb', line 34 def capture_payment(payment_id, capture_request = nil, idempotency_key = nil) api_client.invoke_post(build_path(PAYMENTS_PATH, payment_id, 'captures'), , capture_request, idempotency_key) end |
#request_payment(payment_request, idempotency_key = nil) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/checkout_sdk/payments/previous/payments_client.rb', line 15 def request_payment(payment_request, idempotency_key = nil) api_client.invoke_post(PAYMENTS_PATH, , payment_request, idempotency_key) end |
#request_payout(payout_request, idempotency_key = nil) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/checkout_sdk/payments/previous/payments_client.rb', line 24 def request_payout(payout_request, idempotency_key = nil) api_client.invoke_post(PAYMENTS_PATH, , payout_request, idempotency_key) end |