Class: Zazu::Resources::CheckoutSessions
- Defined in:
- lib/zazu/resources/checkout_sessions.rb
Overview
One-off hosted checkout sessions. Pre-API there’s no list, update, or delete — sessions are created and inspected by id. State (‘open`, `processing`, `complete`, `expired`) transitions are read-only from the SDK’s perspective.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(**attributes) ⇒ Object
POST /api/checkout_sessions.
-
#get(id) ⇒ Object
GET /api/checkout_sessions/:id.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Zazu::Resources::Base
Instance Method Details
#create(**attributes) ⇒ Object
POST /api/checkout_sessions
20 21 22 |
# File 'lib/zazu/resources/checkout_sessions.rb', line 20 def create(**attributes) http_post("api/checkout_sessions", body: attributes) end |
#get(id) ⇒ Object
GET /api/checkout_sessions/:id
11 12 13 |
# File 'lib/zazu/resources/checkout_sessions.rb', line 11 def get(id) http_get(encode_path("api/checkout_sessions", id)) end |