Class: CheckoutSdk::Payments::PaymentContextsClient
- Defined in:
- lib/checkout_sdk/payments/contexts/payment_contexts_client.rb
Constant Summary collapse
- PAYMENT_CONTEXTS =
'payment-contexts'
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary collapse
- #create_payment_contexts(payment_contexts) ⇒ Object
- #get_payment_context_details(payment_context_id) ⇒ Object
-
#initialize(api_client, configuration) ⇒ PaymentContextsClient
constructor
A new instance of PaymentContextsClient.
Constructor Details
#initialize(api_client, configuration) ⇒ PaymentContextsClient
Returns a new instance of PaymentContextsClient.
10 11 12 |
# File 'lib/checkout_sdk/payments/contexts/payment_contexts_client.rb', line 10 def initialize(api_client, configuration) super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH end |
Instance Method Details
#create_payment_contexts(payment_contexts) ⇒ Object
15 16 17 |
# File 'lib/checkout_sdk/payments/contexts/payment_contexts_client.rb', line 15 def create_payment_contexts(payment_contexts) api_client.invoke_post(PAYMENT_CONTEXTS, , payment_contexts) end |
#get_payment_context_details(payment_context_id) ⇒ Object
20 21 22 |
# File 'lib/checkout_sdk/payments/contexts/payment_contexts_client.rb', line 20 def get_payment_context_details(payment_context_id) api_client.invoke_get(build_path(PAYMENT_CONTEXTS, payment_context_id), ) end |