Class: CheckoutSdk::AgenticCommerce::AgenticCommerceClient
- Defined in:
- lib/checkout_sdk/agentic_commerce/agentic_commerce_client.rb
Overview
Client for the Agentic Commerce Protocol API (Beta). Used by AI agents to create delegated payment tokens scoped to a single purchase.
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary collapse
-
#create_delegated_payment_token(delegated_payment_request, idempotency_key = nil) ⇒ Object
Create a delegated payment token.
-
#initialize(api_client, configuration) ⇒ AgenticCommerceClient
constructor
A new instance of AgenticCommerceClient.
Constructor Details
#initialize(api_client, configuration) ⇒ AgenticCommerceClient
Returns a new instance of AgenticCommerceClient.
14 15 16 |
# File 'lib/checkout_sdk/agentic_commerce/agentic_commerce_client.rb', line 14 def initialize(api_client, configuration) super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY) end |
Instance Method Details
#create_delegated_payment_token(delegated_payment_request, idempotency_key = nil) ⇒ Object
Create a delegated payment token.
21 22 23 24 25 26 27 28 |
# File 'lib/checkout_sdk/agentic_commerce/agentic_commerce_client.rb', line 21 def create_delegated_payment_token(delegated_payment_request, idempotency_key = nil) api_client.invoke_post( build_path(AGENTIC_COMMERCE, DELEGATE_PAYMENT), , delegated_payment_request, idempotency_key ) end |