@leaflow/sdk 0.101.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/account/v1/index.d.ts +8 -4
- package/dist/billing/account/v1/schema.d.ts +342 -78
- package/dist/billing/catalog/v1/schema.d.ts +13 -5
- package/dist/billing/project/v1/schema.d.ts +190 -77
- package/dist/compute/v1/schema.d.ts +1 -1
- package/dist/routes.d.ts +10 -2
- package/dist/routes.js +11 -2
- package/package.json +1 -1
|
@@ -59,10 +59,10 @@ export type CreatePaymentMethodSetupResult = operations["create-payment-method-s
|
|
|
59
59
|
export type CreatePaymentMethodSetupBody = NonNullable<operations["create-payment-method-setup"]["requestBody"]>["content"]["application/json"];
|
|
60
60
|
/** The success response body of `PUT /account/v1/payment-methods/{paymentMethodId}/default`. */
|
|
61
61
|
export type SetDefaultPaymentMethodResult = operations["set-default-payment-method"]["responses"][200]["content"]["application/json"];
|
|
62
|
-
/** The success response body of `POST /account/v1/invoices/{invoiceId}/
|
|
63
|
-
export type
|
|
64
|
-
/** The request body of `POST /account/v1/invoices/{invoiceId}/
|
|
65
|
-
export type
|
|
62
|
+
/** The success response body of `POST /account/v1/invoices/{invoiceId}/collect-payment`. */
|
|
63
|
+
export type CollectInvoicePaymentResult = operations["collect-invoice-payment"]["responses"][200]["content"]["application/json"];
|
|
64
|
+
/** The request body of `POST /account/v1/invoices/{invoiceId}/collect-payment`. */
|
|
65
|
+
export type CollectInvoicePaymentBody = NonNullable<operations["collect-invoice-payment"]["requestBody"]>["content"]["application/json"];
|
|
66
66
|
/** The success response body of `GET /account/v1/invoices/{invoiceId}/payment-preview`. */
|
|
67
67
|
export type PreviewInvoicePaymentResult = operations["preview-invoice-payment"]["responses"][200]["content"]["application/json"];
|
|
68
68
|
/** The query parameters of `GET /account/v1/invoices/{invoiceId}/payment-preview`. */
|
|
@@ -157,6 +157,10 @@ export type ListOrdersResult = operations["list-orders"]["responses"][200]["cont
|
|
|
157
157
|
export type ListOrdersQuery = operations["list-orders"]["parameters"]["query"];
|
|
158
158
|
/** The success response body of `GET /account/v1/orders/{orderId}`. */
|
|
159
159
|
export type GetOrderResult = operations["get-order"]["responses"][200]["content"]["application/json"];
|
|
160
|
+
/** The success response body of `POST /account/v1/orders/{orderId}/checkout`. */
|
|
161
|
+
export type CheckoutOrderResult = operations["checkout-order"]["responses"][200]["content"]["application/json"];
|
|
162
|
+
/** The request body of `POST /account/v1/orders/{orderId}/checkout`. */
|
|
163
|
+
export type CheckoutOrderBody = NonNullable<operations["checkout-order"]["requestBody"]>["content"]["application/json"];
|
|
160
164
|
/** The success response body of `POST /account/v1/orders/{orderId}/cancel`. */
|
|
161
165
|
export type CancelOrderResult = operations["cancel-order"]["responses"][200]["content"]["application/json"];
|
|
162
166
|
/** The success response body of `GET /account/v1/orders/{orderId}/items`. */
|
|
@@ -376,7 +376,7 @@ export interface paths {
|
|
|
376
376
|
patch?: never;
|
|
377
377
|
trace?: never;
|
|
378
378
|
};
|
|
379
|
-
"/account/v1/invoices/{invoiceId}/
|
|
379
|
+
"/account/v1/invoices/{invoiceId}/collect-payment": {
|
|
380
380
|
parameters: {
|
|
381
381
|
query?: never;
|
|
382
382
|
header?: never;
|
|
@@ -388,19 +388,23 @@ export interface paths {
|
|
|
388
388
|
get?: never;
|
|
389
389
|
put?: never;
|
|
390
390
|
/**
|
|
391
|
-
*
|
|
392
|
-
* @description Applies
|
|
393
|
-
*
|
|
391
|
+
* Collect payment for an invoice
|
|
392
|
+
* @description Applies eligible credit grants and available balance as requested, then collects the remainder
|
|
393
|
+
* through the selected payment gateway and method. With no gateway selection, insufficient
|
|
394
|
+
* account funds fail without starting an online payment. Card and non-card methods use this same
|
|
395
|
+
* operation. Promotion codes are confirmed by checkout, before collecting payment.
|
|
394
396
|
*
|
|
395
|
-
* Returns a
|
|
396
|
-
*
|
|
397
|
+
* Returns a payment action when customer interaction is required. requires_action and processing
|
|
398
|
+
* do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved payment
|
|
399
|
+
* attempt is reused, and retries do not apply credit grants or balance twice.
|
|
397
400
|
*
|
|
398
|
-
* Calling this on an invoice that is already paid returns the
|
|
399
|
-
*
|
|
401
|
+
* Calling this on an invoice that is already paid returns the existing payment result without
|
|
402
|
+
* another charge. A draft order invoice must first be confirmed through checkout. It and a void
|
|
403
|
+
* invoice are refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an order that has failed or was
|
|
400
404
|
* canceled, with `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`; and that of an order whose
|
|
401
405
|
* payment deadline has passed, with `BILLING_ORDER_EXPIRED`.
|
|
402
406
|
*/
|
|
403
|
-
post: operations["
|
|
407
|
+
post: operations["collect-invoice-payment"];
|
|
404
408
|
delete?: never;
|
|
405
409
|
options?: never;
|
|
406
410
|
head?: never;
|
|
@@ -453,7 +457,7 @@ export interface paths {
|
|
|
453
457
|
* Either every invoice is paid or none is. When the credit grants and balance cannot cover
|
|
454
458
|
* them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
|
|
455
459
|
* Invoices that are already paid are not charged again. An invoice with an online payment
|
|
456
|
-
* still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
|
|
460
|
+
* still in progress is refused with `BILLING_PAYMENT_PENDING`, a draft order invoice or void invoice with
|
|
457
461
|
* `BILLING_INVOICE_NOT_PAYABLE`, an order that has failed or was canceled with
|
|
458
462
|
* `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
|
|
459
463
|
* passed with `BILLING_ORDER_EXPIRED`.
|
|
@@ -693,23 +697,33 @@ export interface paths {
|
|
|
693
697
|
get?: never;
|
|
694
698
|
put?: never;
|
|
695
699
|
/**
|
|
696
|
-
* Quote renewals or a cancellation
|
|
697
|
-
* @description
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
700
|
+
* Quote order checkout, renewals or a cancellation
|
|
701
|
+
* @description Computes a price preview without creating a resource or saving a quote. Nothing is charged,
|
|
702
|
+
* reserved or applied to an order, and no discount redemption is consumed. The response has no
|
|
703
|
+
* quote ID and does not guarantee a price or reserve a promotion code.
|
|
704
|
+
*
|
|
705
|
+
* With order_id, uses that order's recorded purchase terms and billing account. An optional
|
|
706
|
+
* promotion_code previews one code; without it, Billing selects an applicable account discount.
|
|
707
|
+
* An invalid or inapplicable explicit code is refused rather than silently replaced. Give total
|
|
708
|
+
* as expected_amount when confirming checkout; eligibility and availability are checked again.
|
|
709
|
+
* An order already checked out returns its confirmed amounts, without reapplying its discount;
|
|
710
|
+
* a different code is refused with BILLING_ORDER_CHECKOUT_CONFLICT.
|
|
701
711
|
*
|
|
702
712
|
* A renewal is priced exactly as renewing would charge it: at the agreed amount or the price
|
|
703
|
-
* named, with the discounts the account holds, and with tax.
|
|
713
|
+
* named, with the discounts the account holds, and with tax. A renewal list does not accept a
|
|
714
|
+
* promotion code because its entries create separate orders. To use a new code on a renewal,
|
|
715
|
+
* first create a renewal order and quote its checkout by order_id. Prices and discount eligibility
|
|
716
|
+
* may change between preview and confirmation.
|
|
704
717
|
*
|
|
705
718
|
* A cancellation is quoted as creating it would compute the refund, as of now and under the refund
|
|
706
|
-
* terms agreed when each subscription was bought. It is quoted on its own: combined with
|
|
719
|
+
* terms agreed when each subscription was bought. It is quoted on its own: combined with another target
|
|
707
720
|
* the request is refused with HTTP 400 `BILLING_PURCHASE_INVALID` and `meta.field`
|
|
708
721
|
* `cancellation`. It is refused with the same errors as creating the cancellation, except that the
|
|
709
722
|
* amount is not checked. Give the returned `cancellation.proration_date` and
|
|
710
723
|
* `cancellation.refundable_amount` when creating it.
|
|
711
724
|
*
|
|
712
|
-
*
|
|
725
|
+
* Orders must belong to one of your billing accounts. Every subscription in a renewal or cancellation
|
|
726
|
+
* quote must be paid for by the same one of your billing accounts; otherwise the
|
|
713
727
|
* request is refused with HTTP 400 `BILLING_PURCHASE_INVALID`. Returns 404 when a subscription does
|
|
714
728
|
* not exist, and 403 `BILLING_ACCOUNT_FORBIDDEN` when it is paid for by an account you do not own.
|
|
715
729
|
*/
|
|
@@ -894,11 +908,13 @@ export interface paths {
|
|
|
894
908
|
put?: never;
|
|
895
909
|
/**
|
|
896
910
|
* Create renewal order
|
|
897
|
-
* @description Places a renewal order
|
|
898
|
-
*
|
|
899
|
-
*
|
|
911
|
+
* @description Places a renewal order with a draft invoice, without applying a new discount or charging anything.
|
|
912
|
+
* Quote and confirm its checkout before collecting payment to renew. Existing subscription
|
|
913
|
+
* discount commitments are retained. The periods and price are chosen as for renewing. The order
|
|
914
|
+
* can be paid until the current paid period ends, and never after the end of the first period it renews; unpaid by
|
|
900
915
|
* then, it is canceled. While auto-renew is on, the renewal due at the end of the period pays
|
|
901
|
-
* this order instead of placing another
|
|
916
|
+
* this order instead of placing another, confirming checkout with an applicable account discount
|
|
917
|
+
* first if it has not already been confirmed.
|
|
902
918
|
*
|
|
903
919
|
* Save `order_id` before submitting and read the order after an unknown outcome; creating it a
|
|
904
920
|
* second time conflicts.
|
|
@@ -993,7 +1009,7 @@ export interface paths {
|
|
|
993
1009
|
};
|
|
994
1010
|
/**
|
|
995
1011
|
* List orders
|
|
996
|
-
* @description Lists acceptance status and associated invoice amounts.
|
|
1012
|
+
* @description Lists acceptance status and associated invoice amounts. pending_checkout awaits confirmation; pending has confirmed checkout and may be unpaid or paid. active means accepted, not delivered. pending_checkout and pending orders can expire at expires_at.
|
|
997
1013
|
*/
|
|
998
1014
|
get: operations["list-orders"];
|
|
999
1015
|
put?: never;
|
|
@@ -1023,6 +1039,55 @@ export interface paths {
|
|
|
1023
1039
|
patch?: never;
|
|
1024
1040
|
trace?: never;
|
|
1025
1041
|
};
|
|
1042
|
+
"/account/v1/orders/{orderId}/checkout": {
|
|
1043
|
+
parameters: {
|
|
1044
|
+
query?: never;
|
|
1045
|
+
header?: never;
|
|
1046
|
+
path: {
|
|
1047
|
+
orderId: components["parameters"]["OrderId"];
|
|
1048
|
+
};
|
|
1049
|
+
cookie?: never;
|
|
1050
|
+
};
|
|
1051
|
+
get?: never;
|
|
1052
|
+
put?: never;
|
|
1053
|
+
/**
|
|
1054
|
+
* Confirm order checkout
|
|
1055
|
+
* @description Confirms the purchase's final amount and discount. Supply the same promotion_code used for the
|
|
1056
|
+
* preview, or omit it to select an applicable account discount. At most one new coupon is applied
|
|
1057
|
+
* to an order; existing subscription discount commitments are not stacked with a new coupon on
|
|
1058
|
+
* the same line. Promotion codes are evaluated against the order, not client-supplied line amounts.
|
|
1059
|
+
*
|
|
1060
|
+
* Rechecks eligibility and redemption availability. A different total fails with
|
|
1061
|
+
* BILLING_AMOUNT_CHANGED. An invalid or inapplicable code fails rather than collecting full price.
|
|
1062
|
+
* A failed confirmation leaves the invoice draft and reserves no discount redemption.
|
|
1063
|
+
*
|
|
1064
|
+
* A successful confirmation records the discount, including any recurring discount terms,
|
|
1065
|
+
* reserves its redemption, moves pending_checkout to pending and finalizes the invoice when one
|
|
1066
|
+
* is required. The reservation counts toward the code's limits and is consumed when the invoice
|
|
1067
|
+
* is paid, or at confirmation when nothing is due. Use collect-invoice-payment to collect
|
|
1068
|
+
* its outstanding amount from account funds or a payment gateway. No payment attempt or checkout
|
|
1069
|
+
* session is created by this operation. A purchase with nothing to collect can proceed to Billing
|
|
1070
|
+
* admission without a payment transaction. An absent invoice or zero immediate amount still
|
|
1071
|
+
* requires checkout confirmation; checkout alone does not confirm resource delivery.
|
|
1072
|
+
*
|
|
1073
|
+
* Retrying with the same code and expected amount returns the existing order without another
|
|
1074
|
+
* redemption. Omitting the code on a confirmed checkout retains its recorded discount. Changing
|
|
1075
|
+
* that code is refused with BILLING_ORDER_CHECKOUT_CONFLICT. Payment retries reuse the confirmed
|
|
1076
|
+
* terms. Cancellation, expiry or complete fulfillment failure releases the reservation or returns
|
|
1077
|
+
* the consumed redemption; a refund alone does not.
|
|
1078
|
+
*
|
|
1079
|
+
* The order must belong to one of your billing accounts. A canceled, failed or expired order
|
|
1080
|
+
* cannot be checked out. A period-end change cannot be checked out before its renewal invoice is
|
|
1081
|
+
* available. Orders retain their billing account and currency after a project is linked elsewhere;
|
|
1082
|
+
* discounts from another account cannot be used for them.
|
|
1083
|
+
*/
|
|
1084
|
+
post: operations["checkout-order"];
|
|
1085
|
+
delete?: never;
|
|
1086
|
+
options?: never;
|
|
1087
|
+
head?: never;
|
|
1088
|
+
patch?: never;
|
|
1089
|
+
trace?: never;
|
|
1090
|
+
};
|
|
1026
1091
|
"/account/v1/orders/{orderId}/cancel": {
|
|
1027
1092
|
parameters: {
|
|
1028
1093
|
query?: never;
|
|
@@ -1117,10 +1182,41 @@ export interface components {
|
|
|
1117
1182
|
* @enum {string}
|
|
1118
1183
|
*/
|
|
1119
1184
|
RefundPolicy: "none" | "prorated";
|
|
1120
|
-
/** @description
|
|
1121
|
-
QuoteRequest:
|
|
1122
|
-
|
|
1123
|
-
|
|
1185
|
+
/** @description Quote exactly one target. An existing order, a renewal list and a cancellation are mutually exclusive. */
|
|
1186
|
+
QuoteRequest: components["schemas"]["OrderQuoteRequest"] | components["schemas"]["RenewalQuoteRequest"] | components["schemas"]["CancellationQuoteRequest"];
|
|
1187
|
+
/**
|
|
1188
|
+
* @description Preview checkout of one existing order. Its recorded purchase terms supply every line.
|
|
1189
|
+
* Without a code, an applicable account discount is selected. A preview neither changes the
|
|
1190
|
+
* order nor reserves or consumes a redemption. A confirmed order returns its recorded amounts.
|
|
1191
|
+
*/
|
|
1192
|
+
OrderQuoteRequest: {
|
|
1193
|
+
/** Format: uuid */
|
|
1194
|
+
order_id: string;
|
|
1195
|
+
/** @description Code to evaluate for this order. Must be supplied again when confirming checkout. */
|
|
1196
|
+
promotion_code?: string;
|
|
1197
|
+
};
|
|
1198
|
+
/**
|
|
1199
|
+
* @description Preview renewing subscriptions, each at most once. Each entry represents a separate renewal
|
|
1200
|
+
* order. To preview a new promotion code, create a renewal order and quote it by order_id.
|
|
1201
|
+
*/
|
|
1202
|
+
RenewalQuoteRequest: {
|
|
1203
|
+
renewals: components["schemas"]["QuoteRenewal"][];
|
|
1204
|
+
};
|
|
1205
|
+
/** @description Preview one cancellation without combining it with a purchase, renewal or promotion code. */
|
|
1206
|
+
CancellationQuoteRequest: {
|
|
1207
|
+
cancellation: components["schemas"]["QuoteCancellation"];
|
|
1208
|
+
};
|
|
1209
|
+
CheckoutOrderRequest: {
|
|
1210
|
+
/**
|
|
1211
|
+
* @description The code to apply, evaluated again at confirmation. Omit to select an applicable account
|
|
1212
|
+
* discount. On an already confirmed checkout, omission retains the recorded discount.
|
|
1213
|
+
*/
|
|
1214
|
+
promotion_code?: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* @description Quote.total in the order's currency, after discounts and tax but before applying credit
|
|
1217
|
+
* grants or balance. A different total fails with BILLING_AMOUNT_CHANGED.
|
|
1218
|
+
*/
|
|
1219
|
+
expected_amount: components["schemas"]["Money"];
|
|
1124
1220
|
};
|
|
1125
1221
|
/**
|
|
1126
1222
|
* @description Price renewing a prepaid subscription. Give `price_id`, or `interval` with
|
|
@@ -1178,18 +1274,110 @@ export interface components {
|
|
|
1178
1274
|
*/
|
|
1179
1275
|
total: components["schemas"]["Money"];
|
|
1180
1276
|
};
|
|
1277
|
+
/**
|
|
1278
|
+
* @description A purchase quote line or one recorded order item. Monetary fields use the account currency.
|
|
1279
|
+
* Fixed purchase amounts are rounded as checkout rounds them. Usage estimates are not amounts
|
|
1280
|
+
* collectible at checkout. When priced is false, monetary fields and price_id are absent.
|
|
1281
|
+
*/
|
|
1282
|
+
QuotedLine: {
|
|
1283
|
+
/** @description Tax on the discounted amount, including any tax already contained in that amount. */
|
|
1284
|
+
tax_amount?: components["schemas"]["Money"];
|
|
1285
|
+
/** @description The part of tax_amount already contained in amount minus discount_amount. */
|
|
1286
|
+
tax_included_amount?: components["schemas"]["Money"];
|
|
1287
|
+
/** @description Zero-based request line index, or the recorded order item's position for an order quote. */
|
|
1288
|
+
index: number;
|
|
1289
|
+
/**
|
|
1290
|
+
* Format: uuid
|
|
1291
|
+
* @description Present for an existing order quote; identifies the recorded item being priced.
|
|
1292
|
+
*/
|
|
1293
|
+
order_item_id?: string;
|
|
1294
|
+
/**
|
|
1295
|
+
* @description Whether a price was found for this line. Read this before anything else.
|
|
1296
|
+
*
|
|
1297
|
+
* A single item with no price no longer fails the whole request. A catalogue
|
|
1298
|
+
* almost always has something not yet priced, and refusing the request would
|
|
1299
|
+
* leave no way to render a list in which a few entries are simply not on sale.
|
|
1300
|
+
*
|
|
1301
|
+
* When false, `price_id`, `unit_amount` and `amount` are absent and
|
|
1302
|
+
* `unpriced_reason` states what is missing.
|
|
1303
|
+
*/
|
|
1304
|
+
priced: boolean;
|
|
1305
|
+
/**
|
|
1306
|
+
* @description Why no price was found; `none` while `priced` is true.
|
|
1307
|
+
* @enum {string}
|
|
1308
|
+
*/
|
|
1309
|
+
unpriced_reason?: "none" | "no_price";
|
|
1310
|
+
/**
|
|
1311
|
+
* Format: uuid
|
|
1312
|
+
* @description The price selected. Returned whenever `priced` is true, including when the
|
|
1313
|
+
* request identified the item indirectly, so that the choice can be confirmed.
|
|
1314
|
+
*/
|
|
1315
|
+
price_id?: string;
|
|
1316
|
+
plan_name?: string;
|
|
1317
|
+
/** @description Unit price before discounts, with tax included only where the price includes it. */
|
|
1318
|
+
unit_amount?: components["schemas"]["Money"];
|
|
1319
|
+
/** @description The quantity priced. */
|
|
1320
|
+
quantity?: string;
|
|
1321
|
+
/**
|
|
1322
|
+
* @description Before discounts, including any setup charges. Contains tax only where the price includes it.
|
|
1323
|
+
* Zero for a priced order item with no immediate charge.
|
|
1324
|
+
*/
|
|
1325
|
+
amount?: components["schemas"]["Money"];
|
|
1326
|
+
/** @description Total reduction on this line, including any committed recurring discount. */
|
|
1327
|
+
discount_amount?: components["schemas"]["Money"];
|
|
1328
|
+
/** @description amount minus discount_amount plus tax_amount minus tax_included_amount. */
|
|
1329
|
+
total?: components["schemas"]["Money"];
|
|
1330
|
+
currency: string;
|
|
1331
|
+
};
|
|
1332
|
+
/**
|
|
1333
|
+
* @description A computed price preview, without a saved quote or a price guarantee. No funds or discount
|
|
1334
|
+
* redemptions are reserved. Amounts use currency and exclude payment from credit grants or balance.
|
|
1335
|
+
*/
|
|
1181
1336
|
Quote: {
|
|
1337
|
+
/**
|
|
1338
|
+
* @description Sum before discounts, less tax already included in the discounted line amounts, as on an
|
|
1339
|
+
* invoice. Null when any line cannot be priced. Zero for a cancellation-only quote.
|
|
1340
|
+
*/
|
|
1341
|
+
subtotal: components["schemas"]["Money"] | null;
|
|
1342
|
+
/** @description Total line discounts. Null when any line cannot be priced; zero for a cancellation-only quote. */
|
|
1343
|
+
discount_amount: components["schemas"]["Money"] | null;
|
|
1344
|
+
/** @description Total tax on the discounted amounts. Null when any line cannot be priced; zero for a cancellation-only quote. */
|
|
1345
|
+
tax_amount: components["schemas"]["Money"] | null;
|
|
1346
|
+
/**
|
|
1347
|
+
* @description The one new discount evaluated for a purchase or order, without applying it. Null when
|
|
1348
|
+
* none is selected, pricing is incomplete, or the quote targets a renewal list or cancellation.
|
|
1349
|
+
* A confirmed order instead reports its recorded discount.
|
|
1350
|
+
*/
|
|
1351
|
+
discount: components["schemas"]["QuotedDiscount"] | null;
|
|
1352
|
+
lines?: components["schemas"]["QuotedLine"][];
|
|
1182
1353
|
renewals?: components["schemas"]["QuoteRenewalResult"][];
|
|
1183
1354
|
/** @description What the cancellation requested would return. Present only when one was requested. */
|
|
1184
1355
|
cancellation?: components["schemas"]["CancellationRefundPreview"];
|
|
1185
1356
|
/**
|
|
1186
|
-
* @description
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1357
|
+
* @description subtotal minus discount_amount plus tax_amount, before applying credit grants or balance.
|
|
1358
|
+
* For a purchase or order with no usage estimates, pass this as expected_amount at checkout.
|
|
1359
|
+
* A renewal list sums separate orders; use each renewal's total when confirming that order.
|
|
1360
|
+
* Refunds are not netted off: a cancellation-only quote has zero totals and its refund is in
|
|
1361
|
+
* cancellation. Usage estimates are projections, not checkout amounts.
|
|
1362
|
+
*
|
|
1363
|
+
* Null when any line could not be priced. What would be owed is not knowable then, and a
|
|
1364
|
+
* total that silently left the unpriced lines out would read as a smaller bill rather than
|
|
1365
|
+
* an incomplete one — the per-line `priced` flag is easy to skip, a missing total is not.
|
|
1189
1366
|
*/
|
|
1190
|
-
total: components["schemas"]["Money"];
|
|
1367
|
+
total: components["schemas"]["Money"] | null;
|
|
1191
1368
|
currency: string;
|
|
1192
1369
|
};
|
|
1370
|
+
/**
|
|
1371
|
+
* @description The discount selected for this calculation. Its presence in a quote does not apply it or
|
|
1372
|
+
* reserve a redemption. Discount amounts are reported on the quote and its lines.
|
|
1373
|
+
*/
|
|
1374
|
+
QuotedDiscount: {
|
|
1375
|
+
/** @enum {string} */
|
|
1376
|
+
type: "promotion_code" | "account_discount";
|
|
1377
|
+
name: string;
|
|
1378
|
+
/** @description Code text for a promotion_code discount; null for an account_discount. */
|
|
1379
|
+
promotion_code: string | null;
|
|
1380
|
+
};
|
|
1193
1381
|
/**
|
|
1194
1382
|
* @description A cancellation to quote: what ending these subscriptions together would return. One mode per
|
|
1195
1383
|
* request; to compare, quote `immediate` and `period_end` separately.
|
|
@@ -1418,37 +1606,17 @@ export interface components {
|
|
|
1418
1606
|
/**
|
|
1419
1607
|
* @description Identify a price directly, or select a price for a plan. For each resource give its ID or lookup key, never both. Lookup keys require product_id.
|
|
1420
1608
|
*
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
* `BILLING_PURCHASE_INVALID` when `price_type` is `prepaid` or `one_time`, or when the price
|
|
1424
|
-
* it names is not postpaid; `meta.field` is `price_type`, `price_id` or `price_lookup_key`
|
|
1425
|
-
* accordingly. When the plan has no postpaid price, the line is returned unpriced with
|
|
1426
|
-
* `no_price`.
|
|
1609
|
+
* Charges for future usage are not estimated here; the service that sells the product quotes
|
|
1610
|
+
* them with its purchase.
|
|
1427
1611
|
*/
|
|
1428
1612
|
QuoteLine: {
|
|
1429
1613
|
price_lookup_key?: string;
|
|
1430
1614
|
plan_lookup_key?: string;
|
|
1431
|
-
meter_lookup_key?: string;
|
|
1432
1615
|
/** Format: uuid */
|
|
1433
1616
|
price_id?: string;
|
|
1434
1617
|
product_id?: components["schemas"]["ProductID"];
|
|
1435
1618
|
/** Format: uuid */
|
|
1436
1619
|
plan_id?: string;
|
|
1437
|
-
/** Format: uuid */
|
|
1438
|
-
meter_id?: string;
|
|
1439
|
-
/**
|
|
1440
|
-
* @description The attributes the price depends on — region, instance type, token class.
|
|
1441
|
-
*
|
|
1442
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
1443
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
1444
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
1445
|
-
*
|
|
1446
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
1447
|
-
* covering it is refused rather than priced at zero.
|
|
1448
|
-
*/
|
|
1449
|
-
dimensions?: {
|
|
1450
|
-
[key: string]: string;
|
|
1451
|
-
};
|
|
1452
1620
|
/**
|
|
1453
1621
|
* @description Narrows the selection when a plan offers more than one billing type.
|
|
1454
1622
|
* @enum {string}
|
|
@@ -1458,13 +1626,6 @@ export interface components {
|
|
|
1458
1626
|
interval?: "none" | "day" | "month" | "year";
|
|
1459
1627
|
interval_count?: number;
|
|
1460
1628
|
quantity: string;
|
|
1461
|
-
/**
|
|
1462
|
-
* Format: int64
|
|
1463
|
-
* @description For metered items, how long to price for. This allows an estimate such as "about
|
|
1464
|
-
* this much per month" to be shown before anything exists. The priced quantity is
|
|
1465
|
-
* `quantity` multiplied by this duration.
|
|
1466
|
-
*/
|
|
1467
|
-
duration_seconds?: number;
|
|
1468
1629
|
};
|
|
1469
1630
|
BillingAccount: {
|
|
1470
1631
|
/** Format: int64 */
|
|
@@ -1817,7 +1978,7 @@ export interface components {
|
|
|
1817
1978
|
* An unresolved channel payment is reused; retries do not apply the grant or balance portions twice.
|
|
1818
1979
|
* Without a gateway selection, insufficient account funds fail without starting an online payment.
|
|
1819
1980
|
*/
|
|
1820
|
-
|
|
1981
|
+
CollectInvoicePaymentRequest: {
|
|
1821
1982
|
/** @description Required to collect an online remainder. An existing attempt keeps its original gateway. */
|
|
1822
1983
|
payment_gateway?: string;
|
|
1823
1984
|
/** @description Required with payment_gateway; for example card, wechat_pay or alipay. */
|
|
@@ -1954,7 +2115,11 @@ export interface components {
|
|
|
1954
2115
|
failure_reason?: string;
|
|
1955
2116
|
};
|
|
1956
2117
|
/**
|
|
1957
|
-
* @description
|
|
2118
|
+
* @description An order invoice stays `draft` until checkout confirms its discount and final amounts. It
|
|
2119
|
+
* cannot be collected while draft. Confirmation makes it `open`, or `paid` when its total is zero
|
|
2120
|
+
* without creating a payment transaction. A quote never changes this status.
|
|
2121
|
+
*
|
|
2122
|
+
* A usage invoice stays `draft` through its month: each charge is added to it as it is priced
|
|
1958
2123
|
* and paid from credits and balance as it goes. It is issued at the end of the month, becoming
|
|
1959
2124
|
* `paid` when everything was covered and `open` when something is still owed.
|
|
1960
2125
|
*
|
|
@@ -2316,7 +2481,29 @@ export interface components {
|
|
|
2316
2481
|
items: components["schemas"]["Subscription"][];
|
|
2317
2482
|
pagination: components["schemas"]["OffsetPagination"];
|
|
2318
2483
|
};
|
|
2319
|
-
/**
|
|
2484
|
+
/**
|
|
2485
|
+
* @description An independently billed purchase relationship, separate from the owning service's resource.
|
|
2486
|
+
* Placing a new prepaid or postpaid service order creates a pending subscription for each line
|
|
2487
|
+
* in the same purchase transaction. Its ID is returned on the order item and remains stable
|
|
2488
|
+
* through checkout and delivery. One order may create several subscriptions, such as an instance,
|
|
2489
|
+
* its system disk and its address; it has no single subscription ID.
|
|
2490
|
+
*
|
|
2491
|
+
* Pending does not grant service or accrue usage. Payment confirmation and order acceptance do
|
|
2492
|
+
* not activate a service-owned subscription. It becomes active when the owning service confirms
|
|
2493
|
+
* delivery, with started_at set to the confirmed effective time. Prepaid service periods start
|
|
2494
|
+
* then; postpaid usage starts only when the service reports actual delivery and metering.
|
|
2495
|
+
*
|
|
2496
|
+
* One-time delivery may omit a subscription. Renewals reference and extend existing subscriptions
|
|
2497
|
+
* rather than creating another; changes may create pending replacements. Canceling or failing an
|
|
2498
|
+
* unfulfilled purchase closes its pending subscriptions without starting a service period.
|
|
2499
|
+
* Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their
|
|
2500
|
+
* original value. Technical state belongs to the owning service.
|
|
2501
|
+
*
|
|
2502
|
+
* A purchased shared capacity limit, such as a regional snapshot count quota, can have its own
|
|
2503
|
+
* subscription. Activating that capacity confirms delivery of the quota, not individual snapshots.
|
|
2504
|
+
* Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
|
|
2505
|
+
* the owning service enforces current holdings against the purchased count.
|
|
2506
|
+
*/
|
|
2320
2507
|
Subscription: {
|
|
2321
2508
|
currency: string;
|
|
2322
2509
|
/** @enum {string} */
|
|
@@ -2324,7 +2511,11 @@ export interface components {
|
|
|
2324
2511
|
/** @enum {string} */
|
|
2325
2512
|
interval: "none" | "day" | "month" | "year";
|
|
2326
2513
|
interval_count?: number;
|
|
2327
|
-
/**
|
|
2514
|
+
/**
|
|
2515
|
+
* @description Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
|
|
2516
|
+
* Pending subscriptions show base terms until checkout confirms any new continuing discount.
|
|
2517
|
+
* Absent for other billing types.
|
|
2518
|
+
*/
|
|
2328
2519
|
recurring_amount?: string;
|
|
2329
2520
|
termination_policy?: components["schemas"]["TerminationPolicy"];
|
|
2330
2521
|
refund_policy?: components["schemas"]["RefundPolicy"];
|
|
@@ -2378,13 +2569,21 @@ export interface components {
|
|
|
2378
2569
|
quantity: string;
|
|
2379
2570
|
/**
|
|
2380
2571
|
* Format: date-time
|
|
2381
|
-
* @description
|
|
2572
|
+
* @description End of the prepaid service already activated. Null for a new pending subscription, even
|
|
2573
|
+
* when its purchase has been paid, and for postpaid subscriptions with no prepaid end date.
|
|
2382
2574
|
*/
|
|
2383
2575
|
paid_until?: string | null;
|
|
2384
2576
|
auto_renew: boolean;
|
|
2385
|
-
/**
|
|
2577
|
+
/**
|
|
2578
|
+
* @description pending means the purchase relationship exists but service has not started. For a
|
|
2579
|
+
* service-owned purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
2580
|
+
* @enum {string}
|
|
2581
|
+
*/
|
|
2386
2582
|
status: "pending" | "active" | "suspended" | "canceled" | "terminated";
|
|
2387
|
-
/**
|
|
2583
|
+
/**
|
|
2584
|
+
* Format: date-time
|
|
2585
|
+
* @description Confirmed start of service. Null for a new pending subscription, including after payment.
|
|
2586
|
+
*/
|
|
2388
2587
|
started_at?: string | null;
|
|
2389
2588
|
/** Format: date-time */
|
|
2390
2589
|
ended_at?: string | null;
|
|
@@ -2480,7 +2679,11 @@ export interface components {
|
|
|
2480
2679
|
auto_renew: boolean;
|
|
2481
2680
|
};
|
|
2482
2681
|
/**
|
|
2483
|
-
* @description
|
|
2682
|
+
* @description pending_checkout has recorded purchase terms but no confirmed checkout. An absent invoice
|
|
2683
|
+
* or zero total does not permit acceptance. Confirmation moves it to pending. Both pending_checkout
|
|
2684
|
+
* and pending can expire or be canceled; neither establishes service delivery.
|
|
2685
|
+
*
|
|
2686
|
+
* Follows the items. `pending` has confirmed checkout, is not yet accepted and may be paid or unpaid. `active` is
|
|
2484
2687
|
* accepted with items still being set up. `completed` means every item was set up.
|
|
2485
2688
|
* `partially_completed` means some items were set up and the others failed and were
|
|
2486
2689
|
* refunded to their original payment sources. `failed` means every item failed and the
|
|
@@ -2488,7 +2691,7 @@ export interface components {
|
|
|
2488
2691
|
* nothing was charged.
|
|
2489
2692
|
* @enum {string}
|
|
2490
2693
|
*/
|
|
2491
|
-
OrderStatus: "pending" | "active" | "completed" | "partially_completed" | "failed" | "canceled";
|
|
2694
|
+
OrderStatus: "pending_checkout" | "pending" | "active" | "completed" | "partially_completed" | "failed" | "canceled";
|
|
2492
2695
|
/**
|
|
2493
2696
|
* @description `pending` is waiting to be set up. `completed` was confirmed by the service.
|
|
2494
2697
|
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
@@ -2497,13 +2700,19 @@ export interface components {
|
|
|
2497
2700
|
* @enum {string}
|
|
2498
2701
|
*/
|
|
2499
2702
|
OrderItemStatus: "pending" | "completed" | "failed" | "canceled";
|
|
2703
|
+
/**
|
|
2704
|
+
* @description A recorded purchase. pending_checkout requires explicit Billing confirmation before collection
|
|
2705
|
+
* or acceptance, even without an invoice. Coupon fields describe a discount confirmed at checkout and are absent
|
|
2706
|
+
* before confirmation; a quote never populates them. A draft invoice contains base purchase
|
|
2707
|
+
* amounts awaiting checkout. Payment and acceptance remain separate from resource delivery.
|
|
2708
|
+
*/
|
|
2500
2709
|
Order: {
|
|
2501
2710
|
/** Format: uuid */
|
|
2502
2711
|
coupon_id?: string;
|
|
2503
2712
|
coupon?: components["schemas"]["ObjectIdentity"];
|
|
2504
2713
|
/** Format: uuid */
|
|
2505
2714
|
promotion_code_id?: string;
|
|
2506
|
-
/** @description Code text frozen when
|
|
2715
|
+
/** @description Code text frozen when checkout applied the coupon. Absent for an account discount. */
|
|
2507
2716
|
promotion_code?: string;
|
|
2508
2717
|
invoice?: components["schemas"]["InvoiceSummary"];
|
|
2509
2718
|
/** @description How the order was paid. Absent until it is paid. */
|
|
@@ -2554,7 +2763,7 @@ export interface components {
|
|
|
2554
2763
|
change_effective?: "none" | "immediate" | "period_end";
|
|
2555
2764
|
/**
|
|
2556
2765
|
* Format: date-time
|
|
2557
|
-
* @description Acceptance deadline.
|
|
2766
|
+
* @description Acceptance deadline. pending_checkout and pending orders can expire automatically.
|
|
2558
2767
|
*/
|
|
2559
2768
|
expires_at?: string | null;
|
|
2560
2769
|
/** Format: date-time */
|
|
@@ -2640,8 +2849,8 @@ export interface components {
|
|
|
2640
2849
|
*/
|
|
2641
2850
|
shortfall?: components["schemas"]["Money"];
|
|
2642
2851
|
/**
|
|
2643
|
-
* @description What it would take off this purchase. An estimate: the
|
|
2644
|
-
*
|
|
2852
|
+
* @description What it would take off this purchase. An estimate: the discount is confirmed during
|
|
2853
|
+
* order checkout. Use CreateQuote for the purchase's complete total, including tax.
|
|
2645
2854
|
*/
|
|
2646
2855
|
estimated_discount?: components["schemas"]["Money"];
|
|
2647
2856
|
};
|
|
@@ -2747,13 +2956,22 @@ export interface components {
|
|
|
2747
2956
|
/** @description The longest term a purchase may have, in months. */
|
|
2748
2957
|
max_term_months?: number;
|
|
2749
2958
|
};
|
|
2750
|
-
/**
|
|
2959
|
+
/**
|
|
2960
|
+
* @description Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are absent
|
|
2961
|
+
* when there is no immediate invoice. Later catalog changes do not reprice this line. A new service
|
|
2962
|
+
* purchase creates its pending subscription when this item is recorded, not when payment succeeds.
|
|
2963
|
+
*/
|
|
2751
2964
|
OrderItem: {
|
|
2752
2965
|
position?: number;
|
|
2753
2966
|
configuration?: {
|
|
2754
2967
|
[key: string]: unknown;
|
|
2755
2968
|
};
|
|
2756
|
-
/**
|
|
2969
|
+
/**
|
|
2970
|
+
* Format: uuid
|
|
2971
|
+
* @description Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
|
|
2972
|
+
* pending subscription here; renewals reference the existing subscription and changes the
|
|
2973
|
+
* replacement. Absent for delivery without a subscription. This is not a business resource ID.
|
|
2974
|
+
*/
|
|
2757
2975
|
subscription_id?: string;
|
|
2758
2976
|
/** @enum {string} */
|
|
2759
2977
|
interval: "none" | "day" | "month" | "year";
|
|
@@ -2891,7 +3109,11 @@ export interface components {
|
|
|
2891
3109
|
items: components["schemas"]["Entitlement"][];
|
|
2892
3110
|
pagination: components["schemas"]["OffsetPagination"];
|
|
2893
3111
|
};
|
|
2894
|
-
/**
|
|
3112
|
+
/**
|
|
3113
|
+
* @description Purchase-related invoice amounts, without account contact details or payment methods. A draft
|
|
3114
|
+
* order invoice shows base amounts awaiting checkout, not a confirmed discount or collectible total.
|
|
3115
|
+
* Absent when no invoice has been created; absence does not establish acceptance or delivery.
|
|
3116
|
+
*/
|
|
2895
3117
|
InvoiceSummary: {
|
|
2896
3118
|
/** Format: uuid */
|
|
2897
3119
|
id: string;
|
|
@@ -3511,7 +3733,7 @@ export interface operations {
|
|
|
3511
3733
|
default: components["responses"]["Error"];
|
|
3512
3734
|
};
|
|
3513
3735
|
};
|
|
3514
|
-
"
|
|
3736
|
+
"collect-invoice-payment": {
|
|
3515
3737
|
parameters: {
|
|
3516
3738
|
query?: never;
|
|
3517
3739
|
header?: never;
|
|
@@ -3522,7 +3744,7 @@ export interface operations {
|
|
|
3522
3744
|
};
|
|
3523
3745
|
requestBody?: {
|
|
3524
3746
|
content: {
|
|
3525
|
-
"application/json": components["schemas"]["
|
|
3747
|
+
"application/json": components["schemas"]["CollectInvoicePaymentRequest"];
|
|
3526
3748
|
};
|
|
3527
3749
|
};
|
|
3528
3750
|
responses: {
|
|
@@ -4289,6 +4511,48 @@ export interface operations {
|
|
|
4289
4511
|
default: components["responses"]["Error"];
|
|
4290
4512
|
};
|
|
4291
4513
|
};
|
|
4514
|
+
"checkout-order": {
|
|
4515
|
+
parameters: {
|
|
4516
|
+
query?: never;
|
|
4517
|
+
header?: never;
|
|
4518
|
+
path: {
|
|
4519
|
+
orderId: components["parameters"]["OrderId"];
|
|
4520
|
+
};
|
|
4521
|
+
cookie?: never;
|
|
4522
|
+
};
|
|
4523
|
+
requestBody: {
|
|
4524
|
+
content: {
|
|
4525
|
+
/**
|
|
4526
|
+
* @example {
|
|
4527
|
+
* "promotion_code": "WELCOME",
|
|
4528
|
+
* "expected_amount": "90.00"
|
|
4529
|
+
* }
|
|
4530
|
+
*/
|
|
4531
|
+
"application/json": components["schemas"]["CheckoutOrderRequest"];
|
|
4532
|
+
};
|
|
4533
|
+
};
|
|
4534
|
+
responses: {
|
|
4535
|
+
/** @description The order with confirmed checkout terms and its invoice, when applicable. */
|
|
4536
|
+
200: {
|
|
4537
|
+
headers: {
|
|
4538
|
+
[name: string]: unknown;
|
|
4539
|
+
};
|
|
4540
|
+
content: {
|
|
4541
|
+
"application/json": components["schemas"]["Order"];
|
|
4542
|
+
};
|
|
4543
|
+
};
|
|
4544
|
+
/** @description The order no longer permits checkout or another discount has already been confirmed. */
|
|
4545
|
+
409: {
|
|
4546
|
+
headers: {
|
|
4547
|
+
[name: string]: unknown;
|
|
4548
|
+
};
|
|
4549
|
+
content: {
|
|
4550
|
+
"application/json": components["schemas"]["Error"];
|
|
4551
|
+
};
|
|
4552
|
+
};
|
|
4553
|
+
default: components["responses"]["Error"];
|
|
4554
|
+
};
|
|
4555
|
+
};
|
|
4292
4556
|
"cancel-order": {
|
|
4293
4557
|
parameters: {
|
|
4294
4558
|
query?: never;
|
|
@@ -410,10 +410,14 @@ export interface components {
|
|
|
410
410
|
currency: string;
|
|
411
411
|
lines: components["schemas"]["QuoteLine"][];
|
|
412
412
|
};
|
|
413
|
-
|
|
413
|
+
/**
|
|
414
|
+
* @description One public catalog estimate. Prices are used as listed, before account discounts; tax is not
|
|
415
|
+
* evaluated. Monetary fields are absent when the line cannot be priced.
|
|
416
|
+
*/
|
|
417
|
+
QuotedLine: {
|
|
414
418
|
/** @description Tax included in the account quote. Absent in public catalogue estimates. */
|
|
415
419
|
tax_amount?: components["schemas"]["Money"];
|
|
416
|
-
/** @description Tax already included in the displayed price. */
|
|
420
|
+
/** @description Tax already included in the displayed price. Absent in public catalogue estimates. */
|
|
417
421
|
tax_included_amount?: components["schemas"]["Money"];
|
|
418
422
|
/** @description Which line of the request this answers. */
|
|
419
423
|
index: number;
|
|
@@ -451,14 +455,18 @@ export interface components {
|
|
|
451
455
|
* `quantity` multiplied by that duration.
|
|
452
456
|
*/
|
|
453
457
|
quantity?: string;
|
|
454
|
-
/** @description Not rounded
|
|
458
|
+
/** @description Public list-price amount including any setup charges, before account discounts. Not rounded; round only for display. */
|
|
455
459
|
amount?: components["schemas"]["Money"];
|
|
456
460
|
currency: string;
|
|
457
461
|
};
|
|
462
|
+
/**
|
|
463
|
+
* @description A public catalog estimate. No account discounts or tax are evaluated. Its total is a list-price
|
|
464
|
+
* estimate, not an expected checkout amount. Nothing is saved, charged or reserved.
|
|
465
|
+
*/
|
|
458
466
|
Quote: {
|
|
459
|
-
lines?: components["schemas"]["
|
|
467
|
+
lines?: components["schemas"]["QuotedLine"][];
|
|
460
468
|
/**
|
|
461
|
-
* @description
|
|
469
|
+
* @description Sum of the public list-price line amounts, without evaluating account discounts or tax.
|
|
462
470
|
*
|
|
463
471
|
* Null when any line could not be priced. What would be owed is not knowable then, and a
|
|
464
472
|
* total that silently left the unpriced lines out would read as a smaller bill rather than
|
|
@@ -247,8 +247,8 @@ export interface paths {
|
|
|
247
247
|
};
|
|
248
248
|
/**
|
|
249
249
|
* List project orders
|
|
250
|
-
* @description
|
|
251
|
-
* centre by the account owner.
|
|
250
|
+
* @description A draft order invoice shows base amounts awaiting checkout. A confirmed invoice shows what
|
|
251
|
+
* is outstanding. Checkout and payment are performed in the billing centre by the account owner.
|
|
252
252
|
*/
|
|
253
253
|
get: operations["list-project-orders"];
|
|
254
254
|
put?: never;
|
|
@@ -314,15 +314,27 @@ export interface paths {
|
|
|
314
314
|
put?: never;
|
|
315
315
|
/**
|
|
316
316
|
* Quote for a project
|
|
317
|
-
* @description
|
|
318
|
-
*
|
|
317
|
+
* @description Computes a price preview without creating a resource or saving a quote. Nothing is charged,
|
|
318
|
+
* reserved or applied to an order, and no discount redemption is consumed. The response has no
|
|
319
|
+
* quote ID and does not guarantee a price or reserve a promotion code.
|
|
319
320
|
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
321
|
+
* New purchases use the project's current billing account and currency. With order_id, the order
|
|
322
|
+
* must belong to this project; its recorded purchase terms, billing account and currency are used.
|
|
323
|
+
* An optional promotion_code previews one code for the purchase or order. Without it, Billing
|
|
324
|
+
* selects an applicable account discount. An invalid or inapplicable explicit code is refused
|
|
325
|
+
* rather than silently replaced. Give total as expected_amount when confirming checkout through
|
|
326
|
+
* Billing; eligibility and availability are checked again. An order already checked out returns
|
|
327
|
+
* its confirmed amounts without reapplying its discount; a different code is refused with
|
|
328
|
+
* BILLING_ORDER_CHECKOUT_CONFLICT.
|
|
329
|
+
*
|
|
330
|
+
* Prices may change before an order is created; confirmed purchase terms are not repriced from
|
|
331
|
+
* today's catalog. Usage estimates describe future usage and are not checkout amounts. They do
|
|
332
|
+
* not accept a promotion code, including when mixed with fixed purchase lines.
|
|
323
333
|
*
|
|
324
334
|
* A renewal is priced exactly as renewing would charge it: at the agreed amount or the price
|
|
325
|
-
* named, with the discounts the account holds, and with tax.
|
|
335
|
+
* named, with the discounts the account holds, and with tax. A renewal list does not accept a
|
|
336
|
+
* promotion code because its entries create separate orders. To use a new code on a renewal,
|
|
337
|
+
* first create a renewal order and quote its checkout by order_id.
|
|
326
338
|
*
|
|
327
339
|
* A cancellation is quoted as creating it would compute the refund, as of now and under the refund
|
|
328
340
|
* terms agreed when each subscription was bought. It is quoted on its own: combined with lines or
|
|
@@ -331,8 +343,8 @@ export interface paths {
|
|
|
331
343
|
* amount is not checked. Give the returned `cancellation.proration_date` and
|
|
332
344
|
* `cancellation.refundable_amount` when creating it.
|
|
333
345
|
*
|
|
334
|
-
* Returns 404 when the project has no billing account
|
|
335
|
-
* canceled does not belong to this project.
|
|
346
|
+
* Returns 404 when the project has no billing account for a new purchase quote, or when the order
|
|
347
|
+
* or a subscription to be renewed or canceled does not belong to this project.
|
|
336
348
|
*/
|
|
337
349
|
post: operations["create-project-quote"];
|
|
338
350
|
delete?: never;
|
|
@@ -653,37 +665,17 @@ export interface components {
|
|
|
653
665
|
/**
|
|
654
666
|
* @description Identify a price directly, or select a price for a plan. For each resource give its ID or lookup key, never both. Lookup keys require product_id.
|
|
655
667
|
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
* `BILLING_PURCHASE_INVALID` when `price_type` is `prepaid` or `one_time`, or when the price
|
|
659
|
-
* it names is not postpaid; `meta.field` is `price_type`, `price_id` or `price_lookup_key`
|
|
660
|
-
* accordingly. When the plan has no postpaid price, the line is returned unpriced with
|
|
661
|
-
* `no_price`.
|
|
668
|
+
* Charges for future usage are not estimated here; the service that sells the product quotes
|
|
669
|
+
* them with its purchase.
|
|
662
670
|
*/
|
|
663
671
|
QuoteLine: {
|
|
664
672
|
price_lookup_key?: string;
|
|
665
673
|
plan_lookup_key?: string;
|
|
666
|
-
meter_lookup_key?: string;
|
|
667
674
|
/** Format: uuid */
|
|
668
675
|
price_id?: string;
|
|
669
676
|
product_id?: components["schemas"]["ProductID"];
|
|
670
677
|
/** Format: uuid */
|
|
671
678
|
plan_id?: string;
|
|
672
|
-
/** Format: uuid */
|
|
673
|
-
meter_id?: string;
|
|
674
|
-
/**
|
|
675
|
-
* @description The attributes the price depends on — region, instance type, token class.
|
|
676
|
-
*
|
|
677
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
678
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
679
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
680
|
-
*
|
|
681
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
682
|
-
* covering it is refused rather than priced at zero.
|
|
683
|
-
*/
|
|
684
|
-
dimensions?: {
|
|
685
|
-
[key: string]: string;
|
|
686
|
-
};
|
|
687
679
|
/**
|
|
688
680
|
* @description Narrows the selection when a plan offers more than one billing type.
|
|
689
681
|
* @enum {string}
|
|
@@ -693,13 +685,6 @@ export interface components {
|
|
|
693
685
|
interval?: "none" | "day" | "month" | "year";
|
|
694
686
|
interval_count?: number;
|
|
695
687
|
quantity: string;
|
|
696
|
-
/**
|
|
697
|
-
* Format: int64
|
|
698
|
-
* @description For metered items, how long to price for. This allows an estimate such as "about
|
|
699
|
-
* this much per month" to be shown before anything exists. The priced quantity is
|
|
700
|
-
* `quantity` multiplied by this duration.
|
|
701
|
-
*/
|
|
702
|
-
duration_seconds?: number;
|
|
703
688
|
};
|
|
704
689
|
/**
|
|
705
690
|
* @description Price renewing a prepaid subscription. Give `price_id`, or `interval` with
|
|
@@ -720,22 +705,57 @@ export interface components {
|
|
|
720
705
|
*/
|
|
721
706
|
periods?: number;
|
|
722
707
|
};
|
|
708
|
+
/** @description Quote exactly one target. Purchase lines, an existing order, a renewal list and a cancellation are mutually exclusive. */
|
|
709
|
+
QuoteRequest: components["schemas"]["PurchaseQuoteRequest"] | components["schemas"]["OrderQuoteRequest"] | components["schemas"]["RenewalQuoteRequest"] | components["schemas"]["CancellationQuoteRequest"];
|
|
723
710
|
/**
|
|
724
|
-
* @description
|
|
725
|
-
*
|
|
711
|
+
* @description Preview one proposed purchase using the project's current billing account. Without a code,
|
|
712
|
+
* an applicable account discount is selected. An explicit code is evaluated without reserving or
|
|
713
|
+
* consuming a redemption and must be supplied again when confirming checkout through Billing.
|
|
714
|
+
* Future usage estimates cannot be combined with a promotion code or used as a checkout amount.
|
|
726
715
|
*/
|
|
727
|
-
|
|
728
|
-
lines
|
|
729
|
-
|
|
730
|
-
|
|
716
|
+
PurchaseQuoteRequest: {
|
|
717
|
+
lines: components["schemas"]["QuoteLine"][];
|
|
718
|
+
promotion_code?: string;
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* @description Preview checkout of one existing order. Its recorded purchase terms supply every line.
|
|
722
|
+
* Without a code, an applicable account discount is selected. A preview neither changes the
|
|
723
|
+
* order nor reserves or consumes a redemption. A confirmed order returns its recorded amounts.
|
|
724
|
+
*/
|
|
725
|
+
OrderQuoteRequest: {
|
|
726
|
+
/** Format: uuid */
|
|
727
|
+
order_id: string;
|
|
728
|
+
/** @description Code to evaluate for this order. Must be supplied again when confirming checkout. */
|
|
729
|
+
promotion_code?: string;
|
|
731
730
|
};
|
|
732
|
-
|
|
733
|
-
|
|
731
|
+
/**
|
|
732
|
+
* @description Preview renewing subscriptions, each at most once. Each entry represents a separate renewal
|
|
733
|
+
* order. To preview a new promotion code, create a renewal order and quote it by order_id.
|
|
734
|
+
*/
|
|
735
|
+
RenewalQuoteRequest: {
|
|
736
|
+
renewals: components["schemas"]["QuoteRenewal"][];
|
|
737
|
+
};
|
|
738
|
+
/** @description Preview one cancellation without combining it with a purchase, renewal or promotion code. */
|
|
739
|
+
CancellationQuoteRequest: {
|
|
740
|
+
cancellation: components["schemas"]["QuoteCancellation"];
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* @description A purchase quote line or one recorded order item. Monetary fields use the account currency.
|
|
744
|
+
* Fixed purchase amounts are rounded as checkout rounds them. Usage estimates are not amounts
|
|
745
|
+
* collectible at checkout. When priced is false, monetary fields and price_id are absent.
|
|
746
|
+
*/
|
|
747
|
+
QuotedLine: {
|
|
748
|
+
/** @description Tax on the discounted amount, including any tax already contained in that amount. */
|
|
734
749
|
tax_amount?: components["schemas"]["Money"];
|
|
735
|
-
/** @description
|
|
750
|
+
/** @description The part of tax_amount already contained in amount minus discount_amount. */
|
|
736
751
|
tax_included_amount?: components["schemas"]["Money"];
|
|
737
|
-
/** @description
|
|
752
|
+
/** @description Zero-based request line index, or the recorded order item's position for an order quote. */
|
|
738
753
|
index: number;
|
|
754
|
+
/**
|
|
755
|
+
* Format: uuid
|
|
756
|
+
* @description Present for an existing order quote; identifies the recorded item being priced.
|
|
757
|
+
*/
|
|
758
|
+
order_item_id?: string;
|
|
739
759
|
/**
|
|
740
760
|
* @description Whether a price was found for this line. Read this before anything else.
|
|
741
761
|
*
|
|
@@ -749,14 +769,9 @@ export interface components {
|
|
|
749
769
|
priced: boolean;
|
|
750
770
|
/**
|
|
751
771
|
* @description Why no price was found; `none` while `priced` is true.
|
|
752
|
-
*
|
|
753
|
-
* The last four are told apart because their remedies differ: the price points
|
|
754
|
-
* at no price list, the list holds no rate for that meter, that exact combination
|
|
755
|
-
* of attributes is not configured, or it is configured but nothing is in effect
|
|
756
|
-
* at the moment asked about.
|
|
757
772
|
* @enum {string}
|
|
758
773
|
*/
|
|
759
|
-
unpriced_reason?: "none" | "no_price"
|
|
774
|
+
unpriced_reason?: "none" | "no_price";
|
|
760
775
|
/**
|
|
761
776
|
* Format: uuid
|
|
762
777
|
* @description The price selected. Returned whenever `priced` is true, including when the
|
|
@@ -764,14 +779,19 @@ export interface components {
|
|
|
764
779
|
*/
|
|
765
780
|
price_id?: string;
|
|
766
781
|
plan_name?: string;
|
|
782
|
+
/** @description Unit price before discounts, with tax included only where the price includes it. */
|
|
767
783
|
unit_amount?: components["schemas"]["Money"];
|
|
784
|
+
/** @description The quantity priced. */
|
|
785
|
+
quantity?: string;
|
|
768
786
|
/**
|
|
769
|
-
* @description
|
|
770
|
-
*
|
|
787
|
+
* @description Before discounts, including any setup charges. Contains tax only where the price includes it.
|
|
788
|
+
* Zero for a priced order item with no immediate charge.
|
|
771
789
|
*/
|
|
772
|
-
quantity?: string;
|
|
773
|
-
/** @description Not rounded. Round only for display. */
|
|
774
790
|
amount?: components["schemas"]["Money"];
|
|
791
|
+
/** @description Total reduction on this line, including any committed recurring discount. */
|
|
792
|
+
discount_amount?: components["schemas"]["Money"];
|
|
793
|
+
/** @description amount minus discount_amount plus tax_amount minus tax_included_amount. */
|
|
794
|
+
total?: components["schemas"]["Money"];
|
|
775
795
|
currency: string;
|
|
776
796
|
};
|
|
777
797
|
/**
|
|
@@ -811,23 +831,55 @@ export interface components {
|
|
|
811
831
|
*/
|
|
812
832
|
total: components["schemas"]["Money"];
|
|
813
833
|
};
|
|
834
|
+
/**
|
|
835
|
+
* @description A computed price preview, without a saved quote or a price guarantee. No funds or discount
|
|
836
|
+
* redemptions are reserved. Amounts use currency and exclude payment from credit grants or balance.
|
|
837
|
+
*/
|
|
814
838
|
Quote: {
|
|
815
|
-
|
|
839
|
+
/**
|
|
840
|
+
* @description Sum before discounts, less tax already included in the discounted line amounts, as on an
|
|
841
|
+
* invoice. Null when any line cannot be priced. Zero for a cancellation-only quote.
|
|
842
|
+
*/
|
|
843
|
+
subtotal: components["schemas"]["Money"] | null;
|
|
844
|
+
/** @description Total line discounts. Null when any line cannot be priced; zero for a cancellation-only quote. */
|
|
845
|
+
discount_amount: components["schemas"]["Money"] | null;
|
|
846
|
+
/** @description Total tax on the discounted amounts. Null when any line cannot be priced; zero for a cancellation-only quote. */
|
|
847
|
+
tax_amount: components["schemas"]["Money"] | null;
|
|
848
|
+
/**
|
|
849
|
+
* @description The one new discount evaluated for a purchase or order, without applying it. Null when
|
|
850
|
+
* none is selected, pricing is incomplete, or the quote targets a renewal list or cancellation.
|
|
851
|
+
* A confirmed order instead reports its recorded discount.
|
|
852
|
+
*/
|
|
853
|
+
discount: components["schemas"]["QuotedDiscount"] | null;
|
|
854
|
+
lines?: components["schemas"]["QuotedLine"][];
|
|
816
855
|
renewals?: components["schemas"]["QuoteRenewalResult"][];
|
|
817
856
|
/** @description What the cancellation requested would return. Present only when one was requested. */
|
|
818
857
|
cancellation?: components["schemas"]["CancellationRefundPreview"];
|
|
819
858
|
/**
|
|
820
|
-
* @description
|
|
821
|
-
*
|
|
822
|
-
*
|
|
859
|
+
* @description subtotal minus discount_amount plus tax_amount, before applying credit grants or balance.
|
|
860
|
+
* For a purchase or order with no usage estimates, pass this as expected_amount at checkout.
|
|
861
|
+
* A renewal list sums separate orders; use each renewal's total when confirming that order.
|
|
862
|
+
* Refunds are not netted off: a cancellation-only quote has zero totals and its refund is in
|
|
863
|
+
* cancellation. Usage estimates are projections, not checkout amounts.
|
|
823
864
|
*
|
|
824
865
|
* Null when any line could not be priced. What would be owed is not knowable then, and a
|
|
825
866
|
* total that silently left the unpriced lines out would read as a smaller bill rather than
|
|
826
867
|
* an incomplete one — the per-line `priced` flag is easy to skip, a missing total is not.
|
|
827
868
|
*/
|
|
828
|
-
total
|
|
869
|
+
total: components["schemas"]["Money"] | null;
|
|
829
870
|
currency: string;
|
|
830
871
|
};
|
|
872
|
+
/**
|
|
873
|
+
* @description The discount selected for this calculation. Its presence in a quote does not apply it or
|
|
874
|
+
* reserve a redemption. Discount amounts are reported on the quote and its lines.
|
|
875
|
+
*/
|
|
876
|
+
QuotedDiscount: {
|
|
877
|
+
/** @enum {string} */
|
|
878
|
+
type: "promotion_code" | "account_discount";
|
|
879
|
+
name: string;
|
|
880
|
+
/** @description Code text for a promotion_code discount; null for an account_discount. */
|
|
881
|
+
promotion_code: string | null;
|
|
882
|
+
};
|
|
831
883
|
/**
|
|
832
884
|
* @description A narrow view of the project's billing account, restricted to what a project member needs in order
|
|
833
885
|
* to know whether the project's resources will keep running.
|
|
@@ -870,7 +922,11 @@ export interface components {
|
|
|
870
922
|
currency: string;
|
|
871
923
|
};
|
|
872
924
|
/**
|
|
873
|
-
* @description
|
|
925
|
+
* @description An order invoice stays `draft` until checkout confirms its discount and final amounts. It
|
|
926
|
+
* cannot be collected while draft. Confirmation makes it `open`, or `paid` when its total is zero
|
|
927
|
+
* without creating a payment transaction. A quote never changes this status.
|
|
928
|
+
*
|
|
929
|
+
* `refunded` means the invoice was paid and has since been refunded in full; a partial refund
|
|
874
930
|
* leaves it `paid`, with the refunded part in `amount_refunded`.
|
|
875
931
|
*
|
|
876
932
|
* `void` means the invoice will not be paid and holds no money: nothing was paid, or its order
|
|
@@ -946,7 +1002,29 @@ export interface components {
|
|
|
946
1002
|
items: components["schemas"]["Subscription"][];
|
|
947
1003
|
pagination: components["schemas"]["OffsetPagination"];
|
|
948
1004
|
};
|
|
949
|
-
/**
|
|
1005
|
+
/**
|
|
1006
|
+
* @description An independently billed purchase relationship, separate from the owning service's resource.
|
|
1007
|
+
* Placing a new prepaid or postpaid service order creates a pending subscription for each line
|
|
1008
|
+
* in the same purchase transaction. Its ID is returned on the order item and remains stable
|
|
1009
|
+
* through checkout and delivery. One order may create several subscriptions, such as an instance,
|
|
1010
|
+
* its system disk and its address; it has no single subscription ID.
|
|
1011
|
+
*
|
|
1012
|
+
* Pending does not grant service or accrue usage. Payment confirmation and order acceptance do
|
|
1013
|
+
* not activate a service-owned subscription. It becomes active when the owning service confirms
|
|
1014
|
+
* delivery, with started_at set to the confirmed effective time. Prepaid service periods start
|
|
1015
|
+
* then; postpaid usage starts only when the service reports actual delivery and metering.
|
|
1016
|
+
*
|
|
1017
|
+
* One-time delivery may omit a subscription. Renewals reference and extend existing subscriptions
|
|
1018
|
+
* rather than creating another; changes may create pending replacements. Canceling or failing an
|
|
1019
|
+
* unfulfilled purchase closes its pending subscriptions without starting a service period.
|
|
1020
|
+
* Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their
|
|
1021
|
+
* original value. Technical state belongs to the owning service.
|
|
1022
|
+
*
|
|
1023
|
+
* A purchased shared capacity limit, such as a regional snapshot count quota, can have its own
|
|
1024
|
+
* subscription. Activating that capacity confirms delivery of the quota, not individual snapshots.
|
|
1025
|
+
* Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
|
|
1026
|
+
* the owning service enforces current holdings against the purchased count.
|
|
1027
|
+
*/
|
|
950
1028
|
Subscription: {
|
|
951
1029
|
currency: string;
|
|
952
1030
|
/** @enum {string} */
|
|
@@ -954,7 +1032,11 @@ export interface components {
|
|
|
954
1032
|
/** @enum {string} */
|
|
955
1033
|
interval: "none" | "day" | "month" | "year";
|
|
956
1034
|
interval_count?: number;
|
|
957
|
-
/**
|
|
1035
|
+
/**
|
|
1036
|
+
* @description Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
|
|
1037
|
+
* Pending subscriptions show base terms until checkout confirms any new continuing discount.
|
|
1038
|
+
* Absent for other billing types.
|
|
1039
|
+
*/
|
|
958
1040
|
recurring_amount?: string;
|
|
959
1041
|
termination_policy?: components["schemas"]["TerminationPolicy"];
|
|
960
1042
|
refund_policy?: components["schemas"]["RefundPolicy"];
|
|
@@ -1008,13 +1090,21 @@ export interface components {
|
|
|
1008
1090
|
quantity: string;
|
|
1009
1091
|
/**
|
|
1010
1092
|
* Format: date-time
|
|
1011
|
-
* @description
|
|
1093
|
+
* @description End of the prepaid service already activated. Null for a new pending subscription, even
|
|
1094
|
+
* when its purchase has been paid, and for postpaid subscriptions with no prepaid end date.
|
|
1012
1095
|
*/
|
|
1013
1096
|
paid_until?: string | null;
|
|
1014
1097
|
auto_renew: boolean;
|
|
1015
|
-
/**
|
|
1098
|
+
/**
|
|
1099
|
+
* @description pending means the purchase relationship exists but service has not started. For a
|
|
1100
|
+
* service-owned purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
1101
|
+
* @enum {string}
|
|
1102
|
+
*/
|
|
1016
1103
|
status: "pending" | "active" | "suspended" | "canceled" | "terminated";
|
|
1017
|
-
/**
|
|
1104
|
+
/**
|
|
1105
|
+
* Format: date-time
|
|
1106
|
+
* @description Confirmed start of service. Null for a new pending subscription, including after payment.
|
|
1107
|
+
*/
|
|
1018
1108
|
started_at?: string | null;
|
|
1019
1109
|
/** Format: date-time */
|
|
1020
1110
|
ended_at?: string | null;
|
|
@@ -1063,7 +1153,11 @@ export interface components {
|
|
|
1063
1153
|
pagination: components["schemas"]["OffsetPagination"];
|
|
1064
1154
|
};
|
|
1065
1155
|
/**
|
|
1066
|
-
* @description
|
|
1156
|
+
* @description pending_checkout has recorded purchase terms but no confirmed checkout. An absent invoice
|
|
1157
|
+
* or zero total does not permit acceptance. Confirmation moves it to pending. Both pending_checkout
|
|
1158
|
+
* and pending can expire or be canceled; neither establishes service delivery.
|
|
1159
|
+
*
|
|
1160
|
+
* Follows the items. `pending` has confirmed checkout, is not yet accepted and may be paid or unpaid. `active` is
|
|
1067
1161
|
* accepted with items still being set up. `completed` means every item was set up.
|
|
1068
1162
|
* `partially_completed` means some items were set up and the others failed and were
|
|
1069
1163
|
* refunded to their original payment sources. `failed` means every item failed and the
|
|
@@ -1071,7 +1165,7 @@ export interface components {
|
|
|
1071
1165
|
* nothing was charged.
|
|
1072
1166
|
* @enum {string}
|
|
1073
1167
|
*/
|
|
1074
|
-
OrderStatus: "pending" | "active" | "completed" | "partially_completed" | "failed" | "canceled";
|
|
1168
|
+
OrderStatus: "pending_checkout" | "pending" | "active" | "completed" | "partially_completed" | "failed" | "canceled";
|
|
1075
1169
|
/**
|
|
1076
1170
|
* @description `pending` is waiting to be set up. `completed` was confirmed by the service.
|
|
1077
1171
|
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
@@ -1080,13 +1174,19 @@ export interface components {
|
|
|
1080
1174
|
* @enum {string}
|
|
1081
1175
|
*/
|
|
1082
1176
|
OrderItemStatus: "pending" | "completed" | "failed" | "canceled";
|
|
1177
|
+
/**
|
|
1178
|
+
* @description A recorded purchase. pending_checkout requires explicit Billing confirmation before collection
|
|
1179
|
+
* or acceptance, even without an invoice. Coupon fields describe a discount confirmed at checkout and are absent
|
|
1180
|
+
* before confirmation; a quote never populates them. A draft invoice contains base purchase
|
|
1181
|
+
* amounts awaiting checkout. Payment and acceptance remain separate from resource delivery.
|
|
1182
|
+
*/
|
|
1083
1183
|
Order: {
|
|
1084
1184
|
/** Format: uuid */
|
|
1085
1185
|
coupon_id?: string;
|
|
1086
1186
|
coupon?: components["schemas"]["ObjectIdentity"];
|
|
1087
1187
|
/** Format: uuid */
|
|
1088
1188
|
promotion_code_id?: string;
|
|
1089
|
-
/** @description Code text frozen when
|
|
1189
|
+
/** @description Code text frozen when checkout applied the coupon. Absent for an account discount. */
|
|
1090
1190
|
promotion_code?: string;
|
|
1091
1191
|
invoice?: components["schemas"]["InvoiceSummary"];
|
|
1092
1192
|
/** @description How the order was paid. Absent until it is paid. */
|
|
@@ -1137,7 +1237,7 @@ export interface components {
|
|
|
1137
1237
|
change_effective?: "none" | "immediate" | "period_end";
|
|
1138
1238
|
/**
|
|
1139
1239
|
* Format: date-time
|
|
1140
|
-
* @description Acceptance deadline.
|
|
1240
|
+
* @description Acceptance deadline. pending_checkout and pending orders can expire automatically.
|
|
1141
1241
|
*/
|
|
1142
1242
|
expires_at?: string | null;
|
|
1143
1243
|
/** Format: date-time */
|
|
@@ -1172,13 +1272,22 @@ export interface components {
|
|
|
1172
1272
|
brand?: string;
|
|
1173
1273
|
last4?: string;
|
|
1174
1274
|
};
|
|
1175
|
-
/**
|
|
1275
|
+
/**
|
|
1276
|
+
* @description Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are absent
|
|
1277
|
+
* when there is no immediate invoice. Later catalog changes do not reprice this line. A new service
|
|
1278
|
+
* purchase creates its pending subscription when this item is recorded, not when payment succeeds.
|
|
1279
|
+
*/
|
|
1176
1280
|
OrderItem: {
|
|
1177
1281
|
position?: number;
|
|
1178
1282
|
configuration?: {
|
|
1179
1283
|
[key: string]: unknown;
|
|
1180
1284
|
};
|
|
1181
|
-
/**
|
|
1285
|
+
/**
|
|
1286
|
+
* Format: uuid
|
|
1287
|
+
* @description Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
|
|
1288
|
+
* pending subscription here; renewals reference the existing subscription and changes the
|
|
1289
|
+
* replacement. Absent for delivery without a subscription. This is not a business resource ID.
|
|
1290
|
+
*/
|
|
1182
1291
|
subscription_id?: string;
|
|
1183
1292
|
/** @enum {string} */
|
|
1184
1293
|
interval: "none" | "day" | "month" | "year";
|
|
@@ -1316,7 +1425,11 @@ export interface components {
|
|
|
1316
1425
|
items: components["schemas"]["Entitlement"][];
|
|
1317
1426
|
pagination: components["schemas"]["OffsetPagination"];
|
|
1318
1427
|
};
|
|
1319
|
-
/**
|
|
1428
|
+
/**
|
|
1429
|
+
* @description Purchase-related invoice amounts, without account contact details or payment methods. A draft
|
|
1430
|
+
* order invoice shows base amounts awaiting checkout, not a confirmed discount or collectible total.
|
|
1431
|
+
* Absent when no invoice has been created; absence does not establish acceptance or delivery.
|
|
1432
|
+
*/
|
|
1320
1433
|
InvoiceSummary: {
|
|
1321
1434
|
/** Format: uuid */
|
|
1322
1435
|
id: string;
|
|
@@ -2498,7 +2498,7 @@ export interface components {
|
|
|
2498
2498
|
PlacedOrder: {
|
|
2499
2499
|
/**
|
|
2500
2500
|
* Format: uuid
|
|
2501
|
-
* @description The invoice for this purchase. Null when
|
|
2501
|
+
* @description The invoice for this purchase, which may still be a draft awaiting checkout. Null when no invoice has been created. Its presence or absence does not establish whether delivery may begin.
|
|
2502
2502
|
*/
|
|
2503
2503
|
invoice_id: string | null;
|
|
2504
2504
|
/**
|
package/dist/routes.d.ts
CHANGED
|
@@ -938,8 +938,8 @@ export declare const routes: readonly [{
|
|
|
938
938
|
readonly service: "billing";
|
|
939
939
|
readonly contract: "billing/account";
|
|
940
940
|
readonly method: "POST";
|
|
941
|
-
readonly path: "/account/v1/invoices/{invoiceId}/
|
|
942
|
-
readonly operationId: "
|
|
941
|
+
readonly path: "/account/v1/invoices/{invoiceId}/collect-payment";
|
|
942
|
+
readonly operationId: "collect-invoice-payment";
|
|
943
943
|
readonly securityScheme: "AccessToken";
|
|
944
944
|
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
945
945
|
}, {
|
|
@@ -950,6 +950,14 @@ export declare const routes: readonly [{
|
|
|
950
950
|
readonly operationId: "cancel-order";
|
|
951
951
|
readonly securityScheme: "AccessToken";
|
|
952
952
|
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
953
|
+
}, {
|
|
954
|
+
readonly service: "billing";
|
|
955
|
+
readonly contract: "billing/account";
|
|
956
|
+
readonly method: "POST";
|
|
957
|
+
readonly path: "/account/v1/orders/{orderId}/checkout";
|
|
958
|
+
readonly operationId: "checkout-order";
|
|
959
|
+
readonly securityScheme: "AccessToken";
|
|
960
|
+
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
953
961
|
}, {
|
|
954
962
|
readonly service: "billing";
|
|
955
963
|
readonly contract: "billing/account";
|
package/dist/routes.js
CHANGED
|
@@ -1057,8 +1057,8 @@ export const routes = [
|
|
|
1057
1057
|
service: "billing",
|
|
1058
1058
|
contract: "billing/account",
|
|
1059
1059
|
method: "POST",
|
|
1060
|
-
path: "/account/v1/invoices/{invoiceId}/
|
|
1061
|
-
operationId: "
|
|
1060
|
+
path: "/account/v1/invoices/{invoiceId}/collect-payment",
|
|
1061
|
+
operationId: "collect-invoice-payment",
|
|
1062
1062
|
securityScheme: "AccessToken",
|
|
1063
1063
|
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1064
1064
|
},
|
|
@@ -1071,6 +1071,15 @@ export const routes = [
|
|
|
1071
1071
|
securityScheme: "AccessToken",
|
|
1072
1072
|
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1073
1073
|
},
|
|
1074
|
+
{
|
|
1075
|
+
service: "billing",
|
|
1076
|
+
contract: "billing/account",
|
|
1077
|
+
method: "POST",
|
|
1078
|
+
path: "/account/v1/orders/{orderId}/checkout",
|
|
1079
|
+
operationId: "checkout-order",
|
|
1080
|
+
securityScheme: "AccessToken",
|
|
1081
|
+
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1082
|
+
},
|
|
1074
1083
|
{
|
|
1075
1084
|
service: "billing",
|
|
1076
1085
|
contract: "billing/account",
|