Class: CheckoutSdk::Payments::BasePaymentsClient
- Inherits:
-
Client
- Object
- Client
- CheckoutSdk::Payments::BasePaymentsClient
show all
- Defined in:
- lib/checkout_sdk/payments/base_payments_client.rb
Constant Summary
collapse
- PAYMENTS_PATH =
'payments'
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary
collapse
Instance Method Details
#get_payment_actions(payment_id) ⇒ Object
20
21
22
23
|
# File 'lib/checkout_sdk/payments/base_payments_client.rb', line 20
def get_payment_actions(payment_id)
api_client.invoke_get(build_path(PAYMENTS_PATH, payment_id, 'actions'),
sdk_authorization)
end
|
#get_payment_details(payment_id) ⇒ Object
14
15
16
17
|
# File 'lib/checkout_sdk/payments/base_payments_client.rb', line 14
def get_payment_details(payment_id)
api_client.invoke_get(build_path(PAYMENTS_PATH, payment_id),
sdk_authorization)
end
|
#get_payments_list(query_filter) ⇒ Object
9
10
11
|
# File 'lib/checkout_sdk/payments/base_payments_client.rb', line 9
def get_payments_list(query_filter)
api_client.invoke_get(PAYMENTS_PATH, sdk_authorization, query_filter)
end
|
#refund_payment(payment_id, refund_request = nil, idempotency_key = nil) ⇒ Object
28
29
30
31
32
33
|
# File 'lib/checkout_sdk/payments/base_payments_client.rb', line 28
def refund_payment(payment_id, refund_request = nil, idempotency_key = nil)
api_client.invoke_post(build_path(PAYMENTS_PATH, payment_id, 'refunds'),
sdk_authorization,
refund_request,
idempotency_key)
end
|
#reverse_payment(payment_id, reverse_request = nil, idempotency_key = nil) ⇒ Object
48
49
50
51
52
53
|
# File 'lib/checkout_sdk/payments/base_payments_client.rb', line 48
def reverse_payment(payment_id, reverse_request = nil, idempotency_key = nil)
api_client.invoke_post(build_path(PAYMENTS_PATH, payment_id, 'reversals'),
sdk_authorization,
reverse_request,
idempotency_key)
end
|
#void_payment(payment_id, void_request = nil, idempotency_key = nil) ⇒ Object
38
39
40
41
42
43
|
# File 'lib/checkout_sdk/payments/base_payments_client.rb', line 38
def void_payment(payment_id, void_request = nil, idempotency_key = nil)
api_client.invoke_post(build_path(PAYMENTS_PATH, payment_id, 'voids'),
sdk_authorization,
void_request,
idempotency_key)
end
|