Class: CheckoutSdk::Payments::PaymentContextsClient

Inherits:
Client
  • Object
show all
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

Constructor Details

#initialize(api_client, configuration) ⇒ PaymentContextsClient

Returns a new instance of PaymentContextsClient.

Parameters:



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

Parameters:

  • payment_contexts (Hash)


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, sdk_authorization, payment_contexts)
end

#get_payment_context_details(payment_context_id) ⇒ Object

Parameters:

  • payment_context_id (String)


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), sdk_authorization)
end