Class: CheckoutSdk::Payments::PaymentSessionsClient
- Defined in:
- lib/checkout_sdk/payments/sessions/payment_sessions_client.rb
Constant Summary collapse
- PAYMENT_SESSIONS =
'payment-sessions'
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary collapse
-
#create_and_complete_payment_sessions(payment_sessions_request) ⇒ Object
Create and immediately submit a payment session.
- #create_payment_sessions(payment_sessions) ⇒ Object
-
#initialize(api_client, configuration) ⇒ PaymentSessionsClient
constructor
A new instance of PaymentSessionsClient.
Constructor Details
#initialize(api_client, configuration) ⇒ PaymentSessionsClient
Returns a new instance of PaymentSessionsClient.
12 13 14 |
# File 'lib/checkout_sdk/payments/sessions/payment_sessions_client.rb', line 12 def initialize(api_client, configuration) super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY) end |
Instance Method Details
#create_and_complete_payment_sessions(payment_sessions_request) ⇒ Object
Create and immediately submit a payment session. POST /payment-sessions/complete.
23 24 25 26 27 28 29 |
# File 'lib/checkout_sdk/payments/sessions/payment_sessions_client.rb', line 23 def create_and_complete_payment_sessions(payment_sessions_request) api_client.invoke_post( build_path(PAYMENT_SESSIONS, COMPLETE), , payment_sessions_request ) end |
#create_payment_sessions(payment_sessions) ⇒ Object
17 18 19 |
# File 'lib/checkout_sdk/payments/sessions/payment_sessions_client.rb', line 17 def create_payment_sessions(payment_sessions) api_client.invoke_post(PAYMENT_SESSIONS, , payment_sessions) end |