@leaflow/sdk 0.121.0 → 0.123.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/type/checkout/v1/generated/functions.d.ts +8 -0
- package/dist/billing/type/checkout/v1/generated/functions.js +8 -0
- package/dist/billing/type/checkout/v1/generated/models.d.ts +49 -0
- package/dist/billing/type/checkout/v1/generated/models.js +4 -0
- package/dist/billing/type/checkout/v1/generated/schemas.zod.d.ts +8 -0
- package/dist/billing/type/checkout/v1/generated/schemas.zod.js +8 -0
- package/dist/billing/type/checkout/v1/generated/validators/checkoutMode.zod.d.ts +14 -0
- package/dist/billing/type/checkout/v1/generated/validators/checkoutMode.zod.js +11 -0
- package/dist/billing/type/checkout/v1/generated/validators/checkoutOptions.zod.d.ts +19 -0
- package/dist/billing/type/checkout/v1/generated/validators/checkoutOptions.zod.js +20 -0
- package/dist/billing/type/checkout/v1/generated/validators/money.zod.d.ts +11 -0
- package/dist/billing/type/checkout/v1/generated/validators/money.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/functions.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/functions.js +8 -0
- package/dist/billing/type/order/v1/generated/models.d.ts +2931 -0
- package/dist/billing/type/order/v1/generated/models.js +359 -0
- package/dist/billing/type/order/v1/generated/schemas.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/schemas.zod.js +8 -0
- package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.d.ts +123 -0
- package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.js +26 -0
- package/dist/billing/type/order/v1/generated/validators/accountIdentity.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/accountIdentity.zod.js +13 -0
- package/dist/billing/type/order/v1/generated/validators/activeResource.zod.d.ts +41 -0
- package/dist/billing/type/order/v1/generated/validators/activeResource.zod.js +36 -0
- package/dist/billing/type/order/v1/generated/validators/activeResourceList.zod.d.ts +48 -0
- package/dist/billing/type/order/v1/generated/validators/activeResourceList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/allowance.zod.d.ts +44 -0
- package/dist/billing/type/order/v1/generated/validators/allowance.zod.js +41 -0
- package/dist/billing/type/order/v1/generated/validators/allowanceList.zod.d.ts +51 -0
- package/dist/billing/type/order/v1/generated/validators/allowanceList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/applicability.zod.d.ts +108 -0
- package/dist/billing/type/order/v1/generated/validators/applicability.zod.js +32 -0
- package/dist/billing/type/order/v1/generated/validators/applicablePlan.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/applicablePlan.zod.js +15 -0
- package/dist/billing/type/order/v1/generated/validators/appliedCredit.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/appliedCredit.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/autoRenewSet.zod.d.ts +13 -0
- package/dist/billing/type/order/v1/generated/validators/autoRenewSet.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +31 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountCreate.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountCreate.zod.js +15 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountList.zod.d.ts +32 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountUpdate.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountUpdate.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +21 -0
- package/dist/billing/type/order/v1/generated/validators/cancelSubscriptionRequest.zod.js +21 -0
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +64 -0
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +39 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.d.ts +23 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +31 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +35 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.js +35 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +71 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +46 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +32 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +31 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +31 -0
- package/dist/billing/type/order/v1/generated/validators/contact.zod.d.ts +41 -0
- package/dist/billing/type/order/v1/generated/validators/contact.zod.js +39 -0
- package/dist/billing/type/order/v1/generated/validators/contactCreate.zod.d.ts +32 -0
- package/dist/billing/type/order/v1/generated/validators/contactCreate.zod.js +30 -0
- package/dist/billing/type/order/v1/generated/validators/contactList.zod.d.ts +38 -0
- package/dist/billing/type/order/v1/generated/validators/contactList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/contactUpdate.zod.d.ts +33 -0
- package/dist/billing/type/order/v1/generated/validators/contactUpdate.zod.js +31 -0
- package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.d.ts +126 -0
- package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.js +27 -0
- package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.d.ts +133 -0
- package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.d.ts +112 -0
- package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.js +18 -0
- package/dist/billing/type/order/v1/generated/validators/creditNote.zod.d.ts +34 -0
- package/dist/billing/type/order/v1/generated/validators/creditNote.zod.js +40 -0
- package/dist/billing/type/order/v1/generated/validators/creditNoteItem.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/creditNoteItem.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/creditNoteItemList.zod.d.ts +24 -0
- package/dist/billing/type/order/v1/generated/validators/creditNoteItemList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/creditNoteList.zod.d.ts +41 -0
- package/dist/billing/type/order/v1/generated/validators/creditNoteList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/currency.zod.d.ts +21 -0
- package/dist/billing/type/order/v1/generated/validators/currency.zod.js +30 -0
- package/dist/billing/type/order/v1/generated/validators/currencyList.zod.d.ts +23 -0
- package/dist/billing/type/order/v1/generated/validators/currencyList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/cursorPagination.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/cursorPagination.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +142 -0
- package/dist/billing/type/order/v1/generated/validators/discount.zod.js +44 -0
- package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +149 -0
- package/dist/billing/type/order/v1/generated/validators/discountList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/entitlement.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/entitlement.zod.js +20 -0
- package/dist/billing/type/order/v1/generated/validators/entitlementList.zod.d.ts +32 -0
- package/dist/billing/type/order/v1/generated/validators/entitlementList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/error.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/error.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/featureGrant.zod.d.ts +33 -0
- package/dist/billing/type/order/v1/generated/validators/featureGrant.zod.js +24 -0
- package/dist/billing/type/order/v1/generated/validators/featureGrantList.zod.d.ts +40 -0
- package/dist/billing/type/order/v1/generated/validators/featureGrantList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/featureGrantStatus.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/featureGrantStatus.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +63 -0
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.js +53 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.d.ts +41 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.js +46 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItemList.zod.d.ts +48 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItemList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +70 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.d.ts +33 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.js +34 -0
- package/dist/billing/type/order/v1/generated/validators/money.zod.d.ts +11 -0
- package/dist/billing/type/order/v1/generated/validators/money.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/namedIdentity.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/namedIdentity.zod.js +15 -0
- package/dist/billing/type/order/v1/generated/validators/objectIdentity.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/objectIdentity.zod.js +15 -0
- package/dist/billing/type/order/v1/generated/validators/offsetPagination.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/offsetPagination.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +143 -0
- package/dist/billing/type/order/v1/generated/validators/order.zod.js +65 -0
- package/dist/billing/type/order/v1/generated/validators/orderCancel.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/orderCancel.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +69 -0
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +73 -0
- package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +75 -0
- package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +150 -0
- package/dist/billing/type/order/v1/generated/validators/orderList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +18 -0
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuoteInput.zod.js +20 -0
- package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.d.ts +18 -0
- package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/paidWith.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/paidWith.zod.js +25 -0
- package/dist/billing/type/order/v1/generated/validators/payInvoiceRequest.zod.d.ts +26 -0
- package/dist/billing/type/order/v1/generated/validators/payInvoiceRequest.zod.js +53 -0
- package/dist/billing/type/order/v1/generated/validators/payTogetherRequest.zod.d.ts +18 -0
- package/dist/billing/type/order/v1/generated/validators/payTogetherRequest.zod.js +21 -0
- package/dist/billing/type/order/v1/generated/validators/paymentAction.zod.d.ts +22 -0
- package/dist/billing/type/order/v1/generated/validators/paymentAction.zod.js +24 -0
- package/dist/billing/type/order/v1/generated/validators/paymentCancellationReason.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/paymentCancellationReason.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethod.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethod.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethodList.zod.d.ts +32 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethodList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethodSetup.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethodSetup.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +26 -0
- package/dist/billing/type/order/v1/generated/validators/paymentMethodSetupResult.zod.js +18 -0
- package/dist/billing/type/order/v1/generated/validators/paymentOption.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/paymentOption.zod.js +15 -0
- package/dist/billing/type/order/v1/generated/validators/paymentOptionList.zod.d.ts +24 -0
- package/dist/billing/type/order/v1/generated/validators/paymentOptionList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/paymentOptionMethod.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/paymentOptionMethod.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.d.ts +30 -0
- package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.js +28 -0
- package/dist/billing/type/order/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/paymentPreviewInvoice.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.d.ts +86 -0
- package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.js +39 -0
- package/dist/billing/type/order/v1/generated/validators/paymentStatus.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/paymentStatus.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/placedOrder.zod.d.ts +36 -0
- package/dist/billing/type/order/v1/generated/validators/placedOrder.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/plan.zod.d.ts +31 -0
- package/dist/billing/type/order/v1/generated/validators/plan.zod.js +23 -0
- package/dist/billing/type/order/v1/generated/validators/planFeature.zod.d.ts +18 -0
- package/dist/billing/type/order/v1/generated/validators/planFeature.zod.js +13 -0
- package/dist/billing/type/order/v1/generated/validators/planList.zod.d.ts +38 -0
- package/dist/billing/type/order/v1/generated/validators/planList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +81 -0
- package/dist/billing/type/order/v1/generated/validators/price.zod.js +67 -0
- package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +88 -0
- package/dist/billing/type/order/v1/generated/validators/priceList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/priceOption.zod.d.ts +44 -0
- package/dist/billing/type/order/v1/generated/validators/priceOption.zod.js +28 -0
- package/dist/billing/type/order/v1/generated/validators/product.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/product.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/productID.zod.d.ts +13 -0
- package/dist/billing/type/order/v1/generated/validators/productID.zod.js +16 -0
- package/dist/billing/type/order/v1/generated/validators/productList.zod.d.ts +22 -0
- package/dist/billing/type/order/v1/generated/validators/productList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/projectAssignment.zod.d.ts +22 -0
- package/dist/billing/type/order/v1/generated/validators/projectAssignment.zod.js +23 -0
- package/dist/billing/type/order/v1/generated/validators/projectAssignmentList.zod.d.ts +29 -0
- package/dist/billing/type/order/v1/generated/validators/projectAssignmentList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/purchaseOperation.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/purchaseOperation.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +99 -0
- package/dist/billing/type/order/v1/generated/validators/quote.zod.js +30 -0
- package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.d.ts +18 -0
- package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +20 -0
- package/dist/billing/type/order/v1/generated/validators/quoteItem.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/quoteItem.zod.js +38 -0
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +42 -0
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +41 -0
- package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.d.ts +27 -0
- package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +26 -0
- package/dist/billing/type/order/v1/generated/validators/quoteRenewalResult.zod.d.ts +27 -0
- package/dist/billing/type/order/v1/generated/validators/quoteRenewalResult.zod.js +24 -0
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +72 -0
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.js +42 -0
- package/dist/billing/type/order/v1/generated/validators/quotedDiscount.zod.d.ts +19 -0
- package/dist/billing/type/order/v1/generated/validators/quotedDiscount.zod.js +21 -0
- package/dist/billing/type/order/v1/generated/validators/rate.zod.d.ts +38 -0
- package/dist/billing/type/order/v1/generated/validators/rate.zod.js +33 -0
- package/dist/billing/type/order/v1/generated/validators/rateList.zod.d.ts +45 -0
- package/dist/billing/type/order/v1/generated/validators/rateList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/refund.zod.d.ts +92 -0
- package/dist/billing/type/order/v1/generated/validators/refund.zod.js +44 -0
- package/dist/billing/type/order/v1/generated/validators/refundList.zod.d.ts +99 -0
- package/dist/billing/type/order/v1/generated/validators/refundList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/refundReason.zod.d.ts +23 -0
- package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +23 -0
- package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.d.ts +31 -0
- package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +42 -0
- package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +25 -0
- package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.d.ts +30 -0
- package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +23 -0
- package/dist/billing/type/order/v1/generated/validators/renewalPriceList.zod.d.ts +37 -0
- package/dist/billing/type/order/v1/generated/validators/renewalPriceList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +13 -0
- package/dist/billing/type/order/v1/generated/validators/setProjectAssignmentRequest.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/spendRow.zod.d.ts +22 -0
- package/dist/billing/type/order/v1/generated/validators/spendRow.zod.js +18 -0
- package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.d.ts +31 -0
- package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/statement.zod.d.ts +34 -0
- package/dist/billing/type/order/v1/generated/validators/statement.zod.js +36 -0
- package/dist/billing/type/order/v1/generated/validators/statementAmounts.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/statementAmounts.zod.js +15 -0
- package/dist/billing/type/order/v1/generated/validators/statementItem.zod.d.ts +19 -0
- package/dist/billing/type/order/v1/generated/validators/statementItem.zod.js +21 -0
- package/dist/billing/type/order/v1/generated/validators/statementList.zod.d.ts +41 -0
- package/dist/billing/type/order/v1/generated/validators/statementList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/statementStatus.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/statementStatus.zod.js +9 -0
- package/dist/billing/type/order/v1/generated/validators/statementSummary.zod.d.ts +35 -0
- package/dist/billing/type/order/v1/generated/validators/statementSummary.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +111 -0
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +92 -0
- package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.d.ts +37 -0
- package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.js +30 -0
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +117 -0
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/taxItem.zod.d.ts +21 -0
- package/dist/billing/type/order/v1/generated/validators/taxItem.zod.js +21 -0
- package/dist/billing/type/order/v1/generated/validators/terminationPolicy.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/terminationPolicy.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/tier.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/tier.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/topUp.zod.d.ts +51 -0
- package/dist/billing/type/order/v1/generated/validators/topUp.zod.js +46 -0
- package/dist/billing/type/order/v1/generated/validators/topUpCreate.zod.d.ts +22 -0
- package/dist/billing/type/order/v1/generated/validators/topUpCreate.zod.js +34 -0
- package/dist/billing/type/order/v1/generated/validators/topUpList.zod.d.ts +58 -0
- package/dist/billing/type/order/v1/generated/validators/topUpList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/transaction.zod.d.ts +53 -0
- package/dist/billing/type/order/v1/generated/validators/transaction.zod.js +48 -0
- package/dist/billing/type/order/v1/generated/validators/transactionList.zod.d.ts +60 -0
- package/dist/billing/type/order/v1/generated/validators/transactionList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/transactionType.zod.d.ts +16 -0
- package/dist/billing/type/order/v1/generated/validators/transactionType.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/usageCharge.zod.d.ts +43 -0
- package/dist/billing/type/order/v1/generated/validators/usageCharge.zod.js +57 -0
- package/dist/billing/type/order/v1/generated/validators/usageChargeList.zod.d.ts +50 -0
- package/dist/billing/type/order/v1/generated/validators/usageChargeList.zod.js +14 -0
- package/dist/billing/type/quote/v1/generated/functions.d.ts +8 -0
- package/dist/billing/type/quote/v1/generated/functions.js +8 -0
- package/dist/billing/type/quote/v1/generated/models.d.ts +98 -0
- package/dist/billing/type/quote/v1/generated/models.js +1 -0
- package/dist/billing/type/quote/v1/generated/schemas.zod.d.ts +8 -0
- package/dist/billing/type/quote/v1/generated/schemas.zod.js +8 -0
- package/dist/billing/type/quote/v1/generated/validators/money.zod.d.ts +11 -0
- package/dist/billing/type/quote/v1/generated/validators/money.zod.js +11 -0
- package/dist/billing/type/quote/v1/generated/validators/quote.zod.d.ts +32 -0
- package/dist/billing/type/quote/v1/generated/validators/quote.zod.js +32 -0
- package/dist/billing/type/quote/v1/generated/validators/quoteItem.zod.d.ts +22 -0
- package/dist/billing/type/quote/v1/generated/validators/quoteItem.zod.js +27 -0
- package/dist/billing/v1/generated/functions.d.ts +80 -83
- package/dist/billing/v1/generated/functions.js +83 -90
- package/dist/billing/v1/generated/models.d.ts +317 -154
- package/dist/billing/v1/generated/models.js +43 -15
- package/dist/billing/v1/generated/schemas.zod.d.ts +90 -70
- package/dist/billing/v1/generated/schemas.zod.js +108 -78
- package/dist/billing/v1/generated/validators/accountBalance.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/applicability.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/applicability.zod.js +1 -1
- package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/cancellationItem.zod.js +3 -3
- package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +2 -2
- package/dist/billing/v1/generated/validators/contact.zod.d.ts +5 -1
- package/dist/billing/v1/generated/validators/contact.zod.js +3 -1
- package/dist/billing/v1/generated/validators/contactList.zod.d.ts +5 -1
- package/dist/billing/v1/generated/validators/creditGrant.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/creditGrantList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/creditGroup.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/creditNote.zod.d.ts +12 -2
- package/dist/billing/v1/generated/validators/creditNote.zod.js +15 -3
- package/dist/billing/v1/generated/validators/creditNoteItem.zod.d.ts +2 -2
- package/dist/billing/v1/generated/validators/creditNoteItem.zod.js +2 -2
- package/dist/billing/v1/generated/validators/creditNoteItemList.zod.d.ts +2 -2
- package/dist/billing/v1/generated/validators/creditNoteList.zod.d.ts +12 -2
- package/dist/billing/v1/generated/validators/discount.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/discount.zod.js +9 -4
- package/dist/billing/v1/generated/validators/discountList.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/featureGrant.zod.d.ts +33 -0
- package/dist/billing/v1/generated/validators/featureGrant.zod.js +24 -0
- package/dist/billing/v1/generated/validators/featureGrantList.zod.d.ts +40 -0
- package/dist/billing/v1/generated/validators/featureGrantList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/featureGrantStatus.zod.d.ts +16 -0
- package/dist/billing/v1/generated/validators/featureGrantStatus.zod.js +11 -0
- package/dist/billing/v1/generated/validators/invoice.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/invoice.zod.js +7 -3
- package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/billing/v1/generated/validators/invoiceSummary.zod.d.ts +2 -3
- package/dist/billing/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.d.ts +26 -0
- package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.js +29 -0
- package/dist/billing/v1/generated/validators/listInvoicesParams.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/listOrdersParams.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/order.zod.d.ts +9 -10
- package/dist/billing/v1/generated/validators/order.zod.js +12 -7
- package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/orderItem.zod.js +2 -2
- package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/orderList.zod.d.ts +9 -10
- package/dist/billing/v1/generated/validators/orderStatus.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/orderStatus.zod.js +2 -10
- package/dist/billing/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/billing/v1/generated/validators/payInvoiceRequest.zod.d.ts +4 -0
- package/dist/billing/v1/generated/validators/payInvoiceRequest.zod.js +13 -1
- package/dist/billing/v1/generated/validators/payTogetherRequest.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/payTogetherRequest.zod.js +5 -0
- package/dist/billing/v1/generated/validators/paymentResult.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/previewInvoicePaymentParams.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/previewInvoicePaymentParams.zod.js +2 -0
- package/dist/billing/v1/generated/validators/purchaseOperation.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/purchaseOperation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quote.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +1 -1
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +1 -1
- package/dist/billing/v1/generated/validators/quoteRequest.zod.js +1 -1
- package/dist/billing/v1/generated/validators/rate.zod.d.ts +5 -1
- package/dist/billing/v1/generated/validators/rate.zod.js +7 -5
- package/dist/billing/v1/generated/validators/rateList.zod.d.ts +5 -1
- package/dist/billing/v1/generated/validators/refund.zod.d.ts +2 -3
- package/dist/billing/v1/generated/validators/refund.zod.js +1 -1
- package/dist/billing/v1/generated/validators/refundList.zod.d.ts +2 -3
- package/dist/billing/v1/generated/validators/refundReason.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.d.ts +4 -0
- package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -0
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +6 -10
- package/dist/billing/v1/generated/validators/subscription.zod.js +21 -9
- package/dist/billing/v1/generated/validators/{cancellationRequest.zod.d.ts → subscriptionCancellation.zod.d.ts} +3 -3
- package/dist/billing/v1/generated/validators/{cancellationRequest.zod.js → subscriptionCancellation.zod.js} +2 -2
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +6 -10
- package/dist/billing/v1/generated/validators/topUp.zod.js +1 -1
- package/dist/billing/v1/generated/validators/transaction.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/transaction.zod.js +1 -1
- package/dist/billing/v1/generated/validators/transactionList.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/transactionType.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/transactionType.zod.js +2 -2
- package/dist/canopy/v1/generated/models.d.ts +2883 -17
- package/dist/canopy/v1/generated/models.js +359 -0
- package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +146 -0
- package/dist/canopy/v1/generated/validators/accountBalance.zod.js +49 -0
- package/dist/canopy/v1/generated/validators/accountIdentity.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/accountIdentity.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/activeResource.zod.d.ts +64 -0
- package/dist/canopy/v1/generated/validators/activeResource.zod.js +59 -0
- package/dist/canopy/v1/generated/validators/activeResourceList.zod.d.ts +71 -0
- package/dist/canopy/v1/generated/validators/activeResourceList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/allowance.zod.d.ts +67 -0
- package/dist/canopy/v1/generated/validators/allowance.zod.js +64 -0
- package/dist/canopy/v1/generated/validators/allowanceList.zod.d.ts +74 -0
- package/dist/canopy/v1/generated/validators/allowanceList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +131 -0
- package/dist/canopy/v1/generated/validators/applicability.zod.js +55 -0
- package/dist/canopy/v1/generated/validators/applicablePlan.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +38 -0
- package/dist/canopy/v1/generated/validators/appliedCredit.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/appliedCredit.zod.js +39 -0
- package/dist/canopy/v1/generated/validators/autoRenewSet.zod.d.ts +36 -0
- package/dist/canopy/v1/generated/validators/autoRenewSet.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/billingAccount.zod.d.ts +48 -0
- package/dist/canopy/v1/generated/validators/billingAccount.zod.js +54 -0
- package/dist/canopy/v1/generated/validators/billingAccountCreate.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/billingAccountCreate.zod.js +38 -0
- package/dist/canopy/v1/generated/validators/billingAccountList.zod.d.ts +55 -0
- package/dist/canopy/v1/generated/validators/billingAccountList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +39 -0
- package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +44 -0
- package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.js +44 -0
- package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +87 -0
- package/dist/canopy/v1/generated/validators/cancellation.zod.js +62 -0
- package/dist/canopy/v1/generated/validators/cancellationCreate.zod.d.ts +46 -0
- package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +54 -0
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +58 -0
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +58 -0
- package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +94 -0
- package/dist/canopy/v1/generated/validators/cancellationList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +69 -0
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +55 -0
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +54 -0
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +54 -0
- package/dist/canopy/v1/generated/validators/checkoutMode.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/checkoutOptions.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/contact.zod.d.ts +64 -0
- package/dist/canopy/v1/generated/validators/contact.zod.js +62 -0
- package/dist/canopy/v1/generated/validators/contactCreate.zod.d.ts +55 -0
- package/dist/canopy/v1/generated/validators/contactCreate.zod.js +53 -0
- package/dist/canopy/v1/generated/validators/contactList.zod.d.ts +61 -0
- package/dist/canopy/v1/generated/validators/contactList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/contactUpdate.zod.d.ts +56 -0
- package/dist/canopy/v1/generated/validators/contactUpdate.zod.js +54 -0
- package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +23 -1
- package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +149 -0
- package/dist/canopy/v1/generated/validators/creditGrant.zod.js +50 -0
- package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +156 -0
- package/dist/canopy/v1/generated/validators/creditGrantList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +135 -0
- package/dist/canopy/v1/generated/validators/creditGroup.zod.js +41 -0
- package/dist/canopy/v1/generated/validators/creditNote.zod.d.ts +57 -0
- package/dist/canopy/v1/generated/validators/creditNote.zod.js +63 -0
- package/dist/canopy/v1/generated/validators/creditNoteItem.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/creditNoteItem.zod.js +39 -0
- package/dist/canopy/v1/generated/validators/creditNoteItemList.zod.d.ts +47 -0
- package/dist/canopy/v1/generated/validators/creditNoteItemList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/creditNoteList.zod.d.ts +64 -0
- package/dist/canopy/v1/generated/validators/creditNoteList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/currency.zod.d.ts +44 -0
- package/dist/canopy/v1/generated/validators/currency.zod.js +53 -0
- package/dist/canopy/v1/generated/validators/currencyList.zod.d.ts +46 -0
- package/dist/canopy/v1/generated/validators/currencyList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/discount.zod.d.ts +165 -0
- package/dist/canopy/v1/generated/validators/discount.zod.js +67 -0
- package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +172 -0
- package/dist/canopy/v1/generated/validators/discountList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/entitlement.zod.d.ts +48 -0
- package/dist/canopy/v1/generated/validators/entitlement.zod.js +43 -0
- package/dist/canopy/v1/generated/validators/entitlementList.zod.d.ts +55 -0
- package/dist/canopy/v1/generated/validators/entitlementList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/errorA200529.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/errorA200529.zod.js +33 -0
- package/dist/canopy/v1/generated/validators/featureGrant.zod.d.ts +56 -0
- package/dist/canopy/v1/generated/validators/featureGrant.zod.js +47 -0
- package/dist/canopy/v1/generated/validators/featureGrantList.zod.d.ts +63 -0
- package/dist/canopy/v1/generated/validators/featureGrantList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +86 -0
- package/dist/canopy/v1/generated/validators/invoice.zod.js +76 -0
- package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +64 -0
- package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +69 -0
- package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +71 -0
- package/dist/canopy/v1/generated/validators/invoiceItemList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +93 -0
- package/dist/canopy/v1/generated/validators/invoiceList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +56 -0
- package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +57 -0
- package/dist/canopy/v1/generated/validators/namedIdentity.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/namedIdentity.zod.js +38 -0
- package/dist/canopy/v1/generated/validators/objectIdentity.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +38 -0
- package/dist/canopy/v1/generated/validators/order.zod.d.ts +166 -0
- package/dist/canopy/v1/generated/validators/order.zod.js +88 -0
- package/dist/canopy/v1/generated/validators/orderCancel.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/orderCancel.zod.js +40 -0
- package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +92 -0
- package/dist/canopy/v1/generated/validators/orderItem.zod.js +96 -0
- package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +98 -0
- package/dist/canopy/v1/generated/validators/orderItemList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/orderItemStatus.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +173 -0
- package/dist/canopy/v1/generated/validators/orderList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +41 -0
- package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +43 -0
- package/dist/canopy/v1/generated/validators/orderStatus.zod.d.ts +41 -0
- package/dist/canopy/v1/generated/validators/orderStatus.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/paidWith.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/paidWith.zod.js +48 -0
- package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.d.ts +49 -0
- package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +76 -0
- package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.d.ts +41 -0
- package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +44 -0
- package/dist/canopy/v1/generated/validators/paymentAction.zod.d.ts +45 -0
- package/dist/canopy/v1/generated/validators/paymentAction.zod.js +47 -0
- package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/paymentMethod.zod.d.ts +48 -0
- package/dist/canopy/v1/generated/validators/paymentMethod.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/paymentMethodList.zod.d.ts +55 -0
- package/dist/canopy/v1/generated/validators/paymentMethodList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/paymentMethodSetup.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/paymentMethodSetup.zod.js +40 -0
- package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +49 -0
- package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +41 -0
- package/dist/canopy/v1/generated/validators/paymentOption.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/paymentOption.zod.js +38 -0
- package/dist/canopy/v1/generated/validators/paymentOptionList.zod.d.ts +47 -0
- package/dist/canopy/v1/generated/validators/paymentOptionList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +39 -0
- package/dist/canopy/v1/generated/validators/paymentPreview.zod.d.ts +53 -0
- package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +51 -0
- package/dist/canopy/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/paymentPreviewInvoice.zod.js +39 -0
- package/dist/canopy/v1/generated/validators/paymentResult.zod.d.ts +109 -0
- package/dist/canopy/v1/generated/validators/paymentResult.zod.js +62 -0
- package/dist/canopy/v1/generated/validators/paymentStatus.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +23 -1
- package/dist/canopy/v1/generated/validators/placedOrder.zod.js +5 -8
- package/dist/canopy/v1/generated/validators/plan.zod.d.ts +54 -0
- package/dist/canopy/v1/generated/validators/plan.zod.js +46 -0
- package/dist/canopy/v1/generated/validators/planFeature.zod.d.ts +41 -0
- package/dist/canopy/v1/generated/validators/planFeature.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/planList.zod.d.ts +61 -0
- package/dist/canopy/v1/generated/validators/planList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/price.zod.d.ts +104 -0
- package/dist/canopy/v1/generated/validators/price.zod.js +90 -0
- package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +111 -0
- package/dist/canopy/v1/generated/validators/priceList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +67 -0
- package/dist/canopy/v1/generated/validators/priceOption.zod.js +51 -0
- package/dist/canopy/v1/generated/validators/product.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/product.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/productID.zod.d.ts +36 -0
- package/dist/canopy/v1/generated/validators/productID.zod.js +39 -0
- package/dist/canopy/v1/generated/validators/productList.zod.d.ts +45 -0
- package/dist/canopy/v1/generated/validators/productList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/projectAssignment.zod.d.ts +45 -0
- package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +46 -0
- package/dist/canopy/v1/generated/validators/projectAssignmentList.zod.d.ts +52 -0
- package/dist/canopy/v1/generated/validators/projectAssignmentList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/purchaseOperation.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/quote.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +122 -0
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +53 -0
- package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +122 -0
- package/dist/canopy/v1/generated/validators/quoteA200529.zod.js +33 -0
- package/dist/canopy/v1/generated/validators/quoteCancellation.zod.d.ts +41 -0
- package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +43 -0
- package/dist/canopy/v1/generated/validators/quoteItem.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/quoteItem.zod.js +22 -11
- package/dist/canopy/v1/generated/validators/quoteItemDc1fddb.zod.d.ts +45 -0
- package/dist/canopy/v1/generated/validators/quoteItemDc1fddb.zod.js +50 -0
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +65 -0
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +64 -0
- package/dist/canopy/v1/generated/validators/quoteRenewal.zod.d.ts +50 -0
- package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +49 -0
- package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.d.ts +50 -0
- package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +47 -0
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +95 -0
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +65 -0
- package/dist/canopy/v1/generated/validators/quotedDiscount.zod.d.ts +42 -0
- package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +44 -0
- package/dist/canopy/v1/generated/validators/rate.zod.d.ts +61 -0
- package/dist/canopy/v1/generated/validators/rate.zod.js +56 -0
- package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +68 -0
- package/dist/canopy/v1/generated/validators/rateList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/refund.zod.d.ts +115 -0
- package/dist/canopy/v1/generated/validators/refund.zod.js +67 -0
- package/dist/canopy/v1/generated/validators/refundList.zod.d.ts +122 -0
- package/dist/canopy/v1/generated/validators/refundList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/refundPolicy.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/refundReason.zod.d.ts +46 -0
- package/dist/canopy/v1/generated/validators/refundReason.zod.js +46 -0
- package/dist/canopy/v1/generated/validators/renewRequest.zod.d.ts +54 -0
- package/dist/canopy/v1/generated/validators/renewRequest.zod.js +65 -0
- package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.d.ts +48 -0
- package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +48 -0
- package/dist/canopy/v1/generated/validators/renewalPrice.zod.d.ts +53 -0
- package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +46 -0
- package/dist/canopy/v1/generated/validators/renewalPriceList.zod.d.ts +60 -0
- package/dist/canopy/v1/generated/validators/renewalPriceList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/serviceResource.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +36 -0
- package/dist/canopy/v1/generated/validators/setProjectAssignmentRequest.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +45 -0
- package/dist/canopy/v1/generated/validators/spendRow.zod.js +41 -0
- package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +54 -0
- package/dist/canopy/v1/generated/validators/spendRowList.zod.js +40 -0
- package/dist/canopy/v1/generated/validators/statement.zod.d.ts +57 -0
- package/dist/canopy/v1/generated/validators/statement.zod.js +59 -0
- package/dist/canopy/v1/generated/validators/statementAmounts.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/statementAmounts.zod.js +38 -0
- package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +42 -0
- package/dist/canopy/v1/generated/validators/statementItem.zod.js +44 -0
- package/dist/canopy/v1/generated/validators/statementList.zod.d.ts +64 -0
- package/dist/canopy/v1/generated/validators/statementList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/statementStatus.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/statementStatus.zod.js +32 -0
- package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +58 -0
- package/dist/canopy/v1/generated/validators/statementSummary.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +134 -0
- package/dist/canopy/v1/generated/validators/subscription.zod.js +115 -0
- package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.d.ts +60 -0
- package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +53 -0
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +140 -0
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/taxItem.zod.d.ts +44 -0
- package/dist/canopy/v1/generated/validators/taxItem.zod.js +44 -0
- package/dist/canopy/v1/generated/validators/terminationPolicy.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/terminationPolicy.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/tier.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/tier.zod.js +40 -0
- package/dist/canopy/v1/generated/validators/topUp.zod.d.ts +74 -0
- package/dist/canopy/v1/generated/validators/topUp.zod.js +69 -0
- package/dist/canopy/v1/generated/validators/topUpCreate.zod.d.ts +45 -0
- package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +57 -0
- package/dist/canopy/v1/generated/validators/topUpList.zod.d.ts +81 -0
- package/dist/canopy/v1/generated/validators/topUpList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/transaction.zod.d.ts +76 -0
- package/dist/canopy/v1/generated/validators/transaction.zod.js +71 -0
- package/dist/canopy/v1/generated/validators/transactionList.zod.d.ts +83 -0
- package/dist/canopy/v1/generated/validators/transactionList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/transactionType.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/transactionType.zod.js +34 -0
- package/dist/canopy/v1/generated/validators/usageCharge.zod.d.ts +66 -0
- package/dist/canopy/v1/generated/validators/usageCharge.zod.js +80 -0
- package/dist/canopy/v1/generated/validators/usageChargeList.zod.d.ts +73 -0
- package/dist/canopy/v1/generated/validators/usageChargeList.zod.js +37 -0
- package/dist/compute/v1/generated/models.d.ts +2882 -15
- package/dist/compute/v1/generated/models.js +359 -0
- package/dist/compute/v1/generated/validators/accountBalance.zod.d.ts +139 -0
- package/dist/compute/v1/generated/validators/accountBalance.zod.js +42 -0
- package/dist/compute/v1/generated/validators/accountIdentity.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/accountIdentity.zod.js +29 -0
- package/dist/compute/v1/generated/validators/activeResource.zod.d.ts +57 -0
- package/dist/compute/v1/generated/validators/activeResource.zod.js +52 -0
- package/dist/compute/v1/generated/validators/activeResourceList.zod.d.ts +64 -0
- package/dist/compute/v1/generated/validators/activeResourceList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/allocateFloatingIPResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/allowance.zod.d.ts +60 -0
- package/dist/compute/v1/generated/validators/allowance.zod.js +57 -0
- package/dist/compute/v1/generated/validators/allowanceList.zod.d.ts +67 -0
- package/dist/compute/v1/generated/validators/allowanceList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/applicability.zod.d.ts +124 -0
- package/dist/compute/v1/generated/validators/applicability.zod.js +48 -0
- package/dist/compute/v1/generated/validators/applicablePlan.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/applicablePlan.zod.js +31 -0
- package/dist/compute/v1/generated/validators/appliedCredit.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/appliedCredit.zod.js +32 -0
- package/dist/compute/v1/generated/validators/autoRenewSet.zod.d.ts +29 -0
- package/dist/compute/v1/generated/validators/autoRenewSet.zod.js +27 -0
- package/dist/compute/v1/generated/validators/billingAccount.zod.d.ts +41 -0
- package/dist/compute/v1/generated/validators/billingAccount.zod.js +47 -0
- package/dist/compute/v1/generated/validators/billingAccountCreate.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/billingAccountCreate.zod.js +31 -0
- package/dist/compute/v1/generated/validators/billingAccountList.zod.d.ts +48 -0
- package/dist/compute/v1/generated/validators/billingAccountList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/billingAccountUpdate.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/billingAccountUpdate.zod.js +32 -0
- package/dist/compute/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +37 -0
- package/dist/compute/v1/generated/validators/cancelSubscriptionRequest.zod.js +37 -0
- package/dist/compute/v1/generated/validators/cancellation.zod.d.ts +80 -0
- package/dist/compute/v1/generated/validators/cancellation.zod.js +55 -0
- package/dist/compute/v1/generated/validators/cancellationCreate.zod.d.ts +39 -0
- package/dist/compute/v1/generated/validators/cancellationCreate.zod.js +47 -0
- package/dist/compute/v1/generated/validators/cancellationItem.zod.d.ts +51 -0
- package/dist/compute/v1/generated/validators/cancellationItem.zod.js +51 -0
- package/dist/compute/v1/generated/validators/cancellationList.zod.d.ts +87 -0
- package/dist/compute/v1/generated/validators/cancellationList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/cancellationRefundPreview.zod.d.ts +62 -0
- package/dist/compute/v1/generated/validators/cancellationRefundPreview.zod.js +48 -0
- package/dist/compute/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +47 -0
- package/dist/compute/v1/generated/validators/cancellationRefundPreviewItem.zod.js +47 -0
- package/dist/compute/v1/generated/validators/checkoutMode.zod.js +1 -1
- package/dist/compute/v1/generated/validators/checkoutOptions.zod.js +2 -2
- package/dist/compute/v1/generated/validators/contact.zod.d.ts +57 -0
- package/dist/compute/v1/generated/validators/contact.zod.js +55 -0
- package/dist/compute/v1/generated/validators/contactCreate.zod.d.ts +48 -0
- package/dist/compute/v1/generated/validators/contactCreate.zod.js +46 -0
- package/dist/compute/v1/generated/validators/contactList.zod.d.ts +54 -0
- package/dist/compute/v1/generated/validators/contactList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/contactUpdate.zod.d.ts +49 -0
- package/dist/compute/v1/generated/validators/contactUpdate.zod.js +47 -0
- package/dist/compute/v1/generated/validators/createBackupCapacityPackResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/createDiskResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/createImageResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/creditGrant.zod.d.ts +142 -0
- package/dist/compute/v1/generated/validators/creditGrant.zod.js +43 -0
- package/dist/compute/v1/generated/validators/creditGrantList.zod.d.ts +149 -0
- package/dist/compute/v1/generated/validators/creditGrantList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/creditGroup.zod.d.ts +128 -0
- package/dist/compute/v1/generated/validators/creditGroup.zod.js +34 -0
- package/dist/compute/v1/generated/validators/creditNote.zod.d.ts +50 -0
- package/dist/compute/v1/generated/validators/creditNote.zod.js +56 -0
- package/dist/compute/v1/generated/validators/creditNoteItem.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/creditNoteItem.zod.js +32 -0
- package/dist/compute/v1/generated/validators/creditNoteItemList.zod.d.ts +40 -0
- package/dist/compute/v1/generated/validators/creditNoteItemList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/creditNoteList.zod.d.ts +57 -0
- package/dist/compute/v1/generated/validators/creditNoteList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/currency.zod.d.ts +37 -0
- package/dist/compute/v1/generated/validators/currency.zod.js +46 -0
- package/dist/compute/v1/generated/validators/currencyList.zod.d.ts +39 -0
- package/dist/compute/v1/generated/validators/currencyList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/discount.zod.d.ts +158 -0
- package/dist/compute/v1/generated/validators/discount.zod.js +60 -0
- package/dist/compute/v1/generated/validators/discountList.zod.d.ts +165 -0
- package/dist/compute/v1/generated/validators/discountList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/entitlement.zod.d.ts +41 -0
- package/dist/compute/v1/generated/validators/entitlement.zod.js +36 -0
- package/dist/compute/v1/generated/validators/entitlementList.zod.d.ts +48 -0
- package/dist/compute/v1/generated/validators/entitlementList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/errorA200529.zod.d.ts +32 -0
- package/dist/compute/v1/generated/validators/errorA200529.zod.js +26 -0
- package/dist/compute/v1/generated/validators/featureGrant.zod.d.ts +49 -0
- package/dist/compute/v1/generated/validators/featureGrant.zod.js +40 -0
- package/dist/compute/v1/generated/validators/featureGrantList.zod.d.ts +56 -0
- package/dist/compute/v1/generated/validators/featureGrantList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/featureGrantStatus.zod.d.ts +32 -0
- package/dist/compute/v1/generated/validators/featureGrantStatus.zod.js +27 -0
- package/dist/compute/v1/generated/validators/invoice.zod.d.ts +79 -0
- package/dist/compute/v1/generated/validators/invoice.zod.js +69 -0
- package/dist/compute/v1/generated/validators/invoiceItem.zod.d.ts +57 -0
- package/dist/compute/v1/generated/validators/invoiceItem.zod.js +62 -0
- package/dist/compute/v1/generated/validators/invoiceItemList.zod.d.ts +64 -0
- package/dist/compute/v1/generated/validators/invoiceItemList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/invoiceList.zod.d.ts +86 -0
- package/dist/compute/v1/generated/validators/invoiceList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/invoiceStatus.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/invoiceStatus.zod.js +27 -0
- package/dist/compute/v1/generated/validators/invoiceSummary.zod.d.ts +49 -0
- package/dist/compute/v1/generated/validators/invoiceSummary.zod.js +50 -0
- package/dist/compute/v1/generated/validators/launchInstanceResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/namedIdentity.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/namedIdentity.zod.js +31 -0
- package/dist/compute/v1/generated/validators/objectIdentity.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/objectIdentity.zod.js +31 -0
- package/dist/compute/v1/generated/validators/order.zod.d.ts +159 -0
- package/dist/compute/v1/generated/validators/order.zod.js +81 -0
- package/dist/compute/v1/generated/validators/orderCancel.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/orderCancel.zod.js +33 -0
- package/dist/compute/v1/generated/validators/orderItem.zod.d.ts +85 -0
- package/dist/compute/v1/generated/validators/orderItem.zod.js +89 -0
- package/dist/compute/v1/generated/validators/orderItemList.zod.d.ts +91 -0
- package/dist/compute/v1/generated/validators/orderItemList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/orderItemStatus.zod.d.ts +32 -0
- package/dist/compute/v1/generated/validators/orderItemStatus.zod.js +27 -0
- package/dist/compute/v1/generated/validators/orderList.zod.d.ts +166 -0
- package/dist/compute/v1/generated/validators/orderList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/orderRefundQuote.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/orderRefundQuote.zod.js +34 -0
- package/dist/compute/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/orderRefundQuoteInput.zod.js +36 -0
- package/dist/compute/v1/generated/validators/orderStatus.zod.d.ts +34 -0
- package/dist/compute/v1/generated/validators/orderStatus.zod.js +27 -0
- package/dist/compute/v1/generated/validators/paidWith.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/paidWith.zod.js +41 -0
- package/dist/compute/v1/generated/validators/payInvoiceRequest.zod.d.ts +42 -0
- package/dist/compute/v1/generated/validators/payInvoiceRequest.zod.js +69 -0
- package/dist/compute/v1/generated/validators/payTogetherRequest.zod.d.ts +34 -0
- package/dist/compute/v1/generated/validators/payTogetherRequest.zod.js +37 -0
- package/dist/compute/v1/generated/validators/paymentAction.zod.d.ts +38 -0
- package/dist/compute/v1/generated/validators/paymentAction.zod.js +40 -0
- package/dist/compute/v1/generated/validators/paymentCancellationReason.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/paymentCancellationReason.zod.js +27 -0
- package/dist/compute/v1/generated/validators/paymentMethod.zod.d.ts +41 -0
- package/dist/compute/v1/generated/validators/paymentMethod.zod.js +35 -0
- package/dist/compute/v1/generated/validators/paymentMethodList.zod.d.ts +48 -0
- package/dist/compute/v1/generated/validators/paymentMethodList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/paymentMethodSetup.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/paymentMethodSetup.zod.js +33 -0
- package/dist/compute/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +42 -0
- package/dist/compute/v1/generated/validators/paymentMethodSetupResult.zod.js +34 -0
- package/dist/compute/v1/generated/validators/paymentOption.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/paymentOption.zod.js +31 -0
- package/dist/compute/v1/generated/validators/paymentOptionList.zod.d.ts +40 -0
- package/dist/compute/v1/generated/validators/paymentOptionList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/paymentOptionMethod.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/paymentOptionMethod.zod.js +32 -0
- package/dist/compute/v1/generated/validators/paymentPreview.zod.d.ts +46 -0
- package/dist/compute/v1/generated/validators/paymentPreview.zod.js +44 -0
- package/dist/compute/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +33 -0
- package/dist/compute/v1/generated/validators/paymentPreviewInvoice.zod.js +32 -0
- package/dist/compute/v1/generated/validators/paymentResult.zod.d.ts +102 -0
- package/dist/compute/v1/generated/validators/paymentResult.zod.js +55 -0
- package/dist/compute/v1/generated/validators/paymentStatus.zod.d.ts +32 -0
- package/dist/compute/v1/generated/validators/paymentStatus.zod.js +27 -0
- package/dist/compute/v1/generated/validators/placedOrder.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/placedOrder.zod.js +5 -8
- package/dist/compute/v1/generated/validators/plan.zod.d.ts +47 -0
- package/dist/compute/v1/generated/validators/plan.zod.js +39 -0
- package/dist/compute/v1/generated/validators/planFeature.zod.d.ts +34 -0
- package/dist/compute/v1/generated/validators/planFeature.zod.js +29 -0
- package/dist/compute/v1/generated/validators/planList.zod.d.ts +54 -0
- package/dist/compute/v1/generated/validators/planList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/price.zod.d.ts +97 -0
- package/dist/compute/v1/generated/validators/price.zod.js +83 -0
- package/dist/compute/v1/generated/validators/priceList.zod.d.ts +104 -0
- package/dist/compute/v1/generated/validators/priceList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/priceOption.zod.d.ts +60 -0
- package/dist/compute/v1/generated/validators/priceOption.zod.js +44 -0
- package/dist/compute/v1/generated/validators/product.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/product.zod.js +30 -0
- package/dist/compute/v1/generated/validators/productID.zod.d.ts +29 -0
- package/dist/compute/v1/generated/validators/productID.zod.js +32 -0
- package/dist/compute/v1/generated/validators/productList.zod.d.ts +38 -0
- package/dist/compute/v1/generated/validators/productList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/projectAssignment.zod.d.ts +38 -0
- package/dist/compute/v1/generated/validators/projectAssignment.zod.js +39 -0
- package/dist/compute/v1/generated/validators/projectAssignmentList.zod.d.ts +45 -0
- package/dist/compute/v1/generated/validators/projectAssignmentList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/purchaseOperation.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/purchaseOperation.zod.js +27 -0
- package/dist/compute/v1/generated/validators/quote.zod.js +2 -2
- package/dist/compute/v1/generated/validators/quote5f60d00.zod.d.ts +115 -0
- package/dist/compute/v1/generated/validators/quote5f60d00.zod.js +46 -0
- package/dist/compute/v1/generated/validators/quoteA200529.zod.d.ts +115 -0
- package/dist/compute/v1/generated/validators/quoteA200529.zod.js +26 -0
- package/dist/compute/v1/generated/validators/quoteCancellation.zod.d.ts +34 -0
- package/dist/compute/v1/generated/validators/quoteCancellation.zod.js +36 -0
- package/dist/compute/v1/generated/validators/quoteItem.zod.d.ts +6 -3
- package/dist/compute/v1/generated/validators/quoteItem.zod.js +22 -11
- package/dist/compute/v1/generated/validators/quoteItemDc1fddb.zod.d.ts +38 -0
- package/dist/compute/v1/generated/validators/quoteItemDc1fddb.zod.js +43 -0
- package/dist/compute/v1/generated/validators/quoteItemInput.zod.d.ts +58 -0
- package/dist/compute/v1/generated/validators/quoteItemInput.zod.js +57 -0
- package/dist/compute/v1/generated/validators/quoteRenewal.zod.d.ts +43 -0
- package/dist/compute/v1/generated/validators/quoteRenewal.zod.js +42 -0
- package/dist/compute/v1/generated/validators/quoteRenewalResult.zod.d.ts +43 -0
- package/dist/compute/v1/generated/validators/quoteRenewalResult.zod.js +40 -0
- package/dist/compute/v1/generated/validators/quoteRequest.zod.d.ts +88 -0
- package/dist/compute/v1/generated/validators/quoteRequest.zod.js +58 -0
- package/dist/compute/v1/generated/validators/quotedDiscount.zod.d.ts +35 -0
- package/dist/compute/v1/generated/validators/quotedDiscount.zod.js +37 -0
- package/dist/compute/v1/generated/validators/rate.zod.d.ts +54 -0
- package/dist/compute/v1/generated/validators/rate.zod.js +49 -0
- package/dist/compute/v1/generated/validators/rateList.zod.d.ts +61 -0
- package/dist/compute/v1/generated/validators/rateList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/refund.zod.d.ts +108 -0
- package/dist/compute/v1/generated/validators/refund.zod.js +60 -0
- package/dist/compute/v1/generated/validators/refundList.zod.d.ts +115 -0
- package/dist/compute/v1/generated/validators/refundList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/refundPolicy.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/refundPolicy.zod.js +27 -0
- package/dist/compute/v1/generated/validators/refundReason.zod.d.ts +39 -0
- package/dist/compute/v1/generated/validators/refundReason.zod.js +39 -0
- package/dist/compute/v1/generated/validators/renewRequest.zod.d.ts +47 -0
- package/dist/compute/v1/generated/validators/renewRequest.zod.js +58 -0
- package/dist/compute/v1/generated/validators/renewalOrderRequest.zod.d.ts +41 -0
- package/dist/compute/v1/generated/validators/renewalOrderRequest.zod.js +41 -0
- package/dist/compute/v1/generated/validators/renewalPrice.zod.d.ts +46 -0
- package/dist/compute/v1/generated/validators/renewalPrice.zod.js +39 -0
- package/dist/compute/v1/generated/validators/renewalPriceList.zod.d.ts +53 -0
- package/dist/compute/v1/generated/validators/renewalPriceList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/resizeDiskResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/resizeInstanceResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/setFloatingIPBandwidthResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +29 -0
- package/dist/compute/v1/generated/validators/setProjectAssignmentRequest.zod.js +27 -0
- package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +23 -1
- package/dist/compute/v1/generated/validators/spendRow.zod.d.ts +38 -0
- package/dist/compute/v1/generated/validators/spendRow.zod.js +34 -0
- package/dist/compute/v1/generated/validators/spendRowList.zod.d.ts +47 -0
- package/dist/compute/v1/generated/validators/spendRowList.zod.js +33 -0
- package/dist/compute/v1/generated/validators/statement.zod.d.ts +50 -0
- package/dist/compute/v1/generated/validators/statement.zod.js +52 -0
- package/dist/compute/v1/generated/validators/statementAmounts.zod.d.ts +32 -0
- package/dist/compute/v1/generated/validators/statementAmounts.zod.js +31 -0
- package/dist/compute/v1/generated/validators/statementItem.zod.d.ts +35 -0
- package/dist/compute/v1/generated/validators/statementItem.zod.js +37 -0
- package/dist/compute/v1/generated/validators/statementList.zod.d.ts +57 -0
- package/dist/compute/v1/generated/validators/statementList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/statementStatus.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/statementStatus.zod.js +25 -0
- package/dist/compute/v1/generated/validators/statementSummary.zod.d.ts +51 -0
- package/dist/compute/v1/generated/validators/statementSummary.zod.js +35 -0
- package/dist/compute/v1/generated/validators/subscription.zod.d.ts +127 -0
- package/dist/compute/v1/generated/validators/subscription.zod.js +108 -0
- package/dist/compute/v1/generated/validators/subscriptionCancellation.zod.d.ts +53 -0
- package/dist/compute/v1/generated/validators/subscriptionCancellation.zod.js +46 -0
- package/dist/compute/v1/generated/validators/subscriptionList.zod.d.ts +133 -0
- package/dist/compute/v1/generated/validators/subscriptionList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/taxItem.zod.d.ts +37 -0
- package/dist/compute/v1/generated/validators/taxItem.zod.js +37 -0
- package/dist/compute/v1/generated/validators/terminationPolicyA200529.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/terminationPolicyA200529.zod.js +26 -0
- package/dist/compute/v1/generated/validators/terminationPolicyBfdab9f.zod.d.ts +30 -0
- package/dist/compute/v1/generated/validators/terminationPolicyBfdab9f.zod.js +27 -0
- package/dist/compute/v1/generated/validators/tier.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/tier.zod.js +33 -0
- package/dist/compute/v1/generated/validators/topUp.zod.d.ts +67 -0
- package/dist/compute/v1/generated/validators/topUp.zod.js +62 -0
- package/dist/compute/v1/generated/validators/topUpCreate.zod.d.ts +38 -0
- package/dist/compute/v1/generated/validators/topUpCreate.zod.js +50 -0
- package/dist/compute/v1/generated/validators/topUpList.zod.d.ts +74 -0
- package/dist/compute/v1/generated/validators/topUpList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/transaction.zod.d.ts +69 -0
- package/dist/compute/v1/generated/validators/transaction.zod.js +64 -0
- package/dist/compute/v1/generated/validators/transactionList.zod.d.ts +76 -0
- package/dist/compute/v1/generated/validators/transactionList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/transactionType.zod.d.ts +32 -0
- package/dist/compute/v1/generated/validators/transactionType.zod.js +27 -0
- package/dist/compute/v1/generated/validators/usageCharge.zod.d.ts +59 -0
- package/dist/compute/v1/generated/validators/usageCharge.zod.js +73 -0
- package/dist/compute/v1/generated/validators/usageChargeList.zod.d.ts +66 -0
- package/dist/compute/v1/generated/validators/usageChargeList.zod.js +30 -0
- package/dist/membership/v1/generated/functions.d.ts +224 -0
- package/dist/membership/v1/generated/functions.js +237 -0
- package/dist/membership/v1/generated/models.d.ts +3308 -0
- package/dist/membership/v1/generated/models.js +400 -0
- package/dist/membership/v1/generated/schemas.zod.d.ts +139 -0
- package/dist/membership/v1/generated/schemas.zod.js +158 -0
- package/dist/membership/v1/generated/validators/accountBalance.zod.d.ts +138 -0
- package/dist/membership/v1/generated/validators/accountBalance.zod.js +41 -0
- package/dist/membership/v1/generated/validators/accountIdentity.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/accountIdentity.zod.js +28 -0
- package/dist/membership/v1/generated/validators/activeResource.zod.d.ts +56 -0
- package/dist/membership/v1/generated/validators/activeResource.zod.js +51 -0
- package/dist/membership/v1/generated/validators/activeResourceList.zod.d.ts +63 -0
- package/dist/membership/v1/generated/validators/activeResourceList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/allowance.zod.d.ts +59 -0
- package/dist/membership/v1/generated/validators/allowance.zod.js +56 -0
- package/dist/membership/v1/generated/validators/allowanceBenefit.zod.d.ts +36 -0
- package/dist/membership/v1/generated/validators/allowanceBenefit.zod.js +36 -0
- package/dist/membership/v1/generated/validators/allowanceList.zod.d.ts +66 -0
- package/dist/membership/v1/generated/validators/allowanceList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/applicability.zod.d.ts +123 -0
- package/dist/membership/v1/generated/validators/applicability.zod.js +47 -0
- package/dist/membership/v1/generated/validators/applicablePlan.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/applicablePlan.zod.js +30 -0
- package/dist/membership/v1/generated/validators/appliedCredit.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/appliedCredit.zod.js +31 -0
- package/dist/membership/v1/generated/validators/autoRenewSet.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/autoRenewSet.zod.js +26 -0
- package/dist/membership/v1/generated/validators/benefit.zod.d.ts +76 -0
- package/dist/membership/v1/generated/validators/benefit.zod.js +37 -0
- package/dist/membership/v1/generated/validators/billingAccount.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/billingAccount.zod.js +46 -0
- package/dist/membership/v1/generated/validators/billingAccountCreate.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/billingAccountCreate.zod.js +30 -0
- package/dist/membership/v1/generated/validators/billingAccountList.zod.d.ts +47 -0
- package/dist/membership/v1/generated/validators/billingAccountList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/billingAccountUpdate.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/billingAccountUpdate.zod.js +31 -0
- package/dist/membership/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +36 -0
- package/dist/membership/v1/generated/validators/cancelSubscriptionRequest.zod.js +36 -0
- package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +79 -0
- package/dist/membership/v1/generated/validators/cancellation.zod.js +54 -0
- package/dist/membership/v1/generated/validators/cancellationCreate.zod.d.ts +38 -0
- package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +46 -0
- package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +50 -0
- package/dist/membership/v1/generated/validators/cancellationItem.zod.js +50 -0
- package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +86 -0
- package/dist/membership/v1/generated/validators/cancellationList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +61 -0
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +47 -0
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +46 -0
- package/dist/membership/v1/generated/validators/checkoutMode.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/checkoutMode.zod.js +26 -0
- package/dist/membership/v1/generated/validators/checkoutOptions.zod.d.ts +34 -0
- package/dist/membership/v1/generated/validators/checkoutOptions.zod.js +35 -0
- package/dist/membership/v1/generated/validators/contact.zod.d.ts +56 -0
- package/dist/membership/v1/generated/validators/contact.zod.js +54 -0
- package/dist/membership/v1/generated/validators/contactCreate.zod.d.ts +47 -0
- package/dist/membership/v1/generated/validators/contactCreate.zod.js +45 -0
- package/dist/membership/v1/generated/validators/contactList.zod.d.ts +53 -0
- package/dist/membership/v1/generated/validators/contactList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/contactUpdate.zod.d.ts +48 -0
- package/dist/membership/v1/generated/validators/contactUpdate.zod.js +46 -0
- package/dist/membership/v1/generated/validators/creditBenefit.zod.d.ts +34 -0
- package/dist/membership/v1/generated/validators/creditBenefit.zod.js +38 -0
- package/dist/membership/v1/generated/validators/creditGrant.zod.d.ts +141 -0
- package/dist/membership/v1/generated/validators/creditGrant.zod.js +42 -0
- package/dist/membership/v1/generated/validators/creditGrantList.zod.d.ts +148 -0
- package/dist/membership/v1/generated/validators/creditGrantList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/creditGroup.zod.d.ts +127 -0
- package/dist/membership/v1/generated/validators/creditGroup.zod.js +33 -0
- package/dist/membership/v1/generated/validators/creditNote.zod.d.ts +49 -0
- package/dist/membership/v1/generated/validators/creditNote.zod.js +55 -0
- package/dist/membership/v1/generated/validators/creditNoteItem.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/creditNoteItem.zod.js +31 -0
- package/dist/membership/v1/generated/validators/creditNoteItemList.zod.d.ts +39 -0
- package/dist/membership/v1/generated/validators/creditNoteItemList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/creditNoteList.zod.d.ts +56 -0
- package/dist/membership/v1/generated/validators/creditNoteList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/currency.zod.d.ts +27 -0
- package/dist/membership/v1/generated/validators/currency.zod.js +25 -0
- package/dist/membership/v1/generated/validators/currency6ff0ec7.zod.d.ts +36 -0
- package/dist/membership/v1/generated/validators/currency6ff0ec7.zod.js +45 -0
- package/dist/membership/v1/generated/validators/currencyA200529.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/currencyA200529.zod.js +25 -0
- package/dist/membership/v1/generated/validators/currencyList.zod.d.ts +38 -0
- package/dist/membership/v1/generated/validators/currencyList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/cursorPagination.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/cursorPagination.zod.js +29 -0
- package/dist/membership/v1/generated/validators/discount.zod.d.ts +157 -0
- package/dist/membership/v1/generated/validators/discount.zod.js +59 -0
- package/dist/membership/v1/generated/validators/discountBenefit.zod.d.ts +39 -0
- package/dist/membership/v1/generated/validators/discountBenefit.zod.js +37 -0
- package/dist/membership/v1/generated/validators/discountList.zod.d.ts +164 -0
- package/dist/membership/v1/generated/validators/discountList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/entitlement.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/entitlement.zod.js +35 -0
- package/dist/membership/v1/generated/validators/entitlementList.zod.d.ts +47 -0
- package/dist/membership/v1/generated/validators/entitlementList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/error.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/error.zod.js +32 -0
- package/dist/membership/v1/generated/validators/errorA200529.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/errorA200529.zod.js +25 -0
- package/dist/membership/v1/generated/validators/featureBenefit.zod.d.ts +33 -0
- package/dist/membership/v1/generated/validators/featureBenefit.zod.js +31 -0
- package/dist/membership/v1/generated/validators/featureGrant.zod.d.ts +48 -0
- package/dist/membership/v1/generated/validators/featureGrant.zod.js +39 -0
- package/dist/membership/v1/generated/validators/featureGrantList.zod.d.ts +55 -0
- package/dist/membership/v1/generated/validators/featureGrantList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/featureGrantStatus.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/featureGrantStatus.zod.js +26 -0
- package/dist/membership/v1/generated/validators/getPlanParams.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/getPlanParams.zod.js +27 -0
- package/dist/membership/v1/generated/validators/grant.zod.d.ts +86 -0
- package/dist/membership/v1/generated/validators/grant.zod.js +46 -0
- package/dist/membership/v1/generated/validators/invoice.zod.d.ts +78 -0
- package/dist/membership/v1/generated/validators/invoice.zod.js +68 -0
- package/dist/membership/v1/generated/validators/invoiceItem.zod.d.ts +56 -0
- package/dist/membership/v1/generated/validators/invoiceItem.zod.js +61 -0
- package/dist/membership/v1/generated/validators/invoiceItemList.zod.d.ts +63 -0
- package/dist/membership/v1/generated/validators/invoiceItemList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +85 -0
- package/dist/membership/v1/generated/validators/invoiceList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/invoiceStatus.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/invoiceStatus.zod.js +26 -0
- package/dist/membership/v1/generated/validators/invoiceSummary.zod.d.ts +48 -0
- package/dist/membership/v1/generated/validators/invoiceSummary.zod.js +49 -0
- package/dist/membership/v1/generated/validators/listMembershipPeriodsParams.zod.d.ts +33 -0
- package/dist/membership/v1/generated/validators/listMembershipPeriodsParams.zod.js +39 -0
- package/dist/membership/v1/generated/validators/listMembershipsParams.zod.d.ts +34 -0
- package/dist/membership/v1/generated/validators/listMembershipsParams.zod.js +40 -0
- package/dist/membership/v1/generated/validators/listPlansParams.zod.d.ts +34 -0
- package/dist/membership/v1/generated/validators/listPlansParams.zod.js +37 -0
- package/dist/membership/v1/generated/validators/membership.zod.d.ts +123 -0
- package/dist/membership/v1/generated/validators/membership.zod.js +55 -0
- package/dist/membership/v1/generated/validators/membershipCreate.zod.d.ts +37 -0
- package/dist/membership/v1/generated/validators/membershipCreate.zod.js +32 -0
- package/dist/membership/v1/generated/validators/membershipDowngrade.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/membershipDowngrade.zod.js +28 -0
- package/dist/membership/v1/generated/validators/membershipList.zod.d.ts +130 -0
- package/dist/membership/v1/generated/validators/membershipList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +151 -0
- package/dist/membership/v1/generated/validators/membershipPurchase.zod.js +31 -0
- package/dist/membership/v1/generated/validators/membershipUpgrade.zod.d.ts +35 -0
- package/dist/membership/v1/generated/validators/membershipUpgrade.zod.js +28 -0
- package/dist/membership/v1/generated/validators/money.zod.d.ts +26 -0
- package/dist/membership/v1/generated/validators/money.zod.js +26 -0
- package/dist/membership/v1/generated/validators/namedIdentity.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/namedIdentity.zod.js +30 -0
- package/dist/membership/v1/generated/validators/objectIdentity.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/objectIdentity.zod.js +30 -0
- package/dist/membership/v1/generated/validators/offsetPagination.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/offsetPagination.zod.js +31 -0
- package/dist/membership/v1/generated/validators/order.zod.d.ts +158 -0
- package/dist/membership/v1/generated/validators/order.zod.js +80 -0
- package/dist/membership/v1/generated/validators/orderCancel.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/orderCancel.zod.js +32 -0
- package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +84 -0
- package/dist/membership/v1/generated/validators/orderItem.zod.js +88 -0
- package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +90 -0
- package/dist/membership/v1/generated/validators/orderItemList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/orderItemStatus.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/orderItemStatus.zod.js +26 -0
- package/dist/membership/v1/generated/validators/orderList.zod.d.ts +165 -0
- package/dist/membership/v1/generated/validators/orderList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/orderRefundQuote.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +33 -0
- package/dist/membership/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/orderRefundQuoteInput.zod.js +35 -0
- package/dist/membership/v1/generated/validators/orderStatus.zod.d.ts +33 -0
- package/dist/membership/v1/generated/validators/orderStatus.zod.js +26 -0
- package/dist/membership/v1/generated/validators/paidWith.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/paidWith.zod.js +40 -0
- package/dist/membership/v1/generated/validators/payInvoiceRequest.zod.d.ts +41 -0
- package/dist/membership/v1/generated/validators/payInvoiceRequest.zod.js +68 -0
- package/dist/membership/v1/generated/validators/payTogetherRequest.zod.d.ts +33 -0
- package/dist/membership/v1/generated/validators/payTogetherRequest.zod.js +36 -0
- package/dist/membership/v1/generated/validators/paymentAction.zod.d.ts +37 -0
- package/dist/membership/v1/generated/validators/paymentAction.zod.js +39 -0
- package/dist/membership/v1/generated/validators/paymentCancellationReason.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/paymentCancellationReason.zod.js +26 -0
- package/dist/membership/v1/generated/validators/paymentMethod.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/paymentMethod.zod.js +34 -0
- package/dist/membership/v1/generated/validators/paymentMethodList.zod.d.ts +47 -0
- package/dist/membership/v1/generated/validators/paymentMethodList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/paymentMethodSetup.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/paymentMethodSetup.zod.js +32 -0
- package/dist/membership/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +41 -0
- package/dist/membership/v1/generated/validators/paymentMethodSetupResult.zod.js +33 -0
- package/dist/membership/v1/generated/validators/paymentOption.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/paymentOption.zod.js +30 -0
- package/dist/membership/v1/generated/validators/paymentOptionList.zod.d.ts +39 -0
- package/dist/membership/v1/generated/validators/paymentOptionList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/paymentOptionMethod.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/paymentOptionMethod.zod.js +31 -0
- package/dist/membership/v1/generated/validators/paymentPreview.zod.d.ts +45 -0
- package/dist/membership/v1/generated/validators/paymentPreview.zod.js +43 -0
- package/dist/membership/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +32 -0
- package/dist/membership/v1/generated/validators/paymentPreviewInvoice.zod.js +31 -0
- package/dist/membership/v1/generated/validators/paymentResult.zod.d.ts +101 -0
- package/dist/membership/v1/generated/validators/paymentResult.zod.js +54 -0
- package/dist/membership/v1/generated/validators/paymentStatus.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/paymentStatus.zod.js +26 -0
- package/dist/membership/v1/generated/validators/period.zod.d.ts +98 -0
- package/dist/membership/v1/generated/validators/period.zod.js +35 -0
- package/dist/membership/v1/generated/validators/periodList.zod.d.ts +105 -0
- package/dist/membership/v1/generated/validators/periodList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/placedOrder.zod.d.ts +51 -0
- package/dist/membership/v1/generated/validators/placedOrder.zod.js +31 -0
- package/dist/membership/v1/generated/validators/plan.zod.d.ts +93 -0
- package/dist/membership/v1/generated/validators/plan.zod.js +34 -0
- package/dist/membership/v1/generated/validators/planA200529.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/planA200529.zod.js +25 -0
- package/dist/membership/v1/generated/validators/planC836db9.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/planC836db9.zod.js +38 -0
- package/dist/membership/v1/generated/validators/planFeature.zod.d.ts +33 -0
- package/dist/membership/v1/generated/validators/planFeature.zod.js +28 -0
- package/dist/membership/v1/generated/validators/planList.zod.d.ts +100 -0
- package/dist/membership/v1/generated/validators/planList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/planListA200529.zod.d.ts +53 -0
- package/dist/membership/v1/generated/validators/planListA200529.zod.js +25 -0
- package/dist/membership/v1/generated/validators/planListC836db9.zod.d.ts +53 -0
- package/dist/membership/v1/generated/validators/planListC836db9.zod.js +29 -0
- package/dist/membership/v1/generated/validators/planPrice.zod.d.ts +35 -0
- package/dist/membership/v1/generated/validators/planPrice.zod.js +34 -0
- package/dist/membership/v1/generated/validators/planSummary.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/planSummary.zod.js +31 -0
- package/dist/membership/v1/generated/validators/price.zod.d.ts +96 -0
- package/dist/membership/v1/generated/validators/price.zod.js +82 -0
- package/dist/membership/v1/generated/validators/priceList.zod.d.ts +103 -0
- package/dist/membership/v1/generated/validators/priceList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/priceOption.zod.d.ts +59 -0
- package/dist/membership/v1/generated/validators/priceOption.zod.js +43 -0
- package/dist/membership/v1/generated/validators/product.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/product.zod.js +29 -0
- package/dist/membership/v1/generated/validators/productID.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/productID.zod.js +31 -0
- package/dist/membership/v1/generated/validators/productIdentity.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/productIdentity.zod.js +29 -0
- package/dist/membership/v1/generated/validators/productList.zod.d.ts +37 -0
- package/dist/membership/v1/generated/validators/productList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/projectAssignment.zod.d.ts +37 -0
- package/dist/membership/v1/generated/validators/projectAssignment.zod.js +38 -0
- package/dist/membership/v1/generated/validators/projectAssignmentList.zod.d.ts +44 -0
- package/dist/membership/v1/generated/validators/projectAssignmentList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/purchaseOperation.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/purchaseOperation.zod.js +26 -0
- package/dist/membership/v1/generated/validators/quote.zod.d.ts +114 -0
- package/dist/membership/v1/generated/validators/quote.zod.js +45 -0
- package/dist/membership/v1/generated/validators/quoteCancellation.zod.d.ts +33 -0
- package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +35 -0
- package/dist/membership/v1/generated/validators/quoteItem.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/quoteItem.zod.js +53 -0
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +57 -0
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +56 -0
- package/dist/membership/v1/generated/validators/quoteRenewal.zod.d.ts +42 -0
- package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +41 -0
- package/dist/membership/v1/generated/validators/quoteRenewalResult.zod.d.ts +42 -0
- package/dist/membership/v1/generated/validators/quoteRenewalResult.zod.js +39 -0
- package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +87 -0
- package/dist/membership/v1/generated/validators/quoteRequest.zod.js +57 -0
- package/dist/membership/v1/generated/validators/quotedDiscount.zod.d.ts +34 -0
- package/dist/membership/v1/generated/validators/quotedDiscount.zod.js +36 -0
- package/dist/membership/v1/generated/validators/rate.zod.d.ts +53 -0
- package/dist/membership/v1/generated/validators/rate.zod.js +48 -0
- package/dist/membership/v1/generated/validators/rateList.zod.d.ts +60 -0
- package/dist/membership/v1/generated/validators/rateList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/refund.zod.d.ts +107 -0
- package/dist/membership/v1/generated/validators/refund.zod.js +59 -0
- package/dist/membership/v1/generated/validators/refundList.zod.d.ts +114 -0
- package/dist/membership/v1/generated/validators/refundList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/refundPolicy.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/refundPolicy.zod.js +26 -0
- package/dist/membership/v1/generated/validators/refundReason.zod.d.ts +38 -0
- package/dist/membership/v1/generated/validators/refundReason.zod.js +38 -0
- package/dist/membership/v1/generated/validators/renewRequest.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/renewRequest.zod.js +57 -0
- package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +40 -0
- package/dist/membership/v1/generated/validators/renewalPrice.zod.d.ts +45 -0
- package/dist/membership/v1/generated/validators/renewalPrice.zod.js +38 -0
- package/dist/membership/v1/generated/validators/renewalPriceList.zod.d.ts +52 -0
- package/dist/membership/v1/generated/validators/renewalPriceList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/setProjectAssignmentRequest.zod.js +26 -0
- package/dist/membership/v1/generated/validators/spendRow.zod.d.ts +37 -0
- package/dist/membership/v1/generated/validators/spendRow.zod.js +33 -0
- package/dist/membership/v1/generated/validators/spendRowList.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/spendRowList.zod.js +32 -0
- package/dist/membership/v1/generated/validators/statement.zod.d.ts +49 -0
- package/dist/membership/v1/generated/validators/statement.zod.js +51 -0
- package/dist/membership/v1/generated/validators/statementAmounts.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/statementAmounts.zod.js +30 -0
- package/dist/membership/v1/generated/validators/statementItem.zod.d.ts +34 -0
- package/dist/membership/v1/generated/validators/statementItem.zod.js +36 -0
- package/dist/membership/v1/generated/validators/statementList.zod.d.ts +56 -0
- package/dist/membership/v1/generated/validators/statementList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/statementStatus.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/statementStatus.zod.js +24 -0
- package/dist/membership/v1/generated/validators/statementSummary.zod.d.ts +50 -0
- package/dist/membership/v1/generated/validators/statementSummary.zod.js +34 -0
- package/dist/membership/v1/generated/validators/subscription.zod.d.ts +126 -0
- package/dist/membership/v1/generated/validators/subscription.zod.js +107 -0
- package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.d.ts +52 -0
- package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.js +45 -0
- package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +132 -0
- package/dist/membership/v1/generated/validators/subscriptionList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/taxItem.zod.d.ts +36 -0
- package/dist/membership/v1/generated/validators/taxItem.zod.js +36 -0
- package/dist/membership/v1/generated/validators/terminationPolicy.zod.d.ts +29 -0
- package/dist/membership/v1/generated/validators/terminationPolicy.zod.js +26 -0
- package/dist/membership/v1/generated/validators/tier.zod.d.ts +30 -0
- package/dist/membership/v1/generated/validators/tier.zod.js +32 -0
- package/dist/membership/v1/generated/validators/topUp.zod.d.ts +66 -0
- package/dist/membership/v1/generated/validators/topUp.zod.js +61 -0
- package/dist/membership/v1/generated/validators/topUpCreate.zod.d.ts +37 -0
- package/dist/membership/v1/generated/validators/topUpCreate.zod.js +49 -0
- package/dist/membership/v1/generated/validators/topUpList.zod.d.ts +73 -0
- package/dist/membership/v1/generated/validators/topUpList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/transaction.zod.d.ts +68 -0
- package/dist/membership/v1/generated/validators/transaction.zod.js +63 -0
- package/dist/membership/v1/generated/validators/transactionList.zod.d.ts +75 -0
- package/dist/membership/v1/generated/validators/transactionList.zod.js +29 -0
- package/dist/membership/v1/generated/validators/transactionType.zod.d.ts +31 -0
- package/dist/membership/v1/generated/validators/transactionType.zod.js +26 -0
- package/dist/membership/v1/generated/validators/usageCharge.zod.d.ts +58 -0
- package/dist/membership/v1/generated/validators/usageCharge.zod.js +72 -0
- package/dist/membership/v1/generated/validators/usageChargeList.zod.d.ts +65 -0
- package/dist/membership/v1/generated/validators/usageChargeList.zod.js +29 -0
- package/dist/routes.d.ts +80 -8
- package/dist/routes.js +90 -9
- package/package.json +1 -1
- package/dist/billing/v1/generated/validators/checkoutOrderRequest.zod.d.ts +0 -16
- package/dist/billing/v1/generated/validators/checkoutOrderRequest.zod.js +0 -22
|
@@ -340,7 +340,7 @@ export declare const ServiceResourceStatus: {
|
|
|
340
340
|
readonly failed: "failed";
|
|
341
341
|
};
|
|
342
342
|
/**
|
|
343
|
-
* Why the enablement failed; null unless `status` is `failed`. `order_declined` means Billing did not accept the order, for example because the billing account is suspended; `order_canceled` means the order was withdrawn; `order_expired` means
|
|
343
|
+
* Why the enablement failed; null unless `status` is `failed`. `order_declined` means Billing did not accept the order, for example because the billing account is suspended; `order_canceled` means the order was withdrawn; `order_expired` means it was not paid in time.
|
|
344
344
|
* @nullable
|
|
345
345
|
*/
|
|
346
346
|
export type ServiceResourceFailureReason = (typeof ServiceResourceFailureReason)[keyof typeof ServiceResourceFailureReason] | null;
|
|
@@ -356,7 +356,7 @@ export interface ServiceResource {
|
|
|
356
356
|
/** `inactive` has never been enabled or its subscription has ended; `pending` awaits acceptance of its order; `active` accepts requests on the forwarding endpoints; `failed` means the enablement failed, as `failure_reason` states. An `inactive` or `failed` service can be enabled again. */
|
|
357
357
|
status: ServiceResourceStatus;
|
|
358
358
|
/**
|
|
359
|
-
* Why the enablement failed; null unless `status` is `failed`. `order_declined` means Billing did not accept the order, for example because the billing account is suspended; `order_canceled` means the order was withdrawn; `order_expired` means
|
|
359
|
+
* Why the enablement failed; null unless `status` is `failed`. `order_declined` means Billing did not accept the order, for example because the billing account is suspended; `order_canceled` means the order was withdrawn; `order_expired` means it was not paid in time.
|
|
360
360
|
* @nullable
|
|
361
361
|
*/
|
|
362
362
|
failure_reason: ServiceResourceFailureReason;
|
|
@@ -382,12 +382,13 @@ export interface ServiceResource {
|
|
|
382
382
|
ended_at: string | null;
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
|
-
* automatic
|
|
386
|
-
* credit grants and available balance. Insufficient funds fail the purchase with HTTP 422
|
|
385
|
+
* automatic applies the best applicable account discount, issues the invoice and pays it from eligible
|
|
386
|
+
* credit grants and available balance at placement. Insufficient funds fail the purchase with HTTP 422
|
|
387
387
|
* BILLING_INSUFFICIENT_FUNDS; no Billing order, charge or discount redemption is committed.
|
|
388
|
-
* deferred
|
|
389
|
-
*
|
|
390
|
-
*
|
|
388
|
+
* deferred places the order with a draft invoice at base prices and collects nothing. Paying that
|
|
389
|
+
* invoice through Billing applies a promotion code or the best applicable account discount, issues the
|
|
390
|
+
* invoice and collects it; an order still unpaid at its deadline expires. A zero-total invoice is issued
|
|
391
|
+
* and paid at placement in either mode.
|
|
391
392
|
*/
|
|
392
393
|
export type CheckoutMode = (typeof CheckoutMode)[keyof typeof CheckoutMode];
|
|
393
394
|
export declare const CheckoutMode: {
|
|
@@ -397,7 +398,7 @@ export declare const CheckoutMode: {
|
|
|
397
398
|
/**
|
|
398
399
|
* Shared checkout choices for a product purchase. Omitting this object or mode selects
|
|
399
400
|
* automatic checkout. Each purchase creates its own order. Promotion codes are supplied only to
|
|
400
|
-
* Billing quote and
|
|
401
|
+
* Billing quote and payment operations. A service may retain a failed creation record when Billing
|
|
401
402
|
* refuses a purchase; no infrastructure is created for that refusal.
|
|
402
403
|
*/
|
|
403
404
|
export interface CheckoutOptions {
|
|
@@ -406,7 +407,7 @@ export interface CheckoutOptions {
|
|
|
406
407
|
* Expected invoice total after discounts and tax, before applying credit grants or balance.
|
|
407
408
|
* A different total fails with BILLING_AMOUNT_CHANGED without charging or reserving a discount.
|
|
408
409
|
* Accepted only in automatic mode; with deferred it is refused with HTTP 400. For deferred
|
|
409
|
-
* checkout,
|
|
410
|
+
* checkout, give the expected amount when paying the invoice through Billing.
|
|
410
411
|
*/
|
|
411
412
|
expected_amount?: Money & string;
|
|
412
413
|
}
|
|
@@ -414,16 +415,70 @@ export interface CreateServiceRequestBody {
|
|
|
414
415
|
checkout?: CheckoutOptions;
|
|
415
416
|
}
|
|
416
417
|
/**
|
|
417
|
-
*
|
|
418
|
+
* A draft is not yet issued. The draft invoice of an order shows base prices until it is paid, when
|
|
419
|
+
* the discount is applied and it is issued; other drafts are private to administrators.
|
|
420
|
+
* An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
|
|
421
|
+
* Unbilled usage remains separate from invoices until it is invoiced.
|
|
422
|
+
* A refund does not change the status: a paid invoice stays paid, with the refunded part in
|
|
423
|
+
* amount_refunded. void means collection has stopped and any funds received have been returned.
|
|
418
424
|
*/
|
|
419
|
-
export
|
|
425
|
+
export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
|
|
426
|
+
export declare const InvoiceStatus: {
|
|
427
|
+
readonly draft: "draft";
|
|
428
|
+
readonly open: "open";
|
|
429
|
+
readonly paid: "paid";
|
|
430
|
+
readonly void: "void";
|
|
431
|
+
readonly uncollectible: "uncollectible";
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Purchase-related invoice amounts, without account contact details or payment methods. Every order
|
|
435
|
+
* has an invoice from placement. A draft shows base prices until it is paid, when the discount is
|
|
436
|
+
* applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
|
|
437
|
+
* checkout mode. Neither establishes acceptance or delivery.
|
|
438
|
+
*/
|
|
439
|
+
export interface InvoiceSummary {
|
|
440
|
+
id: string;
|
|
441
|
+
number?: string;
|
|
442
|
+
currency: string;
|
|
443
|
+
status: InvoiceStatus;
|
|
420
444
|
/**
|
|
421
|
-
*
|
|
422
|
-
*
|
|
445
|
+
* Sum of the line amounts before discounts. Where prices include tax, the tax contained in
|
|
446
|
+
* each line's discounted amount is taken out here, so that total = subtotal -
|
|
447
|
+
* discount_amount + tax_amount always holds.
|
|
448
|
+
*/
|
|
449
|
+
subtotal: string;
|
|
450
|
+
/** Sum of the line discounts, taken off before tax. */
|
|
451
|
+
discount_amount: string;
|
|
452
|
+
tax_amount: string;
|
|
453
|
+
total: string;
|
|
454
|
+
amount_paid: string;
|
|
455
|
+
/** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
|
|
456
|
+
pre_payment_credit_notes_amount: Money;
|
|
457
|
+
/** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
|
|
458
|
+
post_payment_credit_notes_amount: Money;
|
|
459
|
+
/**
|
|
460
|
+
* What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
461
|
+
* @pattern ^\d+(\.\d{1,10})?$
|
|
423
462
|
*/
|
|
424
|
-
|
|
425
|
-
|
|
463
|
+
amount_due: string;
|
|
464
|
+
amount_refunded: string;
|
|
465
|
+
due_at?: string;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* The Billing order this purchase placed and its invoice as they stood at placement. Read the order and
|
|
469
|
+
* the invoice in Billing for current progress: the service starts delivery only after Billing accepts the
|
|
470
|
+
* order, and payment alone does not mean delivery has completed.
|
|
471
|
+
*/
|
|
472
|
+
export interface PlacedOrder {
|
|
426
473
|
order_id: string;
|
|
474
|
+
/** The order's invoice, the same as invoice.id. */
|
|
475
|
+
invoice_id: string;
|
|
476
|
+
/**
|
|
477
|
+
* What the purchase charges. A draft shows the base price in total and is paid through Billing, where a
|
|
478
|
+
* promotion code can still be applied; an open invoice is issued and awaits its amount_due; a paid one
|
|
479
|
+
* needs nothing further. A zero-total invoice is issued and paid at placement.
|
|
480
|
+
*/
|
|
481
|
+
invoice: InvoiceSummary;
|
|
427
482
|
}
|
|
428
483
|
/**
|
|
429
484
|
* The service, `pending` until its order is accepted, and the order.
|
|
@@ -437,7 +492,7 @@ export interface CreateServiceResponseBody {
|
|
|
437
492
|
* A line without an immediate charge has zero checkout amounts. unit_amount remains null when
|
|
438
493
|
* no single unit price applies; an unrequested usage estimate remains null.
|
|
439
494
|
*/
|
|
440
|
-
export interface
|
|
495
|
+
export interface QuoteItemDc1fddb {
|
|
441
496
|
plan_name: string;
|
|
442
497
|
/**
|
|
443
498
|
* Unit price before discounts, with tax included only where the price includes it. Null when
|
|
@@ -478,7 +533,7 @@ export interface QuoteItem {
|
|
|
478
533
|
*/
|
|
479
534
|
export interface Quote {
|
|
480
535
|
/** One line for each item the purchase would order, in the order it would order them. */
|
|
481
|
-
items:
|
|
536
|
+
items: QuoteItemDc1fddb[];
|
|
482
537
|
/**
|
|
483
538
|
* Sum of line amounts before discounts, less tax already included in the discounted line
|
|
484
539
|
* amounts, as on an invoice.
|
|
@@ -531,6 +586,2817 @@ export interface CursorPagination {
|
|
|
531
586
|
/** @nullable */
|
|
532
587
|
next_cursor?: string | null;
|
|
533
588
|
}
|
|
589
|
+
/**
|
|
590
|
+
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
591
|
+
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
592
|
+
* invoices state this. Only operators change it.
|
|
593
|
+
*/
|
|
594
|
+
export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
|
|
595
|
+
export declare const ContactTaxExempt: {
|
|
596
|
+
readonly none: "none";
|
|
597
|
+
readonly exempt: "exempt";
|
|
598
|
+
readonly reverse: "reverse";
|
|
599
|
+
};
|
|
600
|
+
/**
|
|
601
|
+
* A billing-account contact profile with one address. An account can hold multiple contacts; this is not a login identity.
|
|
602
|
+
*/
|
|
603
|
+
export interface Contact {
|
|
604
|
+
id: string;
|
|
605
|
+
billing_account_id: number;
|
|
606
|
+
/**
|
|
607
|
+
* @minLength 1
|
|
608
|
+
* @maxLength 255
|
|
609
|
+
*/
|
|
610
|
+
name: string;
|
|
611
|
+
/** @maxLength 255 */
|
|
612
|
+
legal_name?: string;
|
|
613
|
+
/** @maxLength 255 */
|
|
614
|
+
email?: string;
|
|
615
|
+
/** @maxLength 64 */
|
|
616
|
+
tax_id?: string;
|
|
617
|
+
/** @maxLength 255 */
|
|
618
|
+
address_line1?: string;
|
|
619
|
+
/** @maxLength 255 */
|
|
620
|
+
address_line2?: string;
|
|
621
|
+
/** @maxLength 128 */
|
|
622
|
+
address_city?: string;
|
|
623
|
+
/** @maxLength 128 */
|
|
624
|
+
address_state?: string;
|
|
625
|
+
/** @maxLength 32 */
|
|
626
|
+
address_postal_code?: string;
|
|
627
|
+
/** @pattern ^([A-Z]{2})?$ */
|
|
628
|
+
address_country?: string;
|
|
629
|
+
/**
|
|
630
|
+
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
631
|
+
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
632
|
+
* invoices state this. Only operators change it.
|
|
633
|
+
*/
|
|
634
|
+
tax_exempt: ContactTaxExempt;
|
|
635
|
+
active: boolean;
|
|
636
|
+
created_at: string;
|
|
637
|
+
}
|
|
638
|
+
export interface ContactCreate {
|
|
639
|
+
/**
|
|
640
|
+
* @minLength 1
|
|
641
|
+
* @maxLength 255
|
|
642
|
+
*/
|
|
643
|
+
name: string;
|
|
644
|
+
/** @maxLength 255 */
|
|
645
|
+
legal_name?: string;
|
|
646
|
+
/** @maxLength 255 */
|
|
647
|
+
email?: string;
|
|
648
|
+
/** @maxLength 64 */
|
|
649
|
+
tax_id?: string;
|
|
650
|
+
/** @maxLength 255 */
|
|
651
|
+
address_line1?: string;
|
|
652
|
+
/** @maxLength 255 */
|
|
653
|
+
address_line2?: string;
|
|
654
|
+
/** @maxLength 128 */
|
|
655
|
+
address_city?: string;
|
|
656
|
+
/** @maxLength 128 */
|
|
657
|
+
address_state?: string;
|
|
658
|
+
/** @maxLength 32 */
|
|
659
|
+
address_postal_code?: string;
|
|
660
|
+
/** @pattern ^([A-Z]{2})?$ */
|
|
661
|
+
address_country?: string;
|
|
662
|
+
}
|
|
663
|
+
export interface ContactUpdate {
|
|
664
|
+
/**
|
|
665
|
+
* @minLength 1
|
|
666
|
+
* @maxLength 255
|
|
667
|
+
*/
|
|
668
|
+
name?: string;
|
|
669
|
+
/** @maxLength 255 */
|
|
670
|
+
legal_name?: string;
|
|
671
|
+
/** @maxLength 255 */
|
|
672
|
+
email?: string;
|
|
673
|
+
/** @maxLength 64 */
|
|
674
|
+
tax_id?: string;
|
|
675
|
+
/** @maxLength 255 */
|
|
676
|
+
address_line1?: string;
|
|
677
|
+
/** @maxLength 255 */
|
|
678
|
+
address_line2?: string;
|
|
679
|
+
/** @maxLength 128 */
|
|
680
|
+
address_city?: string;
|
|
681
|
+
/** @maxLength 128 */
|
|
682
|
+
address_state?: string;
|
|
683
|
+
/** @maxLength 32 */
|
|
684
|
+
address_postal_code?: string;
|
|
685
|
+
/** @pattern ^([A-Z]{2})?$ */
|
|
686
|
+
address_country?: string;
|
|
687
|
+
active?: boolean;
|
|
688
|
+
}
|
|
689
|
+
export interface ContactList {
|
|
690
|
+
items: Contact[];
|
|
691
|
+
pagination: OffsetPagination;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Whether a fulfilled purchase may end immediately or only after its paid term. Does not grant a refund. When absent, the terms are not configured and termination requires review.
|
|
695
|
+
*/
|
|
696
|
+
export type TerminationPolicy = (typeof TerminationPolicy)[keyof typeof TerminationPolicy];
|
|
697
|
+
export declare const TerminationPolicy: {
|
|
698
|
+
readonly immediate: "immediate";
|
|
699
|
+
readonly period_end: "period_end";
|
|
700
|
+
};
|
|
701
|
+
/**
|
|
702
|
+
* none refunds nothing. prorated refunds the amount paid for the current period minus the value of
|
|
703
|
+
* the time used, never below zero and never more than what remains unrefunded. The time used runs
|
|
704
|
+
* from the period start to the effective cancellation time and is valued at the plan's
|
|
705
|
+
* shorter-period prices in the same currency, frozen at purchase as the order item's
|
|
706
|
+
* refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
|
|
707
|
+
* price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
|
|
708
|
+
* second. When the plan has no prepaid period shorter than the one bought, the time used is valued
|
|
709
|
+
* at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
|
|
710
|
+
* and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
|
|
711
|
+
* paid is refunded in the same proportion as the amount it was paid on.
|
|
712
|
+
*/
|
|
713
|
+
export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
|
|
714
|
+
export declare const RefundPolicy: {
|
|
715
|
+
readonly none: "none";
|
|
716
|
+
readonly prorated: "prorated";
|
|
717
|
+
};
|
|
718
|
+
export interface OrderCancel {
|
|
719
|
+
/**
|
|
720
|
+
* Omit to select all still-pending items. Explicit selections name one or more items of this order; successful items cannot be reversed here.
|
|
721
|
+
* @minItems 1
|
|
722
|
+
* @maxItems 100
|
|
723
|
+
*/
|
|
724
|
+
order_item_ids?: string[];
|
|
725
|
+
}
|
|
726
|
+
export type QuoteRenewalInterval = (typeof QuoteRenewalInterval)[keyof typeof QuoteRenewalInterval];
|
|
727
|
+
export declare const QuoteRenewalInterval: {
|
|
728
|
+
readonly day: "day";
|
|
729
|
+
readonly month: "month";
|
|
730
|
+
readonly year: "year";
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* Price renewing a prepaid subscription. Give `price_id`, or `interval` with
|
|
734
|
+
* `interval_count`, to renew for another term at the price currently sold for it. Naming
|
|
735
|
+
* the current term, or giving neither, renews at the agreed amount. A term sold at several
|
|
736
|
+
* prices that differ in termination policy is refused with 409
|
|
737
|
+
* `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `termination_policy` or `price_id` is given.
|
|
738
|
+
*/
|
|
739
|
+
export interface QuoteRenewal {
|
|
740
|
+
subscription_id: string;
|
|
741
|
+
price_id?: string;
|
|
742
|
+
interval?: QuoteRenewalInterval;
|
|
743
|
+
/** @minimum 1 */
|
|
744
|
+
interval_count?: number;
|
|
745
|
+
/** With `interval` and `interval_count`, chooses among prices of that term that differ in termination policy. */
|
|
746
|
+
termination_policy?: TerminationPolicy;
|
|
747
|
+
/**
|
|
748
|
+
* How many consecutive periods to renew for.
|
|
749
|
+
* @minimum 1
|
|
750
|
+
* @maximum 100
|
|
751
|
+
*/
|
|
752
|
+
periods?: number;
|
|
753
|
+
}
|
|
754
|
+
export type QuoteRenewalResultInterval = (typeof QuoteRenewalResultInterval)[keyof typeof QuoteRenewalResultInterval];
|
|
755
|
+
export declare const QuoteRenewalResultInterval: {
|
|
756
|
+
readonly day: "day";
|
|
757
|
+
readonly month: "month";
|
|
758
|
+
readonly year: "year";
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* What renewing would charge. Renewing the same subscription for the same term and number
|
|
762
|
+
* of periods charges exactly `total`, unless prices or the discounts the account holds
|
|
763
|
+
* change in between.
|
|
764
|
+
*/
|
|
765
|
+
export interface QuoteRenewalResult {
|
|
766
|
+
/** Which renewal of the request this answers. */
|
|
767
|
+
index: number;
|
|
768
|
+
subscription_id: string;
|
|
769
|
+
/** The price the renewal is charged under. */
|
|
770
|
+
price_id: string;
|
|
771
|
+
interval: QuoteRenewalResultInterval;
|
|
772
|
+
interval_count: number;
|
|
773
|
+
periods: number;
|
|
774
|
+
/**
|
|
775
|
+
* The price of the periods before the discounts the account holds. A discount the
|
|
776
|
+
* subscription already carries is reflected here. Contains tax only where the price
|
|
777
|
+
* itself includes it.
|
|
778
|
+
*/
|
|
779
|
+
amount: Money;
|
|
780
|
+
/** The reduction from a discount the account holds. */
|
|
781
|
+
discount_amount: Money;
|
|
782
|
+
/** Tax on the discounted amount. */
|
|
783
|
+
tax_amount: Money;
|
|
784
|
+
/** The part of `tax_amount` already contained in `amount`. */
|
|
785
|
+
tax_included_amount: Money;
|
|
786
|
+
/**
|
|
787
|
+
* What renewing would charge: `amount` less `discount_amount`, plus `tax_amount`, less
|
|
788
|
+
* `tax_included_amount`.
|
|
789
|
+
*/
|
|
790
|
+
total: Money;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* One fully calculated purchase, estimated postpaid usage or recorded order item. Amounts use the
|
|
794
|
+
* billing-account currency. An item with no immediate charge has zero checkout amounts.
|
|
795
|
+
*/
|
|
796
|
+
export interface QuoteItem {
|
|
797
|
+
tax_amount: Money;
|
|
798
|
+
tax_included_amount: Money;
|
|
799
|
+
/**
|
|
800
|
+
* Zero-based request line index, or the recorded order item's position for an order quote.
|
|
801
|
+
* @minimum 0
|
|
802
|
+
*/
|
|
803
|
+
index: number;
|
|
804
|
+
/** Present for an existing order quote; identifies the recorded item being priced. */
|
|
805
|
+
order_item_id?: string;
|
|
806
|
+
/** The selected price, including when the request identified it indirectly. */
|
|
807
|
+
price_id: string;
|
|
808
|
+
plan_name: string;
|
|
809
|
+
/** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
|
|
810
|
+
unit_amount: Money | null;
|
|
811
|
+
/** The quantity priced. When duration_seconds is supplied for metered usage, this is quantity multiplied by that duration. */
|
|
812
|
+
quantity: string;
|
|
813
|
+
/** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
|
|
814
|
+
amount: Money;
|
|
815
|
+
discount_amount: Money;
|
|
816
|
+
total: Money;
|
|
817
|
+
currency: string;
|
|
818
|
+
}
|
|
819
|
+
export type QuotedDiscountType = (typeof QuotedDiscountType)[keyof typeof QuotedDiscountType];
|
|
820
|
+
export declare const QuotedDiscountType: {
|
|
821
|
+
readonly promotion_code: "promotion_code";
|
|
822
|
+
readonly account_discount: "account_discount";
|
|
823
|
+
};
|
|
824
|
+
/**
|
|
825
|
+
* The discount selected for this calculation. Its presence in a quote does not apply it or
|
|
826
|
+
* reserve a redemption. Discount amounts are reported on the quote and its lines.
|
|
827
|
+
*/
|
|
828
|
+
export interface QuotedDiscount {
|
|
829
|
+
type: QuotedDiscountType;
|
|
830
|
+
name: string;
|
|
831
|
+
/**
|
|
832
|
+
* Code text for a promotion_code discount; null for an account_discount.
|
|
833
|
+
* @minLength 1
|
|
834
|
+
* @maxLength 64
|
|
835
|
+
* @nullable
|
|
836
|
+
*/
|
|
837
|
+
promotion_code: string | null;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Which object this is, together with what a person currently calls it.
|
|
841
|
+
*
|
|
842
|
+
* The name is for display. It is chosen by whoever owns the object, it changes, it is not unique
|
|
843
|
+
* between objects, and it may be empty when nobody has named it yet — so it must not be used to
|
|
844
|
+
* address, match or deduplicate anything. Addressing is by id.
|
|
845
|
+
*
|
|
846
|
+
* This differs from an identity carrying a lookup key: a lookup key is written once by an operator,
|
|
847
|
+
* is unique, and can be used to fetch the object. A name cannot.
|
|
848
|
+
*/
|
|
849
|
+
export interface NamedIdentity {
|
|
850
|
+
id: string;
|
|
851
|
+
/** @maxLength 255 */
|
|
852
|
+
name: string;
|
|
853
|
+
}
|
|
854
|
+
export type CancellationRefundPreviewItemChargeType = (typeof CancellationRefundPreviewItemChargeType)[keyof typeof CancellationRefundPreviewItemChargeType];
|
|
855
|
+
export declare const CancellationRefundPreviewItemChargeType: {
|
|
856
|
+
readonly postpaid: "postpaid";
|
|
857
|
+
readonly prepaid: "prepaid";
|
|
858
|
+
readonly one_time: "one_time";
|
|
859
|
+
};
|
|
860
|
+
/**
|
|
861
|
+
* One subscription of the quoted cancellation. The amounts mean what they mean in the total.
|
|
862
|
+
*/
|
|
863
|
+
export interface CancellationRefundPreviewItem {
|
|
864
|
+
subscription_id: string;
|
|
865
|
+
plan_id: string;
|
|
866
|
+
plan_name: string;
|
|
867
|
+
/**
|
|
868
|
+
* The project and its current name, for display. Absent for a purchase at account level, and when the
|
|
869
|
+
* project details cannot be read at the moment.
|
|
870
|
+
*/
|
|
871
|
+
project?: NamedIdentity | null;
|
|
872
|
+
charge_type: CancellationRefundPreviewItemChargeType;
|
|
873
|
+
/**
|
|
874
|
+
* Whether automatic renewal is on now. Creating the cancellation turns it off. Withdrawing the
|
|
875
|
+
* cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
|
|
876
|
+
* until it is canceled and turns it back on.
|
|
877
|
+
*/
|
|
878
|
+
auto_renew: boolean;
|
|
879
|
+
unused_amount: Money;
|
|
880
|
+
refundable_amount: Money;
|
|
881
|
+
refund_amount: Money;
|
|
882
|
+
credit_amount: Money;
|
|
883
|
+
tax_amount: Money;
|
|
884
|
+
forfeited_amount: Money;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* What the cancellation would return, subscription by subscription and in total, as of now. Give
|
|
888
|
+
* `proration_date` and `refundable_amount` when creating the cancellation.
|
|
889
|
+
*
|
|
890
|
+
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
|
|
891
|
+
* time used, valued as refund policy `prorated` describes, whatever the refund terms say.
|
|
892
|
+
* - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
|
|
893
|
+
* `refund_amount` plus `credit_amount`.
|
|
894
|
+
* - `refund_amount`: the part returned to the balance or to the payment method.
|
|
895
|
+
* - `credit_amount`: the part restored to the credit grants that paid.
|
|
896
|
+
* - `tax_amount`: the tax included in `refundable_amount`.
|
|
897
|
+
* - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
|
|
898
|
+
*
|
|
899
|
+
* Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
|
|
900
|
+
*/
|
|
901
|
+
export interface CancellationRefundPreview {
|
|
902
|
+
mode: TerminationPolicy;
|
|
903
|
+
/** For `period_end`, when release begins, the end of the paid terms. */
|
|
904
|
+
scheduled_at?: string;
|
|
905
|
+
/** For `immediate`, the second the refund is computed as of. Give it when creating the cancellation. */
|
|
906
|
+
proration_date?: string;
|
|
907
|
+
currency: string;
|
|
908
|
+
unused_amount: Money;
|
|
909
|
+
refundable_amount: Money;
|
|
910
|
+
refund_amount: Money;
|
|
911
|
+
credit_amount: Money;
|
|
912
|
+
tax_amount: Money;
|
|
913
|
+
forfeited_amount: Money;
|
|
914
|
+
items: CancellationRefundPreviewItem[];
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* An estimated refund to original payment sources. Before acceptance, cancellation returns the
|
|
918
|
+
* collected amount. For delivered service, only value funded by this order is included; renewals
|
|
919
|
+
* are evaluated under their own orders and the agreed termination terms apply. An unknown
|
|
920
|
+
* delivery outcome is not evidence that a refund is eligible. This calculation does not create
|
|
921
|
+
* a refund; the amount returned is determined when cancellation or termination is confirmed.
|
|
922
|
+
*/
|
|
923
|
+
export interface OrderRefundQuote {
|
|
924
|
+
order_id: string;
|
|
925
|
+
refundable_amount: Money;
|
|
926
|
+
refund_amount: Money;
|
|
927
|
+
credit_amount: Money;
|
|
928
|
+
currency: string;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* A complete calculation in one billing-account currency, without saving a quote or reserving funds or
|
|
932
|
+
* redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
|
|
933
|
+
* included in totals for reporting and are not collectible at checkout. Only an existing-order quote
|
|
934
|
+
* provides that order's checkout amount.
|
|
935
|
+
*/
|
|
936
|
+
export interface Quote5f60d00 {
|
|
937
|
+
subtotal: Money;
|
|
938
|
+
discount_amount: Money;
|
|
939
|
+
tax_amount: Money;
|
|
940
|
+
/**
|
|
941
|
+
* The discount evaluated for a purchase or order, without applying it. Null when none is selected or
|
|
942
|
+
* when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
|
|
943
|
+
*/
|
|
944
|
+
discount: QuotedDiscount | null;
|
|
945
|
+
items: QuoteItem[];
|
|
946
|
+
renewals: QuoteRenewalResult[];
|
|
947
|
+
/** What the cancellation requested would return. Present only when one was requested. */
|
|
948
|
+
cancellation?: CancellationRefundPreview;
|
|
949
|
+
total: Money;
|
|
950
|
+
currency: string;
|
|
951
|
+
/** Present only when an order refund was requested. Nothing is collectible for this target. */
|
|
952
|
+
refund?: OrderRefundQuote;
|
|
953
|
+
}
|
|
954
|
+
export type QuoteA200529 = Quote5f60d00;
|
|
955
|
+
/**
|
|
956
|
+
* A cancellation to quote: what ending these subscriptions together would return. One mode per
|
|
957
|
+
* request; to compare, quote `immediate` and `period_end` separately.
|
|
958
|
+
*
|
|
959
|
+
* Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
|
|
960
|
+
* canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
|
|
961
|
+
* paid change still waiting to switch (`meta.order_id`).
|
|
962
|
+
*/
|
|
963
|
+
export interface QuoteCancellation {
|
|
964
|
+
/**
|
|
965
|
+
* The subscriptions to end together, all of one service. Every subscription released with a resource must be included.
|
|
966
|
+
* @minItems 1
|
|
967
|
+
* @maxItems 50
|
|
968
|
+
*/
|
|
969
|
+
subscription_ids: string[];
|
|
970
|
+
mode: TerminationPolicy;
|
|
971
|
+
}
|
|
972
|
+
export interface CancellationCreate {
|
|
973
|
+
/**
|
|
974
|
+
* As in the quote.
|
|
975
|
+
* @minItems 1
|
|
976
|
+
* @maxItems 50
|
|
977
|
+
*/
|
|
978
|
+
subscription_ids: string[];
|
|
979
|
+
mode: TerminationPolicy;
|
|
980
|
+
/**
|
|
981
|
+
* For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
|
|
982
|
+
* at most ten minutes old. The refund is computed as of it. Now when omitted.
|
|
983
|
+
*/
|
|
984
|
+
proration_date?: string;
|
|
985
|
+
/** The `refundable_amount` of the quote. The cancellation is refused when the refund differs. */
|
|
986
|
+
expected_refundable_amount: Money & string;
|
|
987
|
+
/**
|
|
988
|
+
* A note from the account holder. It is kept with the cancellation and not shown elsewhere.
|
|
989
|
+
* @maxLength 1024
|
|
990
|
+
*/
|
|
991
|
+
reason?: string;
|
|
992
|
+
}
|
|
993
|
+
export type CancellationStatus = (typeof CancellationStatus)[keyof typeof CancellationStatus];
|
|
994
|
+
export declare const CancellationStatus: {
|
|
995
|
+
readonly requested: "requested";
|
|
996
|
+
readonly scheduled: "scheduled";
|
|
997
|
+
readonly releasing: "releasing";
|
|
998
|
+
readonly completed: "completed";
|
|
999
|
+
readonly canceled: "canceled";
|
|
1000
|
+
readonly failed: "failed";
|
|
1001
|
+
};
|
|
1002
|
+
/**
|
|
1003
|
+
* Who asked for it. `project_deletion` means the project was deleted.
|
|
1004
|
+
*/
|
|
1005
|
+
export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
|
|
1006
|
+
export declare const CancellationOrigin: {
|
|
1007
|
+
readonly customer: "customer";
|
|
1008
|
+
readonly operator: "operator";
|
|
1009
|
+
readonly project_deletion: "project_deletion";
|
|
1010
|
+
};
|
|
1011
|
+
/**
|
|
1012
|
+
* How the subscription is charged. Creating the cancellation turned automatic renewal off;
|
|
1013
|
+
* withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
|
|
1014
|
+
* `prepaid` one.
|
|
1015
|
+
*/
|
|
1016
|
+
export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
|
|
1017
|
+
export declare const CancellationItemChargeType: {
|
|
1018
|
+
readonly postpaid: "postpaid";
|
|
1019
|
+
readonly prepaid: "prepaid";
|
|
1020
|
+
readonly one_time: "one_time";
|
|
1021
|
+
};
|
|
1022
|
+
export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
|
|
1023
|
+
export declare const CancellationItemStatus: {
|
|
1024
|
+
readonly requested: "requested";
|
|
1025
|
+
readonly scheduled: "scheduled";
|
|
1026
|
+
readonly releasing: "releasing";
|
|
1027
|
+
readonly completed: "completed";
|
|
1028
|
+
readonly canceled: "canceled";
|
|
1029
|
+
readonly failed: "failed";
|
|
1030
|
+
};
|
|
1031
|
+
/**
|
|
1032
|
+
* One subscription of the cancellation.
|
|
1033
|
+
*/
|
|
1034
|
+
export interface CancellationItem {
|
|
1035
|
+
/** The cancellation item of this subscription, the same as `Subscription.cancellation.id`. */
|
|
1036
|
+
id: string;
|
|
1037
|
+
subscription_id: string;
|
|
1038
|
+
plan_id: string;
|
|
1039
|
+
plan_name: string;
|
|
1040
|
+
/**
|
|
1041
|
+
* How the subscription is charged. Creating the cancellation turned automatic renewal off;
|
|
1042
|
+
* withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
|
|
1043
|
+
* `prepaid` one.
|
|
1044
|
+
*/
|
|
1045
|
+
charge_type: CancellationItemChargeType;
|
|
1046
|
+
status: CancellationItemStatus;
|
|
1047
|
+
/** Execution stopped or its result is unknown. Present while release still requires resolution; it does not establish refund eligibility. */
|
|
1048
|
+
failure_code?: string;
|
|
1049
|
+
release_started_at?: string;
|
|
1050
|
+
/** When the service ended, as confirmed by the service that provides it. */
|
|
1051
|
+
effective_at?: string;
|
|
1052
|
+
/** Present with `completed`. The part of the refund returned to the account balance. */
|
|
1053
|
+
balance_amount?: Money;
|
|
1054
|
+
/** Present with `completed`. The part restored to the credit grants that paid. */
|
|
1055
|
+
credit_amount?: Money;
|
|
1056
|
+
/** Present with `completed`. The part returned to the payment method it was paid with. */
|
|
1057
|
+
gateway_amount?: Money;
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
* One cancellation of a set of subscriptions of one service, released together at one time.
|
|
1061
|
+
*
|
|
1062
|
+
* - `requested`: `immediate`, release has not begun.
|
|
1063
|
+
* - `scheduled`: `period_end`, waiting for `scheduled_at`.
|
|
1064
|
+
* - `releasing`: release has begun; it can no longer be withdrawn.
|
|
1065
|
+
* - `completed`: every subscription has ended and its refund has been made.
|
|
1066
|
+
* - `canceled`: withdrawn before release began; the subscriptions continue.
|
|
1067
|
+
* - `failed`: the service could not carry it out, for the reason in `failure_code`; the
|
|
1068
|
+
* subscriptions continue and can be canceled again.
|
|
1069
|
+
*/
|
|
1070
|
+
export interface Cancellation {
|
|
1071
|
+
id: string;
|
|
1072
|
+
status: CancellationStatus;
|
|
1073
|
+
mode: TerminationPolicy;
|
|
1074
|
+
scheduled_at?: string;
|
|
1075
|
+
/** For `immediate`, the second the refund is computed as of. */
|
|
1076
|
+
proration_date?: string;
|
|
1077
|
+
/** Who asked for it. `project_deletion` means the project was deleted. */
|
|
1078
|
+
origin: CancellationOrigin;
|
|
1079
|
+
/**
|
|
1080
|
+
* The billing account that paid for these subscriptions when the cancellation was created: the
|
|
1081
|
+
* account of an account-level purchase, or the account the project was linked to.
|
|
1082
|
+
*/
|
|
1083
|
+
billing_account_id: number;
|
|
1084
|
+
currency: string;
|
|
1085
|
+
/** The refund confirmed when it was created. Absent when the platform created it. */
|
|
1086
|
+
expected_refundable_amount?: Money;
|
|
1087
|
+
/**
|
|
1088
|
+
* Present with `failed`. A code of the service that provides the resources, such as a disk
|
|
1089
|
+
* that can only be released with its server. Clients map it to their own wording.
|
|
1090
|
+
*/
|
|
1091
|
+
failure_code?: string;
|
|
1092
|
+
requested_at: string;
|
|
1093
|
+
completed_at?: string;
|
|
1094
|
+
canceled_at?: string;
|
|
1095
|
+
items: CancellationItem[];
|
|
1096
|
+
}
|
|
1097
|
+
export interface CancellationList {
|
|
1098
|
+
items: Cancellation[];
|
|
1099
|
+
pagination: OffsetPagination;
|
|
1100
|
+
}
|
|
1101
|
+
export type SubscriptionCancellationStatus = (typeof SubscriptionCancellationStatus)[keyof typeof SubscriptionCancellationStatus];
|
|
1102
|
+
export declare const SubscriptionCancellationStatus: {
|
|
1103
|
+
readonly requested: "requested";
|
|
1104
|
+
readonly scheduled: "scheduled";
|
|
1105
|
+
readonly releasing: "releasing";
|
|
1106
|
+
readonly failed: "failed";
|
|
1107
|
+
readonly completed: "completed";
|
|
1108
|
+
readonly canceled: "canceled";
|
|
1109
|
+
};
|
|
1110
|
+
export type SubscriptionCancellationMode = (typeof SubscriptionCancellationMode)[keyof typeof SubscriptionCancellationMode];
|
|
1111
|
+
export declare const SubscriptionCancellationMode: {
|
|
1112
|
+
readonly immediate: "immediate";
|
|
1113
|
+
readonly period_end: "period_end";
|
|
1114
|
+
};
|
|
1115
|
+
/**
|
|
1116
|
+
* The latest cancellation that includes the subscription, with this subscription's item. `id` is the
|
|
1117
|
+
* item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
|
|
1118
|
+
* confirmed end of service. A cancellation alone does not stop metering or issue a refund.
|
|
1119
|
+
*/
|
|
1120
|
+
export interface SubscriptionCancellation {
|
|
1121
|
+
reason?: string;
|
|
1122
|
+
/** The cancellation this request belongs to, with the other subscriptions released together. */
|
|
1123
|
+
cancellation_id?: string;
|
|
1124
|
+
id: string;
|
|
1125
|
+
subscription_id: string;
|
|
1126
|
+
status: SubscriptionCancellationStatus;
|
|
1127
|
+
mode: SubscriptionCancellationMode;
|
|
1128
|
+
requested_at: string;
|
|
1129
|
+
scheduled_at?: string;
|
|
1130
|
+
effective_at?: string;
|
|
1131
|
+
completed_at?: string;
|
|
1132
|
+
release_started_at?: string;
|
|
1133
|
+
canceled_at?: string;
|
|
1134
|
+
forfeit_remaining_value: boolean;
|
|
1135
|
+
failure_code?: string;
|
|
1136
|
+
failure_reason?: string;
|
|
1137
|
+
}
|
|
1138
|
+
export type ErrorA200529 = Error;
|
|
1139
|
+
/**
|
|
1140
|
+
* Immutable platform service identifier, such as compute, canopy or assistant.
|
|
1141
|
+
* @minLength 1
|
|
1142
|
+
* @maxLength 64
|
|
1143
|
+
* @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
|
|
1144
|
+
*/
|
|
1145
|
+
export type ProductID = string;
|
|
1146
|
+
export interface Product {
|
|
1147
|
+
id: ProductID;
|
|
1148
|
+
name: string;
|
|
1149
|
+
description?: string;
|
|
1150
|
+
}
|
|
1151
|
+
export type BillingAccountStatus = (typeof BillingAccountStatus)[keyof typeof BillingAccountStatus];
|
|
1152
|
+
export declare const BillingAccountStatus: {
|
|
1153
|
+
readonly active: "active";
|
|
1154
|
+
readonly suspended: "suspended";
|
|
1155
|
+
readonly closed: "closed";
|
|
1156
|
+
};
|
|
1157
|
+
export interface BillingAccount {
|
|
1158
|
+
/**
|
|
1159
|
+
* The active contact used for invoicing. Must belong to this account; null clears the selection.
|
|
1160
|
+
* @nullable
|
|
1161
|
+
*/
|
|
1162
|
+
invoice_contact_id?: string | null;
|
|
1163
|
+
id: number;
|
|
1164
|
+
/** What you call this account. */
|
|
1165
|
+
name?: string;
|
|
1166
|
+
/** Fixed when the account was opened. */
|
|
1167
|
+
currency: string;
|
|
1168
|
+
status: BillingAccountStatus;
|
|
1169
|
+
/**
|
|
1170
|
+
* How far past the suspension threshold this account may go before its resources are
|
|
1171
|
+
* suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
|
|
1172
|
+
*/
|
|
1173
|
+
grace_amount?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* How long this account has to top up after crossing the suspension threshold.
|
|
1176
|
+
* 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
|
|
1177
|
+
*/
|
|
1178
|
+
grace_period_seconds?: number;
|
|
1179
|
+
/**
|
|
1180
|
+
* The actual time this account was closed, in UTC (RFC 3339).
|
|
1181
|
+
* Null or absent if the account is not closed or its historical close time is unknown.
|
|
1182
|
+
* @nullable
|
|
1183
|
+
*/
|
|
1184
|
+
readonly closed_at?: string | null;
|
|
1185
|
+
created_at: string;
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* A currency a billing account can be opened in.
|
|
1189
|
+
*/
|
|
1190
|
+
export interface Currency {
|
|
1191
|
+
/**
|
|
1192
|
+
* ISO 4217 alpha-3, uppercase.
|
|
1193
|
+
* @minLength 3
|
|
1194
|
+
* @maxLength 3
|
|
1195
|
+
*/
|
|
1196
|
+
code: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* Decimal places of the currency, the ISO 4217 minor unit.
|
|
1199
|
+
* @minimum 0
|
|
1200
|
+
* @maximum 4
|
|
1201
|
+
*/
|
|
1202
|
+
exponent: number;
|
|
1203
|
+
/**
|
|
1204
|
+
* @minLength 1
|
|
1205
|
+
* @maxLength 64
|
|
1206
|
+
*/
|
|
1207
|
+
name: string;
|
|
1208
|
+
minimum_top_up: Money;
|
|
1209
|
+
}
|
|
1210
|
+
export interface CurrencyList {
|
|
1211
|
+
items: Currency[];
|
|
1212
|
+
pagination: OffsetPagination;
|
|
1213
|
+
}
|
|
1214
|
+
export interface BillingAccountCreate {
|
|
1215
|
+
/**
|
|
1216
|
+
* @minLength 3
|
|
1217
|
+
* @maxLength 3
|
|
1218
|
+
*/
|
|
1219
|
+
currency: string;
|
|
1220
|
+
/** @maxLength 255 */
|
|
1221
|
+
name?: string;
|
|
1222
|
+
}
|
|
1223
|
+
export interface BillingAccountUpdate {
|
|
1224
|
+
/**
|
|
1225
|
+
* The active contact used for invoicing. Must belong to this account; null clears the selection.
|
|
1226
|
+
* @nullable
|
|
1227
|
+
*/
|
|
1228
|
+
invoice_contact_id?: string | null;
|
|
1229
|
+
/** @maxLength 255 */
|
|
1230
|
+
name?: string;
|
|
1231
|
+
}
|
|
1232
|
+
export interface BillingAccountList {
|
|
1233
|
+
items: BillingAccount[];
|
|
1234
|
+
pagination: OffsetPagination;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* A plan it refers to. active is false once the plan is archived; it still applies to subscriptions already on this plan.
|
|
1238
|
+
*/
|
|
1239
|
+
export interface ApplicablePlan {
|
|
1240
|
+
id: string;
|
|
1241
|
+
name: string;
|
|
1242
|
+
active: boolean;
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* A catalog object inlined for display.
|
|
1246
|
+
*/
|
|
1247
|
+
export interface ObjectIdentity {
|
|
1248
|
+
lookup_key?: string;
|
|
1249
|
+
id: string;
|
|
1250
|
+
name: string;
|
|
1251
|
+
}
|
|
1252
|
+
export type PriceOptionBillingScheme = (typeof PriceOptionBillingScheme)[keyof typeof PriceOptionBillingScheme];
|
|
1253
|
+
export declare const PriceOptionBillingScheme: {
|
|
1254
|
+
readonly per_unit: "per_unit";
|
|
1255
|
+
readonly tiered: "tiered";
|
|
1256
|
+
readonly rated: "rated";
|
|
1257
|
+
};
|
|
1258
|
+
export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
|
|
1259
|
+
export declare const PriceOptionType: {
|
|
1260
|
+
readonly postpaid: "postpaid";
|
|
1261
|
+
readonly prepaid: "prepaid";
|
|
1262
|
+
readonly one_time: "one_time";
|
|
1263
|
+
};
|
|
1264
|
+
export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
|
|
1265
|
+
export declare const PriceOptionInterval: {
|
|
1266
|
+
readonly none: "none";
|
|
1267
|
+
readonly day: "day";
|
|
1268
|
+
readonly month: "month";
|
|
1269
|
+
readonly year: "year";
|
|
1270
|
+
};
|
|
1271
|
+
/**
|
|
1272
|
+
* A price's display terms, including archived prices referenced by an applicability list.
|
|
1273
|
+
*/
|
|
1274
|
+
export interface PriceOption {
|
|
1275
|
+
product: Product;
|
|
1276
|
+
plan: ObjectIdentity;
|
|
1277
|
+
billing_scheme: PriceOptionBillingScheme;
|
|
1278
|
+
unit_quantity: string;
|
|
1279
|
+
id: string;
|
|
1280
|
+
currency: string;
|
|
1281
|
+
type: PriceOptionType;
|
|
1282
|
+
interval: PriceOptionInterval;
|
|
1283
|
+
/** How many periods one purchase covers. */
|
|
1284
|
+
interval_count?: number;
|
|
1285
|
+
unit_amount?: Money;
|
|
1286
|
+
/** False once the price is archived. It still applies to purchases already made at this price. */
|
|
1287
|
+
active: boolean;
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Which purchase operation this applies to. `new` covers every new purchase, including
|
|
1291
|
+
* zero-charge purchases. It does not mean the account's first purchase; use
|
|
1292
|
+
* `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
|
|
1293
|
+
* configuration or billing-term changes, including changes that increase or decrease
|
|
1294
|
+
* the amount due and changes with no additional charge or refund.
|
|
1295
|
+
*/
|
|
1296
|
+
export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
|
|
1297
|
+
export declare const PurchaseOperation: {
|
|
1298
|
+
readonly new: "new";
|
|
1299
|
+
readonly renew: "renew";
|
|
1300
|
+
readonly modify: "modify";
|
|
1301
|
+
};
|
|
1302
|
+
/**
|
|
1303
|
+
* Anything not excluded that matches an inclusion, or anything not excluded when no inclusion is
|
|
1304
|
+
* given, subject to the charge type, operation and term conditions. Entries always include their
|
|
1305
|
+
* display fields; archived plans and prices stay listed with active set to false.
|
|
1306
|
+
*/
|
|
1307
|
+
export interface Applicability {
|
|
1308
|
+
products?: Product[];
|
|
1309
|
+
plans?: ApplicablePlan[];
|
|
1310
|
+
prices?: PriceOption[];
|
|
1311
|
+
price_types?: string[];
|
|
1312
|
+
operations?: PurchaseOperation[];
|
|
1313
|
+
/**
|
|
1314
|
+
* The shortest term a purchase may have, in months. A purchase with no term, such as
|
|
1315
|
+
* metered usage, never qualifies while this is set.
|
|
1316
|
+
*/
|
|
1317
|
+
min_term_months?: number;
|
|
1318
|
+
/** The longest term a purchase may have, in months. */
|
|
1319
|
+
max_term_months?: number;
|
|
1320
|
+
excluded_products?: Product[];
|
|
1321
|
+
excluded_plans?: ApplicablePlan[];
|
|
1322
|
+
excluded_prices?: PriceOption[];
|
|
1323
|
+
}
|
|
1324
|
+
export interface CreditGroup {
|
|
1325
|
+
/** What the credit in this group may pay for. No restrictions means anything on the account. */
|
|
1326
|
+
applies_to: Applicability;
|
|
1327
|
+
/** Restricted to your first purchase of anything it applies to. */
|
|
1328
|
+
first_purchase_only?: boolean;
|
|
1329
|
+
amount: Money;
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Account balance, credits, and unpaid charges are reported separately.
|
|
1333
|
+
*/
|
|
1334
|
+
export interface AccountBalance {
|
|
1335
|
+
/** Balance minus pending balance returns, unbilled usage estimates and issued unpaid amounts. Credit grants are excluded; the result may be negative. */
|
|
1336
|
+
available_credit: Money;
|
|
1337
|
+
/** Current estimate of rated usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
|
|
1338
|
+
unbilled_amount: Money;
|
|
1339
|
+
billing_account_id: number;
|
|
1340
|
+
currency: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Prepaid funds in the account currency, excluding credits. May be negative after a payment
|
|
1343
|
+
* dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
|
|
1344
|
+
*/
|
|
1345
|
+
balance: Money;
|
|
1346
|
+
/**
|
|
1347
|
+
* The recorded remaining credit, including restricted grants. It is not withdrawable
|
|
1348
|
+
* and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
|
|
1349
|
+
* credits balance does not imply that due is zero.
|
|
1350
|
+
*/
|
|
1351
|
+
credits: Money;
|
|
1352
|
+
/** Currently valid credit whose use has applicable product, operation or eligibility conditions. Included in credits, separate from the balance. */
|
|
1353
|
+
restricted_credits: Money;
|
|
1354
|
+
/**
|
|
1355
|
+
* Currently valid, unspent credit grouped by permitted use. Restrictions and
|
|
1356
|
+
* validity dates determine which charges a group can cover, so these groups are not a general
|
|
1357
|
+
* spendable balance and may differ from the recorded credits total.
|
|
1358
|
+
*/
|
|
1359
|
+
credit_groups: CreditGroup[];
|
|
1360
|
+
/** Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
|
|
1361
|
+
due: Money;
|
|
1362
|
+
pending_returns_amount: Money;
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* A project's assignment to a billing account for the interval from effective_from to effective_to. An open-ended assignment has no end time.
|
|
1366
|
+
*/
|
|
1367
|
+
export interface ProjectAssignment {
|
|
1368
|
+
project_id: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
1371
|
+
* details cannot be read at the moment; `project_id` still identifies it.
|
|
1372
|
+
*/
|
|
1373
|
+
project?: NamedIdentity | null;
|
|
1374
|
+
billing_account_id: number;
|
|
1375
|
+
account_name?: string;
|
|
1376
|
+
currency: string;
|
|
1377
|
+
effective_from: string;
|
|
1378
|
+
/** @nullable */
|
|
1379
|
+
effective_to?: string | null;
|
|
1380
|
+
}
|
|
1381
|
+
export interface ProjectAssignmentList {
|
|
1382
|
+
items: ProjectAssignment[];
|
|
1383
|
+
pagination: OffsetPagination;
|
|
1384
|
+
}
|
|
1385
|
+
export interface SetProjectAssignmentRequest {
|
|
1386
|
+
billing_account_id: number;
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
|
|
1390
|
+
*
|
|
1391
|
+
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
1392
|
+
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
1393
|
+
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1394
|
+
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1395
|
+
* payment.
|
|
1396
|
+
*
|
|
1397
|
+
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1398
|
+
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
1399
|
+
*/
|
|
1400
|
+
export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
|
|
1401
|
+
export declare const TopUpStatus: {
|
|
1402
|
+
readonly pending: "pending";
|
|
1403
|
+
readonly succeeded: "succeeded";
|
|
1404
|
+
readonly failed: "failed";
|
|
1405
|
+
readonly canceled: "canceled";
|
|
1406
|
+
};
|
|
1407
|
+
export interface AccountIdentity {
|
|
1408
|
+
id: number;
|
|
1409
|
+
name: string;
|
|
1410
|
+
currency: string;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Why a gateway payment was withdrawn. `abandoned` means the customer did not complete it within the time
|
|
1414
|
+
* allowed for payment. `requested_by_customer` means the customer canceled it.
|
|
1415
|
+
*/
|
|
1416
|
+
export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
|
|
1417
|
+
export declare const PaymentCancellationReason: {
|
|
1418
|
+
readonly abandoned: "abandoned";
|
|
1419
|
+
readonly requested_by_customer: "requested_by_customer";
|
|
1420
|
+
};
|
|
1421
|
+
export type PaymentActionType = (typeof PaymentActionType)[keyof typeof PaymentActionType];
|
|
1422
|
+
export declare const PaymentActionType: {
|
|
1423
|
+
readonly redirect: "redirect";
|
|
1424
|
+
readonly qr_code: "qr_code";
|
|
1425
|
+
readonly sdk: "sdk";
|
|
1426
|
+
};
|
|
1427
|
+
/**
|
|
1428
|
+
* The customer's next interaction. The gateway reports the actual payment outcome separately.
|
|
1429
|
+
*/
|
|
1430
|
+
export interface PaymentAction {
|
|
1431
|
+
type: PaymentActionType;
|
|
1432
|
+
/** Identifies the browser adapter for an SDK action, for example stripe. */
|
|
1433
|
+
provider?: string;
|
|
1434
|
+
url?: string;
|
|
1435
|
+
/** QR content to render and scan, not an image URL. */
|
|
1436
|
+
qr_code?: string;
|
|
1437
|
+
/** Short-lived client credential for this payment's browser confirmation. */
|
|
1438
|
+
client_secret?: string;
|
|
1439
|
+
public_key?: string;
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* A top-up attempt and its outcome. A successful top-up adds a traceable amount to the balance; it is not a credit grant and has no associated invoice.
|
|
1443
|
+
*/
|
|
1444
|
+
export interface TopUp {
|
|
1445
|
+
id: string;
|
|
1446
|
+
billing_account_id: number;
|
|
1447
|
+
account: AccountIdentity;
|
|
1448
|
+
/** What is credited to the account, in the account's own currency. */
|
|
1449
|
+
amount: Money;
|
|
1450
|
+
currency: string;
|
|
1451
|
+
/**
|
|
1452
|
+
* The part of this top-up still held in the balance. Pending refunds can temporarily
|
|
1453
|
+
* reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
|
|
1454
|
+
*/
|
|
1455
|
+
remaining_amount?: Money;
|
|
1456
|
+
/**
|
|
1457
|
+
* `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
|
|
1458
|
+
*
|
|
1459
|
+
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
1460
|
+
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
1461
|
+
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1462
|
+
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1463
|
+
* payment.
|
|
1464
|
+
*
|
|
1465
|
+
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1466
|
+
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
1467
|
+
*/
|
|
1468
|
+
status: TopUpStatus;
|
|
1469
|
+
cancellation_reason?: PaymentCancellationReason;
|
|
1470
|
+
/** Which payment gateway collected it. */
|
|
1471
|
+
payment_gateway?: string;
|
|
1472
|
+
/** The selected payment method, such as card, wechat_pay or alipay. */
|
|
1473
|
+
method_type?: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* The currency the customer was actually charged in, when the checkout page collected a
|
|
1476
|
+
* local one. Absent when it was the same as the account's.
|
|
1477
|
+
*/
|
|
1478
|
+
presentment_currency?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* What was charged, in `presentment_currency`. It will not equal `amount`, and it is
|
|
1481
|
+
* the figure that appears on the customer's card or wallet statement.
|
|
1482
|
+
*/
|
|
1483
|
+
presentment_amount?: Money;
|
|
1484
|
+
/**
|
|
1485
|
+
* Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
|
|
1486
|
+
* passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
|
|
1487
|
+
* such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
|
|
1488
|
+
* such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
|
|
1489
|
+
* to their own wording and treat an unknown value as a generic decline.
|
|
1490
|
+
*/
|
|
1491
|
+
failure_reason?: string;
|
|
1492
|
+
action?: PaymentAction;
|
|
1493
|
+
created_at: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* When the funds arrived. Later than `created_at` — by days for a bank transfer — so
|
|
1496
|
+
* reconciling against a statement uses this rather than the moment it was started.
|
|
1497
|
+
* Absent until the payment completes.
|
|
1498
|
+
* @nullable
|
|
1499
|
+
*/
|
|
1500
|
+
settled_at?: string | null;
|
|
1501
|
+
}
|
|
1502
|
+
export interface TopUpCreate {
|
|
1503
|
+
/**
|
|
1504
|
+
* The gateway explicitly selected from the available payment options.
|
|
1505
|
+
* @minLength 1
|
|
1506
|
+
* @maxLength 32
|
|
1507
|
+
*/
|
|
1508
|
+
payment_gateway: string;
|
|
1509
|
+
/**
|
|
1510
|
+
* The selected method, such as card, wechat_pay or alipay.
|
|
1511
|
+
* @minLength 1
|
|
1512
|
+
* @maxLength 64
|
|
1513
|
+
*/
|
|
1514
|
+
method_type: string;
|
|
1515
|
+
/** The ID of this top-up attempt. Keep it before submitting and query it after an uncertain response. */
|
|
1516
|
+
id: string;
|
|
1517
|
+
billing_account_id: number;
|
|
1518
|
+
/**
|
|
1519
|
+
* In the account's currency, and no finer than that currency's smallest unit:
|
|
1520
|
+
* two decimals for most, none for the yen. A finer amount is refused here rather
|
|
1521
|
+
* than at the checkout page, where the customer would see the gateway's own wording
|
|
1522
|
+
* instead of an explanation.
|
|
1523
|
+
*
|
|
1524
|
+
* There is a minimum, which differs by currency. Below it the gateway's fee
|
|
1525
|
+
* exceeds the top-up itself, so such a payment costs more to accept than it brings.
|
|
1526
|
+
* The minimum in force is returned with the rejection.
|
|
1527
|
+
*/
|
|
1528
|
+
amount: Money & string;
|
|
1529
|
+
/** Charge a saved method instead of opening a checkout page. */
|
|
1530
|
+
payment_method_id?: string;
|
|
1531
|
+
/** Where to send the customer after checkout. */
|
|
1532
|
+
return_url?: string;
|
|
1533
|
+
}
|
|
1534
|
+
export interface TopUpList {
|
|
1535
|
+
items: TopUp[];
|
|
1536
|
+
pagination: OffsetPagination;
|
|
1537
|
+
}
|
|
1538
|
+
export interface PaymentOptionMethod {
|
|
1539
|
+
/** The value to send as `method_type`, such as card, wechat_pay or alipay. */
|
|
1540
|
+
method_type: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* Whether a method of this type can be saved with create-payment-method-setup and charged later
|
|
1543
|
+
* without the customer present. Methods that are not reusable are paid anew each time.
|
|
1544
|
+
*/
|
|
1545
|
+
reusable: boolean;
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* A payment gateway that accepts payment in the account's currency, with the methods it accepts.
|
|
1549
|
+
*/
|
|
1550
|
+
export interface PaymentOption {
|
|
1551
|
+
/** The value to send as `payment_gateway`. */
|
|
1552
|
+
payment_gateway: string;
|
|
1553
|
+
methods: PaymentOptionMethod[];
|
|
1554
|
+
}
|
|
1555
|
+
export interface PaymentOptionList {
|
|
1556
|
+
items: PaymentOption[];
|
|
1557
|
+
pagination: OffsetPagination;
|
|
1558
|
+
}
|
|
1559
|
+
export type PaymentMethodStatus = (typeof PaymentMethodStatus)[keyof typeof PaymentMethodStatus];
|
|
1560
|
+
export declare const PaymentMethodStatus: {
|
|
1561
|
+
readonly active: "active";
|
|
1562
|
+
readonly expired: "expired";
|
|
1563
|
+
readonly removed: "removed";
|
|
1564
|
+
};
|
|
1565
|
+
export interface PaymentMethod {
|
|
1566
|
+
id: string;
|
|
1567
|
+
billing_account_id: number;
|
|
1568
|
+
payment_gateway: string;
|
|
1569
|
+
brand?: string;
|
|
1570
|
+
last4?: string;
|
|
1571
|
+
/** @nullable */
|
|
1572
|
+
exp_month?: number | null;
|
|
1573
|
+
/** @nullable */
|
|
1574
|
+
exp_year?: number | null;
|
|
1575
|
+
is_default: boolean;
|
|
1576
|
+
status: PaymentMethodStatus;
|
|
1577
|
+
}
|
|
1578
|
+
export interface PaymentMethodList {
|
|
1579
|
+
items: PaymentMethod[];
|
|
1580
|
+
pagination: OffsetPagination;
|
|
1581
|
+
}
|
|
1582
|
+
export interface PaymentMethodSetup {
|
|
1583
|
+
/**
|
|
1584
|
+
* The selected gateway supporting saved payment methods.
|
|
1585
|
+
* @minLength 1
|
|
1586
|
+
* @maxLength 32
|
|
1587
|
+
*/
|
|
1588
|
+
payment_gateway: string;
|
|
1589
|
+
billing_account_id: number;
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* What the payment gateway's browser library needs in order to collect a card. There is
|
|
1593
|
+
* no address to redirect to: the form is rendered in the page, and the card goes straight
|
|
1594
|
+
* from the browser to the gateway.
|
|
1595
|
+
*/
|
|
1596
|
+
export interface PaymentMethodSetupResult {
|
|
1597
|
+
/**
|
|
1598
|
+
* The gateway's identifier for this attempt. Use it to tell a reloaded page apart
|
|
1599
|
+
* from a second attempt.
|
|
1600
|
+
*/
|
|
1601
|
+
setup_id: string;
|
|
1602
|
+
payment_gateway: string;
|
|
1603
|
+
action: PaymentAction;
|
|
1604
|
+
}
|
|
1605
|
+
/**
|
|
1606
|
+
* Applies eligible credit grants and the available balance as requested, then collects only the remainder
|
|
1607
|
+
* through the selected gateway. Grants restricted to other purchases are not counted as available funds.
|
|
1608
|
+
* An unresolved channel payment is reused; retries do not apply the grant or balance portions twice.
|
|
1609
|
+
* Without a gateway selection, insufficient account funds fail without starting an online payment.
|
|
1610
|
+
*
|
|
1611
|
+
* `payment_gateway` and `method_type` are given together, and `payment_method_id` only with both;
|
|
1612
|
+
* otherwise the request is refused with `BILLING_PURCHASE_INVALID`.
|
|
1613
|
+
*/
|
|
1614
|
+
export interface PayInvoiceRequest {
|
|
1615
|
+
/**
|
|
1616
|
+
* Required to collect an online remainder. An existing attempt keeps its original gateway.
|
|
1617
|
+
* @minLength 1
|
|
1618
|
+
* @maxLength 32
|
|
1619
|
+
*/
|
|
1620
|
+
payment_gateway?: string;
|
|
1621
|
+
/**
|
|
1622
|
+
* Required with payment_gateway; for example card, wechat_pay or alipay.
|
|
1623
|
+
* @minLength 1
|
|
1624
|
+
* @maxLength 64
|
|
1625
|
+
*/
|
|
1626
|
+
method_type?: string;
|
|
1627
|
+
/** Optional saved card owned by this billing account and belonging to the selected gateway. Omit to complete payment interactively. */
|
|
1628
|
+
payment_method_id?: string;
|
|
1629
|
+
/** Whether to apply the available balance. Credit grants are controlled separately by use_credits. */
|
|
1630
|
+
use_balance?: boolean;
|
|
1631
|
+
/** Apply eligible, unexpired credit grants before using the balance. This never withdraws grants or converts them into balance. */
|
|
1632
|
+
use_credits?: boolean;
|
|
1633
|
+
return_url?: string;
|
|
1634
|
+
/**
|
|
1635
|
+
* The code to apply while the order's terms are not yet fixed. Omit to apply the best applicable
|
|
1636
|
+
* account discount, or to keep the discount already recorded.
|
|
1637
|
+
* @minLength 1
|
|
1638
|
+
* @maxLength 64
|
|
1639
|
+
*/
|
|
1640
|
+
promotion_code?: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* The invoice total to expect, after discounts and tax and before credit grants or balance, as the
|
|
1643
|
+
* payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
|
|
1644
|
+
* and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
|
|
1645
|
+
*/
|
|
1646
|
+
expected_amount?: Money & string;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* Name at least one invoice or order. They must all belong to the same account and share
|
|
1650
|
+
* its currency; anything else is refused rather than partly paid.
|
|
1651
|
+
*/
|
|
1652
|
+
export interface PayTogetherRequest {
|
|
1653
|
+
/** @maxItems 100 */
|
|
1654
|
+
invoice_ids?: string[];
|
|
1655
|
+
/** @maxItems 100 */
|
|
1656
|
+
order_ids?: string[];
|
|
1657
|
+
/**
|
|
1658
|
+
* The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
|
|
1659
|
+
* gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
|
|
1660
|
+
* the comparison.
|
|
1661
|
+
*/
|
|
1662
|
+
expected_amount?: Money & string;
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* The current payment outcome.
|
|
1666
|
+
*
|
|
1667
|
+
* succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
|
|
1668
|
+
* order rather than submitting another payment. requires_action means the customer must complete the
|
|
1669
|
+
* supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
|
|
1670
|
+
* declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
|
|
1671
|
+
* same or another method.
|
|
1672
|
+
*/
|
|
1673
|
+
export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
|
|
1674
|
+
export declare const PaymentStatus: {
|
|
1675
|
+
readonly succeeded: "succeeded";
|
|
1676
|
+
readonly processing: "processing";
|
|
1677
|
+
readonly requires_action: "requires_action";
|
|
1678
|
+
readonly failed: "failed";
|
|
1679
|
+
};
|
|
1680
|
+
/**
|
|
1681
|
+
* A credit grant and what it would pay.
|
|
1682
|
+
*/
|
|
1683
|
+
export interface AppliedCredit {
|
|
1684
|
+
credit_grant_id: string;
|
|
1685
|
+
name: string;
|
|
1686
|
+
amount: Money;
|
|
1687
|
+
}
|
|
1688
|
+
export interface PaymentPreviewInvoice {
|
|
1689
|
+
invoice_id: string;
|
|
1690
|
+
/** @nullable */
|
|
1691
|
+
order_id?: string | null;
|
|
1692
|
+
amount_due: Money;
|
|
1693
|
+
credit_applied: Money;
|
|
1694
|
+
balance_applied: Money;
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* What paying would take, computed as paying computes it. Nothing is charged or reserved.
|
|
1698
|
+
*/
|
|
1699
|
+
export interface PaymentPreview {
|
|
1700
|
+
currency: string;
|
|
1701
|
+
/** What is outstanding before paying. */
|
|
1702
|
+
amount_due: Money;
|
|
1703
|
+
/** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
|
|
1704
|
+
credit_applied: Money;
|
|
1705
|
+
/** The credit grants that would pay, in the order they would be used. */
|
|
1706
|
+
credit_grants: AppliedCredit[];
|
|
1707
|
+
/** What the balance would pay. */
|
|
1708
|
+
balance_applied: Money;
|
|
1709
|
+
/** What would remain to be paid online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
|
|
1710
|
+
gateway_amount: Money;
|
|
1711
|
+
/** The available balance after paying. */
|
|
1712
|
+
balance_after: Money;
|
|
1713
|
+
/** Paying together only. Each invoice, in the order it would be paid. */
|
|
1714
|
+
invoices?: PaymentPreviewInvoice[];
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* Present on refunds. Where this part of the refund goes.
|
|
1718
|
+
*
|
|
1719
|
+
* - `balance`: back to the account balance.
|
|
1720
|
+
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1721
|
+
* - `gateway`: back to the payment method it was paid with.
|
|
1722
|
+
*/
|
|
1723
|
+
export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
|
|
1724
|
+
export declare const TransactionRefundDestination: {
|
|
1725
|
+
readonly balance: "balance";
|
|
1726
|
+
readonly credit: "credit";
|
|
1727
|
+
readonly gateway: "gateway";
|
|
1728
|
+
};
|
|
1729
|
+
/**
|
|
1730
|
+
* `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
1731
|
+
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
1732
|
+
* an invoice the payment was meant to pay remains open for another payment.
|
|
1733
|
+
*/
|
|
1734
|
+
export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
|
|
1735
|
+
export declare const TransactionStatus: {
|
|
1736
|
+
readonly pending: "pending";
|
|
1737
|
+
readonly succeeded: "succeeded";
|
|
1738
|
+
readonly failed: "failed";
|
|
1739
|
+
readonly canceled: "canceled";
|
|
1740
|
+
};
|
|
1741
|
+
/**
|
|
1742
|
+
* topup adds to the balance; payment settles an invoice; refund returns original funds; adjustment changes the balance with an audit reason.
|
|
1743
|
+
*/
|
|
1744
|
+
export type TransactionType = (typeof TransactionType)[keyof typeof TransactionType];
|
|
1745
|
+
export declare const TransactionType: {
|
|
1746
|
+
readonly topup: "topup";
|
|
1747
|
+
readonly payment: "payment";
|
|
1748
|
+
readonly refund: "refund";
|
|
1749
|
+
readonly adjustment: "adjustment";
|
|
1750
|
+
};
|
|
1751
|
+
/**
|
|
1752
|
+
* A funds operation. Each payment has one source; refunds identify the original successful transaction. Unknown gateway results remain pending. Payments from the balance or a gateway are distinct from credit-grant payments.
|
|
1753
|
+
*/
|
|
1754
|
+
export interface Transaction {
|
|
1755
|
+
invoice_id?: string;
|
|
1756
|
+
transaction_id?: string;
|
|
1757
|
+
/** The credit grant that paid, or for a refund, the credit grant restored. */
|
|
1758
|
+
credit_grant_id?: string;
|
|
1759
|
+
credit_grant?: ObjectIdentity;
|
|
1760
|
+
refund_id?: string;
|
|
1761
|
+
/**
|
|
1762
|
+
* Present on refunds. Where this part of the refund goes.
|
|
1763
|
+
*
|
|
1764
|
+
* - `balance`: back to the account balance.
|
|
1765
|
+
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1766
|
+
* - `gateway`: back to the payment method it was paid with.
|
|
1767
|
+
*/
|
|
1768
|
+
refund_destination?: TransactionRefundDestination;
|
|
1769
|
+
/**
|
|
1770
|
+
* `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
1771
|
+
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
1772
|
+
* an invoice the payment was meant to pay remains open for another payment.
|
|
1773
|
+
*/
|
|
1774
|
+
status?: TransactionStatus;
|
|
1775
|
+
cancellation_reason?: PaymentCancellationReason;
|
|
1776
|
+
payment_gateway?: string;
|
|
1777
|
+
method_type?: string;
|
|
1778
|
+
/**
|
|
1779
|
+
* Why it failed. Present with `failed`. For a declined gateway payment the value is the
|
|
1780
|
+
* gateway's own code, passed on unchanged: the card issuer's decline code when there is one
|
|
1781
|
+
* (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
|
|
1782
|
+
* error code (Stripe's code, such as card_declined, expired_card or
|
|
1783
|
+
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1784
|
+
* unknown value as a generic decline.
|
|
1785
|
+
*/
|
|
1786
|
+
failure_reason?: string;
|
|
1787
|
+
settled_at?: string;
|
|
1788
|
+
id: string;
|
|
1789
|
+
billing_account_id?: number;
|
|
1790
|
+
type: TransactionType;
|
|
1791
|
+
/**
|
|
1792
|
+
* Signed by type: positive for `topup` and `payment`, negative for `refund`.
|
|
1793
|
+
* An `adjustment` is positive when it adds to the balance and negative when it takes from
|
|
1794
|
+
* it. For the other types the sign does not tell the effect on the balance: a payment from
|
|
1795
|
+
* the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
|
|
1796
|
+
*/
|
|
1797
|
+
amount: Money;
|
|
1798
|
+
/**
|
|
1799
|
+
* How much of this transaction is still available in the balance. Only top-ups, positive
|
|
1800
|
+
* adjustments and gateway payments later returned to the balance can be non-zero.
|
|
1801
|
+
*/
|
|
1802
|
+
remaining_amount: Money;
|
|
1803
|
+
currency: string;
|
|
1804
|
+
reason?: string;
|
|
1805
|
+
created_at: string;
|
|
1806
|
+
}
|
|
1807
|
+
export interface PaymentResult {
|
|
1808
|
+
transactions: Transaction[];
|
|
1809
|
+
/** The gateway transaction, when one is involved. Balance and credit-grant payments are separate transactions. */
|
|
1810
|
+
transaction_id?: string;
|
|
1811
|
+
status: PaymentStatus;
|
|
1812
|
+
amount_paid: Money;
|
|
1813
|
+
/**
|
|
1814
|
+
* What is still outstanding. Zero once the payment succeeds. Unchanged while
|
|
1815
|
+
* `processing`: nothing is collected until the gateway confirms it.
|
|
1816
|
+
*/
|
|
1817
|
+
amount_due: Money;
|
|
1818
|
+
currency: string;
|
|
1819
|
+
credit_applied?: Money;
|
|
1820
|
+
gateway_amount?: Money;
|
|
1821
|
+
payment_gateway?: string;
|
|
1822
|
+
method_type?: string;
|
|
1823
|
+
/**
|
|
1824
|
+
* The amount already paid from the account's balance toward this invoice. Retrying an online remainder
|
|
1825
|
+
* does not debit it again. A canceled purchase returns funds through its refund process.
|
|
1826
|
+
*/
|
|
1827
|
+
balance_applied?: Money;
|
|
1828
|
+
action?: PaymentAction;
|
|
1829
|
+
/**
|
|
1830
|
+
* Whether paying again is worth attempting. False for a refusal that will keep
|
|
1831
|
+
* happening — a closed account, an amount over a limit — so that a client does not
|
|
1832
|
+
* retry in a loop.
|
|
1833
|
+
*/
|
|
1834
|
+
retriable?: boolean;
|
|
1835
|
+
/** @nullable */
|
|
1836
|
+
invoice_id?: string | null;
|
|
1837
|
+
/** @nullable */
|
|
1838
|
+
order_id?: string | null;
|
|
1839
|
+
/**
|
|
1840
|
+
* Why the payment did not go through. Present with `failed`. For a declined gateway payment the
|
|
1841
|
+
* value is the gateway's own code, passed on unchanged: the card issuer's decline code when
|
|
1842
|
+
* there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
|
|
1843
|
+
* gateway's error code (Stripe's code, such as card_declined, expired_card or
|
|
1844
|
+
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1845
|
+
* unknown value as a generic decline.
|
|
1846
|
+
*/
|
|
1847
|
+
failure_reason?: string;
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* How tax applied to the customer when the invoice was issued. `reverse` means no tax was
|
|
1851
|
+
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1852
|
+
*/
|
|
1853
|
+
export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
|
|
1854
|
+
export declare const InvoiceCustomerTaxExempt: {
|
|
1855
|
+
readonly none: "none";
|
|
1856
|
+
readonly exempt: "exempt";
|
|
1857
|
+
readonly reverse: "reverse";
|
|
1858
|
+
};
|
|
1859
|
+
/**
|
|
1860
|
+
* Tax name, rate and amounts frozen on the invoice.
|
|
1861
|
+
*/
|
|
1862
|
+
export interface TaxItem {
|
|
1863
|
+
id: string;
|
|
1864
|
+
invoice_id: string;
|
|
1865
|
+
name: string;
|
|
1866
|
+
percentage: string;
|
|
1867
|
+
country: string;
|
|
1868
|
+
state?: string;
|
|
1869
|
+
taxable_amount: string;
|
|
1870
|
+
tax_amount: string;
|
|
1871
|
+
currency: string;
|
|
1872
|
+
}
|
|
1873
|
+
export interface Invoice {
|
|
1874
|
+
/** Collection has been stopped; any accepted return obligations are completed before final voiding. */
|
|
1875
|
+
void_requested_at?: string;
|
|
1876
|
+
due_at?: string;
|
|
1877
|
+
amount_refunded?: string;
|
|
1878
|
+
tax_items: TaxItem[];
|
|
1879
|
+
id: string;
|
|
1880
|
+
billing_account_id: number;
|
|
1881
|
+
/** Numbered per account and per month. */
|
|
1882
|
+
number: string;
|
|
1883
|
+
currency: string;
|
|
1884
|
+
status: InvoiceStatus;
|
|
1885
|
+
/**
|
|
1886
|
+
* Sum of the line amounts before discounts. Where prices include tax, the tax contained in
|
|
1887
|
+
* each line's discounted amount is taken out here, so that total = subtotal -
|
|
1888
|
+
* discount_amount + tax_amount always holds.
|
|
1889
|
+
*/
|
|
1890
|
+
subtotal?: Money;
|
|
1891
|
+
/** Sum of the line discounts, taken off before tax. */
|
|
1892
|
+
discount_amount?: Money;
|
|
1893
|
+
tax_amount?: Money;
|
|
1894
|
+
/** Successful credit-grant payments included in amount_paid. Does not reduce the receivable or tax base. */
|
|
1895
|
+
credit_applied?: Money;
|
|
1896
|
+
/** Subtotal less discount plus tax. Balance and credit grants are payment sources, not reductions of the receivable. */
|
|
1897
|
+
total: Money;
|
|
1898
|
+
amount_paid?: Money;
|
|
1899
|
+
/** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
|
|
1900
|
+
pre_payment_credit_notes_amount: Money;
|
|
1901
|
+
/** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
|
|
1902
|
+
post_payment_credit_notes_amount: Money;
|
|
1903
|
+
/** What is still collectible after unpaid credit notes and successful payments; never below zero. A draft has none; its total is the base price, and a payment preview shows what paying it would collect. A paid or void invoice has none either. */
|
|
1904
|
+
amount_due: Money;
|
|
1905
|
+
/** @nullable */
|
|
1906
|
+
period_start?: string | null;
|
|
1907
|
+
/**
|
|
1908
|
+
* Exclusive.
|
|
1909
|
+
* @nullable
|
|
1910
|
+
*/
|
|
1911
|
+
period_end?: string | null;
|
|
1912
|
+
/**
|
|
1913
|
+
* Who this was billed to, as recorded when the invoice was issued. Later changes to
|
|
1914
|
+
* the account do not alter it.
|
|
1915
|
+
*/
|
|
1916
|
+
customer_name?: string;
|
|
1917
|
+
customer_email?: string;
|
|
1918
|
+
customer_tax_id?: string;
|
|
1919
|
+
/**
|
|
1920
|
+
* How tax applied to the customer when the invoice was issued. `reverse` means no tax was
|
|
1921
|
+
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1922
|
+
*/
|
|
1923
|
+
customer_tax_exempt?: InvoiceCustomerTaxExempt;
|
|
1924
|
+
customer_address_line1?: string;
|
|
1925
|
+
customer_address_line2?: string;
|
|
1926
|
+
customer_address_city?: string;
|
|
1927
|
+
customer_address_state?: string;
|
|
1928
|
+
customer_address_postal_code?: string;
|
|
1929
|
+
customer_address_country?: string;
|
|
1930
|
+
/** @nullable */
|
|
1931
|
+
paid_at?: string | null;
|
|
1932
|
+
}
|
|
1933
|
+
export interface InvoiceList {
|
|
1934
|
+
items: Invoice[];
|
|
1935
|
+
pagination: OffsetPagination;
|
|
1936
|
+
}
|
|
1937
|
+
export type InvoiceItemType = (typeof InvoiceItemType)[keyof typeof InvoiceItemType];
|
|
1938
|
+
export declare const InvoiceItemType: {
|
|
1939
|
+
readonly usage: "usage";
|
|
1940
|
+
readonly subscription: "subscription";
|
|
1941
|
+
readonly one_time: "one_time";
|
|
1942
|
+
readonly setup: "setup";
|
|
1943
|
+
readonly adjustment: "adjustment";
|
|
1944
|
+
};
|
|
1945
|
+
export interface InvoiceItem {
|
|
1946
|
+
taxable?: boolean;
|
|
1947
|
+
/** Discount applied to this line before tax. */
|
|
1948
|
+
discount_amount?: string;
|
|
1949
|
+
/**
|
|
1950
|
+
* The account discount applied to this line.
|
|
1951
|
+
* @nullable
|
|
1952
|
+
*/
|
|
1953
|
+
discount_id?: string | null;
|
|
1954
|
+
/**
|
|
1955
|
+
* The coupon applied to this line.
|
|
1956
|
+
* @nullable
|
|
1957
|
+
*/
|
|
1958
|
+
coupon_id?: string | null;
|
|
1959
|
+
/** Tax on the discounted line, including tax already included in the price. */
|
|
1960
|
+
tax_amount?: string;
|
|
1961
|
+
/** The part of tax_amount already included in amount. */
|
|
1962
|
+
tax_included_amount?: string;
|
|
1963
|
+
id: string;
|
|
1964
|
+
type?: InvoiceItemType;
|
|
1965
|
+
/** @nullable */
|
|
1966
|
+
project_id?: string | null;
|
|
1967
|
+
/**
|
|
1968
|
+
* The project the charge was for and its current name, for display. Absent when the line is
|
|
1969
|
+
* not for a project, and when the project no longer exists or its details cannot be read at
|
|
1970
|
+
* the moment; `project_id` still identifies it then.
|
|
1971
|
+
*/
|
|
1972
|
+
project?: NamedIdentity | null;
|
|
1973
|
+
resource_id?: string;
|
|
1974
|
+
/**
|
|
1975
|
+
* The wording as recorded when the invoice was issued. It is not re-translated
|
|
1976
|
+
* afterwards, so that an invoice continues to read as it did when it was sent.
|
|
1977
|
+
*/
|
|
1978
|
+
description: string;
|
|
1979
|
+
unit?: string;
|
|
1980
|
+
quantity?: string;
|
|
1981
|
+
/** The part covered by an included allowance, and therefore not charged. */
|
|
1982
|
+
deducted_quantity?: string;
|
|
1983
|
+
unit_amount?: Money;
|
|
1984
|
+
amount: Money;
|
|
1985
|
+
currency: string;
|
|
1986
|
+
/** @nullable */
|
|
1987
|
+
period_start?: string | null;
|
|
1988
|
+
/** @nullable */
|
|
1989
|
+
period_end?: string | null;
|
|
1990
|
+
}
|
|
1991
|
+
export interface InvoiceItemList {
|
|
1992
|
+
items: InvoiceItem[];
|
|
1993
|
+
pagination: OffsetPagination;
|
|
1994
|
+
}
|
|
1995
|
+
export interface TransactionList {
|
|
1996
|
+
items: Transaction[];
|
|
1997
|
+
pagination: OffsetPagination;
|
|
1998
|
+
}
|
|
1999
|
+
export type CreditGrantStatus = (typeof CreditGrantStatus)[keyof typeof CreditGrantStatus];
|
|
2000
|
+
export declare const CreditGrantStatus: {
|
|
2001
|
+
readonly active: "active";
|
|
2002
|
+
readonly depleted: "depleted";
|
|
2003
|
+
readonly expired: "expired";
|
|
2004
|
+
readonly voided: "voided";
|
|
2005
|
+
};
|
|
2006
|
+
export interface CreditGrant {
|
|
2007
|
+
min_amount?: string;
|
|
2008
|
+
id: string;
|
|
2009
|
+
billing_account_id?: number;
|
|
2010
|
+
name: string;
|
|
2011
|
+
amount: Money;
|
|
2012
|
+
remaining_amount: Money;
|
|
2013
|
+
currency: string;
|
|
2014
|
+
/** What this credit may pay for. No restrictions means anything on the account. */
|
|
2015
|
+
applies_to: Applicability;
|
|
2016
|
+
/** Restricted to your first purchase of anything it applies to. */
|
|
2017
|
+
first_purchase_only?: boolean;
|
|
2018
|
+
status: CreditGrantStatus;
|
|
2019
|
+
valid_from: string;
|
|
2020
|
+
/** @nullable */
|
|
2021
|
+
valid_until?: string | null;
|
|
2022
|
+
}
|
|
2023
|
+
export interface CreditGrantList {
|
|
2024
|
+
items: CreditGrant[];
|
|
2025
|
+
pagination: OffsetPagination;
|
|
2026
|
+
}
|
|
2027
|
+
export type CreditNoteStatus = (typeof CreditNoteStatus)[keyof typeof CreditNoteStatus];
|
|
2028
|
+
export declare const CreditNoteStatus: {
|
|
2029
|
+
readonly issued: "issued";
|
|
2030
|
+
readonly void: "void";
|
|
2031
|
+
};
|
|
2032
|
+
/**
|
|
2033
|
+
* Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
|
|
2034
|
+
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
2035
|
+
* issued by Leaflow on request.
|
|
2036
|
+
*/
|
|
2037
|
+
export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
|
|
2038
|
+
export declare const CreditNoteReason: {
|
|
2039
|
+
readonly provisioning_failed: "provisioning_failed";
|
|
2040
|
+
readonly order_expired: "order_expired";
|
|
2041
|
+
readonly order_canceled: "order_canceled";
|
|
2042
|
+
readonly change_canceled: "change_canceled";
|
|
2043
|
+
readonly change_expired: "change_expired";
|
|
2044
|
+
readonly subscription_canceled: "subscription_canceled";
|
|
2045
|
+
readonly usage_true_up: "usage_true_up";
|
|
2046
|
+
readonly operator: "operator";
|
|
2047
|
+
};
|
|
2048
|
+
/**
|
|
2049
|
+
* An issued invoice reduction. Its credited amount is pre_payment_amount plus post_payment_amount. A paid credit records a return obligation; refund_id identifies its refund, whose outcome may still be pending. Original invoice amounts remain unchanged.
|
|
2050
|
+
*/
|
|
2051
|
+
export interface CreditNote {
|
|
2052
|
+
id: string;
|
|
2053
|
+
invoice_id: string;
|
|
2054
|
+
currency: string;
|
|
2055
|
+
issued_at: string;
|
|
2056
|
+
status: CreditNoteStatus;
|
|
2057
|
+
/**
|
|
2058
|
+
* When this note was voided; null while issued.
|
|
2059
|
+
* @nullable
|
|
2060
|
+
*/
|
|
2061
|
+
voided_at: string | null;
|
|
2062
|
+
/** The reduction of unpaid receivables. A void note no longer reduces what is due. */
|
|
2063
|
+
pre_payment_amount: Money;
|
|
2064
|
+
/** The credited part of payments already received. This is not proof that its refund has completed. */
|
|
2065
|
+
post_payment_amount: Money;
|
|
2066
|
+
/**
|
|
2067
|
+
* The refund to the original payment sources, or null when no paid amount was credited.
|
|
2068
|
+
* @nullable
|
|
2069
|
+
*/
|
|
2070
|
+
refund_id: string | null;
|
|
2071
|
+
/**
|
|
2072
|
+
* Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
|
|
2073
|
+
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
2074
|
+
* issued by Leaflow on request.
|
|
2075
|
+
*/
|
|
2076
|
+
reason: CreditNoteReason;
|
|
2077
|
+
}
|
|
2078
|
+
export interface CreditNoteItem {
|
|
2079
|
+
id: string;
|
|
2080
|
+
credit_note_id: string;
|
|
2081
|
+
invoice_item_id: string;
|
|
2082
|
+
pre_payment_amount: Money;
|
|
2083
|
+
post_payment_amount: Money;
|
|
2084
|
+
}
|
|
2085
|
+
export interface CreditNoteList {
|
|
2086
|
+
items: CreditNote[];
|
|
2087
|
+
pagination: OffsetPagination;
|
|
2088
|
+
}
|
|
2089
|
+
export interface CreditNoteItemList {
|
|
2090
|
+
items: CreditNoteItem[];
|
|
2091
|
+
pagination: OffsetPagination;
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
|
|
2095
|
+
* @deprecated
|
|
2096
|
+
*/
|
|
2097
|
+
export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
|
|
2098
|
+
export declare const RefundDestination: {
|
|
2099
|
+
readonly balance: "balance";
|
|
2100
|
+
readonly gateway: "gateway";
|
|
2101
|
+
};
|
|
2102
|
+
/**
|
|
2103
|
+
* Summary of the parts in `transactions`.
|
|
2104
|
+
*
|
|
2105
|
+
* - `pending`: nothing has been returned yet, and at least one part is in progress.
|
|
2106
|
+
* - `processing`: some parts have been returned, and at least one is still in progress.
|
|
2107
|
+
* - `succeeded`: every part has been returned.
|
|
2108
|
+
* - `failed`: no part is in progress and at least one has failed. What was returned is in
|
|
2109
|
+
* settled_amount.
|
|
2110
|
+
*
|
|
2111
|
+
* Returns to the balance and to credit grants complete shortly after the refund is made; a
|
|
2112
|
+
* return to a payment method completes when the gateway confirms it.
|
|
2113
|
+
*/
|
|
2114
|
+
export type RefundStatus = (typeof RefundStatus)[keyof typeof RefundStatus];
|
|
2115
|
+
export declare const RefundStatus: {
|
|
2116
|
+
readonly pending: "pending";
|
|
2117
|
+
readonly processing: "processing";
|
|
2118
|
+
readonly succeeded: "succeeded";
|
|
2119
|
+
readonly failed: "failed";
|
|
2120
|
+
};
|
|
2121
|
+
/**
|
|
2122
|
+
* Why the refund was made. Clients map the code to their own wording. More codes may be added;
|
|
2123
|
+
* treat an unknown code as a refund without a stated reason.
|
|
2124
|
+
*
|
|
2125
|
+
* - `provisioning_failed`: the purchase could not be delivered.
|
|
2126
|
+
* - `order_expired`: the order expired after part of it had been paid.
|
|
2127
|
+
* - `order_canceled`: the account holder canceled the order after part of it had been paid.
|
|
2128
|
+
* - `change_canceled`: a scheduled change was withdrawn after part of it had been paid.
|
|
2129
|
+
* - `change_expired`: a scheduled change could not take effect before its time passed.
|
|
2130
|
+
* - `subscription_canceled`: the subscription was canceled and its unused value returned under
|
|
2131
|
+
* its refund terms.
|
|
2132
|
+
* - `future_period_canceled`: a renewal that had not started yet was withdrawn.
|
|
2133
|
+
* - `downgrade_difference`: after a downgrade, the remaining value of what was paid, valued as refund
|
|
2134
|
+
* policy `prorated` describes, minus the new configuration's cost for the remaining time at the
|
|
2135
|
+
* change item's `refund_monthly_amount` and `refund_hourly_amount`. Nothing is refunded when that is
|
|
2136
|
+
* zero or less.
|
|
2137
|
+
* - `usage_true_up`: usage priced again over the whole month cost less than was charged.
|
|
2138
|
+
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
2139
|
+
* - `operator`: made by the platform operator.
|
|
2140
|
+
*/
|
|
2141
|
+
export type RefundReason = (typeof RefundReason)[keyof typeof RefundReason];
|
|
2142
|
+
export declare const RefundReason: {
|
|
2143
|
+
readonly provisioning_failed: "provisioning_failed";
|
|
2144
|
+
readonly order_expired: "order_expired";
|
|
2145
|
+
readonly order_canceled: "order_canceled";
|
|
2146
|
+
readonly change_canceled: "change_canceled";
|
|
2147
|
+
readonly change_expired: "change_expired";
|
|
2148
|
+
readonly subscription_canceled: "subscription_canceled";
|
|
2149
|
+
readonly future_period_canceled: "future_period_canceled";
|
|
2150
|
+
readonly downgrade_difference: "downgrade_difference";
|
|
2151
|
+
readonly usage_true_up: "usage_true_up";
|
|
2152
|
+
readonly payment_not_applied: "payment_not_applied";
|
|
2153
|
+
readonly operator: "operator";
|
|
2154
|
+
};
|
|
2155
|
+
export interface Refund {
|
|
2156
|
+
transaction_id?: string;
|
|
2157
|
+
cancellation_item_id?: string;
|
|
2158
|
+
/** Original funds-return split and each result. Unknown gateway results remain pending. */
|
|
2159
|
+
transactions: Transaction[];
|
|
2160
|
+
id: string;
|
|
2161
|
+
billing_account_id?: number;
|
|
2162
|
+
/** @nullable */
|
|
2163
|
+
invoice_id?: string | null;
|
|
2164
|
+
/**
|
|
2165
|
+
* The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
|
|
2166
|
+
* the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
|
|
2167
|
+
* @nullable
|
|
2168
|
+
*/
|
|
2169
|
+
order_id?: string | null;
|
|
2170
|
+
/** The whole refund. Equals balance_amount plus credit_amount plus gateway_amount. */
|
|
2171
|
+
amount: Money;
|
|
2172
|
+
/** The part returned to the account balance. */
|
|
2173
|
+
balance_amount: Money;
|
|
2174
|
+
/** The part restored to the credit grants that paid for it. */
|
|
2175
|
+
credit_amount: Money;
|
|
2176
|
+
/** The part returned to the payment method it was paid with. */
|
|
2177
|
+
gateway_amount: Money;
|
|
2178
|
+
/** What has actually been returned. */
|
|
2179
|
+
settled_amount?: Money;
|
|
2180
|
+
currency: string;
|
|
2181
|
+
/**
|
|
2182
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
|
|
2183
|
+
* @deprecated
|
|
2184
|
+
*/
|
|
2185
|
+
destination?: RefundDestination;
|
|
2186
|
+
/**
|
|
2187
|
+
* Summary of the parts in `transactions`.
|
|
2188
|
+
*
|
|
2189
|
+
* - `pending`: nothing has been returned yet, and at least one part is in progress.
|
|
2190
|
+
* - `processing`: some parts have been returned, and at least one is still in progress.
|
|
2191
|
+
* - `succeeded`: every part has been returned.
|
|
2192
|
+
* - `failed`: no part is in progress and at least one has failed. What was returned is in
|
|
2193
|
+
* settled_amount.
|
|
2194
|
+
*
|
|
2195
|
+
* Returns to the balance and to credit grants complete shortly after the refund is made; a
|
|
2196
|
+
* return to a payment method completes when the gateway confirms it.
|
|
2197
|
+
*/
|
|
2198
|
+
status: RefundStatus;
|
|
2199
|
+
/** When the last part was returned. Present with `succeeded`. */
|
|
2200
|
+
settled_at?: string;
|
|
2201
|
+
reason: RefundReason;
|
|
2202
|
+
created_at: string;
|
|
2203
|
+
}
|
|
2204
|
+
export interface RefundList {
|
|
2205
|
+
items: Refund[];
|
|
2206
|
+
pagination: OffsetPagination;
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* The attributes the rate was chosen by, such as region and machine type.
|
|
2210
|
+
*/
|
|
2211
|
+
export type UsageChargeDimensions = {
|
|
2212
|
+
[key: string]: string;
|
|
2213
|
+
};
|
|
2214
|
+
export interface UsageCharge {
|
|
2215
|
+
subscription_id: string;
|
|
2216
|
+
id: string;
|
|
2217
|
+
project_id?: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
2220
|
+
* details cannot be read at the moment; `project_id` still identifies it.
|
|
2221
|
+
*/
|
|
2222
|
+
project?: NamedIdentity | null;
|
|
2223
|
+
product: Product;
|
|
2224
|
+
/** Which resource this was charged for. Empty for charges not tied to one. */
|
|
2225
|
+
resource_id?: string;
|
|
2226
|
+
meter: ObjectIdentity;
|
|
2227
|
+
unit?: string;
|
|
2228
|
+
/** The attributes the rate was chosen by, such as region and machine type. */
|
|
2229
|
+
dimensions?: UsageChargeDimensions;
|
|
2230
|
+
window_start: string;
|
|
2231
|
+
/** Exclusive. */
|
|
2232
|
+
window_end: string;
|
|
2233
|
+
/** How much was used, before any included allowance. */
|
|
2234
|
+
gross_quantity?: string;
|
|
2235
|
+
/** How much of that was covered by an allowance. */
|
|
2236
|
+
deducted_quantity?: string;
|
|
2237
|
+
/** What was charged for — the gross quantity less the part covered. */
|
|
2238
|
+
quantity: string;
|
|
2239
|
+
unit_amount?: Money;
|
|
2240
|
+
amount: Money;
|
|
2241
|
+
currency: string;
|
|
2242
|
+
/**
|
|
2243
|
+
* Present after the statement is closed and its invoice is issued.
|
|
2244
|
+
* @nullable
|
|
2245
|
+
*/
|
|
2246
|
+
invoice_id?: string | null;
|
|
2247
|
+
/**
|
|
2248
|
+
* Present after the statement is closed and its invoice is issued.
|
|
2249
|
+
* @nullable
|
|
2250
|
+
*/
|
|
2251
|
+
invoice_item_id?: string | null;
|
|
2252
|
+
/** The statement this charge was collected into. */
|
|
2253
|
+
statement_id?: string;
|
|
2254
|
+
}
|
|
2255
|
+
export interface UsageChargeList {
|
|
2256
|
+
items: UsageCharge[];
|
|
2257
|
+
pagination: OffsetPagination;
|
|
2258
|
+
}
|
|
2259
|
+
export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
|
|
2260
|
+
export declare const SubscriptionChargeType: {
|
|
2261
|
+
readonly postpaid: "postpaid";
|
|
2262
|
+
readonly prepaid: "prepaid";
|
|
2263
|
+
readonly one_time: "one_time";
|
|
2264
|
+
};
|
|
2265
|
+
export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
|
|
2266
|
+
export declare const SubscriptionInterval: {
|
|
2267
|
+
readonly none: "none";
|
|
2268
|
+
readonly day: "day";
|
|
2269
|
+
readonly month: "month";
|
|
2270
|
+
readonly year: "year";
|
|
2271
|
+
};
|
|
2272
|
+
/**
|
|
2273
|
+
* pending means the purchase relationship exists but its order has not been accepted.
|
|
2274
|
+
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
2275
|
+
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
2276
|
+
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
2277
|
+
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
2278
|
+
*/
|
|
2279
|
+
export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
|
|
2280
|
+
export declare const SubscriptionStatus: {
|
|
2281
|
+
readonly pending: "pending";
|
|
2282
|
+
readonly provisioning: "provisioning";
|
|
2283
|
+
readonly active: "active";
|
|
2284
|
+
readonly suspended: "suspended";
|
|
2285
|
+
readonly canceled: "canceled";
|
|
2286
|
+
readonly terminated: "terminated";
|
|
2287
|
+
};
|
|
2288
|
+
/**
|
|
2289
|
+
* An independently billed purchase relationship, separate from the owning service's resource.
|
|
2290
|
+
* Placing a new prepaid or postpaid service order creates a pending subscription for each line
|
|
2291
|
+
* in the same purchase transaction. Its ID is returned on the order item and remains stable
|
|
2292
|
+
* through checkout and delivery. One order may create several subscriptions, such as an instance,
|
|
2293
|
+
* its system disk and its address; it has no single subscription ID.
|
|
2294
|
+
*
|
|
2295
|
+
* Pending and provisioning do not grant service or accrue usage. A service-owned subscription
|
|
2296
|
+
* becomes provisioning when the owning service accepts the order, and active when the service
|
|
2297
|
+
* confirms delivery, with started_at set to the confirmed effective time; payment changes neither. Prepaid service periods start
|
|
2298
|
+
* then; postpaid usage starts only when the service reports actual delivery and metering.
|
|
2299
|
+
*
|
|
2300
|
+
* One-time delivery may omit a subscription. Renewals reference and extend existing subscriptions
|
|
2301
|
+
* rather than creating another; a change keeps the subscription ID and switches its terms when it
|
|
2302
|
+
* takes effect. Canceling or failing an unfulfilled purchase sets its pending or provisioning
|
|
2303
|
+
* subscriptions to canceled without starting a service period.
|
|
2304
|
+
* Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their
|
|
2305
|
+
* original value. Technical state belongs to the owning service.
|
|
2306
|
+
*
|
|
2307
|
+
* A purchased shared capacity limit, such as a regional snapshot count quota, can have its own
|
|
2308
|
+
* subscription. Activating that capacity confirms delivery of the quota, not individual snapshots.
|
|
2309
|
+
* Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
|
|
2310
|
+
* the owning service enforces current holdings against the purchased count.
|
|
2311
|
+
*/
|
|
2312
|
+
export interface Subscription {
|
|
2313
|
+
currency: string;
|
|
2314
|
+
charge_type: SubscriptionChargeType;
|
|
2315
|
+
interval: SubscriptionInterval;
|
|
2316
|
+
/** @minimum 1 */
|
|
2317
|
+
interval_count?: number;
|
|
2318
|
+
/**
|
|
2319
|
+
* Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
|
|
2320
|
+
* Pending subscriptions show base terms until paying the order fixes any new continuing discount.
|
|
2321
|
+
* Absent for other charge types.
|
|
2322
|
+
*/
|
|
2323
|
+
recurring_amount?: string;
|
|
2324
|
+
termination_policy?: TerminationPolicy;
|
|
2325
|
+
refund_policy?: RefundPolicy;
|
|
2326
|
+
order_item_id?: string;
|
|
2327
|
+
/** Present only on subscriptions created by an earlier change that replaced the subscription. A change now keeps the subscription ID. */
|
|
2328
|
+
replaces_subscription_id?: string;
|
|
2329
|
+
coupon_id?: string;
|
|
2330
|
+
coupon?: ObjectIdentity;
|
|
2331
|
+
/** @minimum 0 */
|
|
2332
|
+
discounted_renewals_remaining?: number;
|
|
2333
|
+
suspend_reason?: string;
|
|
2334
|
+
billing_cycle_anchor?: string;
|
|
2335
|
+
cancellation?: SubscriptionCancellation;
|
|
2336
|
+
/**
|
|
2337
|
+
* The saved payment method automatic renewal charges after the account's balance and credits,
|
|
2338
|
+
* before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
|
|
2339
|
+
* saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
|
|
2340
|
+
* account that pays the renewal.
|
|
2341
|
+
* @nullable
|
|
2342
|
+
*/
|
|
2343
|
+
default_payment_method_id?: string | null;
|
|
2344
|
+
created_at?: string;
|
|
2345
|
+
id: string;
|
|
2346
|
+
/** The billing account that made the purchase. Renewals of a project subscription are charged to the project's current billing account. */
|
|
2347
|
+
billing_account_id: number;
|
|
2348
|
+
account: AccountIdentity;
|
|
2349
|
+
product_id: ProductID;
|
|
2350
|
+
/**
|
|
2351
|
+
* Which project this is for. Absent when it was bought at account level, such as a
|
|
2352
|
+
* membership, which belongs to no single project.
|
|
2353
|
+
* @nullable
|
|
2354
|
+
*/
|
|
2355
|
+
project_id?: string | null;
|
|
2356
|
+
/**
|
|
2357
|
+
* The project and its current name, for display. Absent for a purchase at account level,
|
|
2358
|
+
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2359
|
+
* `project_id` still identifies it then.
|
|
2360
|
+
*/
|
|
2361
|
+
project?: NamedIdentity | null;
|
|
2362
|
+
product: Product;
|
|
2363
|
+
plan_id: string;
|
|
2364
|
+
plan_name: string;
|
|
2365
|
+
price_id: string;
|
|
2366
|
+
quantity: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* When a prepaid subscription renews or expires, the end of the last service period bought.
|
|
2369
|
+
* Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
|
|
2370
|
+
* its purchase has been paid, and for postpaid subscriptions.
|
|
2371
|
+
* @nullable
|
|
2372
|
+
*/
|
|
2373
|
+
current_term_end?: string | null;
|
|
2374
|
+
/**
|
|
2375
|
+
* Start of the service period in effect now. Null when none is, including for postpaid subscriptions.
|
|
2376
|
+
* @nullable
|
|
2377
|
+
*/
|
|
2378
|
+
current_period_start?: string | null;
|
|
2379
|
+
/**
|
|
2380
|
+
* End of the service period in effect now. Renewing in advance moves `current_term_end`, not
|
|
2381
|
+
* this. Null when no period is in effect, including for postpaid subscriptions.
|
|
2382
|
+
* @nullable
|
|
2383
|
+
*/
|
|
2384
|
+
current_period_end?: string | null;
|
|
2385
|
+
/** A prepaid subscription renews automatically while this is on. A postpaid subscription always continues until it is canceled; this is true until a cancellation is requested and cannot be set. */
|
|
2386
|
+
auto_renew: boolean;
|
|
2387
|
+
/**
|
|
2388
|
+
* pending means the purchase relationship exists but its order has not been accepted.
|
|
2389
|
+
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
2390
|
+
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
2391
|
+
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
2392
|
+
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
2393
|
+
*/
|
|
2394
|
+
status: SubscriptionStatus;
|
|
2395
|
+
/**
|
|
2396
|
+
* Confirmed start of service. Null until a new subscription becomes active, including after payment.
|
|
2397
|
+
* @nullable
|
|
2398
|
+
*/
|
|
2399
|
+
started_at?: string | null;
|
|
2400
|
+
/** @nullable */
|
|
2401
|
+
ended_at?: string | null;
|
|
2402
|
+
}
|
|
2403
|
+
export interface SubscriptionList {
|
|
2404
|
+
items: Subscription[];
|
|
2405
|
+
pagination: OffsetPagination;
|
|
2406
|
+
}
|
|
2407
|
+
export type RenewalPriceInterval = (typeof RenewalPriceInterval)[keyof typeof RenewalPriceInterval];
|
|
2408
|
+
export declare const RenewalPriceInterval: {
|
|
2409
|
+
readonly day: "day";
|
|
2410
|
+
readonly month: "month";
|
|
2411
|
+
readonly year: "year";
|
|
2412
|
+
};
|
|
2413
|
+
export interface RenewalPrice {
|
|
2414
|
+
termination_policy?: TerminationPolicy;
|
|
2415
|
+
refund_policy?: RefundPolicy;
|
|
2416
|
+
price_id: string;
|
|
2417
|
+
/** How many periods one renewal covers. */
|
|
2418
|
+
interval_count: number;
|
|
2419
|
+
interval: RenewalPriceInterval;
|
|
2420
|
+
/** What renewing for this term costs, for the quantity held. */
|
|
2421
|
+
amount?: Money;
|
|
2422
|
+
currency?: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* The term this item already bills at. Renewing for it uses the price bought
|
|
2425
|
+
* originally, so a later price change does not affect it.
|
|
2426
|
+
*/
|
|
2427
|
+
current: boolean;
|
|
2428
|
+
}
|
|
2429
|
+
export interface RenewalPriceList {
|
|
2430
|
+
items: RenewalPrice[];
|
|
2431
|
+
pagination: OffsetPagination;
|
|
2432
|
+
}
|
|
2433
|
+
/**
|
|
2434
|
+
* The unit interval_count counts in.
|
|
2435
|
+
*/
|
|
2436
|
+
export type RenewRequestInterval = (typeof RenewRequestInterval)[keyof typeof RenewRequestInterval];
|
|
2437
|
+
export declare const RenewRequestInterval: {
|
|
2438
|
+
readonly day: "day";
|
|
2439
|
+
readonly month: "month";
|
|
2440
|
+
readonly year: "year";
|
|
2441
|
+
};
|
|
2442
|
+
export interface RenewRequest {
|
|
2443
|
+
/** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
|
|
2444
|
+
order_id: string;
|
|
2445
|
+
/**
|
|
2446
|
+
* How many further periods to buy, each at the price this item already bills at.
|
|
2447
|
+
*
|
|
2448
|
+
* Buying twelve monthly periods is not the same as buying one yearly term: a longer
|
|
2449
|
+
* term is usually sold at a lower price, and that price is only reached by naming the
|
|
2450
|
+
* interval. Use `interval_count` and `interval` for that.
|
|
2451
|
+
* @minimum 1
|
|
2452
|
+
*/
|
|
2453
|
+
periods?: number;
|
|
2454
|
+
/**
|
|
2455
|
+
* Renew for a term of this length instead, at the price currently sold for it. Give
|
|
2456
|
+
* `interval` with it.
|
|
2457
|
+
*
|
|
2458
|
+
* Leaving both out renews at the price this item already bills at, which a later price
|
|
2459
|
+
* change does not affect. Naming a term that differs from the current one is a fresh
|
|
2460
|
+
* choice, so it is bought at today's price. Naming the current term changes nothing. A
|
|
2461
|
+
* term sold at several prices that differ in termination policy is refused with 409
|
|
2462
|
+
* `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `termination_policy` is given.
|
|
2463
|
+
*
|
|
2464
|
+
* List the terms on offer with the renewal prices operation.
|
|
2465
|
+
* @minimum 1
|
|
2466
|
+
*/
|
|
2467
|
+
interval_count?: number;
|
|
2468
|
+
/** The unit interval_count counts in. */
|
|
2469
|
+
interval?: RenewRequestInterval;
|
|
2470
|
+
/** With `interval` and `interval_count`, chooses among prices of that term that differ in termination policy. */
|
|
2471
|
+
termination_policy?: TerminationPolicy;
|
|
2472
|
+
payment_method_id?: string;
|
|
2473
|
+
/** Whether to pay from the balance, with or without `payment_method_id`. */
|
|
2474
|
+
use_balance?: boolean;
|
|
2475
|
+
/** Whether to pay from eligible credit grants before the balance. */
|
|
2476
|
+
use_credits?: boolean;
|
|
2477
|
+
return_url?: string;
|
|
2478
|
+
}
|
|
2479
|
+
/**
|
|
2480
|
+
* As in renewing.
|
|
2481
|
+
*/
|
|
2482
|
+
export type RenewalOrderRequestInterval = (typeof RenewalOrderRequestInterval)[keyof typeof RenewalOrderRequestInterval];
|
|
2483
|
+
export declare const RenewalOrderRequestInterval: {
|
|
2484
|
+
readonly day: "day";
|
|
2485
|
+
readonly month: "month";
|
|
2486
|
+
readonly year: "year";
|
|
2487
|
+
};
|
|
2488
|
+
/**
|
|
2489
|
+
* The periods and price of the renewal, chosen as in renewing.
|
|
2490
|
+
*/
|
|
2491
|
+
export interface RenewalOrderRequest {
|
|
2492
|
+
/** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
|
|
2493
|
+
order_id: string;
|
|
2494
|
+
/**
|
|
2495
|
+
* As in renewing.
|
|
2496
|
+
* @minimum 1
|
|
2497
|
+
*/
|
|
2498
|
+
periods?: number;
|
|
2499
|
+
/**
|
|
2500
|
+
* As in renewing.
|
|
2501
|
+
* @minimum 1
|
|
2502
|
+
*/
|
|
2503
|
+
interval_count?: number;
|
|
2504
|
+
/** As in renewing. */
|
|
2505
|
+
interval?: RenewalOrderRequestInterval;
|
|
2506
|
+
/** As in renewing. */
|
|
2507
|
+
termination_policy?: TerminationPolicy;
|
|
2508
|
+
}
|
|
2509
|
+
export interface AutoRenewSet {
|
|
2510
|
+
auto_renew: boolean;
|
|
2511
|
+
}
|
|
2512
|
+
/**
|
|
2513
|
+
* Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
|
|
2514
|
+
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
2515
|
+
* being set up. `completed` means every item was set up. `partially_completed` means some items were set up
|
|
2516
|
+
* and the others failed or were canceled and were refunded to their original payment sources. `failed` means
|
|
2517
|
+
* no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
|
|
2518
|
+
* `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
|
|
2519
|
+
* payment sources. No status establishes service delivery by itself.
|
|
2520
|
+
*/
|
|
2521
|
+
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
|
|
2522
|
+
export declare const OrderStatus: {
|
|
2523
|
+
readonly pending: "pending";
|
|
2524
|
+
readonly accepted: "accepted";
|
|
2525
|
+
readonly completed: "completed";
|
|
2526
|
+
readonly partially_completed: "partially_completed";
|
|
2527
|
+
readonly failed: "failed";
|
|
2528
|
+
readonly canceled: "canceled";
|
|
2529
|
+
};
|
|
2530
|
+
/**
|
|
2531
|
+
* `pending` is waiting to be set up. `completed` was confirmed by the service.
|
|
2532
|
+
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
2533
|
+
* `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
|
|
2534
|
+
* its subscription.
|
|
2535
|
+
*/
|
|
2536
|
+
export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
|
|
2537
|
+
export declare const OrderItemStatus: {
|
|
2538
|
+
readonly pending: "pending";
|
|
2539
|
+
readonly completed: "completed";
|
|
2540
|
+
readonly failed: "failed";
|
|
2541
|
+
readonly canceled: "canceled";
|
|
2542
|
+
};
|
|
2543
|
+
/**
|
|
2544
|
+
* `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms.
|
|
2545
|
+
*/
|
|
2546
|
+
export type OrderType = (typeof OrderType)[keyof typeof OrderType];
|
|
2547
|
+
export declare const OrderType: {
|
|
2548
|
+
readonly new: "new";
|
|
2549
|
+
readonly renew: "renew";
|
|
2550
|
+
readonly modify: "modify";
|
|
2551
|
+
};
|
|
2552
|
+
/**
|
|
2553
|
+
* When a plan change takes effect. `none` on anything that is not a change.
|
|
2554
|
+
*
|
|
2555
|
+
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2556
|
+
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2557
|
+
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2558
|
+
* usual. Renewing in the meantime moves all of this along with it.
|
|
2559
|
+
*/
|
|
2560
|
+
export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
|
|
2561
|
+
export declare const OrderChangeEffective: {
|
|
2562
|
+
readonly none: "none";
|
|
2563
|
+
readonly immediate: "immediate";
|
|
2564
|
+
readonly period_end: "period_end";
|
|
2565
|
+
};
|
|
2566
|
+
/**
|
|
2567
|
+
* How it was paid. Removing the payment method afterwards does not change it; `payment_method_id`
|
|
2568
|
+
* then names a removed payment method.
|
|
2569
|
+
*/
|
|
2570
|
+
export interface PaidWith {
|
|
2571
|
+
/**
|
|
2572
|
+
* `balance` when the account's balance and credits covered it in full. Otherwise the method used
|
|
2573
|
+
* with the gateway, such as `card`.
|
|
2574
|
+
*/
|
|
2575
|
+
method_type: string;
|
|
2576
|
+
/** The gateway that collected it. Absent when `method_type` is `balance`. */
|
|
2577
|
+
payment_gateway?: string;
|
|
2578
|
+
/** The saved payment method that was charged, when one was. */
|
|
2579
|
+
payment_method_id?: string;
|
|
2580
|
+
brand?: string;
|
|
2581
|
+
last4?: string;
|
|
2582
|
+
}
|
|
2583
|
+
export type OrderItemInterval = (typeof OrderItemInterval)[keyof typeof OrderItemInterval];
|
|
2584
|
+
export declare const OrderItemInterval: {
|
|
2585
|
+
readonly none: "none";
|
|
2586
|
+
readonly day: "day";
|
|
2587
|
+
readonly month: "month";
|
|
2588
|
+
readonly year: "year";
|
|
2589
|
+
};
|
|
2590
|
+
/**
|
|
2591
|
+
* The payment timing of the selected price.
|
|
2592
|
+
*/
|
|
2593
|
+
export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
|
|
2594
|
+
export declare const OrderItemChargeType: {
|
|
2595
|
+
readonly postpaid: "postpaid";
|
|
2596
|
+
readonly prepaid: "prepaid";
|
|
2597
|
+
readonly one_time: "one_time";
|
|
2598
|
+
};
|
|
2599
|
+
export type OrderItemConfiguration = {
|
|
2600
|
+
[key: string]: unknown;
|
|
2601
|
+
};
|
|
2602
|
+
/**
|
|
2603
|
+
* Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero
|
|
2604
|
+
* for a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service
|
|
2605
|
+
* purchase creates its pending subscription when this item is recorded, not when payment succeeds.
|
|
2606
|
+
*/
|
|
2607
|
+
export interface OrderItem {
|
|
2608
|
+
/** Financial lines produced by this purchase item, including setup charges. */
|
|
2609
|
+
invoice_item_ids?: string[];
|
|
2610
|
+
/** @minimum 0 */
|
|
2611
|
+
position?: number;
|
|
2612
|
+
configuration?: OrderItemConfiguration;
|
|
2613
|
+
/**
|
|
2614
|
+
* Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
|
|
2615
|
+
* pending subscription here; renewals and changes reference the existing subscription, which
|
|
2616
|
+
* keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
|
|
2617
|
+
*/
|
|
2618
|
+
subscription_id?: string;
|
|
2619
|
+
interval: OrderItemInterval;
|
|
2620
|
+
/** @minimum 1 */
|
|
2621
|
+
interval_count?: number;
|
|
2622
|
+
termination_policy?: TerminationPolicy;
|
|
2623
|
+
refund_policy?: RefundPolicy;
|
|
2624
|
+
/**
|
|
2625
|
+
* Prepaid items only: the plan's one-month prepaid price for this item's quantity before tax, frozen
|
|
2626
|
+
* at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
|
|
2627
|
+
* no prepaid period shorter than the one bought.
|
|
2628
|
+
* @nullable
|
|
2629
|
+
*/
|
|
2630
|
+
refund_monthly_amount?: string | null;
|
|
2631
|
+
/**
|
|
2632
|
+
* Prepaid items only: the plan's postpaid hourly price for this item's quantity before tax, frozen at
|
|
2633
|
+
* purchase, used for time used short of a full month. Null when the plan has no postpaid price.
|
|
2634
|
+
* @nullable
|
|
2635
|
+
*/
|
|
2636
|
+
refund_hourly_amount?: string | null;
|
|
2637
|
+
completes_on_payment: boolean;
|
|
2638
|
+
recurring_amount?: string;
|
|
2639
|
+
setup_amount?: string;
|
|
2640
|
+
/** The payment timing of the selected price. */
|
|
2641
|
+
charge_type: OrderItemChargeType;
|
|
2642
|
+
/** Total tax after discounts, including any tax already included in the price. */
|
|
2643
|
+
tax_amount?: string;
|
|
2644
|
+
/** The part of tax_amount already included in gross_amount; it is not charged again. */
|
|
2645
|
+
tax_included_amount?: string;
|
|
2646
|
+
id: string;
|
|
2647
|
+
order_id?: string;
|
|
2648
|
+
price_id: string;
|
|
2649
|
+
product_id?: ProductID;
|
|
2650
|
+
product?: Product;
|
|
2651
|
+
/** Which plan was bought. */
|
|
2652
|
+
plan_id: string;
|
|
2653
|
+
/**
|
|
2654
|
+
* What it was called when bought. It does not follow later catalogue renames and is
|
|
2655
|
+
* not translated.
|
|
2656
|
+
*/
|
|
2657
|
+
plan_name: string;
|
|
2658
|
+
quantity: string;
|
|
2659
|
+
/**
|
|
2660
|
+
* The unit amount of the price this line is charged under. Absent for a tiered price, which has no
|
|
2661
|
+
* single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
|
|
2662
|
+
* describes.
|
|
2663
|
+
*/
|
|
2664
|
+
unit_amount?: Money;
|
|
2665
|
+
/**
|
|
2666
|
+
* Before discounts: the price applied to the quantity, which for a per-unit price is `unit_amount`
|
|
2667
|
+
* times `quantity`; a minimum charge can make it higher. For an upgrade that takes effect at once it is
|
|
2668
|
+
* the new price minus the old price for the time left in the paid period, both at the subscription's
|
|
2669
|
+
* own period price, and the period end does not move; a downgrade charges nothing and may refund the
|
|
2670
|
+
* difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
|
|
2671
|
+
*
|
|
2672
|
+
* Under an inclusive tax rate it includes tax, as the price does, and the included part is
|
|
2673
|
+
* `tax_included_amount`. A renewal at the agreed terms is the exception: the agreed amount excludes
|
|
2674
|
+
* tax, and tax is added to it.
|
|
2675
|
+
*/
|
|
2676
|
+
gross_amount?: Money;
|
|
2677
|
+
/**
|
|
2678
|
+
* The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
|
|
2679
|
+
* from the discount the subscription carries.
|
|
2680
|
+
*
|
|
2681
|
+
* A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
|
|
2682
|
+
* `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
|
|
2683
|
+
* the carried discount is already reflected in it: the renewal order also uses a coupon the account
|
|
2684
|
+
* holds, or the account's tax rate is inclusive.
|
|
2685
|
+
*/
|
|
2686
|
+
discount_amount?: Money;
|
|
2687
|
+
/** `gross_amount` less `discount_amount`. */
|
|
2688
|
+
amount?: Money;
|
|
2689
|
+
currency: string;
|
|
2690
|
+
/** @nullable */
|
|
2691
|
+
period_start?: string | null;
|
|
2692
|
+
/** @nullable */
|
|
2693
|
+
period_end?: string | null;
|
|
2694
|
+
status: OrderItemStatus;
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* A recorded purchase with its invoice from placement; a zero-total invoice, such as for postpaid
|
|
2698
|
+
* admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
|
|
2699
|
+
* invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
|
|
2700
|
+
* order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
|
|
2701
|
+
* before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
|
|
2702
|
+
*/
|
|
2703
|
+
export interface Order {
|
|
2704
|
+
coupon_id?: string;
|
|
2705
|
+
coupon?: ObjectIdentity;
|
|
2706
|
+
promotion_code_id?: string;
|
|
2707
|
+
/** Code text frozen when the coupon was applied. Absent for an account discount. */
|
|
2708
|
+
promotion_code?: string;
|
|
2709
|
+
/** The order's invoice, the same as invoice.id. */
|
|
2710
|
+
invoice_id: string;
|
|
2711
|
+
invoice: InvoiceSummary;
|
|
2712
|
+
/** How the order was paid. Absent until it is paid. */
|
|
2713
|
+
paid_with?: PaidWith;
|
|
2714
|
+
account?: AccountIdentity;
|
|
2715
|
+
change_effective_at?: string;
|
|
2716
|
+
id: string;
|
|
2717
|
+
/**
|
|
2718
|
+
* Which project it was bought for. Absent for a purchase made at account level, such
|
|
2719
|
+
* as a membership.
|
|
2720
|
+
* @nullable
|
|
2721
|
+
*/
|
|
2722
|
+
project_id?: string | null;
|
|
2723
|
+
/**
|
|
2724
|
+
* The project and its current name, for display. Absent for a purchase at account level,
|
|
2725
|
+
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2726
|
+
* `project_id` still identifies it then.
|
|
2727
|
+
*/
|
|
2728
|
+
project?: NamedIdentity | null;
|
|
2729
|
+
/**
|
|
2730
|
+
* The billing account the order was placed with. It does not change when the project is later
|
|
2731
|
+
* linked to another billing account. While this account is suspended or closed the order cannot
|
|
2732
|
+
* be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
|
|
2733
|
+
* when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
|
|
2734
|
+
*/
|
|
2735
|
+
billing_account_id?: number;
|
|
2736
|
+
currency: string;
|
|
2737
|
+
/** `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms. */
|
|
2738
|
+
type: OrderType;
|
|
2739
|
+
status: OrderStatus;
|
|
2740
|
+
/**
|
|
2741
|
+
* When a plan change takes effect. `none` on anything that is not a change.
|
|
2742
|
+
*
|
|
2743
|
+
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2744
|
+
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2745
|
+
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2746
|
+
* usual. Renewing in the meantime moves all of this along with it.
|
|
2747
|
+
*/
|
|
2748
|
+
change_effective?: OrderChangeEffective;
|
|
2749
|
+
/**
|
|
2750
|
+
* Acceptance deadline. Pending orders can expire automatically.
|
|
2751
|
+
* @nullable
|
|
2752
|
+
*/
|
|
2753
|
+
expires_at?: string | null;
|
|
2754
|
+
/**
|
|
2755
|
+
* When the discount and amount were fixed: at placement for automatic checkout and for a
|
|
2756
|
+
* zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
|
|
2757
|
+
* @nullable
|
|
2758
|
+
*/
|
|
2759
|
+
checkout_confirmed_at?: string | null;
|
|
2760
|
+
created_at: string;
|
|
2761
|
+
/**
|
|
2762
|
+
* What was bought. Present on a single order and on every order in a list, so a list
|
|
2763
|
+
* can be rendered without a further request per row.
|
|
2764
|
+
*/
|
|
2765
|
+
items: OrderItem[];
|
|
2766
|
+
}
|
|
2767
|
+
export interface OrderList {
|
|
2768
|
+
items: Order[];
|
|
2769
|
+
pagination: OffsetPagination;
|
|
2770
|
+
}
|
|
2771
|
+
/**
|
|
2772
|
+
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
2773
|
+
* `voided` once Leaflow withdrew it.
|
|
2774
|
+
*/
|
|
2775
|
+
export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
|
|
2776
|
+
export declare const DiscountStatus: {
|
|
2777
|
+
readonly scheduled: "scheduled";
|
|
2778
|
+
readonly active: "active";
|
|
2779
|
+
readonly expired: "expired";
|
|
2780
|
+
readonly voided: "voided";
|
|
2781
|
+
};
|
|
2782
|
+
export type DiscountType = (typeof DiscountType)[keyof typeof DiscountType];
|
|
2783
|
+
export declare const DiscountType: {
|
|
2784
|
+
readonly percentage: "percentage";
|
|
2785
|
+
readonly fixed_amount: "fixed_amount";
|
|
2786
|
+
readonly price_override: "price_override";
|
|
2787
|
+
readonly free_setup: "free_setup";
|
|
2788
|
+
};
|
|
2789
|
+
/**
|
|
2790
|
+
* Whether the discount continues on renewals of the purchased item. `once` applies only to the
|
|
2791
|
+
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
2792
|
+
* periods including the first, and `forever` continues on every renewal.
|
|
2793
|
+
*/
|
|
2794
|
+
export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
|
|
2795
|
+
export declare const DiscountFrequency: {
|
|
2796
|
+
readonly once: "once";
|
|
2797
|
+
readonly recurring: "recurring";
|
|
2798
|
+
readonly forever: "forever";
|
|
2799
|
+
};
|
|
2800
|
+
/**
|
|
2801
|
+
* A coupon held on this account for a period. Within the period it applies without a code to purchases and
|
|
2802
|
+
* to metered usage that the coupon covers.
|
|
2803
|
+
*/
|
|
2804
|
+
export interface Discount {
|
|
2805
|
+
min_amount?: string;
|
|
2806
|
+
billing_account_id?: number;
|
|
2807
|
+
coupon_id: string;
|
|
2808
|
+
promotion_code_id?: string;
|
|
2809
|
+
/**
|
|
2810
|
+
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
2811
|
+
* `voided` once Leaflow withdrew it.
|
|
2812
|
+
*/
|
|
2813
|
+
status: DiscountStatus;
|
|
2814
|
+
voided_at?: string;
|
|
2815
|
+
type: DiscountType;
|
|
2816
|
+
/**
|
|
2817
|
+
* Whether the discount continues on renewals of the purchased item. `once` applies only to the
|
|
2818
|
+
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
2819
|
+
* periods including the first, and `forever` continues on every renewal.
|
|
2820
|
+
*/
|
|
2821
|
+
frequency?: DiscountFrequency;
|
|
2822
|
+
/** @minimum 1 */
|
|
2823
|
+
frequency_duration?: number;
|
|
2824
|
+
id: string;
|
|
2825
|
+
name?: string;
|
|
2826
|
+
/** For a percentage discount, out of one hundred. */
|
|
2827
|
+
percent_off?: string;
|
|
2828
|
+
amount?: Money;
|
|
2829
|
+
/** Caps a percentage discount. */
|
|
2830
|
+
max_discount?: Money;
|
|
2831
|
+
currency?: string;
|
|
2832
|
+
/**
|
|
2833
|
+
* What it may be used for. Absent means it applies to anything on the account,
|
|
2834
|
+
* including setup fees and traffic.
|
|
2835
|
+
*/
|
|
2836
|
+
applies_to: Applicability;
|
|
2837
|
+
/** Restricted to your first purchase of anything it applies to. */
|
|
2838
|
+
first_purchase_only?: boolean;
|
|
2839
|
+
valid_from?: string;
|
|
2840
|
+
/**
|
|
2841
|
+
* Absent follows the coupon's own validity.
|
|
2842
|
+
* @nullable
|
|
2843
|
+
*/
|
|
2844
|
+
valid_until?: string | null;
|
|
2845
|
+
}
|
|
2846
|
+
export interface DiscountList {
|
|
2847
|
+
items: Discount[];
|
|
2848
|
+
pagination: OffsetPagination;
|
|
2849
|
+
}
|
|
2850
|
+
export interface OrderItemList {
|
|
2851
|
+
items: OrderItem[];
|
|
2852
|
+
pagination: OffsetPagination;
|
|
2853
|
+
}
|
|
2854
|
+
/**
|
|
2855
|
+
* Whether the quantity was paid for or granted free of charge. Both are consumed the same way.
|
|
2856
|
+
*/
|
|
2857
|
+
export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
|
|
2858
|
+
export declare const AllowanceCategory: {
|
|
2859
|
+
readonly paid: "paid";
|
|
2860
|
+
readonly promotional: "promotional";
|
|
2861
|
+
};
|
|
2862
|
+
/**
|
|
2863
|
+
* Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
|
|
2864
|
+
* omitted dimensions are not restricted.
|
|
2865
|
+
*/
|
|
2866
|
+
export type AllowanceDimensions = {
|
|
2867
|
+
[key: string]: string;
|
|
2868
|
+
};
|
|
2869
|
+
export type AllowanceStatus = (typeof AllowanceStatus)[keyof typeof AllowanceStatus];
|
|
2870
|
+
export declare const AllowanceStatus: {
|
|
2871
|
+
readonly active: "active";
|
|
2872
|
+
readonly depleted: "depleted";
|
|
2873
|
+
readonly expired: "expired";
|
|
2874
|
+
readonly voided: "voided";
|
|
2875
|
+
};
|
|
2876
|
+
export interface Allowance {
|
|
2877
|
+
/** Optional issuance key, unique within this billing account. */
|
|
2878
|
+
idempotency_key?: string;
|
|
2879
|
+
subscription_id?: string;
|
|
2880
|
+
id: string;
|
|
2881
|
+
billing_account_id?: number;
|
|
2882
|
+
product: Product;
|
|
2883
|
+
meter: ObjectIdentity;
|
|
2884
|
+
/** The unit it is counted in, such as `MiB`. */
|
|
2885
|
+
unit?: string;
|
|
2886
|
+
/** Whether the quantity was paid for or granted free of charge. Both are consumed the same way. */
|
|
2887
|
+
category: AllowanceCategory;
|
|
2888
|
+
/**
|
|
2889
|
+
* Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
|
|
2890
|
+
* omitted dimensions are not restricted.
|
|
2891
|
+
*/
|
|
2892
|
+
dimensions: AllowanceDimensions;
|
|
2893
|
+
name: string;
|
|
2894
|
+
/** How much was granted. */
|
|
2895
|
+
quantity: string;
|
|
2896
|
+
/** How much is left. */
|
|
2897
|
+
remaining_quantity: string;
|
|
2898
|
+
/**
|
|
2899
|
+
* Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
|
|
2900
|
+
* precedence.
|
|
2901
|
+
*/
|
|
2902
|
+
priority?: number;
|
|
2903
|
+
status: AllowanceStatus;
|
|
2904
|
+
valid_from: string;
|
|
2905
|
+
/**
|
|
2906
|
+
* When it lapses. Anything unused at that point is lost; it is not refunded and does
|
|
2907
|
+
* not carry over. Absent when it does not expire on its own.
|
|
2908
|
+
* @nullable
|
|
2909
|
+
*/
|
|
2910
|
+
valid_until?: string | null;
|
|
2911
|
+
}
|
|
2912
|
+
export interface AllowanceList {
|
|
2913
|
+
items: Allowance[];
|
|
2914
|
+
pagination: OffsetPagination;
|
|
2915
|
+
}
|
|
2916
|
+
/**
|
|
2917
|
+
* Derived from the validity period. scheduled means valid_from has not yet arrived.
|
|
2918
|
+
*/
|
|
2919
|
+
export type FeatureGrantStatus = (typeof FeatureGrantStatus)[keyof typeof FeatureGrantStatus];
|
|
2920
|
+
export declare const FeatureGrantStatus: {
|
|
2921
|
+
readonly scheduled: "scheduled";
|
|
2922
|
+
readonly active: "active";
|
|
2923
|
+
readonly expired: "expired";
|
|
2924
|
+
readonly voided: "voided";
|
|
2925
|
+
};
|
|
2926
|
+
export interface FeatureGrant {
|
|
2927
|
+
id: string;
|
|
2928
|
+
billing_account_id: number;
|
|
2929
|
+
product: Product;
|
|
2930
|
+
feature: ObjectIdentity;
|
|
2931
|
+
name: string;
|
|
2932
|
+
valid_from: string;
|
|
2933
|
+
/**
|
|
2934
|
+
* Null means the grant does not expire.
|
|
2935
|
+
* @nullable
|
|
2936
|
+
*/
|
|
2937
|
+
valid_until: string | null;
|
|
2938
|
+
status: FeatureGrantStatus;
|
|
2939
|
+
}
|
|
2940
|
+
export interface FeatureGrantList {
|
|
2941
|
+
items: FeatureGrant[];
|
|
2942
|
+
pagination: OffsetPagination;
|
|
2943
|
+
}
|
|
2944
|
+
export interface Entitlement {
|
|
2945
|
+
product: Product;
|
|
2946
|
+
feature: ObjectIdentity;
|
|
2947
|
+
name?: string;
|
|
2948
|
+
enabled: boolean;
|
|
2949
|
+
/**
|
|
2950
|
+
* When the subscription providing it ends. Absent for a metered subscription, which
|
|
2951
|
+
* has no end date.
|
|
2952
|
+
* @nullable
|
|
2953
|
+
*/
|
|
2954
|
+
expires_at?: string | null;
|
|
2955
|
+
}
|
|
2956
|
+
export interface EntitlementList {
|
|
2957
|
+
items: Entitlement[];
|
|
2958
|
+
pagination: OffsetPagination;
|
|
2959
|
+
}
|
|
2960
|
+
export interface ProductList {
|
|
2961
|
+
items: Product[];
|
|
2962
|
+
pagination: OffsetPagination;
|
|
2963
|
+
}
|
|
2964
|
+
export interface PlanFeature {
|
|
2965
|
+
feature: ObjectIdentity;
|
|
2966
|
+
name: string;
|
|
2967
|
+
}
|
|
2968
|
+
export interface Plan {
|
|
2969
|
+
/** False once archived. An archived plan cannot be bought until it is active again. */
|
|
2970
|
+
active: boolean;
|
|
2971
|
+
lookup_key?: string;
|
|
2972
|
+
product: Product;
|
|
2973
|
+
features: PlanFeature[];
|
|
2974
|
+
id: string;
|
|
2975
|
+
product_id: ProductID;
|
|
2976
|
+
name: string;
|
|
2977
|
+
description?: string;
|
|
2978
|
+
}
|
|
2979
|
+
export interface PlanList {
|
|
2980
|
+
items: Plan[];
|
|
2981
|
+
pagination: OffsetPagination;
|
|
2982
|
+
}
|
|
2983
|
+
/**
|
|
2984
|
+
* `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
|
|
2985
|
+
* charges once.
|
|
2986
|
+
*/
|
|
2987
|
+
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
2988
|
+
export declare const PriceType: {
|
|
2989
|
+
readonly postpaid: "postpaid";
|
|
2990
|
+
readonly prepaid: "prepaid";
|
|
2991
|
+
readonly one_time: "one_time";
|
|
2992
|
+
};
|
|
2993
|
+
/**
|
|
2994
|
+
* How the amount is arrived at. `rated` means the rate depends on attributes such as
|
|
2995
|
+
* region or machine type, and is looked up on a price list.
|
|
2996
|
+
*/
|
|
2997
|
+
export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
|
|
2998
|
+
export declare const PriceBillingScheme: {
|
|
2999
|
+
readonly per_unit: "per_unit";
|
|
3000
|
+
readonly tiered: "tiered";
|
|
3001
|
+
readonly rated: "rated";
|
|
3002
|
+
};
|
|
3003
|
+
/**
|
|
3004
|
+
* `none` for a price that is not tiered, which is most of them.
|
|
3005
|
+
*
|
|
3006
|
+
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
3007
|
+
* everything at the rate of the band the total falls in.
|
|
3008
|
+
*/
|
|
3009
|
+
export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
|
|
3010
|
+
export declare const PriceTiersMode: {
|
|
3011
|
+
readonly none: "none";
|
|
3012
|
+
readonly graduated: "graduated";
|
|
3013
|
+
readonly volume: "volume";
|
|
3014
|
+
};
|
|
3015
|
+
export type PriceInterval = (typeof PriceInterval)[keyof typeof PriceInterval];
|
|
3016
|
+
export declare const PriceInterval: {
|
|
3017
|
+
readonly none: "none";
|
|
3018
|
+
readonly day: "day";
|
|
3019
|
+
readonly month: "month";
|
|
3020
|
+
readonly year: "year";
|
|
3021
|
+
};
|
|
3022
|
+
export interface Tier {
|
|
3023
|
+
/**
|
|
3024
|
+
* The upper bound of this band. Null on the last band, which has no bound.
|
|
3025
|
+
* @nullable
|
|
3026
|
+
*/
|
|
3027
|
+
up_to?: string | null;
|
|
3028
|
+
unit_amount: Money;
|
|
3029
|
+
/** Charged once when this band is reached, in addition to the per-unit amount. */
|
|
3030
|
+
flat_amount?: Money;
|
|
3031
|
+
}
|
|
3032
|
+
export interface Price {
|
|
3033
|
+
rate_card?: ObjectIdentity;
|
|
3034
|
+
lookup_key?: string;
|
|
3035
|
+
product: Product;
|
|
3036
|
+
plan: ObjectIdentity;
|
|
3037
|
+
meter_id?: string;
|
|
3038
|
+
meter?: ObjectIdentity;
|
|
3039
|
+
unit_quantity: string;
|
|
3040
|
+
/** False once archived. An archived price cannot be bought until it is active again. */
|
|
3041
|
+
active: boolean;
|
|
3042
|
+
termination_policy?: TerminationPolicy;
|
|
3043
|
+
refund_policy?: RefundPolicy;
|
|
3044
|
+
product_id?: ProductID;
|
|
3045
|
+
id: string;
|
|
3046
|
+
plan_id: string;
|
|
3047
|
+
currency: string;
|
|
3048
|
+
/**
|
|
3049
|
+
* `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
|
|
3050
|
+
* charges once.
|
|
3051
|
+
*/
|
|
3052
|
+
type: PriceType;
|
|
3053
|
+
/**
|
|
3054
|
+
* How the amount is arrived at. `rated` means the rate depends on attributes such as
|
|
3055
|
+
* region or machine type, and is looked up on a price list.
|
|
3056
|
+
*/
|
|
3057
|
+
billing_scheme: PriceBillingScheme;
|
|
3058
|
+
/** Present for `per_unit`. */
|
|
3059
|
+
unit_amount?: Money;
|
|
3060
|
+
/**
|
|
3061
|
+
* `none` for a price that is not tiered, which is most of them.
|
|
3062
|
+
*
|
|
3063
|
+
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
3064
|
+
* everything at the rate of the band the total falls in.
|
|
3065
|
+
*/
|
|
3066
|
+
tiers_mode?: PriceTiersMode;
|
|
3067
|
+
/** Present for `tiered`, in ascending order. */
|
|
3068
|
+
tiers?: Tier[];
|
|
3069
|
+
/** For `rated` prices, the price list the rates are read from. */
|
|
3070
|
+
rate_card_id?: string;
|
|
3071
|
+
/** The smallest quantity that can be bought. Absent means no lower bound. */
|
|
3072
|
+
min_quantity?: string;
|
|
3073
|
+
/**
|
|
3074
|
+
* The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
|
|
3075
|
+
* rejected with BILLING_PRICE_INVALID and field=max_quantity.
|
|
3076
|
+
*/
|
|
3077
|
+
max_quantity?: string;
|
|
3078
|
+
/** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
|
|
3079
|
+
quantity_step?: string;
|
|
3080
|
+
/** For prepaid prices, how many periods one purchase covers. */
|
|
3081
|
+
interval_count?: number;
|
|
3082
|
+
interval: PriceInterval;
|
|
3083
|
+
setup_fee?: Money;
|
|
3084
|
+
}
|
|
3085
|
+
export interface PriceList {
|
|
3086
|
+
items: Price[];
|
|
3087
|
+
pagination: OffsetPagination;
|
|
3088
|
+
}
|
|
3089
|
+
/**
|
|
3090
|
+
* The attributes this rate applies to, such as region and machine type.
|
|
3091
|
+
*/
|
|
3092
|
+
export type RateDimensions = {
|
|
3093
|
+
[key: string]: string;
|
|
3094
|
+
};
|
|
3095
|
+
/**
|
|
3096
|
+
* `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says.
|
|
3097
|
+
*/
|
|
3098
|
+
export type RateBillingScheme = (typeof RateBillingScheme)[keyof typeof RateBillingScheme];
|
|
3099
|
+
export declare const RateBillingScheme: {
|
|
3100
|
+
readonly per_unit: "per_unit";
|
|
3101
|
+
readonly tiered: "tiered";
|
|
3102
|
+
};
|
|
3103
|
+
/**
|
|
3104
|
+
* `graduated` charges each band at its own rate; `volume` charges everything at the rate of the band the total lands in. `none` for a `per_unit` rate.
|
|
3105
|
+
*/
|
|
3106
|
+
export type RateTiersMode = (typeof RateTiersMode)[keyof typeof RateTiersMode];
|
|
3107
|
+
export declare const RateTiersMode: {
|
|
3108
|
+
readonly none: "none";
|
|
3109
|
+
readonly graduated: "graduated";
|
|
3110
|
+
readonly volume: "volume";
|
|
3111
|
+
};
|
|
3112
|
+
export interface Rate {
|
|
3113
|
+
meter: ObjectIdentity;
|
|
3114
|
+
/** The unit readings arrive in, such as `core-second`. */
|
|
3115
|
+
unit?: string;
|
|
3116
|
+
/** The attributes this rate applies to, such as region and machine type. */
|
|
3117
|
+
dimensions: RateDimensions;
|
|
3118
|
+
/** `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says. */
|
|
3119
|
+
billing_scheme: RateBillingScheme;
|
|
3120
|
+
/** `graduated` charges each band at its own rate; `volume` charges everything at the rate of the band the total lands in. `none` for a `per_unit` rate. */
|
|
3121
|
+
tiers_mode: RateTiersMode;
|
|
3122
|
+
/** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
|
|
3123
|
+
unit_amount?: Money;
|
|
3124
|
+
/** Present for a tiered rate, in ascending order. */
|
|
3125
|
+
tiers?: Tier[];
|
|
3126
|
+
/**
|
|
3127
|
+
* How many measured units one amount covers. An hourly rate on a per-second meter is
|
|
3128
|
+
* `"3600"`.
|
|
3129
|
+
*/
|
|
3130
|
+
unit_quantity?: string;
|
|
3131
|
+
currency: string;
|
|
3132
|
+
effective_from: string;
|
|
3133
|
+
/** @nullable */
|
|
3134
|
+
effective_to?: string | null;
|
|
3135
|
+
}
|
|
3136
|
+
export interface RateList {
|
|
3137
|
+
items: Rate[];
|
|
3138
|
+
pagination: OffsetPagination;
|
|
3139
|
+
}
|
|
3140
|
+
/**
|
|
3141
|
+
* Narrows the selection when a plan offers more than one charge type.
|
|
3142
|
+
*/
|
|
3143
|
+
export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
|
|
3144
|
+
export declare const QuoteItemInputPriceType: {
|
|
3145
|
+
readonly postpaid: "postpaid";
|
|
3146
|
+
readonly prepaid: "prepaid";
|
|
3147
|
+
readonly one_time: "one_time";
|
|
3148
|
+
};
|
|
3149
|
+
export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
|
|
3150
|
+
export declare const QuoteItemInputInterval: {
|
|
3151
|
+
readonly none: "none";
|
|
3152
|
+
readonly day: "day";
|
|
3153
|
+
readonly month: "month";
|
|
3154
|
+
readonly year: "year";
|
|
3155
|
+
};
|
|
3156
|
+
/**
|
|
3157
|
+
* The attributes the price depends on — region, instance type, token class.
|
|
3158
|
+
*
|
|
3159
|
+
* Required when the price draws its rates from a price list, which is how anything
|
|
3160
|
+
* sold by region or by machine type is priced. A price that carries a single unit
|
|
3161
|
+
* amount, or a ladder, has no attributes to give and takes none.
|
|
3162
|
+
*
|
|
3163
|
+
* Every attribute the meter declares must be present. A combination with no rate
|
|
3164
|
+
* covering it is refused rather than priced at zero.
|
|
3165
|
+
*/
|
|
3166
|
+
export type QuoteItemInputDimensions = {
|
|
3167
|
+
[key: string]: string;
|
|
3168
|
+
};
|
|
3169
|
+
/**
|
|
3170
|
+
* Identify a price directly, or select a price for a plan. For each resource give its ID or lookup
|
|
3171
|
+
* key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
|
|
3172
|
+
* postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
|
|
3173
|
+
* checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
|
|
3174
|
+
*/
|
|
3175
|
+
export interface QuoteItemInput {
|
|
3176
|
+
/**
|
|
3177
|
+
* @minLength 1
|
|
3178
|
+
* @maxLength 128
|
|
3179
|
+
*/
|
|
3180
|
+
price_lookup_key?: string;
|
|
3181
|
+
/**
|
|
3182
|
+
* @minLength 1
|
|
3183
|
+
* @maxLength 128
|
|
3184
|
+
*/
|
|
3185
|
+
plan_lookup_key?: string;
|
|
3186
|
+
price_id?: string;
|
|
3187
|
+
product_id?: ProductID;
|
|
3188
|
+
plan_id?: string;
|
|
3189
|
+
/** Narrows the selection when a plan offers more than one charge type. */
|
|
3190
|
+
price_type?: QuoteItemInputPriceType;
|
|
3191
|
+
interval?: QuoteItemInputInterval;
|
|
3192
|
+
/** @minimum 1 */
|
|
3193
|
+
interval_count?: number;
|
|
3194
|
+
/** Selects among prepaid prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
|
|
3195
|
+
termination_policy?: TerminationPolicy;
|
|
3196
|
+
/** @pattern ^(?:(?:[1-9][0-9]{0,27}|0(?:[1-9][0-9]{0,26}|0(?:[1-9][0-9]{0,25}|0(?:[1-9][0-9]{0,24}|0(?:[1-9][0-9]{0,23}|0(?:[1-9][0-9]{0,22}|0(?:[1-9][0-9]{0,21}|0(?:[1-9][0-9]{0,20}|0(?:[1-9][0-9]{0,19}|0(?:[1-9][0-9]{0,18}|0(?:[1-9][0-9]{0,17}|0(?:[1-9][0-9]{0,16}|0(?:[1-9][0-9]{0,15}|0(?:[1-9][0-9]{0,14}|0(?:[1-9][0-9]{0,13}|0(?:[1-9][0-9]{0,12}|0(?:[1-9][0-9]{0,11}|0(?:[1-9][0-9]{0,10}|0(?:[1-9][0-9]{0,9}|0(?:[1-9][0-9]{0,8}|0(?:[1-9][0-9]{0,7}|0(?:[1-9][0-9]{0,6}|0(?:[1-9][0-9]{0,5}|0(?:[1-9][0-9]{0,4}|0(?:[1-9][0-9]{0,3}|0(?:[1-9][0-9]{0,2}|0(?:[1-9][0-9]{0,1}|0[1-9])))))))))))))))))))))))))))([.][0-9]{1,10})?|0{1,28}[.](?:[1-9][0-9]{0,9}|0(?:[1-9][0-9]{0,8}|0(?:[1-9][0-9]{0,7}|0(?:[1-9][0-9]{0,6}|0(?:[1-9][0-9]{0,5}|0(?:[1-9][0-9]{0,4}|0(?:[1-9][0-9]{0,3}|0(?:[1-9][0-9]{0,2}|0(?:[1-9][0-9]{0,1}|0[1-9]))))))))))$ */
|
|
3197
|
+
quantity: string;
|
|
3198
|
+
meter_id?: string;
|
|
3199
|
+
/**
|
|
3200
|
+
* @minLength 1
|
|
3201
|
+
* @maxLength 128
|
|
3202
|
+
*/
|
|
3203
|
+
meter_lookup_key?: string;
|
|
3204
|
+
/**
|
|
3205
|
+
* The attributes the price depends on — region, instance type, token class.
|
|
3206
|
+
*
|
|
3207
|
+
* Required when the price draws its rates from a price list, which is how anything
|
|
3208
|
+
* sold by region or by machine type is priced. A price that carries a single unit
|
|
3209
|
+
* amount, or a ladder, has no attributes to give and takes none.
|
|
3210
|
+
*
|
|
3211
|
+
* Every attribute the meter declares must be present. A combination with no rate
|
|
3212
|
+
* covering it is refused rather than priced at zero.
|
|
3213
|
+
*/
|
|
3214
|
+
dimensions?: QuoteItemInputDimensions;
|
|
3215
|
+
/**
|
|
3216
|
+
* For metered items, how long to price for. This allows an estimate such as "about
|
|
3217
|
+
* this much per month" to be shown before anything exists. The priced quantity is
|
|
3218
|
+
* `quantity` multiplied by this duration.
|
|
3219
|
+
*/
|
|
3220
|
+
duration_seconds?: number;
|
|
3221
|
+
}
|
|
3222
|
+
export interface SpendRow {
|
|
3223
|
+
product?: Product;
|
|
3224
|
+
plan_id?: string;
|
|
3225
|
+
plan_name?: string;
|
|
3226
|
+
/** Present only when grouped by resource. */
|
|
3227
|
+
resource_id?: string;
|
|
3228
|
+
amount: Money;
|
|
3229
|
+
currency: string;
|
|
3230
|
+
}
|
|
3231
|
+
export interface SpendRowList {
|
|
3232
|
+
items: SpendRow[];
|
|
3233
|
+
/** The sum over the whole period, not only the page returned. */
|
|
3234
|
+
total: Money;
|
|
3235
|
+
currency: string;
|
|
3236
|
+
pagination: OffsetPagination;
|
|
3237
|
+
}
|
|
3238
|
+
export type ActiveResourceDimensions = {
|
|
3239
|
+
[key: string]: string;
|
|
3240
|
+
};
|
|
3241
|
+
export type ActiveResourceStatus = (typeof ActiveResourceStatus)[keyof typeof ActiveResourceStatus];
|
|
3242
|
+
export declare const ActiveResourceStatus: {
|
|
3243
|
+
readonly active: "active";
|
|
3244
|
+
readonly suspended: "suspended";
|
|
3245
|
+
readonly closing: "closing";
|
|
3246
|
+
readonly closed: "closed";
|
|
3247
|
+
};
|
|
3248
|
+
/**
|
|
3249
|
+
* A resource currently accruing charges by the second.
|
|
3250
|
+
*/
|
|
3251
|
+
export interface ActiveResource {
|
|
3252
|
+
id: string;
|
|
3253
|
+
ended_at?: string;
|
|
3254
|
+
suspended_at?: string;
|
|
3255
|
+
state_changed_at?: string;
|
|
3256
|
+
/** The postpaid subscription charged for this metering record, including shared services. */
|
|
3257
|
+
subscription_id: string;
|
|
3258
|
+
resource_id: string;
|
|
3259
|
+
product: Product;
|
|
3260
|
+
/** What it is, as its own service names it. */
|
|
3261
|
+
resource_type?: string;
|
|
3262
|
+
meter: ObjectIdentity;
|
|
3263
|
+
unit?: string;
|
|
3264
|
+
/** How much is held — cores, MiB, cards. Not how much has been used. */
|
|
3265
|
+
quantity: string;
|
|
3266
|
+
dimensions?: ActiveResourceDimensions;
|
|
3267
|
+
status: ActiveResourceStatus;
|
|
3268
|
+
started_at: string;
|
|
3269
|
+
project_id?: string;
|
|
3270
|
+
/** Usage has been generated up to this boundary; it does not imply invoicing or payment. */
|
|
3271
|
+
usage_generated_until: string;
|
|
3272
|
+
}
|
|
3273
|
+
export interface ActiveResourceList {
|
|
3274
|
+
items: ActiveResource[];
|
|
3275
|
+
pagination: OffsetPagination;
|
|
3276
|
+
}
|
|
3277
|
+
/**
|
|
3278
|
+
* An estimate of the refundable value of one order or selected items. This does not cancel the order, stop service or create a refund.
|
|
3279
|
+
*/
|
|
3280
|
+
export interface OrderRefundQuoteInput {
|
|
3281
|
+
order_id: string;
|
|
3282
|
+
/**
|
|
3283
|
+
* Estimate only these items. Omit to estimate the whole order. Every item must belong to the order.
|
|
3284
|
+
* @minItems 1
|
|
3285
|
+
* @maxItems 100
|
|
3286
|
+
*/
|
|
3287
|
+
order_item_ids?: string[];
|
|
3288
|
+
}
|
|
3289
|
+
/**
|
|
3290
|
+
* "Quote exactly one target: proposed items, an existing order, renewals, a cancellation or an order
|
|
3291
|
+
* refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
|
|
3292
|
+
* canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
|
|
3293
|
+
* combination returns BILLING_PURCHASE_INVALID with the offending field."
|
|
3294
|
+
*/
|
|
3295
|
+
export interface QuoteRequest {
|
|
3296
|
+
/**
|
|
3297
|
+
* The billing account to price for. It must belong to you. Existing orders must have been purchased
|
|
3298
|
+
* with this account; renewals and cancellations must currently be paid for by it.
|
|
3299
|
+
* @minimum 1
|
|
3300
|
+
*/
|
|
3301
|
+
billing_account_id: number;
|
|
3302
|
+
/**
|
|
3303
|
+
* A proposed purchase priced in the account currency. Metered items may estimate specified usage
|
|
3304
|
+
* quantities; those estimates are not amounts collectible at checkout.
|
|
3305
|
+
* @minItems 1
|
|
3306
|
+
* @maxItems 100
|
|
3307
|
+
*/
|
|
3308
|
+
items?: QuoteItemInput[];
|
|
3309
|
+
/**
|
|
3310
|
+
* Preview paying this existing order. Its recorded purchase terms supply every line, and an order
|
|
3311
|
+
* whose terms are fixed returns its recorded amounts. A preview does not change the order.
|
|
3312
|
+
*/
|
|
3313
|
+
order_id?: string;
|
|
3314
|
+
/**
|
|
3315
|
+
* Preview renewing these subscriptions, each at most once. Each entry represents a separate
|
|
3316
|
+
* renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
|
|
3317
|
+
* @minItems 1
|
|
3318
|
+
* @maxItems 100
|
|
3319
|
+
*/
|
|
3320
|
+
renewals?: QuoteRenewal[];
|
|
3321
|
+
cancellation?: QuoteCancellation;
|
|
3322
|
+
/**
|
|
3323
|
+
* @minLength 1
|
|
3324
|
+
* @maxLength 64
|
|
3325
|
+
*/
|
|
3326
|
+
promotion_code?: string;
|
|
3327
|
+
refund?: OrderRefundQuoteInput;
|
|
3328
|
+
}
|
|
3329
|
+
export interface CancelSubscriptionRequest {
|
|
3330
|
+
mode: TerminationPolicy;
|
|
3331
|
+
/** For immediate cancellation, the quoted whole-second refund basis. Now when omitted. */
|
|
3332
|
+
proration_date?: string;
|
|
3333
|
+
/** The cancellation quote's refundable amount, including an explicit zero. */
|
|
3334
|
+
expected_refundable_amount: Money & string;
|
|
3335
|
+
/** @maxLength 1024 */
|
|
3336
|
+
reason?: string;
|
|
3337
|
+
}
|
|
3338
|
+
export interface StatementAmounts {
|
|
3339
|
+
subtotal: Money;
|
|
3340
|
+
discount_amount: Money;
|
|
3341
|
+
tax_amount: Money;
|
|
3342
|
+
total: Money;
|
|
3343
|
+
}
|
|
3344
|
+
export type StatementStatus = (typeof StatementStatus)[keyof typeof StatementStatus];
|
|
3345
|
+
export declare const StatementStatus: {
|
|
3346
|
+
readonly open: "open";
|
|
3347
|
+
readonly closed: "closed";
|
|
3348
|
+
};
|
|
3349
|
+
/**
|
|
3350
|
+
* An account's consumption for one billing period, collected at one closing. The first statement of a period (sequence 1) closes after the period ends. Usage priced after that closing is collected in a later statement for the same period, which closes and invoices separately; a closed statement is never rewritten. Payments apply to issued invoices.
|
|
3351
|
+
*/
|
|
3352
|
+
export interface Statement {
|
|
3353
|
+
id: string;
|
|
3354
|
+
billing_account_id: number;
|
|
3355
|
+
currency: string;
|
|
3356
|
+
period_start: string;
|
|
3357
|
+
period_end: string;
|
|
3358
|
+
/** 1 for the first closing of the period; higher for statements that collect usage priced after an earlier closing. */
|
|
3359
|
+
sequence: number;
|
|
3360
|
+
status: StatementStatus;
|
|
3361
|
+
/** True while the statement is open. The estimate applies tier pricing to the period's usage so far and adds tax for the current invoice contact. Minimum charges are added at closing, and a tier reduction larger than this statement's own charges is credited to earlier invoices of the period at closing. */
|
|
3362
|
+
estimated: boolean;
|
|
3363
|
+
amounts: StatementAmounts;
|
|
3364
|
+
closed_at?: string;
|
|
3365
|
+
/** The invoice issued at this closing, when it produced one. */
|
|
3366
|
+
invoice_id?: string;
|
|
3367
|
+
created_at: string;
|
|
3368
|
+
calculated_at?: string;
|
|
3369
|
+
credited_amount: Money;
|
|
3370
|
+
}
|
|
3371
|
+
export interface StatementList {
|
|
3372
|
+
items: Statement[];
|
|
3373
|
+
pagination: OffsetPagination;
|
|
3374
|
+
}
|
|
3375
|
+
export interface StatementItem {
|
|
3376
|
+
project_id?: string;
|
|
3377
|
+
product_id?: string;
|
|
3378
|
+
meter_id?: string;
|
|
3379
|
+
unit?: string;
|
|
3380
|
+
/** Net usage quantity. Included only when grouping by meter. */
|
|
3381
|
+
quantity?: string;
|
|
3382
|
+
deducted_quantity?: string;
|
|
3383
|
+
amount: Money;
|
|
3384
|
+
}
|
|
3385
|
+
export type StatementSummaryGroupBy = (typeof StatementSummaryGroupBy)[keyof typeof StatementSummaryGroupBy];
|
|
3386
|
+
export declare const StatementSummaryGroupBy: {
|
|
3387
|
+
readonly project: "project";
|
|
3388
|
+
readonly product: "product";
|
|
3389
|
+
readonly meter: "meter";
|
|
3390
|
+
};
|
|
3391
|
+
export interface StatementSummary {
|
|
3392
|
+
statement_id: string;
|
|
3393
|
+
currency: string;
|
|
3394
|
+
estimated: boolean;
|
|
3395
|
+
calculated_at?: string;
|
|
3396
|
+
group_by: StatementSummaryGroupBy;
|
|
3397
|
+
items: StatementItem[];
|
|
3398
|
+
pagination: OffsetPagination;
|
|
3399
|
+
}
|
|
534
3400
|
/**
|
|
535
3401
|
* The request conflicts with the current state of the service. The codes are described where they apply.
|
|
536
3402
|
*/
|