Class: Infrawrench::BillingCapacityNamespace
- Inherits:
-
Object
- Object
- Infrawrench::BillingCapacityNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.billing.capacity
Instance Method Summary collapse
-
#checkout(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Start a Stripe Checkout session for prepaid capacity slots.
-
#initialize(transport) ⇒ BillingCapacityNamespace
constructor
private
A new instance of BillingCapacityNamespace.
Constructor Details
#initialize(transport) ⇒ BillingCapacityNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of BillingCapacityNamespace.
1016 1017 1018 |
# File 'lib/infrawrench/client.rb', line 1016 def initialize(transport) @transport = transport end |
Instance Method Details
#checkout(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Start a Stripe Checkout session for prepaid capacity slots
A capacity slot is one seat bought outright for a fixed term instead of
rented monthly, and it grants paid-plan access on its own. This is a
one-time payment, so the seats are granted by the
checkout.session.completed webhook once Stripe confirms the payment — a
200 here only means the buyer was sent to a payment page. Rejected with
400 for complimentary organizations, and 503 when the deployment has no
one-time capacity price configured.
POST /api/org/orgId/billing/capacity/checkout
Raises on 400: Bad request
Raises on 500: Server error
Raises on 503: A backing service this endpoint depends on is not available
1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'lib/infrawrench/client.rb', line 1044 def checkout(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/billing/capacity/checkout", path_params: { "orgId" => org_id }, body: body, request_options: ) end |