@leaflow/sdk 0.0.0-dev.352.g85966ed → 0.0.0-dev.353.g74313e0
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/funds/v1/generated/models.d.ts +4 -4
- package/dist/billing/type/funds/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/models.d.ts +375 -779
- package/dist/billing/type/order/v1/generated/models.js +12 -44
- package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/billing/type/order/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/billing/type/order/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/billing/type/order/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/billing/type/order/v1/generated/validators/contact.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/currency.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/billing/type/order/v1/generated/validators/discount.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/billing/type/order/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/billing/type/order/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/billing/type/order/v1/generated/validators/order.zod.js +10 -12
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/billing/type/order/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/billing/type/order/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/billing/type/order/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/placedOrder.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/billing/type/order/v1/generated/validators/price.zod.js +14 -11
- package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/billing/type/order/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/billing/type/order/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/billing/type/order/v1/generated/validators/priceType.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/priceType.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/productID.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/quote.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/billing/type/order/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/billing/type/order/v1/generated/validators/rate.zod.js +14 -6
- package/dist/billing/type/order/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/billing/type/order/v1/generated/validators/refund.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/statement.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/billing/type/order/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/tier.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/billing/type/order/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/billing/type/order/v1/generated/validators/usageType.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/usageType.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/billing/type/quote/v1/generated/models.d.ts +4 -4
- package/dist/billing/type/quote/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/v1/generated/functions.d.ts +176 -310
- package/dist/billing/v1/generated/functions.js +175 -309
- package/dist/billing/v1/generated/models.d.ts +425 -863
- package/dist/billing/v1/generated/models.js +13 -49
- package/dist/billing/v1/generated/schemas.zod.d.ts +166 -383
- package/dist/billing/v1/generated/schemas.zod.js +213 -372
- package/dist/billing/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/billing/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/billing/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/billing/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/billing/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/billing/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/billing/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/billing/v1/generated/validators/billingScheme.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/billingScheme.zod.js +11 -0
- package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/billing/v1/generated/validators/contact.zod.js +2 -2
- package/dist/billing/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/billing/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/billing/v1/generated/validators/currency.zod.js +1 -1
- package/dist/billing/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/billing/v1/generated/validators/discount.zod.js +4 -4
- package/dist/billing/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/billing/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/billing/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/billing/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/billing/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- 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 +0 -1
- package/dist/billing/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/billing/v1/generated/validators/listInvoicesParams.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/listPricesParams.zod.d.ts +5 -2
- package/dist/billing/v1/generated/validators/listPricesParams.zod.js +4 -1
- package/dist/billing/v1/generated/validators/listSpendParams.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/listSpendParams.zod.js +3 -1
- package/dist/billing/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/billing/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/billing/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/billing/v1/generated/validators/order.zod.js +10 -12
- package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/billing/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/billing/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/billing/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/billing/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/billing/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/billing/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/billing/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/billing/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/billing/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/price.zod.js +14 -11
- package/dist/billing/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/billing/v1/generated/validators/priceType.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/priceType.zod.js +11 -0
- package/dist/billing/v1/generated/validators/productID.zod.js +1 -1
- package/dist/billing/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/billing/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/billing/v1/generated/validators/quote.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/quote.zod.js +4 -4
- package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/billing/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/billing/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/billing/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/billing/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/billing/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/billing/v1/generated/validators/rate.zod.js +14 -6
- package/dist/billing/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/billing/v1/generated/validators/refund.zod.js +3 -3
- package/dist/billing/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/billing/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/billing/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/billing/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/billing/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/billing/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/billing/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/billing/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/billing/v1/generated/validators/statement.zod.js +2 -2
- package/dist/billing/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/billing/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/billing/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/billing/v1/generated/validators/tier.zod.js +1 -1
- package/dist/billing/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/billing/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/billing/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/billing/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/billing/v1/generated/validators/usageType.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/usageType.zod.js +11 -0
- package/dist/billing/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/canopy/v1/generated/models.d.ts +375 -779
- package/dist/canopy/v1/generated/models.js +12 -44
- package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/canopy/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/billingScheme.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/billingScheme.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/canopy/v1/generated/validators/contact.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/currency.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/canopy/v1/generated/validators/discount.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/canopy/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/funds.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/canopy/v1/generated/validators/order.zod.js +10 -12
- package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/canopy/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/canopy/v1/generated/validators/price.zod.js +14 -11
- package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/canopy/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/canopy/v1/generated/validators/priceType.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/priceType.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/productID.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/canopy/v1/generated/validators/rate.zod.js +14 -6
- package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/canopy/v1/generated/validators/refund.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/statement.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/tier.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/canopy/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/canopy/v1/generated/validators/usageType.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/usageType.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/compute/v1/generated/models.d.ts +4 -4
- package/dist/compute/v1/generated/schemas.zod.d.ts +18 -18
- package/dist/compute/v1/generated/validators/allocateFloatingIPQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/allocateFloatingIPRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/backupService.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/billingChoice.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/bootDisk.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createBackupCapacityPackQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createBackupCapacityPackRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/createDiskQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createDiskRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createImageQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createImageRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskTypeListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskTypeResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/funds.zod.js +4 -4
- package/dist/compute/v1/generated/validators/iPv4PoolListResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/iPv4PoolResource.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/instanceTypeListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/instanceTypeResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/launchInstanceQuoteRequestBody.zod.d.ts +3 -3
- package/dist/compute/v1/generated/validators/launchInstanceRequestBody.zod.d.ts +3 -3
- package/dist/compute/v1/generated/validators/newBootDisk.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/newCompute.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/newFloatingIP.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/pricing.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/pricingOption.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/regionListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/regionResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/restoreBackupQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/restoreBackupRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/setSnapshotQuotaQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/setSnapshotQuotaRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/snapshotQuota.zod.d.ts +2 -2
- package/dist/membership/v1/generated/models.d.ts +375 -779
- package/dist/membership/v1/generated/models.js +12 -44
- package/dist/membership/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/membership/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/membership/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/membership/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/membership/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/membership/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/membership/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/membership/v1/generated/validators/billingScheme.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/billingScheme.zod.js +11 -0
- package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/membership/v1/generated/validators/contact.zod.js +2 -2
- package/dist/membership/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/membership/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/membership/v1/generated/validators/currency6ff0ec7.zod.js +1 -1
- package/dist/membership/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/membership/v1/generated/validators/discount.zod.js +4 -4
- package/dist/membership/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/membership/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/membership/v1/generated/validators/funds.zod.js +4 -4
- package/dist/membership/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/membership/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/membership/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/membership/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/membership/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/membership/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/membership/v1/generated/validators/order.zod.js +10 -12
- package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/membership/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/membership/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/membership/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/membership/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/membership/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/membership/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/membership/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/membership/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/membership/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/membership/v1/generated/validators/placedOrder.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/membership/v1/generated/validators/price.zod.js +14 -11
- package/dist/membership/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/membership/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/membership/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/membership/v1/generated/validators/priceType.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/priceType.zod.js +11 -0
- package/dist/membership/v1/generated/validators/productID.zod.js +1 -1
- package/dist/membership/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/membership/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/membership/v1/generated/validators/quote.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/quote.zod.js +4 -4
- package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/membership/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/membership/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/membership/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/membership/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/membership/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/membership/v1/generated/validators/rate.zod.js +14 -6
- package/dist/membership/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/membership/v1/generated/validators/refund.zod.js +3 -3
- package/dist/membership/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/membership/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/membership/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/membership/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/membership/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/membership/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/membership/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/membership/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/membership/v1/generated/validators/statement.zod.js +2 -2
- package/dist/membership/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/membership/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/membership/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/membership/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/membership/v1/generated/validators/tier.zod.js +1 -1
- package/dist/membership/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/membership/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/membership/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/membership/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/membership/v1/generated/validators/usageType.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/usageType.zod.js +11 -0
- package/dist/membership/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/routes.d.ts +4 -4
- package/dist/routes.js +4 -4
- package/package.json +1 -1
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
* OpenAPI spec version: v1
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* the discount is applied and it is issued; other drafts are private to administrators.
|
|
11
|
-
* An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
|
|
12
|
-
* Unbilled usage remains separate from invoices until it is invoiced.
|
|
13
|
-
* A refund does not change the status: a paid invoice stays paid, with the refunded part in
|
|
14
|
-
* amount_refunded. void means collection has stopped and any funds received have been returned.
|
|
9
|
+
* `draft`: not yet issued; an order's draft invoice shows base prices until it is paid, when the discount is applied and it is issued. Other drafts are visible only to operators. `open`: issued and not yet settled; a zero-total invoice is paid at once. `paid` stays paid after a refund, with the refunded part in amount_refunded. `void`: collection has stopped and any funds received have been returned. Usage not yet invoiced is not on any invoice.
|
|
15
10
|
*/
|
|
16
11
|
export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
|
|
17
12
|
export declare const InvoiceStatus: {
|
|
@@ -19,7 +14,6 @@ export declare const InvoiceStatus: {
|
|
|
19
14
|
readonly open: "open";
|
|
20
15
|
readonly paid: "paid";
|
|
21
16
|
readonly void: "void";
|
|
22
|
-
readonly uncollectible: "uncollectible";
|
|
23
17
|
};
|
|
24
18
|
/**
|
|
25
19
|
* A decimal string, in the currency stated alongside it.
|
|
@@ -34,10 +28,7 @@ export declare const InvoiceStatus: {
|
|
|
34
28
|
*/
|
|
35
29
|
export type Money = string;
|
|
36
30
|
/**
|
|
37
|
-
*
|
|
38
|
-
* has an invoice from placement. A draft shows base prices until it is paid, when the discount is
|
|
39
|
-
* applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
|
|
40
|
-
* checkout mode. Neither establishes acceptance or delivery.
|
|
31
|
+
* An order's invoice amounts, without contact details or payment methods. A draft shows base prices until it is paid, when the discount is applied and it is issued; a zero-total invoice is issued and paid at placement.
|
|
41
32
|
*/
|
|
42
33
|
export interface InvoiceSummary {
|
|
43
34
|
id: string;
|
|
@@ -55,9 +46,9 @@ export interface InvoiceSummary {
|
|
|
55
46
|
tax_amount: string;
|
|
56
47
|
total: string;
|
|
57
48
|
amount_paid: string;
|
|
58
|
-
/** Issued
|
|
49
|
+
/** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
|
|
59
50
|
pre_payment_credit_notes_amount: Money;
|
|
60
|
-
/** Issued credit notes against payments already received
|
|
51
|
+
/** Issued credit notes against payments already received; their refunds may not have completed. */
|
|
61
52
|
post_payment_credit_notes_amount: Money;
|
|
62
53
|
/**
|
|
63
54
|
* What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
@@ -120,7 +111,7 @@ export declare const WithdrawalItemStatus: {
|
|
|
120
111
|
readonly reversed: "reversed";
|
|
121
112
|
};
|
|
122
113
|
/**
|
|
123
|
-
* The original top-up and its refund
|
|
114
|
+
* The original top-up and where its refund goes. Card details are included when the original payment method was saved.
|
|
124
115
|
*/
|
|
125
116
|
export interface WithdrawalSource {
|
|
126
117
|
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
@@ -138,7 +129,7 @@ export interface WithdrawalSource {
|
|
|
138
129
|
card_last4?: string;
|
|
139
130
|
}
|
|
140
131
|
/**
|
|
141
|
-
*
|
|
132
|
+
* For one original top-up: the principal deducted, the withdrawal fee and the amount refunded, through its own refund. payment_gateway and method_type identify the original route.
|
|
142
133
|
*/
|
|
143
134
|
export interface WithdrawalItem {
|
|
144
135
|
source_transaction_id: string;
|
|
@@ -163,7 +154,7 @@ export interface WithdrawalItem {
|
|
|
163
154
|
payment_gateway: string;
|
|
164
155
|
method_type: string;
|
|
165
156
|
source: WithdrawalSource;
|
|
166
|
-
/** The
|
|
157
|
+
/** The gateway's failure code when a refund failed, or `refund_reversed` when a completed refund was reversed. Absent while pending or successful. */
|
|
167
158
|
failure_code?: string;
|
|
168
159
|
}
|
|
169
160
|
export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
|
|
@@ -176,7 +167,7 @@ export declare const WithdrawalStatus: {
|
|
|
176
167
|
readonly reversed: "reversed";
|
|
177
168
|
};
|
|
178
169
|
/**
|
|
179
|
-
*
|
|
170
|
+
* A withdrawal of account balance to the original payment methods of its unused top-ups. Accepted amounts are fixed. deducted_amount, settled_amount and charged_fee_amount cover completed items. A failed item releases its principal and fee; successful items stand when another item fails.
|
|
180
171
|
*/
|
|
181
172
|
export interface Withdrawal {
|
|
182
173
|
id: string;
|
|
@@ -201,7 +192,7 @@ export interface Withdrawal {
|
|
|
201
192
|
status: WithdrawalStatus;
|
|
202
193
|
created_at: string;
|
|
203
194
|
completed_at?: string;
|
|
204
|
-
/**
|
|
195
|
+
/** Who submitted the withdrawal; may differ from the account owner. */
|
|
205
196
|
created_by?: string;
|
|
206
197
|
}
|
|
207
198
|
export interface WithdrawalPreviewItem {
|
|
@@ -259,7 +250,7 @@ export interface WithdrawalItemList {
|
|
|
259
250
|
pagination: OffsetPagination;
|
|
260
251
|
}
|
|
261
252
|
/**
|
|
262
|
-
* Whether a
|
|
253
|
+
* Whether a delivered purchase may end immediately or only at the end of its paid term; refunds follow the refund policy. When absent, no termination terms were agreed.
|
|
263
254
|
*/
|
|
264
255
|
export type TerminationPolicy = (typeof TerminationPolicy)[keyof typeof TerminationPolicy];
|
|
265
256
|
export declare const TerminationPolicy: {
|
|
@@ -267,16 +258,7 @@ export declare const TerminationPolicy: {
|
|
|
267
258
|
readonly period_end: "period_end";
|
|
268
259
|
};
|
|
269
260
|
/**
|
|
270
|
-
* none refunds nothing. prorated refunds the amount paid for the current period minus the value of
|
|
271
|
-
* the time used, never below zero and never more than what remains unrefunded. The time used runs
|
|
272
|
-
* from the period start to the effective cancellation time and is valued at the plan's
|
|
273
|
-
* shorter-period prices in the same currency, frozen at purchase as the order item's
|
|
274
|
-
* refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
|
|
275
|
-
* price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
|
|
276
|
-
* second. When the plan has no prepaid period shorter than the one bought, the time used is valued
|
|
277
|
-
* at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
|
|
278
|
-
* and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
|
|
279
|
-
* paid is refunded in the same proportion as the amount it was paid on.
|
|
261
|
+
* `none` refunds nothing. `prorated` refunds the amount paid for the current period minus the value of the time used, never below zero or above what remains unrefunded. Time used runs from the period start to the effective cancellation and is valued at prices frozen on the order item: each full calendar month at `refund_monthly_amount`, the rest at `refund_hourly_amount` or, without it, at the monthly price by the second. When the plan has no licensed period shorter than the one bought, time used is valued pro rata at the price paid. Discounts and setup fees are not refunded. Refunds return to the original payment sources, with tax refunded in proportion.
|
|
280
262
|
*/
|
|
281
263
|
export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
|
|
282
264
|
export declare const RefundPolicy: {
|
|
@@ -298,7 +280,7 @@ export declare const QuoteRenewalInterval: {
|
|
|
298
280
|
readonly year: "year";
|
|
299
281
|
};
|
|
300
282
|
/**
|
|
301
|
-
* Price renewing a
|
|
283
|
+
* Price renewing a licensed subscription. Give `price_id`, or `interval` with
|
|
302
284
|
* `interval_count`, to renew for another term at the price currently sold for it. Naming
|
|
303
285
|
* the current term, or giving neither, renews at the agreed amount. A term sold at several
|
|
304
286
|
* prices that differ in termination policy is refused with 409
|
|
@@ -326,9 +308,7 @@ export declare const QuoteRenewalResultInterval: {
|
|
|
326
308
|
readonly year: "year";
|
|
327
309
|
};
|
|
328
310
|
/**
|
|
329
|
-
* What renewing would charge. Renewing the same subscription for the same term and
|
|
330
|
-
* of periods charges exactly `total`, unless prices or the discounts the account holds
|
|
331
|
-
* change in between.
|
|
311
|
+
* What renewing would charge. Renewing the same subscription for the same term and periods charges exactly `total` unless prices or the account's discounts change first.
|
|
332
312
|
*/
|
|
333
313
|
export interface QuoteRenewalResult {
|
|
334
314
|
/** Which renewal of the request this answers. */
|
|
@@ -339,11 +319,7 @@ export interface QuoteRenewalResult {
|
|
|
339
319
|
interval: QuoteRenewalResultInterval;
|
|
340
320
|
interval_count: number;
|
|
341
321
|
periods: number;
|
|
342
|
-
/**
|
|
343
|
-
* The price of the periods before the discounts the account holds. A discount the
|
|
344
|
-
* subscription already carries is reflected here. Contains tax only where the price
|
|
345
|
-
* itself includes it.
|
|
346
|
-
*/
|
|
322
|
+
/** The price of the periods before the account's discounts, with any discount the subscription carries already reflected; includes tax only where the price does. */
|
|
347
323
|
amount: Money;
|
|
348
324
|
/** The reduction from a discount the account holds. */
|
|
349
325
|
discount_amount: Money;
|
|
@@ -358,25 +334,25 @@ export interface QuoteRenewalResult {
|
|
|
358
334
|
total: Money;
|
|
359
335
|
}
|
|
360
336
|
/**
|
|
361
|
-
* One fully calculated purchase, estimated
|
|
337
|
+
* One fully calculated purchase, estimated metered usage or recorded order item. Amounts use the
|
|
362
338
|
* billing-account currency. An item with no immediate charge has zero checkout amounts.
|
|
363
339
|
*/
|
|
364
340
|
export interface QuoteItem {
|
|
365
341
|
tax_amount: Money;
|
|
366
342
|
tax_included_amount: Money;
|
|
367
343
|
/**
|
|
368
|
-
*
|
|
344
|
+
* The zero-based request line index, or the recorded order item's position for an order quote.
|
|
369
345
|
* @minimum 0
|
|
370
346
|
*/
|
|
371
347
|
index: number;
|
|
372
348
|
/** Present for an existing order quote; identifies the recorded item being priced. */
|
|
373
349
|
order_item_id?: string;
|
|
374
|
-
/** The selected price,
|
|
350
|
+
/** The selected price, also when the request identified it indirectly. */
|
|
375
351
|
price_id: string;
|
|
376
352
|
plan_name: string;
|
|
377
353
|
/** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
|
|
378
354
|
unit_amount: Money | null;
|
|
379
|
-
/** The quantity priced
|
|
355
|
+
/** The quantity priced; with duration_seconds, quantity times the duration. */
|
|
380
356
|
quantity: string;
|
|
381
357
|
/** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
|
|
382
358
|
amount: Money;
|
|
@@ -387,16 +363,16 @@ export interface QuoteItem {
|
|
|
387
363
|
/**
|
|
388
364
|
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
389
365
|
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
390
|
-
* A
|
|
366
|
+
* A licensed purchase may instead be paid with an online payment method.
|
|
391
367
|
*/
|
|
392
368
|
export interface Funds {
|
|
393
369
|
/** Spendable balance after pending returns. */
|
|
394
370
|
available_balance_amount: Money;
|
|
395
|
-
/** Currently effective credits eligible for the quoted purchases or
|
|
371
|
+
/** Currently effective credits eligible for the quoted purchases or metered usage. Each grant is counted once. */
|
|
396
372
|
usable_credit_amount: Money;
|
|
397
|
-
/** Currently effective credits that cannot fund any quoted purchase or
|
|
373
|
+
/** Currently effective credits that cannot fund any quoted purchase or metered target. Unused eligible credits are not restricted. */
|
|
398
374
|
restricted_credit_amount: Money;
|
|
399
|
-
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new
|
|
375
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new metered purchase's admission requirement. */
|
|
400
376
|
required_balance_amount: Money;
|
|
401
377
|
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
402
378
|
balance_shortfall_amount: Money;
|
|
@@ -409,8 +385,7 @@ export declare const QuotedDiscountType: {
|
|
|
409
385
|
readonly account_discount: "account_discount";
|
|
410
386
|
};
|
|
411
387
|
/**
|
|
412
|
-
* The discount selected for this calculation.
|
|
413
|
-
* reserve a redemption. Discount amounts are reported on the quote and its lines.
|
|
388
|
+
* The discount selected for this calculation, not applied and not reserved. Amounts are on the quote and its lines.
|
|
414
389
|
*/
|
|
415
390
|
export interface QuotedDiscount {
|
|
416
391
|
type: QuotedDiscountType;
|
|
@@ -438,30 +413,35 @@ export interface NamedIdentity {
|
|
|
438
413
|
/** @maxLength 255 */
|
|
439
414
|
name: string;
|
|
440
415
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
416
|
+
/**
|
|
417
|
+
* `one_time` charges once when bought. `recurring` charges again for every period, or for usage as it is settled.
|
|
418
|
+
*/
|
|
419
|
+
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
420
|
+
export declare const PriceType: {
|
|
445
421
|
readonly one_time: "one_time";
|
|
422
|
+
readonly recurring: "recurring";
|
|
446
423
|
};
|
|
447
424
|
/**
|
|
448
|
-
*
|
|
425
|
+
* `licensed` charges for the quantity bought, each period paid before it starts. `metered` charges for the usage
|
|
426
|
+
* reported, after it is settled; a metered subscription lasts until it is canceled. A one-time price is licensed.
|
|
427
|
+
*/
|
|
428
|
+
export type UsageType = (typeof UsageType)[keyof typeof UsageType];
|
|
429
|
+
export declare const UsageType: {
|
|
430
|
+
readonly licensed: "licensed";
|
|
431
|
+
readonly metered: "metered";
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* One subscription of the quoted cancellation.
|
|
449
435
|
*/
|
|
450
436
|
export interface CancellationRefundPreviewItem {
|
|
451
437
|
subscription_id: string;
|
|
452
438
|
plan_id: string;
|
|
453
439
|
plan_name: string;
|
|
454
|
-
/**
|
|
455
|
-
* The project and its current name, for display. Absent for a purchase at account level, and when the
|
|
456
|
-
* project details cannot be read at the moment.
|
|
457
|
-
*/
|
|
440
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read. */
|
|
458
441
|
project?: NamedIdentity | null;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
* cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
|
|
463
|
-
* until it is canceled and turns it back on.
|
|
464
|
-
*/
|
|
442
|
+
type: PriceType;
|
|
443
|
+
usage_type: UsageType;
|
|
444
|
+
/** Whether automatic renewal is on now. Creating the cancellation turns it off; withdrawing it turns it back on for a metered subscription but not for a licensed one. */
|
|
465
445
|
auto_renew: boolean;
|
|
466
446
|
unused_amount: Money;
|
|
467
447
|
refundable_amount: Money;
|
|
@@ -471,19 +451,19 @@ export interface CancellationRefundPreviewItem {
|
|
|
471
451
|
forfeited_amount: Money;
|
|
472
452
|
}
|
|
473
453
|
/**
|
|
474
|
-
* What the cancellation would return,
|
|
475
|
-
* `
|
|
454
|
+
* What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and
|
|
455
|
+
* `refundable_amount` when creating the cancellation.
|
|
476
456
|
*
|
|
477
|
-
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
|
|
478
|
-
*
|
|
479
|
-
* - `refundable_amount`: what is returned the way it was paid,
|
|
480
|
-
* `
|
|
481
|
-
* - `refund_amount`: the part returned to the balance or
|
|
457
|
+
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the time used,
|
|
458
|
+
* valued as refund policy `prorated` describes, whatever the refund terms say.
|
|
459
|
+
* - `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus
|
|
460
|
+
* `credit_amount`.
|
|
461
|
+
* - `refund_amount`: the part returned to the balance or the payment method.
|
|
482
462
|
* - `credit_amount`: the part restored to the credit grants that paid.
|
|
483
463
|
* - `tax_amount`: the tax included in `refundable_amount`.
|
|
484
464
|
* - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
|
|
485
465
|
*
|
|
486
|
-
*
|
|
466
|
+
* Metered and one-time subscriptions show zero; their usage until release is charged as usual.
|
|
487
467
|
*/
|
|
488
468
|
export interface CancellationRefundPreview {
|
|
489
469
|
mode: TerminationPolicy;
|
|
@@ -501,11 +481,7 @@ export interface CancellationRefundPreview {
|
|
|
501
481
|
items: CancellationRefundPreviewItem[];
|
|
502
482
|
}
|
|
503
483
|
/**
|
|
504
|
-
* An estimated refund to original payment sources. Before acceptance, cancellation returns the
|
|
505
|
-
* collected amount. For delivered service, only value funded by this order is included; renewals
|
|
506
|
-
* are evaluated under their own orders and the agreed termination terms apply. An unknown
|
|
507
|
-
* delivery outcome is not evidence that a refund is eligible. This calculation does not create
|
|
508
|
-
* a refund; the amount returned is determined when cancellation or termination is confirmed.
|
|
484
|
+
* An estimated refund to the original payment sources. Before acceptance, cancellation returns the collected amount. For delivered service, only value paid by this order is included; renewals are evaluated with their own orders under the agreed termination terms. Nothing is refunded by the quote; the amount is fixed when cancellation or termination is confirmed.
|
|
509
485
|
*/
|
|
510
486
|
export interface OrderRefundQuote {
|
|
511
487
|
order_id: string;
|
|
@@ -515,21 +491,15 @@ export interface OrderRefundQuote {
|
|
|
515
491
|
currency: string;
|
|
516
492
|
}
|
|
517
493
|
/**
|
|
518
|
-
* A complete calculation in
|
|
519
|
-
* redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
|
|
520
|
-
* included in totals for reporting and are not collectible at checkout. Only an existing-order quote
|
|
521
|
-
* provides that order's checkout amount.
|
|
494
|
+
* A complete calculation in the billing account's currency; nothing is saved or reserved. The request fails if any item cannot be priced. Usage estimates are included in totals but are not collected at checkout; only an existing-order quote gives that order's checkout amount.
|
|
522
495
|
*/
|
|
523
496
|
export interface Quote {
|
|
524
|
-
/** Account
|
|
497
|
+
/** Account funds for an existing-order checkout quote. Absent for usage estimates, refunds and cancellations. */
|
|
525
498
|
funds?: Funds;
|
|
526
499
|
subtotal: Money;
|
|
527
500
|
discount_amount: Money;
|
|
528
501
|
tax_amount: Money;
|
|
529
|
-
/**
|
|
530
|
-
* The discount evaluated for a purchase or order, without applying it. Null when none is selected or
|
|
531
|
-
* when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
|
|
532
|
-
*/
|
|
502
|
+
/** The discount a purchase or order would get, not yet applied. Null when there is none, and for renewals and cancellations. A confirmed order reports its recorded discount. */
|
|
533
503
|
discount: QuotedDiscount | null;
|
|
534
504
|
items: QuoteItem[];
|
|
535
505
|
renewals: QuoteRenewalResult[];
|
|
@@ -537,20 +507,15 @@ export interface Quote {
|
|
|
537
507
|
cancellation?: CancellationRefundPreview;
|
|
538
508
|
total: Money;
|
|
539
509
|
currency: string;
|
|
540
|
-
/** Present
|
|
510
|
+
/** Present when an order refund was requested. */
|
|
541
511
|
refund?: OrderRefundQuote;
|
|
542
512
|
}
|
|
543
513
|
/**
|
|
544
|
-
* A cancellation to quote: what ending these subscriptions together would return
|
|
545
|
-
* request; to compare, quote `immediate` and `period_end` separately.
|
|
546
|
-
*
|
|
547
|
-
* Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
|
|
548
|
-
* canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
|
|
549
|
-
* paid change still waiting to switch (`meta.order_id`).
|
|
514
|
+
* A cancellation to quote: what ending these subscriptions together would return, for one mode; quote `immediate` and `period_end` separately to compare. Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a paid change waiting to switch (`meta.order_id`).
|
|
550
515
|
*/
|
|
551
516
|
export interface QuoteCancellation {
|
|
552
517
|
/**
|
|
553
|
-
* The subscriptions to end together, all of one service
|
|
518
|
+
* The subscriptions to end together, all of one service, including every subscription released with a resource.
|
|
554
519
|
* @minItems 1
|
|
555
520
|
* @maxItems 50
|
|
556
521
|
*/
|
|
@@ -565,15 +530,12 @@ export interface CancellationCreate {
|
|
|
565
530
|
*/
|
|
566
531
|
subscription_ids: string[];
|
|
567
532
|
mode: TerminationPolicy;
|
|
568
|
-
/**
|
|
569
|
-
* For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
|
|
570
|
-
* at most ten minutes old. The refund is computed as of it. Now when omitted.
|
|
571
|
-
*/
|
|
533
|
+
/** For `immediate`, the quote's `proration_date`: a whole second, not in the future and at most ten minutes old; the refund is computed as of it. Now when omitted. */
|
|
572
534
|
proration_date?: string;
|
|
573
|
-
/** The `refundable_amount
|
|
535
|
+
/** The quote's `refundable_amount`; the cancellation is refused when the refund differs. */
|
|
574
536
|
expected_refundable_amount: Money & string;
|
|
575
537
|
/**
|
|
576
|
-
* A note from the account holder
|
|
538
|
+
* A note from the account holder, kept with the cancellation.
|
|
577
539
|
* @maxLength 1024
|
|
578
540
|
*/
|
|
579
541
|
reason?: string;
|
|
@@ -588,7 +550,7 @@ export declare const CancellationStatus: {
|
|
|
588
550
|
readonly failed: "failed";
|
|
589
551
|
};
|
|
590
552
|
/**
|
|
591
|
-
* Who
|
|
553
|
+
* Who requested it; `project_deletion` means the project was deleted.
|
|
592
554
|
*/
|
|
593
555
|
export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
|
|
594
556
|
export declare const CancellationOrigin: {
|
|
@@ -596,17 +558,6 @@ export declare const CancellationOrigin: {
|
|
|
596
558
|
readonly operator: "operator";
|
|
597
559
|
readonly project_deletion: "project_deletion";
|
|
598
560
|
};
|
|
599
|
-
/**
|
|
600
|
-
* How the subscription is charged. Creating the cancellation turned automatic renewal off;
|
|
601
|
-
* withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
|
|
602
|
-
* `prepaid` one.
|
|
603
|
-
*/
|
|
604
|
-
export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
|
|
605
|
-
export declare const CancellationItemChargeType: {
|
|
606
|
-
readonly postpaid: "postpaid";
|
|
607
|
-
readonly prepaid: "prepaid";
|
|
608
|
-
readonly one_time: "one_time";
|
|
609
|
-
};
|
|
610
561
|
export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
|
|
611
562
|
export declare const CancellationItemStatus: {
|
|
612
563
|
readonly requested: "requested";
|
|
@@ -620,19 +571,19 @@ export declare const CancellationItemStatus: {
|
|
|
620
571
|
* One subscription of the cancellation.
|
|
621
572
|
*/
|
|
622
573
|
export interface CancellationItem {
|
|
623
|
-
/** The cancellation item
|
|
574
|
+
/** The subscription's cancellation item, the same as `Subscription.cancellation.id`. */
|
|
624
575
|
id: string;
|
|
625
576
|
subscription_id: string;
|
|
626
577
|
plan_id: string;
|
|
627
578
|
plan_name: string;
|
|
579
|
+
type: PriceType;
|
|
628
580
|
/**
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
* `prepaid` one.
|
|
581
|
+
* Creating the cancellation turned automatic renewal off; withdrawing it turns renewal back on
|
|
582
|
+
* for a `metered` subscription and leaves it off for a `licensed` one.
|
|
632
583
|
*/
|
|
633
|
-
|
|
584
|
+
usage_type: UsageType;
|
|
634
585
|
status: CancellationItemStatus;
|
|
635
|
-
/**
|
|
586
|
+
/** The release stopped or its result is unknown; present while the release needs resolution. */
|
|
636
587
|
failure_code?: string;
|
|
637
588
|
release_started_at?: string;
|
|
638
589
|
/** When the service ended, as confirmed by the service that provides it. */
|
|
@@ -662,20 +613,14 @@ export interface Cancellation {
|
|
|
662
613
|
scheduled_at?: string;
|
|
663
614
|
/** For `immediate`, the second the refund is computed as of. */
|
|
664
615
|
proration_date?: string;
|
|
665
|
-
/** Who
|
|
616
|
+
/** Who requested it; `project_deletion` means the project was deleted. */
|
|
666
617
|
origin: CancellationOrigin;
|
|
667
|
-
/**
|
|
668
|
-
* The billing account that paid for these subscriptions when the cancellation was created: the
|
|
669
|
-
* account of an account-level purchase, or the account the project was linked to.
|
|
670
|
-
*/
|
|
618
|
+
/** The billing account paying for these subscriptions when the cancellation was created: the purchasing account of an account-level purchase, or the project's linked account. */
|
|
671
619
|
billing_account_id: number;
|
|
672
620
|
currency: string;
|
|
673
|
-
/** The refund confirmed when
|
|
621
|
+
/** The refund confirmed when the cancellation was created. Absent when the platform created it. */
|
|
674
622
|
expected_refundable_amount?: Money;
|
|
675
|
-
/**
|
|
676
|
-
* Present with `failed`. A code of the service that provides the resources, such as a disk
|
|
677
|
-
* that can only be released with its server. Clients map it to their own wording.
|
|
678
|
-
*/
|
|
623
|
+
/** Present with `failed`: the owning service's code, such as for a disk that can only be released with its server. */
|
|
679
624
|
failure_code?: string;
|
|
680
625
|
requested_at: string;
|
|
681
626
|
completed_at?: string;
|
|
@@ -701,13 +646,11 @@ export declare const SubscriptionCancellationMode: {
|
|
|
701
646
|
readonly period_end: "period_end";
|
|
702
647
|
};
|
|
703
648
|
/**
|
|
704
|
-
* The latest cancellation
|
|
705
|
-
* item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
|
|
706
|
-
* confirmed end of service. A cancellation alone does not stop metering or issue a refund.
|
|
649
|
+
* The latest cancellation including the subscription, with this subscription's item: `id` is the item and `cancellation_id` the cancellation. scheduled_at is the intended time and effective_at the confirmed end of service.
|
|
707
650
|
*/
|
|
708
651
|
export interface SubscriptionCancellation {
|
|
709
652
|
reason?: string;
|
|
710
|
-
/** The cancellation this
|
|
653
|
+
/** The cancellation this item belongs to, with the other subscriptions released together. */
|
|
711
654
|
cancellation_id?: string;
|
|
712
655
|
id: string;
|
|
713
656
|
subscription_id: string;
|
|
@@ -741,7 +684,7 @@ export interface Error {
|
|
|
741
684
|
status: number;
|
|
742
685
|
}
|
|
743
686
|
/**
|
|
744
|
-
*
|
|
687
|
+
* The platform service's fixed identifier, such as compute, canopy or assistant.
|
|
745
688
|
* @minLength 1
|
|
746
689
|
* @maxLength 64
|
|
747
690
|
* @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
|
|
@@ -760,29 +703,22 @@ export declare const BillingAccountStatus: {
|
|
|
760
703
|
};
|
|
761
704
|
export interface BillingAccount {
|
|
762
705
|
/**
|
|
763
|
-
* The active contact used for
|
|
706
|
+
* The active contact used for invoices, of this account; null clears it.
|
|
764
707
|
* @nullable
|
|
765
708
|
*/
|
|
766
709
|
invoice_contact_id?: string | null;
|
|
767
710
|
id: number;
|
|
768
|
-
/**
|
|
711
|
+
/** Your name for the account. */
|
|
769
712
|
name?: string;
|
|
770
713
|
/** Fixed when the account was opened. */
|
|
771
714
|
currency: string;
|
|
772
715
|
status: BillingAccountStatus;
|
|
773
|
-
/**
|
|
774
|
-
* How far past the suspension threshold this account may go before its resources are
|
|
775
|
-
* suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
|
|
776
|
-
*/
|
|
716
|
+
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
777
717
|
grace_amount?: string;
|
|
778
|
-
/**
|
|
779
|
-
* How long this account has to top up after crossing the suspension threshold.
|
|
780
|
-
* 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
|
|
781
|
-
*/
|
|
718
|
+
/** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
|
|
782
719
|
grace_period_seconds?: number;
|
|
783
720
|
/**
|
|
784
|
-
*
|
|
785
|
-
* Null or absent if the account is not closed or its historical close time is unknown.
|
|
721
|
+
* When the account was closed. Null if it is not closed or the time is unknown.
|
|
786
722
|
* @nullable
|
|
787
723
|
*/
|
|
788
724
|
readonly closed_at?: string | null;
|
|
@@ -799,7 +735,7 @@ export interface Currency {
|
|
|
799
735
|
*/
|
|
800
736
|
code: string;
|
|
801
737
|
/**
|
|
802
|
-
* Decimal places of the
|
|
738
|
+
* Decimal places of the ISO 4217 minor unit.
|
|
803
739
|
* @minimum 0
|
|
804
740
|
* @maximum 4
|
|
805
741
|
*/
|
|
@@ -826,7 +762,7 @@ export interface BillingAccountCreate {
|
|
|
826
762
|
}
|
|
827
763
|
export interface BillingAccountUpdate {
|
|
828
764
|
/**
|
|
829
|
-
* The active contact used for
|
|
765
|
+
* The active contact used for invoices, of this account; null clears it.
|
|
830
766
|
* @nullable
|
|
831
767
|
*/
|
|
832
768
|
invoice_contact_id?: string | null;
|
|
@@ -838,7 +774,7 @@ export interface BillingAccountList {
|
|
|
838
774
|
pagination: OffsetPagination;
|
|
839
775
|
}
|
|
840
776
|
/**
|
|
841
|
-
* A plan
|
|
777
|
+
* A plan referenced by an applicability; active is false once it is archived, and the reference still applies.
|
|
842
778
|
*/
|
|
843
779
|
export interface ApplicablePlan {
|
|
844
780
|
id: string;
|
|
@@ -846,24 +782,20 @@ export interface ApplicablePlan {
|
|
|
846
782
|
active: boolean;
|
|
847
783
|
}
|
|
848
784
|
/**
|
|
849
|
-
* A catalog object inlined for display.
|
|
785
|
+
* A catalog object, inlined for display.
|
|
850
786
|
*/
|
|
851
787
|
export interface ObjectIdentity {
|
|
852
788
|
lookup_key?: string;
|
|
853
789
|
id: string;
|
|
854
790
|
name: string;
|
|
855
791
|
}
|
|
856
|
-
|
|
857
|
-
|
|
792
|
+
/**
|
|
793
|
+
* `per_unit` multiplies a unit amount; `tiered` walks a ladder.
|
|
794
|
+
*/
|
|
795
|
+
export type BillingScheme = (typeof BillingScheme)[keyof typeof BillingScheme];
|
|
796
|
+
export declare const BillingScheme: {
|
|
858
797
|
readonly per_unit: "per_unit";
|
|
859
798
|
readonly tiered: "tiered";
|
|
860
|
-
readonly rated: "rated";
|
|
861
|
-
};
|
|
862
|
-
export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
|
|
863
|
-
export declare const PriceOptionType: {
|
|
864
|
-
readonly postpaid: "postpaid";
|
|
865
|
-
readonly prepaid: "prepaid";
|
|
866
|
-
readonly one_time: "one_time";
|
|
867
799
|
};
|
|
868
800
|
export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
|
|
869
801
|
export declare const PriceOptionInterval: {
|
|
@@ -873,16 +805,18 @@ export declare const PriceOptionInterval: {
|
|
|
873
805
|
readonly year: "year";
|
|
874
806
|
};
|
|
875
807
|
/**
|
|
876
|
-
* A price's display terms, including archived prices referenced by an applicability
|
|
808
|
+
* A price's display terms, including archived prices referenced by an applicability.
|
|
877
809
|
*/
|
|
878
810
|
export interface PriceOption {
|
|
879
811
|
product: Product;
|
|
880
812
|
plan: ObjectIdentity;
|
|
881
|
-
|
|
813
|
+
/** Absent when the price delegates to a rate card. */
|
|
814
|
+
billing_scheme?: BillingScheme;
|
|
882
815
|
unit_quantity: string;
|
|
883
816
|
id: string;
|
|
884
817
|
currency: string;
|
|
885
|
-
type:
|
|
818
|
+
type: PriceType;
|
|
819
|
+
usage_type: UsageType;
|
|
886
820
|
interval: PriceOptionInterval;
|
|
887
821
|
/** How many periods one purchase covers. */
|
|
888
822
|
interval_count?: number;
|
|
@@ -891,11 +825,7 @@ export interface PriceOption {
|
|
|
891
825
|
active: boolean;
|
|
892
826
|
}
|
|
893
827
|
/**
|
|
894
|
-
*
|
|
895
|
-
* zero-charge purchases. It does not mean the account's first purchase; use
|
|
896
|
-
* `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
|
|
897
|
-
* configuration or billing-term changes, including changes that increase or decrease
|
|
898
|
-
* the amount due and changes with no additional charge or refund.
|
|
828
|
+
* The purchase operation covered. `new`: every new purchase, including zero-charge ones; it does not mean the account's first purchase, which `first_purchase_only` restricts. `renew`: renewals. `modify`: configuration or billing-term changes, whether they charge, refund or neither.
|
|
899
829
|
*/
|
|
900
830
|
export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
|
|
901
831
|
export declare const PurchaseOperation: {
|
|
@@ -904,20 +834,18 @@ export declare const PurchaseOperation: {
|
|
|
904
834
|
readonly modify: "modify";
|
|
905
835
|
};
|
|
906
836
|
/**
|
|
907
|
-
*
|
|
908
|
-
* given, subject to the charge type, operation and term conditions. Entries always include their
|
|
909
|
-
* display fields; archived plans and prices stay listed with active set to false.
|
|
837
|
+
* Covers anything not excluded that matches an inclusion, or anything not excluded when no inclusion is given, subject to the price type, usage type, operation and term conditions. Archived plans and prices stay listed with active false.
|
|
910
838
|
*/
|
|
911
839
|
export interface Applicability {
|
|
912
840
|
products?: Product[];
|
|
913
841
|
plans?: ApplicablePlan[];
|
|
914
842
|
prices?: PriceOption[];
|
|
915
|
-
|
|
843
|
+
/** The price types covered; empty covers both. */
|
|
844
|
+
price_types?: PriceType[];
|
|
845
|
+
/** The usage types covered; empty covers both. */
|
|
846
|
+
usage_types?: UsageType[];
|
|
916
847
|
operations?: PurchaseOperation[];
|
|
917
|
-
/**
|
|
918
|
-
* The shortest term a purchase may have, in months. A purchase with no term, such as
|
|
919
|
-
* metered usage, never qualifies while this is set.
|
|
920
|
-
*/
|
|
848
|
+
/** The shortest term a purchase may have, in months. Purchases without a term, such as metered usage, do not qualify while this is set. */
|
|
921
849
|
min_term_months?: number;
|
|
922
850
|
/** The longest term a purchase may have, in months. */
|
|
923
851
|
max_term_months?: number;
|
|
@@ -926,56 +854,42 @@ export interface Applicability {
|
|
|
926
854
|
excluded_prices?: PriceOption[];
|
|
927
855
|
}
|
|
928
856
|
export interface CreditGroup {
|
|
929
|
-
/** What the credit in this group may pay for
|
|
857
|
+
/** What the credit in this group may pay for; no restrictions means anything on the account. */
|
|
930
858
|
applies_to: Applicability;
|
|
931
859
|
/** Restricted to your first purchase of anything it applies to. */
|
|
932
860
|
first_purchase_only?: boolean;
|
|
933
861
|
amount: Money;
|
|
934
862
|
}
|
|
935
863
|
/**
|
|
936
|
-
*
|
|
864
|
+
* Balance, credits and unpaid charges, each reported separately.
|
|
937
865
|
*/
|
|
938
866
|
export interface AccountBalance {
|
|
939
867
|
/** Balance minus pending balance returns and the part of unbilled_amount and due that estimated_credit_applied does not cover. Negative only when the balance and applicable credit fall short of what the account owes. */
|
|
940
868
|
available_credit: Money;
|
|
941
|
-
/** Credit expected to pay unbilled_amount and due
|
|
869
|
+
/** Credit expected to pay unbilled_amount and due, matching each charge to the grants whose scope, validity and conditions it meets, in the order credit is applied at payment. Nothing is deducted until an invoice is paid, so credits still includes this amount. */
|
|
942
870
|
estimated_credit_applied: Money;
|
|
943
|
-
/** Current estimate of
|
|
871
|
+
/** Current estimate of priced usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
|
|
944
872
|
unbilled_amount: Money;
|
|
945
873
|
billing_account_id: number;
|
|
946
874
|
currency: string;
|
|
947
|
-
/**
|
|
948
|
-
* Prepaid funds in the account currency, excluding credits. May be negative after a payment
|
|
949
|
-
* dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
|
|
950
|
-
*/
|
|
875
|
+
/** Topped-up funds in the account's currency, excluding credits. May be negative after a payment dispute. Amounts owed are reported in due; this is not a withdrawable amount. */
|
|
951
876
|
balance: Money;
|
|
952
|
-
/**
|
|
953
|
-
* The recorded remaining credit, including restricted grants. It is not withdrawable
|
|
954
|
-
* and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
|
|
955
|
-
* credits balance does not imply that due is zero.
|
|
956
|
-
*/
|
|
877
|
+
/** Remaining credit, including restricted grants; not withdrawable and not part of balance. credit_groups shows currently valid credit by permitted use; positive credits do not mean due is zero. */
|
|
957
878
|
credits: Money;
|
|
958
|
-
/** Currently valid credit
|
|
879
|
+
/** Currently valid credit restricted to certain products, operations or conditions; part of credits, not of balance. */
|
|
959
880
|
restricted_credits: Money;
|
|
960
|
-
/**
|
|
961
|
-
* Currently valid, unspent credit grouped by permitted use. Restrictions and
|
|
962
|
-
* validity dates determine which charges a group can cover, so these groups are not a general
|
|
963
|
-
* spendable balance and may differ from the recorded credits total.
|
|
964
|
-
*/
|
|
881
|
+
/** Currently valid unspent credit grouped by permitted use. Each group covers only the charges its restrictions and validity allow, and the groups may differ from the recorded credits total. */
|
|
965
882
|
credit_groups: CreditGroup[];
|
|
966
|
-
/** Amount still payable on issued invoices. The invoice of an order not yet accepted is
|
|
883
|
+
/** Amount still payable on issued invoices. The invoice of an order not yet accepted is excluded, here and from available_credit. Usage not yet invoiced is reported separately. */
|
|
967
884
|
due: Money;
|
|
968
885
|
pending_returns_amount: Money;
|
|
969
886
|
}
|
|
970
887
|
/**
|
|
971
|
-
* A project's assignment to a billing account
|
|
888
|
+
* A project's assignment to a billing account from effective_from until effective_to; an open assignment has no end.
|
|
972
889
|
*/
|
|
973
890
|
export interface ProjectAssignment {
|
|
974
891
|
project_id: string;
|
|
975
|
-
/**
|
|
976
|
-
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
977
|
-
* details cannot be read at the moment; `project_id` still identifies it.
|
|
978
|
-
*/
|
|
892
|
+
/** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
|
|
979
893
|
project?: NamedIdentity | null;
|
|
980
894
|
billing_account_id: number;
|
|
981
895
|
account_name?: string;
|
|
@@ -992,16 +906,7 @@ export interface SetProjectAssignmentRequest {
|
|
|
992
906
|
billing_account_id: number;
|
|
993
907
|
}
|
|
994
908
|
/**
|
|
995
|
-
* `pending` until the payment gateway reaches a result
|
|
996
|
-
*
|
|
997
|
-
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
998
|
-
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
999
|
-
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1000
|
-
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1001
|
-
* payment.
|
|
1002
|
-
*
|
|
1003
|
-
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1004
|
-
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
909
|
+
* `pending` until the payment gateway reaches a result; the balance increases on `succeeded`. `failed`: the gateway declined the payment, which is withdrawn at the gateway; create a new top-up to pay another way. `canceled`: withdrawn without collecting money, for the reason in `cancellation_reason`. Unknown gateway outcomes stay `pending`; a browser redirect is not proof of payment. `failed` and `canceled` are final; a payment the gateway collects afterwards is credited as a separate `succeeded` top-up.
|
|
1005
910
|
*/
|
|
1006
911
|
export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
|
|
1007
912
|
export declare const TopUpStatus: {
|
|
@@ -1016,8 +921,7 @@ export interface AccountIdentity {
|
|
|
1016
921
|
currency: string;
|
|
1017
922
|
}
|
|
1018
923
|
/**
|
|
1019
|
-
* Why a gateway payment was withdrawn
|
|
1020
|
-
* allowed for payment. `requested_by_customer` means the customer canceled it.
|
|
924
|
+
* Why a gateway payment was withdrawn: `abandoned` when the customer did not complete it in time, `requested_by_customer` when the customer canceled it.
|
|
1021
925
|
*/
|
|
1022
926
|
export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
|
|
1023
927
|
export declare const PaymentCancellationReason: {
|
|
@@ -1031,83 +935,55 @@ export declare const PaymentActionType: {
|
|
|
1031
935
|
readonly sdk: "sdk";
|
|
1032
936
|
};
|
|
1033
937
|
/**
|
|
1034
|
-
* The customer's next
|
|
938
|
+
* The customer's next step; the payment outcome is reported separately.
|
|
1035
939
|
*/
|
|
1036
940
|
export interface PaymentAction {
|
|
1037
941
|
type: PaymentActionType;
|
|
1038
|
-
/**
|
|
942
|
+
/** The browser adapter for the action, for example stripe. */
|
|
1039
943
|
provider?: string;
|
|
1040
944
|
url?: string;
|
|
1041
|
-
/** QR content to render
|
|
945
|
+
/** QR content to render, not an image URL. */
|
|
1042
946
|
qr_code?: string;
|
|
1043
|
-
/** Short-lived client credential for this payment
|
|
947
|
+
/** Short-lived client credential for confirming this payment in the browser. */
|
|
1044
948
|
client_secret?: string;
|
|
1045
949
|
public_key?: string;
|
|
1046
950
|
}
|
|
1047
951
|
/**
|
|
1048
|
-
* A top-up attempt and its outcome. A successful top-up adds
|
|
952
|
+
* A top-up attempt and its outcome. A successful top-up adds to the balance; it is not a credit grant and has no invoice.
|
|
1049
953
|
*/
|
|
1050
954
|
export interface TopUp {
|
|
1051
955
|
id: string;
|
|
1052
956
|
billing_account_id: number;
|
|
1053
957
|
account: AccountIdentity;
|
|
1054
|
-
/** What is credited to the account, in
|
|
958
|
+
/** What is credited to the account, in its currency. */
|
|
1055
959
|
amount: Money;
|
|
1056
960
|
currency: string;
|
|
1057
|
-
/**
|
|
1058
|
-
* The part of this top-up still held in the balance. Pending refunds can temporarily
|
|
1059
|
-
* reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
|
|
1060
|
-
*/
|
|
961
|
+
/** The part of this top-up still in the balance. Pending refunds may hold part of it, so not all of it is necessarily withdrawable. */
|
|
1061
962
|
remaining_amount?: Money;
|
|
1062
|
-
/**
|
|
1063
|
-
* `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
|
|
1064
|
-
*
|
|
1065
|
-
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
1066
|
-
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
1067
|
-
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1068
|
-
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1069
|
-
* payment.
|
|
1070
|
-
*
|
|
1071
|
-
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1072
|
-
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
1073
|
-
*/
|
|
963
|
+
/** `pending` until the payment gateway reaches a result; the balance increases on `succeeded`. `failed`: the gateway declined the payment, which is withdrawn at the gateway; create a new top-up to pay another way. `canceled`: withdrawn without collecting money, for the reason in `cancellation_reason`. Unknown gateway outcomes stay `pending`; a browser redirect is not proof of payment. `failed` and `canceled` are final; a payment the gateway collects afterwards is credited as a separate `succeeded` top-up. */
|
|
1074
964
|
status: TopUpStatus;
|
|
1075
965
|
cancellation_reason?: PaymentCancellationReason;
|
|
1076
966
|
/** Which payment gateway collected it. */
|
|
1077
967
|
payment_gateway?: string;
|
|
1078
968
|
/** The selected payment method, such as card, wechat_pay or alipay. */
|
|
1079
969
|
method_type?: string;
|
|
1080
|
-
/**
|
|
1081
|
-
* The currency the customer was actually charged in, when the checkout page collected a
|
|
1082
|
-
* local one. Absent when it was the same as the account's.
|
|
1083
|
-
*/
|
|
970
|
+
/** The currency the customer was charged in when the checkout collected a local currency; absent when it is the account's. */
|
|
1084
971
|
presentment_currency?: string;
|
|
1085
|
-
/**
|
|
1086
|
-
* What was charged, in `presentment_currency`. It will not equal `amount`, and it is
|
|
1087
|
-
* the figure that appears on the customer's card or wallet statement.
|
|
1088
|
-
*/
|
|
972
|
+
/** The amount charged in `presentment_currency`, as shown on the customer's statement. */
|
|
1089
973
|
presentment_amount?: Money;
|
|
1090
|
-
/**
|
|
1091
|
-
* Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
|
|
1092
|
-
* passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
|
|
1093
|
-
* such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
|
|
1094
|
-
* such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
|
|
1095
|
-
* to their own wording and treat an unknown value as a generic decline.
|
|
1096
|
-
*/
|
|
974
|
+
/** Why the gateway declined it; present with `failed`. The gateway's code unchanged: the issuer's decline code when there is one (Stripe decline_code, such as insufficient_funds), otherwise the gateway's error code (Stripe code, such as card_declined). Treat an unknown value as a generic decline. */
|
|
1097
975
|
failure_reason?: string;
|
|
1098
976
|
action?: PaymentAction;
|
|
1099
977
|
created_at: string;
|
|
1100
978
|
/**
|
|
1101
|
-
* When the funds arrived
|
|
1102
|
-
* reconciling against a statement uses this rather than the moment it was started.
|
|
1103
|
-
* Absent until the payment completes.
|
|
979
|
+
* When the funds arrived, possibly days after `created_at`. Absent until the payment completes.
|
|
1104
980
|
* @nullable
|
|
1105
981
|
*/
|
|
1106
982
|
settled_at?: string | null;
|
|
1107
983
|
}
|
|
1108
984
|
export interface TopUpCreate {
|
|
1109
985
|
/**
|
|
1110
|
-
* The gateway
|
|
986
|
+
* The gateway selected from the available payment options.
|
|
1111
987
|
* @minLength 1
|
|
1112
988
|
* @maxLength 32
|
|
1113
989
|
*/
|
|
@@ -1118,21 +994,12 @@ export interface TopUpCreate {
|
|
|
1118
994
|
* @maxLength 64
|
|
1119
995
|
*/
|
|
1120
996
|
method_type: string;
|
|
1121
|
-
/** The
|
|
997
|
+
/** The top-up ID, chosen by the caller. Read it after an uncertain response. */
|
|
1122
998
|
id: string;
|
|
1123
999
|
billing_account_id: number;
|
|
1124
|
-
/**
|
|
1125
|
-
* In the account's currency, and no finer than that currency's smallest unit:
|
|
1126
|
-
* two decimals for most, none for the yen. A finer amount is refused here rather
|
|
1127
|
-
* than at the checkout page, where the customer would see the gateway's own wording
|
|
1128
|
-
* instead of an explanation.
|
|
1129
|
-
*
|
|
1130
|
-
* There is a minimum, which differs by currency. Below it the gateway's fee
|
|
1131
|
-
* exceeds the top-up itself, so such a payment costs more to accept than it brings.
|
|
1132
|
-
* The minimum in force is returned with the rejection.
|
|
1133
|
-
*/
|
|
1000
|
+
/** In the account's currency, no finer than its smallest unit (two decimals for most currencies, none for JPY). An amount below the currency's minimum top-up is refused, and the minimum is returned with the error. */
|
|
1134
1001
|
amount: Money & string;
|
|
1135
|
-
/** Charge a saved method instead of opening a checkout page. */
|
|
1002
|
+
/** Charge a saved payment method instead of opening a checkout page. */
|
|
1136
1003
|
payment_method_id?: string;
|
|
1137
1004
|
/** Where to send the customer after checkout. */
|
|
1138
1005
|
return_url?: string;
|
|
@@ -1144,14 +1011,11 @@ export interface TopUpList {
|
|
|
1144
1011
|
export interface PaymentOptionMethod {
|
|
1145
1012
|
/** The value to send as `method_type`, such as card, wechat_pay or alipay. */
|
|
1146
1013
|
method_type: string;
|
|
1147
|
-
/**
|
|
1148
|
-
* Whether a method of this type can be saved with create-payment-method-setup and charged later
|
|
1149
|
-
* without the customer present. Methods that are not reusable are paid anew each time.
|
|
1150
|
-
*/
|
|
1014
|
+
/** Whether this method type can be saved with create-payment-method-setup and charged later without the customer. */
|
|
1151
1015
|
reusable: boolean;
|
|
1152
1016
|
}
|
|
1153
1017
|
/**
|
|
1154
|
-
* A
|
|
1018
|
+
* A gateway accepting the account's currency, with its payment methods.
|
|
1155
1019
|
*/
|
|
1156
1020
|
export interface PaymentOption {
|
|
1157
1021
|
/** The value to send as `payment_gateway`. */
|
|
@@ -1195,15 +1059,10 @@ export interface PaymentMethodSetup {
|
|
|
1195
1059
|
billing_account_id: number;
|
|
1196
1060
|
}
|
|
1197
1061
|
/**
|
|
1198
|
-
* What the payment gateway's browser library needs
|
|
1199
|
-
* no address to redirect to: the form is rendered in the page, and the card goes straight
|
|
1200
|
-
* from the browser to the gateway.
|
|
1062
|
+
* What the payment gateway's browser library needs to collect a card in the page; the card goes from the browser straight to the gateway.
|
|
1201
1063
|
*/
|
|
1202
1064
|
export interface PaymentMethodSetupResult {
|
|
1203
|
-
/**
|
|
1204
|
-
* The gateway's identifier for this attempt. Use it to tell a reloaded page apart
|
|
1205
|
-
* from a second attempt.
|
|
1206
|
-
*/
|
|
1065
|
+
/** The gateway's identifier for this attempt. */
|
|
1207
1066
|
setup_id: string;
|
|
1208
1067
|
payment_gateway: string;
|
|
1209
1068
|
action: PaymentAction;
|
|
@@ -1219,7 +1078,7 @@ export interface PaymentMethodSetupResult {
|
|
|
1219
1078
|
*/
|
|
1220
1079
|
export interface PayInvoiceRequest {
|
|
1221
1080
|
/**
|
|
1222
|
-
* Required to collect an online remainder. An existing attempt keeps its
|
|
1081
|
+
* Required to collect an online remainder. An existing attempt keeps its gateway.
|
|
1223
1082
|
* @minLength 1
|
|
1224
1083
|
* @maxLength 32
|
|
1225
1084
|
*/
|
|
@@ -1230,51 +1089,35 @@ export interface PayInvoiceRequest {
|
|
|
1230
1089
|
* @maxLength 64
|
|
1231
1090
|
*/
|
|
1232
1091
|
method_type?: string;
|
|
1233
|
-
/**
|
|
1092
|
+
/** A saved card of this billing account at the selected gateway. Omit to pay interactively. */
|
|
1234
1093
|
payment_method_id?: string;
|
|
1235
|
-
/** Whether to apply the
|
|
1094
|
+
/** Whether to apply the balance; credit grants are controlled by use_credits. */
|
|
1236
1095
|
use_balance?: boolean;
|
|
1237
|
-
/** Apply eligible, unexpired credit grants before
|
|
1096
|
+
/** Apply eligible, unexpired credit grants before the balance. Grants are never converted into balance. */
|
|
1238
1097
|
use_credits?: boolean;
|
|
1239
1098
|
return_url?: string;
|
|
1240
1099
|
/**
|
|
1241
|
-
* The code to apply while the order's terms are not
|
|
1242
|
-
* account discount, or to keep the discount already recorded.
|
|
1100
|
+
* The code to apply while the order's terms are not fixed. Omit to apply the best applicable account discount, or to keep the discount already recorded.
|
|
1243
1101
|
* @minLength 1
|
|
1244
1102
|
* @maxLength 64
|
|
1245
1103
|
*/
|
|
1246
1104
|
promotion_code?: string;
|
|
1247
|
-
/**
|
|
1248
|
-
* The invoice total to expect, after discounts and tax and before credit grants or balance, as the
|
|
1249
|
-
* payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
|
|
1250
|
-
* and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
|
|
1251
|
-
*/
|
|
1105
|
+
/** The invoice total to expect, after discounts and tax and before credit grants or balance, as the payment preview or an order quote gave it. A different total fails with `BILLING_AMOUNT_CHANGED` and nothing is charged. Omit to skip the check; zero is checked. */
|
|
1252
1106
|
expected_amount?: Money & string;
|
|
1253
1107
|
}
|
|
1254
1108
|
/**
|
|
1255
|
-
* Name at least one invoice or order.
|
|
1256
|
-
* its currency; anything else is refused rather than partly paid.
|
|
1109
|
+
* Name at least one invoice or order. All must belong to one account in its currency.
|
|
1257
1110
|
*/
|
|
1258
1111
|
export interface PayTogetherRequest {
|
|
1259
1112
|
/** @maxItems 100 */
|
|
1260
1113
|
invoice_ids?: string[];
|
|
1261
1114
|
/** @maxItems 100 */
|
|
1262
1115
|
order_ids?: string[];
|
|
1263
|
-
/**
|
|
1264
|
-
* The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
|
|
1265
|
-
* gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
|
|
1266
|
-
* the comparison.
|
|
1267
|
-
*/
|
|
1116
|
+
/** The amount due across all invoices, before credit grants or balance, as preview-pay-together gave it. A different amount fails with `BILLING_AMOUNT_CHANGED` and nothing is charged. Omit to skip the check. */
|
|
1268
1117
|
expected_amount?: Money & string;
|
|
1269
1118
|
}
|
|
1270
1119
|
/**
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
-
* succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
|
|
1274
|
-
* order rather than submitting another payment. requires_action means the customer must complete the
|
|
1275
|
-
* supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
|
|
1276
|
-
* declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
|
|
1277
|
-
* same or another method.
|
|
1120
|
+
* `succeeded`: paid. `processing`: confirmation is pending; poll the invoice or order instead of paying again. `requires_action`: the customer must complete the returned action. `failed`: the attempt did not succeed, for the reason in failure_reason; a declined gateway payment is withdrawn, and paying again starts a new payment.
|
|
1278
1121
|
*/
|
|
1279
1122
|
export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
|
|
1280
1123
|
export declare const PaymentStatus: {
|
|
@@ -1300,7 +1143,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1300
1143
|
balance_applied: Money;
|
|
1301
1144
|
}
|
|
1302
1145
|
/**
|
|
1303
|
-
* What paying would take,
|
|
1146
|
+
* What paying would take, calculated as paying does. Nothing is charged or reserved.
|
|
1304
1147
|
*/
|
|
1305
1148
|
export interface PaymentPreview {
|
|
1306
1149
|
funds?: Funds;
|
|
@@ -1309,23 +1152,19 @@ export interface PaymentPreview {
|
|
|
1309
1152
|
amount_due: Money;
|
|
1310
1153
|
/** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
|
|
1311
1154
|
credit_applied: Money;
|
|
1312
|
-
/** The credit grants that would pay, in the order
|
|
1155
|
+
/** The credit grants that would pay, in the order used. */
|
|
1313
1156
|
credit_grants: AppliedCredit[];
|
|
1314
1157
|
/** What the balance would pay. */
|
|
1315
1158
|
balance_applied: Money;
|
|
1316
|
-
/** What would remain to
|
|
1159
|
+
/** What would remain to pay online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
|
|
1317
1160
|
gateway_amount: Money;
|
|
1318
1161
|
/** The available balance after paying. */
|
|
1319
1162
|
balance_after: Money;
|
|
1320
|
-
/** Paying together only
|
|
1163
|
+
/** Paying together only: each invoice, in payment order. */
|
|
1321
1164
|
invoices?: PaymentPreviewInvoice[];
|
|
1322
1165
|
}
|
|
1323
1166
|
/**
|
|
1324
|
-
* Present on refunds
|
|
1325
|
-
*
|
|
1326
|
-
* - `balance`: back to the account balance.
|
|
1327
|
-
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1328
|
-
* - `gateway`: back to the payment method it was paid with.
|
|
1167
|
+
* Present on refunds: where this part goes. `balance`: the account balance. `credit`: the credit grant that paid, keeping its original expiry. `gateway`: the payment method it was paid with.
|
|
1329
1168
|
*/
|
|
1330
1169
|
export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
|
|
1331
1170
|
export declare const TransactionRefundDestination: {
|
|
@@ -1334,9 +1173,7 @@ export declare const TransactionRefundDestination: {
|
|
|
1334
1173
|
readonly gateway: "gateway";
|
|
1335
1174
|
};
|
|
1336
1175
|
/**
|
|
1337
|
-
* `failed
|
|
1338
|
-
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
1339
|
-
* an invoice the payment was meant to pay remains open for another payment.
|
|
1176
|
+
* `failed`: the operation did not succeed; for a gateway payment, the gateway declined it. `canceled`: a gateway payment was withdrawn without collecting money. Either way, the invoice it was for stays open.
|
|
1340
1177
|
*/
|
|
1341
1178
|
export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
|
|
1342
1179
|
export declare const TransactionStatus: {
|
|
@@ -1357,7 +1194,7 @@ export declare const TransactionType: {
|
|
|
1357
1194
|
readonly fee: "fee";
|
|
1358
1195
|
};
|
|
1359
1196
|
/**
|
|
1360
|
-
* A funds
|
|
1197
|
+
* A funds movement with one source. Refunds name the original transaction. Unknown gateway results stay pending.
|
|
1361
1198
|
*/
|
|
1362
1199
|
export interface Transaction {
|
|
1363
1200
|
invoice_id?: string;
|
|
@@ -1366,47 +1203,22 @@ export interface Transaction {
|
|
|
1366
1203
|
credit_grant_id?: string;
|
|
1367
1204
|
credit_grant?: ObjectIdentity;
|
|
1368
1205
|
refund_id?: string;
|
|
1369
|
-
/**
|
|
1370
|
-
* Present on refunds. Where this part of the refund goes.
|
|
1371
|
-
*
|
|
1372
|
-
* - `balance`: back to the account balance.
|
|
1373
|
-
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1374
|
-
* - `gateway`: back to the payment method it was paid with.
|
|
1375
|
-
*/
|
|
1206
|
+
/** Present on refunds: where this part goes. `balance`: the account balance. `credit`: the credit grant that paid, keeping its original expiry. `gateway`: the payment method it was paid with. */
|
|
1376
1207
|
refund_destination?: TransactionRefundDestination;
|
|
1377
|
-
/**
|
|
1378
|
-
* `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
1379
|
-
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
1380
|
-
* an invoice the payment was meant to pay remains open for another payment.
|
|
1381
|
-
*/
|
|
1208
|
+
/** `failed`: the operation did not succeed; for a gateway payment, the gateway declined it. `canceled`: a gateway payment was withdrawn without collecting money. Either way, the invoice it was for stays open. */
|
|
1382
1209
|
status?: TransactionStatus;
|
|
1383
1210
|
cancellation_reason?: PaymentCancellationReason;
|
|
1384
1211
|
payment_gateway?: string;
|
|
1385
1212
|
method_type?: string;
|
|
1386
|
-
/**
|
|
1387
|
-
* Why it failed. Present with `failed`. For a declined gateway payment the value is the
|
|
1388
|
-
* gateway's own code, passed on unchanged: the card issuer's decline code when there is one
|
|
1389
|
-
* (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
|
|
1390
|
-
* error code (Stripe's code, such as card_declined, expired_card or
|
|
1391
|
-
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1392
|
-
* unknown value as a generic decline.
|
|
1393
|
-
*/
|
|
1213
|
+
/** Why it failed; present with `failed`. For a declined gateway payment, the gateway's code unchanged: the issuer's decline code when there is one (Stripe decline_code, such as insufficient_funds), otherwise the gateway's error code (Stripe code, such as card_declined). Treat an unknown value as a generic decline. */
|
|
1394
1214
|
failure_reason?: string;
|
|
1395
1215
|
settled_at?: string;
|
|
1396
1216
|
id: string;
|
|
1397
1217
|
billing_account_id?: number;
|
|
1398
1218
|
type: TransactionType;
|
|
1399
|
-
/**
|
|
1400
|
-
* Signed by type: positive for `topup` and `payment`, negative for `refund`.
|
|
1401
|
-
* An `adjustment` is positive when it adds to the balance and negative when it takes from
|
|
1402
|
-
* it. For the other types the sign does not tell the effect on the balance: a payment from
|
|
1403
|
-
* the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
|
|
1404
|
-
*/
|
|
1219
|
+
/** Signed by type: positive for `topup` and `payment`, negative for `refund`. An `adjustment` is positive when it adds to the balance and negative when it takes from it. For other types the sign does not show the effect on the balance: a payment from balance lowers it, a payment by gateway or credit does not. */
|
|
1405
1220
|
amount: Money;
|
|
1406
|
-
/**
|
|
1407
|
-
* How much of this transaction is still available in the balance. Only top-ups, positive
|
|
1408
|
-
* adjustments and gateway payments later returned to the balance can be non-zero.
|
|
1409
|
-
*/
|
|
1221
|
+
/** How much of this transaction is still in the balance. Only top-ups, positive adjustments and gateway payments returned to the balance can be non-zero. */
|
|
1410
1222
|
remaining_amount: Money;
|
|
1411
1223
|
currency: string;
|
|
1412
1224
|
reason?: string;
|
|
@@ -1414,49 +1226,31 @@ export interface Transaction {
|
|
|
1414
1226
|
}
|
|
1415
1227
|
export interface PaymentResult {
|
|
1416
1228
|
transactions: Transaction[];
|
|
1417
|
-
/** The gateway transaction, when one is involved.
|
|
1229
|
+
/** The gateway transaction, when one is involved. */
|
|
1418
1230
|
transaction_id?: string;
|
|
1419
1231
|
status: PaymentStatus;
|
|
1420
1232
|
amount_paid: Money;
|
|
1421
|
-
/**
|
|
1422
|
-
* What is still outstanding. Zero once the payment succeeds. Unchanged while
|
|
1423
|
-
* `processing`: nothing is collected until the gateway confirms it.
|
|
1424
|
-
*/
|
|
1233
|
+
/** What is still outstanding: zero once the payment succeeds, unchanged while `processing`. */
|
|
1425
1234
|
amount_due: Money;
|
|
1426
1235
|
currency: string;
|
|
1427
1236
|
credit_applied?: Money;
|
|
1428
1237
|
gateway_amount?: Money;
|
|
1429
1238
|
payment_gateway?: string;
|
|
1430
1239
|
method_type?: string;
|
|
1431
|
-
/**
|
|
1432
|
-
* The amount already paid from the account's balance toward this invoice. Retrying an online remainder
|
|
1433
|
-
* does not debit it again. A canceled purchase returns funds through its refund process.
|
|
1434
|
-
*/
|
|
1240
|
+
/** The amount already paid from balance toward this invoice; retrying the online remainder does not debit it again. */
|
|
1435
1241
|
balance_applied?: Money;
|
|
1436
1242
|
action?: PaymentAction;
|
|
1437
|
-
/**
|
|
1438
|
-
* Whether paying again is worth attempting. False for a refusal that will keep
|
|
1439
|
-
* happening — a closed account, an amount over a limit — so that a client does not
|
|
1440
|
-
* retry in a loop.
|
|
1441
|
-
*/
|
|
1243
|
+
/** Whether paying again can succeed. False for a refusal that will repeat, such as a closed account or an amount over a limit. */
|
|
1442
1244
|
retriable?: boolean;
|
|
1443
1245
|
/** @nullable */
|
|
1444
1246
|
invoice_id?: string | null;
|
|
1445
1247
|
/** @nullable */
|
|
1446
1248
|
order_id?: string | null;
|
|
1447
|
-
/**
|
|
1448
|
-
* Why the payment did not go through. Present with `failed`. For a declined gateway payment the
|
|
1449
|
-
* value is the gateway's own code, passed on unchanged: the card issuer's decline code when
|
|
1450
|
-
* there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
|
|
1451
|
-
* gateway's error code (Stripe's code, such as card_declined, expired_card or
|
|
1452
|
-
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1453
|
-
* unknown value as a generic decline.
|
|
1454
|
-
*/
|
|
1249
|
+
/** Why the payment failed; present with `failed`. For a declined gateway payment, the gateway's code unchanged: the issuer's decline code when there is one (Stripe decline_code, such as insufficient_funds), otherwise the gateway's error code (Stripe code, such as card_declined). Treat an unknown value as a generic decline. */
|
|
1455
1250
|
failure_reason?: string;
|
|
1456
1251
|
}
|
|
1457
1252
|
/**
|
|
1458
|
-
* How tax applied to the customer when the invoice was issued
|
|
1459
|
-
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1253
|
+
* How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism.
|
|
1460
1254
|
*/
|
|
1461
1255
|
export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
|
|
1462
1256
|
export declare const InvoiceCustomerTaxExempt: {
|
|
@@ -1479,7 +1273,7 @@ export interface TaxItem {
|
|
|
1479
1273
|
currency: string;
|
|
1480
1274
|
}
|
|
1481
1275
|
export interface Invoice {
|
|
1482
|
-
/** Collection has
|
|
1276
|
+
/** Collection has stopped; accepted return obligations are completed. */
|
|
1483
1277
|
void_requested_at?: string;
|
|
1484
1278
|
due_at?: string;
|
|
1485
1279
|
amount_refunded?: string;
|
|
@@ -1499,16 +1293,16 @@ export interface Invoice {
|
|
|
1499
1293
|
/** Sum of the line discounts, taken off before tax. */
|
|
1500
1294
|
discount_amount?: Money;
|
|
1501
1295
|
tax_amount?: Money;
|
|
1502
|
-
/** Successful credit-grant payments included in amount_paid
|
|
1296
|
+
/** Successful credit-grant payments, included in amount_paid; they do not reduce the receivable or tax base. */
|
|
1503
1297
|
credit_applied?: Money;
|
|
1504
|
-
/** Subtotal less discount plus tax. Balance and credit grants
|
|
1298
|
+
/** Subtotal less discount plus tax. Balance and credit grants pay it; they do not reduce it. */
|
|
1505
1299
|
total: Money;
|
|
1506
1300
|
amount_paid?: Money;
|
|
1507
|
-
/** Issued
|
|
1301
|
+
/** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
|
|
1508
1302
|
pre_payment_credit_notes_amount: Money;
|
|
1509
|
-
/** Issued credit notes against payments already received
|
|
1303
|
+
/** Issued credit notes against payments already received; their refunds may not have completed. */
|
|
1510
1304
|
post_payment_credit_notes_amount: Money;
|
|
1511
|
-
/** What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
1305
|
+
/** What is still collectible after unpaid credit notes and successful payments; never below zero. Zero for a draft, whose total is the base price, and for a paid or void invoice. */
|
|
1512
1306
|
amount_due: Money;
|
|
1513
1307
|
/** @nullable */
|
|
1514
1308
|
period_start?: string | null;
|
|
@@ -1517,17 +1311,11 @@ export interface Invoice {
|
|
|
1517
1311
|
* @nullable
|
|
1518
1312
|
*/
|
|
1519
1313
|
period_end?: string | null;
|
|
1520
|
-
/**
|
|
1521
|
-
* Who this was billed to, as recorded when the invoice was issued. Later changes to
|
|
1522
|
-
* the account do not alter it.
|
|
1523
|
-
*/
|
|
1314
|
+
/** The billing details recorded when the invoice was issued. */
|
|
1524
1315
|
customer_name?: string;
|
|
1525
1316
|
customer_email?: string;
|
|
1526
1317
|
customer_tax_id?: string;
|
|
1527
|
-
/**
|
|
1528
|
-
* How tax applied to the customer when the invoice was issued. `reverse` means no tax was
|
|
1529
|
-
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1530
|
-
*/
|
|
1318
|
+
/** How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism. */
|
|
1531
1319
|
customer_tax_exempt?: InvoiceCustomerTaxExempt;
|
|
1532
1320
|
customer_address_line1?: string;
|
|
1533
1321
|
customer_address_line2?: string;
|
|
@@ -1550,13 +1338,19 @@ export declare const InvoiceItemType: {
|
|
|
1550
1338
|
readonly setup: "setup";
|
|
1551
1339
|
readonly adjustment: "adjustment";
|
|
1552
1340
|
};
|
|
1341
|
+
/**
|
|
1342
|
+
* For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines.
|
|
1343
|
+
*/
|
|
1344
|
+
export type InvoiceItemDimensions = {
|
|
1345
|
+
[key: string]: string;
|
|
1346
|
+
};
|
|
1553
1347
|
/**
|
|
1554
1348
|
* The value of one paid period moved to the new configuration of a subscription.
|
|
1555
1349
|
*/
|
|
1556
1350
|
export interface InvoiceItemProration {
|
|
1557
1351
|
/** The earlier invoice line that paid for the period. */
|
|
1558
1352
|
credited_invoice_item_id: string;
|
|
1559
|
-
/** The
|
|
1353
|
+
/** The earlier invoice line's wording as recorded. */
|
|
1560
1354
|
description: string;
|
|
1561
1355
|
period_start: string;
|
|
1562
1356
|
/** Exclusive. */
|
|
@@ -1588,17 +1382,10 @@ export interface InvoiceItem {
|
|
|
1588
1382
|
type?: InvoiceItemType;
|
|
1589
1383
|
/** @nullable */
|
|
1590
1384
|
project_id?: string | null;
|
|
1591
|
-
/**
|
|
1592
|
-
* The project the charge was for and its current name, for display. Absent when the line is
|
|
1593
|
-
* not for a project, and when the project no longer exists or its details cannot be read at
|
|
1594
|
-
* the moment; `project_id` still identifies it then.
|
|
1595
|
-
*/
|
|
1385
|
+
/** The project the charge was for and its current name. Absent when the line has no project or the project cannot be read; `project_id` still identifies it. */
|
|
1596
1386
|
project?: NamedIdentity | null;
|
|
1597
1387
|
resource_id?: string;
|
|
1598
|
-
/**
|
|
1599
|
-
* The wording as recorded when the invoice was issued. It is not re-translated
|
|
1600
|
-
* afterwards, so that an invoice continues to read as it did when it was sent.
|
|
1601
|
-
*/
|
|
1388
|
+
/** The line's wording as recorded when the invoice was issued. */
|
|
1602
1389
|
description: string;
|
|
1603
1390
|
unit?: string;
|
|
1604
1391
|
quantity?: string;
|
|
@@ -1611,6 +1398,8 @@ export interface InvoiceItem {
|
|
|
1611
1398
|
period_start?: string | null;
|
|
1612
1399
|
/** @nullable */
|
|
1613
1400
|
period_end?: string | null;
|
|
1401
|
+
/** For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines. */
|
|
1402
|
+
dimensions?: InvoiceItemDimensions;
|
|
1614
1403
|
/**
|
|
1615
1404
|
* Present on a line that changes a subscription immediately, one entry for each paid period it
|
|
1616
1405
|
* covers. `amount` is the sum of `remaining_amount` minus `credited_amount` over the entries.
|
|
@@ -1659,9 +1448,7 @@ export declare const CreditNoteStatus: {
|
|
|
1659
1448
|
readonly void: "void";
|
|
1660
1449
|
};
|
|
1661
1450
|
/**
|
|
1662
|
-
* Why the note was issued. Notes
|
|
1663
|
-
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
1664
|
-
* issued by Leaflow on request.
|
|
1451
|
+
* Why the note was issued. Notes for canceled, expired or failed orders carry the order's reason; `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` was issued on request.
|
|
1665
1452
|
*/
|
|
1666
1453
|
export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
|
|
1667
1454
|
export declare const CreditNoteReason: {
|
|
@@ -1675,7 +1462,7 @@ export declare const CreditNoteReason: {
|
|
|
1675
1462
|
readonly operator: "operator";
|
|
1676
1463
|
};
|
|
1677
1464
|
/**
|
|
1678
|
-
*
|
|
1465
|
+
* A reduction of an issued invoice; the original invoice amounts do not change. The credited amount is pre_payment_amount plus post_payment_amount. A paid part creates a refund, identified by refund_id, whose outcome may still be pending.
|
|
1679
1466
|
*/
|
|
1680
1467
|
export interface CreditNote {
|
|
1681
1468
|
id: string;
|
|
@@ -1690,18 +1477,14 @@ export interface CreditNote {
|
|
|
1690
1477
|
voided_at: string | null;
|
|
1691
1478
|
/** The reduction of unpaid receivables. A void note no longer reduces what is due. */
|
|
1692
1479
|
pre_payment_amount: Money;
|
|
1693
|
-
/** The credited part of payments already received
|
|
1480
|
+
/** The credited part of payments already received; its refund may not have completed. */
|
|
1694
1481
|
post_payment_amount: Money;
|
|
1695
1482
|
/**
|
|
1696
|
-
* The refund to the original payment sources
|
|
1483
|
+
* The refund to the original payment sources; null when no paid amount was credited.
|
|
1697
1484
|
* @nullable
|
|
1698
1485
|
*/
|
|
1699
1486
|
refund_id: string | null;
|
|
1700
|
-
/**
|
|
1701
|
-
* Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
|
|
1702
|
-
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
1703
|
-
* issued by Leaflow on request.
|
|
1704
|
-
*/
|
|
1487
|
+
/** Why the note was issued. Notes for canceled, expired or failed orders carry the order's reason; `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` was issued on request. */
|
|
1705
1488
|
reason: CreditNoteReason;
|
|
1706
1489
|
}
|
|
1707
1490
|
export interface CreditNoteItem {
|
|
@@ -1720,7 +1503,7 @@ export interface CreditNoteItemList {
|
|
|
1720
1503
|
pagination: OffsetPagination;
|
|
1721
1504
|
}
|
|
1722
1505
|
/**
|
|
1723
|
-
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between
|
|
1506
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
|
|
1724
1507
|
* @deprecated
|
|
1725
1508
|
*/
|
|
1726
1509
|
export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
|
|
@@ -1748,22 +1531,19 @@ export declare const RefundStatus: {
|
|
|
1748
1531
|
readonly failed: "failed";
|
|
1749
1532
|
};
|
|
1750
1533
|
/**
|
|
1751
|
-
* Why the refund was made.
|
|
1752
|
-
* treat an unknown code as a refund without a stated reason.
|
|
1534
|
+
* Why the refund was made. New codes may be added; treat an unknown code as unspecified.
|
|
1753
1535
|
*
|
|
1754
1536
|
* - `provisioning_failed`: the purchase could not be delivered.
|
|
1755
|
-
* - `order_expired`: the order expired after part of it
|
|
1756
|
-
* - `order_canceled`: the
|
|
1757
|
-
* - `change_canceled`: a scheduled change was withdrawn after part of it
|
|
1758
|
-
* - `change_expired`: a scheduled change could not take effect
|
|
1759
|
-
* - `subscription_canceled`: the
|
|
1760
|
-
*
|
|
1761
|
-
* - `
|
|
1762
|
-
*
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1765
|
-
* zero or less.
|
|
1766
|
-
* - `usage_true_up`: usage priced again over the whole month cost less than was charged.
|
|
1537
|
+
* - `order_expired`: the order expired after part of it was paid.
|
|
1538
|
+
* - `order_canceled`: the order was canceled after part of it was paid.
|
|
1539
|
+
* - `change_canceled`: a scheduled change was withdrawn after part of it was paid.
|
|
1540
|
+
* - `change_expired`: a scheduled change could not take effect in time.
|
|
1541
|
+
* - `subscription_canceled`: the unused value of a canceled subscription, under its refund terms.
|
|
1542
|
+
* - `future_period_canceled`: a renewal that had not started was withdrawn.
|
|
1543
|
+
* - `downgrade_difference`: after a downgrade, the remaining paid value, valued as refund policy `prorated`
|
|
1544
|
+
* describes, minus the new configuration's cost for the remaining time at the change item's
|
|
1545
|
+
* `refund_monthly_amount` and `refund_hourly_amount`.
|
|
1546
|
+
* - `usage_true_up`: usage priced over the whole month cost less than was charged.
|
|
1767
1547
|
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
1768
1548
|
* - `operator`: made by the platform operator.
|
|
1769
1549
|
*/
|
|
@@ -1784,15 +1564,14 @@ export declare const RefundReason: {
|
|
|
1784
1564
|
export interface Refund {
|
|
1785
1565
|
transaction_id?: string;
|
|
1786
1566
|
cancellation_item_id?: string;
|
|
1787
|
-
/**
|
|
1567
|
+
/** The refund split by original payment source, with each result. Unknown gateway results stay pending. */
|
|
1788
1568
|
transactions: Transaction[];
|
|
1789
1569
|
id: string;
|
|
1790
1570
|
billing_account_id?: number;
|
|
1791
1571
|
/** @nullable */
|
|
1792
1572
|
invoice_id?: string | null;
|
|
1793
1573
|
/**
|
|
1794
|
-
* The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
|
|
1795
|
-
* the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
|
|
1574
|
+
* The order the refund belongs to: the order that caused it, such as a downgrade, otherwise the order of the refunded invoice. Null for refunds of top-ups and usage invoices.
|
|
1796
1575
|
* @nullable
|
|
1797
1576
|
*/
|
|
1798
1577
|
order_id?: string | null;
|
|
@@ -1808,7 +1587,7 @@ export interface Refund {
|
|
|
1808
1587
|
settled_amount?: Money;
|
|
1809
1588
|
currency: string;
|
|
1810
1589
|
/**
|
|
1811
|
-
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between
|
|
1590
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
|
|
1812
1591
|
* @deprecated
|
|
1813
1592
|
*/
|
|
1814
1593
|
destination?: RefundDestination;
|
|
@@ -1835,7 +1614,7 @@ export interface RefundList {
|
|
|
1835
1614
|
pagination: OffsetPagination;
|
|
1836
1615
|
}
|
|
1837
1616
|
/**
|
|
1838
|
-
* The
|
|
1617
|
+
* The dimension values the rate was matched by, such as region and machine type.
|
|
1839
1618
|
*/
|
|
1840
1619
|
export type UsageChargeDimensions = {
|
|
1841
1620
|
[key: string]: string;
|
|
@@ -1844,26 +1623,23 @@ export interface UsageCharge {
|
|
|
1844
1623
|
subscription_id: string;
|
|
1845
1624
|
id: string;
|
|
1846
1625
|
project_id?: string;
|
|
1847
|
-
/**
|
|
1848
|
-
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
1849
|
-
* details cannot be read at the moment; `project_id` still identifies it.
|
|
1850
|
-
*/
|
|
1626
|
+
/** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
|
|
1851
1627
|
project?: NamedIdentity | null;
|
|
1852
1628
|
product: Product;
|
|
1853
1629
|
/** Which resource this was charged for. Empty for charges not tied to one. */
|
|
1854
1630
|
resource_id?: string;
|
|
1855
1631
|
meter: ObjectIdentity;
|
|
1856
1632
|
unit?: string;
|
|
1857
|
-
/** The
|
|
1633
|
+
/** The dimension values the rate was matched by, such as region and machine type. */
|
|
1858
1634
|
dimensions?: UsageChargeDimensions;
|
|
1859
1635
|
window_start: string;
|
|
1860
1636
|
/** Exclusive. */
|
|
1861
1637
|
window_end: string;
|
|
1862
|
-
/**
|
|
1638
|
+
/** Quantity used before allowances. */
|
|
1863
1639
|
gross_quantity?: string;
|
|
1864
1640
|
/** How much of that was covered by an allowance. */
|
|
1865
1641
|
deducted_quantity?: string;
|
|
1866
|
-
/**
|
|
1642
|
+
/** The quantity charged: gross quantity less the part covered by allowances. */
|
|
1867
1643
|
quantity: string;
|
|
1868
1644
|
unit_amount?: Money;
|
|
1869
1645
|
amount: Money;
|
|
@@ -1885,12 +1661,6 @@ export interface UsageChargeList {
|
|
|
1885
1661
|
items: UsageCharge[];
|
|
1886
1662
|
pagination: OffsetPagination;
|
|
1887
1663
|
}
|
|
1888
|
-
export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
|
|
1889
|
-
export declare const SubscriptionChargeType: {
|
|
1890
|
-
readonly postpaid: "postpaid";
|
|
1891
|
-
readonly prepaid: "prepaid";
|
|
1892
|
-
readonly one_time: "one_time";
|
|
1893
|
-
};
|
|
1894
1664
|
export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
|
|
1895
1665
|
export declare const SubscriptionInterval: {
|
|
1896
1666
|
readonly none: "none";
|
|
@@ -1899,7 +1669,7 @@ export declare const SubscriptionInterval: {
|
|
|
1899
1669
|
readonly year: "year";
|
|
1900
1670
|
};
|
|
1901
1671
|
/**
|
|
1902
|
-
* An operation
|
|
1672
|
+
* An operation prevented on the subscription. `billing.subscriptions.use` stops the service. `renew` prevents renewal and paying a renewal order. `modify` prevents placing a change order. `cancel` prevents cancellation. `terminate` prevents immediate termination.
|
|
1903
1673
|
*/
|
|
1904
1674
|
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
1905
1675
|
export declare const SubscriptionRestriction: {
|
|
@@ -1910,13 +1680,7 @@ export declare const SubscriptionRestriction: {
|
|
|
1910
1680
|
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
1911
1681
|
};
|
|
1912
1682
|
/**
|
|
1913
|
-
* Follows the items. `pending
|
|
1914
|
-
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
1915
|
-
* being set up. `completed` means every item was set up. `partially_completed` means some items were set up
|
|
1916
|
-
* and the others failed or were canceled and were refunded to their original payment sources. `failed` means
|
|
1917
|
-
* no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
|
|
1918
|
-
* `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
|
|
1919
|
-
* payment sources. No status establishes service delivery by itself.
|
|
1683
|
+
* Follows the items. `pending`: not yet accepted, paid or unpaid; its invoice shows whether payment is needed, and it can expire or be canceled. `accepted`: items are being set up. `completed`: every item was set up. `partially_completed`: some items were set up and the others failed or were canceled and refunded to their original payment sources. `failed`: no item was delivered and at least one failed; amounts collected for undelivered items are refunded. `canceled`: every item was withdrawn without delivery; collected amounts are returned to their original payment sources. No status by itself means the service was delivered.
|
|
1920
1684
|
*/
|
|
1921
1685
|
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
|
|
1922
1686
|
export declare const OrderStatus: {
|
|
@@ -1934,7 +1698,7 @@ export declare const ScheduledChangeInterval: {
|
|
|
1934
1698
|
readonly year: "year";
|
|
1935
1699
|
};
|
|
1936
1700
|
/**
|
|
1937
|
-
* The next accepted period-end change
|
|
1701
|
+
* The next accepted period-end change of the subscription: the target terms, applied at effective_at.
|
|
1938
1702
|
*/
|
|
1939
1703
|
export interface ScheduledChange {
|
|
1940
1704
|
order_id: string;
|
|
@@ -1945,7 +1709,7 @@ export interface ScheduledChange {
|
|
|
1945
1709
|
plan_name: string;
|
|
1946
1710
|
price_id: string;
|
|
1947
1711
|
quantity: string;
|
|
1948
|
-
/** The target
|
|
1712
|
+
/** The target licensed renewal amount before tax. */
|
|
1949
1713
|
recurring_amount: string;
|
|
1950
1714
|
currency: string;
|
|
1951
1715
|
interval: ScheduledChangeInterval;
|
|
@@ -1953,11 +1717,7 @@ export interface ScheduledChange {
|
|
|
1953
1717
|
interval_count: number;
|
|
1954
1718
|
}
|
|
1955
1719
|
/**
|
|
1956
|
-
* pending
|
|
1957
|
-
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
1958
|
-
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
1959
|
-
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
1960
|
-
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
1720
|
+
* `pending`: the order has not been accepted. `provisioning`: the owning service accepted the order and is delivering. `active`: delivery was confirmed; payment alone does not make a subscription active. `suspended`: service is stopped while a lien restricts its use. `canceled`: cancellation completed, or an undelivered purchase was canceled or failed. `terminated`: an operator or the owning service ended it immediately.
|
|
1961
1721
|
*/
|
|
1962
1722
|
export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
|
|
1963
1723
|
export declare const SubscriptionStatus: {
|
|
@@ -1969,42 +1729,37 @@ export declare const SubscriptionStatus: {
|
|
|
1969
1729
|
readonly terminated: "terminated";
|
|
1970
1730
|
};
|
|
1971
1731
|
/**
|
|
1972
|
-
*
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
*
|
|
1979
|
-
*
|
|
1980
|
-
*
|
|
1981
|
-
* then; postpaid usage starts only when the service reports actual delivery and metering.
|
|
1732
|
+
* The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none.
|
|
1733
|
+
*/
|
|
1734
|
+
export type SubscriptionDimensions = {
|
|
1735
|
+
[key: string]: string;
|
|
1736
|
+
};
|
|
1737
|
+
/**
|
|
1738
|
+
* A purchase that is billed, renewed and changed on its own, separate from the owning service's resource. A new
|
|
1739
|
+
* recurring purchase creates a pending subscription for each order line; its ID is returned on the order item
|
|
1740
|
+
* and stays the same through checkout, delivery, renewals and changes. A one-time purchase may create none.
|
|
1982
1741
|
*
|
|
1983
|
-
*
|
|
1984
|
-
*
|
|
1985
|
-
*
|
|
1986
|
-
*
|
|
1987
|
-
*
|
|
1988
|
-
* original value. Technical state belongs to the owning service.
|
|
1742
|
+
* Pending and provisioning subscriptions grant no service. A subscription becomes provisioning when the owning
|
|
1743
|
+
* service accepts the order, and active when the service confirms delivery, which sets started_at; payment
|
|
1744
|
+
* changes neither. Licensed service periods start at delivery, and metered usage is charged as the service
|
|
1745
|
+
* reports it. Canceling or failing an undelivered purchase cancels its subscriptions without starting a period.
|
|
1746
|
+
* Renewals use recurring_amount and the agreed interval; paid periods keep their value.
|
|
1989
1747
|
*
|
|
1990
|
-
* A
|
|
1991
|
-
*
|
|
1992
|
-
* Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
|
|
1993
|
-
* the owning service enforces current holdings against the purchased count.
|
|
1748
|
+
* A shared capacity limit, such as a regional snapshot quota, has one subscription for the purchased quantity
|
|
1749
|
+
* rather than one per item.
|
|
1994
1750
|
*/
|
|
1995
1751
|
export interface Subscription {
|
|
1996
1752
|
/** Whether new account discounts may apply to future renewals. A fixed operator renewal agreement disables automatic discounts; catalog repricing or a newly selected purchase agreement enables them. */
|
|
1997
1753
|
renewal_discounts_enabled?: boolean;
|
|
1998
1754
|
currency: string;
|
|
1999
|
-
|
|
1755
|
+
type: PriceType;
|
|
1756
|
+
usage_type: UsageType;
|
|
1757
|
+
/** The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none. */
|
|
1758
|
+
dimensions: SubscriptionDimensions;
|
|
2000
1759
|
interval: SubscriptionInterval;
|
|
2001
1760
|
/** @minimum 1 */
|
|
2002
1761
|
interval_count?: number;
|
|
2003
|
-
/**
|
|
2004
|
-
* Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
|
|
2005
|
-
* Pending subscriptions show base terms until paying the order fixes any new continuing discount.
|
|
2006
|
-
* Absent for other charge types.
|
|
2007
|
-
*/
|
|
1762
|
+
/** The whole licensed subscription's renewal amount, after continuing discounts and before tax. A pending subscription shows base terms until paying the order fixes any new discount. Absent for metered and one-time subscriptions. */
|
|
2008
1763
|
recurring_amount?: string;
|
|
2009
1764
|
termination_policy?: TerminationPolicy;
|
|
2010
1765
|
refund_policy?: RefundPolicy;
|
|
@@ -2013,17 +1768,14 @@ export interface Subscription {
|
|
|
2013
1768
|
coupon?: ObjectIdentity;
|
|
2014
1769
|
/** @minimum 0 */
|
|
2015
1770
|
discounted_renewals_remaining?: number;
|
|
2016
|
-
/** The operations currently prevented on the subscription, sorted
|
|
1771
|
+
/** The operations currently prevented on the subscription, sorted; it is suspended while this contains `billing.subscriptions.use`. */
|
|
2017
1772
|
restrictions?: SubscriptionRestriction[];
|
|
2018
1773
|
billing_cycle_anchor?: string;
|
|
2019
1774
|
cancellation?: SubscriptionCancellation;
|
|
2020
|
-
/** The accepted period-end change
|
|
1775
|
+
/** The accepted period-end change scheduled for this subscription; null when there is none. */
|
|
2021
1776
|
scheduled_change?: ScheduledChange | null;
|
|
2022
1777
|
/**
|
|
2023
|
-
* The saved payment method automatic renewal charges after the account's
|
|
2024
|
-
* before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
|
|
2025
|
-
* saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
|
|
2026
|
-
* account that pays the renewal.
|
|
1778
|
+
* The saved payment method automatic renewal charges after balance and credits, before the account's default payment method. Set when a purchase, renewal or change is paid with a saved payment method. Used only while it belongs to the account paying the renewal.
|
|
2027
1779
|
* @nullable
|
|
2028
1780
|
*/
|
|
2029
1781
|
default_payment_method_id?: string | null;
|
|
@@ -2034,16 +1786,11 @@ export interface Subscription {
|
|
|
2034
1786
|
account: AccountIdentity;
|
|
2035
1787
|
product_id: ProductID;
|
|
2036
1788
|
/**
|
|
2037
|
-
*
|
|
2038
|
-
* membership, which belongs to no single project.
|
|
1789
|
+
* The project it is for. Absent for an account-level purchase, such as a membership.
|
|
2039
1790
|
* @nullable
|
|
2040
1791
|
*/
|
|
2041
1792
|
project_id?: string | null;
|
|
2042
|
-
/**
|
|
2043
|
-
* The project and its current name, for display. Absent for a purchase at account level,
|
|
2044
|
-
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2045
|
-
* `project_id` still identifies it then.
|
|
2046
|
-
*/
|
|
1793
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
|
|
2047
1794
|
project?: NamedIdentity | null;
|
|
2048
1795
|
product: Product;
|
|
2049
1796
|
plan_id: string;
|
|
@@ -2051,35 +1798,26 @@ export interface Subscription {
|
|
|
2051
1798
|
price_id: string;
|
|
2052
1799
|
quantity: string;
|
|
2053
1800
|
/**
|
|
2054
|
-
* When a
|
|
2055
|
-
* Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
|
|
2056
|
-
* its purchase has been paid, and for postpaid subscriptions.
|
|
1801
|
+
* When a licensed subscription renews or expires: the end of the last period bought, moved by renewing in advance. Null until the subscription becomes active, even when its purchase has been paid, and for metered subscriptions.
|
|
2057
1802
|
* @nullable
|
|
2058
1803
|
*/
|
|
2059
1804
|
current_term_end?: string | null;
|
|
2060
1805
|
/**
|
|
2061
|
-
* Start of the service period in effect now. Null when none is, including for
|
|
1806
|
+
* Start of the service period in effect now. Null when none is, including for metered subscriptions.
|
|
2062
1807
|
* @nullable
|
|
2063
1808
|
*/
|
|
2064
1809
|
current_period_start?: string | null;
|
|
2065
1810
|
/**
|
|
2066
|
-
* End of the service period in effect now
|
|
2067
|
-
* this. Null when no period is in effect, including for postpaid subscriptions.
|
|
1811
|
+
* End of the service period in effect now; renewing in advance moves `current_term_end`, not this. Null when no period is in effect, including for metered subscriptions.
|
|
2068
1812
|
* @nullable
|
|
2069
1813
|
*/
|
|
2070
1814
|
current_period_end?: string | null;
|
|
2071
|
-
/**
|
|
1815
|
+
/** Whether a licensed subscription renews automatically. A metered subscription continues until it is canceled; for it this is true until a cancellation is requested, and cannot be set. */
|
|
2072
1816
|
auto_renew: boolean;
|
|
2073
|
-
/**
|
|
2074
|
-
* pending means the purchase relationship exists but its order has not been accepted.
|
|
2075
|
-
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
2076
|
-
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
2077
|
-
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
2078
|
-
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
2079
|
-
*/
|
|
1817
|
+
/** `pending`: the order has not been accepted. `provisioning`: the owning service accepted the order and is delivering. `active`: delivery was confirmed; payment alone does not make a subscription active. `suspended`: service is stopped while a lien restricts its use. `canceled`: cancellation completed, or an undelivered purchase was canceled or failed. `terminated`: an operator or the owning service ended it immediately. */
|
|
2080
1818
|
status: SubscriptionStatus;
|
|
2081
1819
|
/**
|
|
2082
|
-
*
|
|
1820
|
+
* When service started. Null until a new subscription becomes active, also after payment.
|
|
2083
1821
|
* @nullable
|
|
2084
1822
|
*/
|
|
2085
1823
|
started_at?: string | null;
|
|
@@ -2106,10 +1844,7 @@ export interface RenewalPrice {
|
|
|
2106
1844
|
/** What renewing for this term costs, for the quantity held. */
|
|
2107
1845
|
amount?: Money;
|
|
2108
1846
|
currency?: string;
|
|
2109
|
-
/**
|
|
2110
|
-
* The term this item already bills at. Renewing for it uses the price bought
|
|
2111
|
-
* originally, so a later price change does not affect it.
|
|
2112
|
-
*/
|
|
1847
|
+
/** The term the subscription renews at now; renewing for it keeps the agreed price. */
|
|
2113
1848
|
current: boolean;
|
|
2114
1849
|
}
|
|
2115
1850
|
export interface RenewalPriceList {
|
|
@@ -2126,14 +1861,10 @@ export declare const RenewRequestInterval: {
|
|
|
2126
1861
|
readonly year: "year";
|
|
2127
1862
|
};
|
|
2128
1863
|
export interface RenewRequest {
|
|
2129
|
-
/**
|
|
1864
|
+
/** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
|
|
2130
1865
|
order_id: string;
|
|
2131
1866
|
/**
|
|
2132
|
-
* How many further periods to buy, each at the price
|
|
2133
|
-
*
|
|
2134
|
-
* Buying twelve monthly periods is not the same as buying one yearly term: a longer
|
|
2135
|
-
* term is usually sold at a lower price, and that price is only reached by naming the
|
|
2136
|
-
* interval. Use `interval_count` and `interval` for that.
|
|
1867
|
+
* How many further periods to buy, each at the price the subscription already renews at. To buy a longer term at its own price, give `interval` and `interval_count` instead.
|
|
2137
1868
|
* @minimum 1
|
|
2138
1869
|
*/
|
|
2139
1870
|
periods?: number;
|
|
@@ -2172,10 +1903,10 @@ export declare const RenewalOrderRequestInterval: {
|
|
|
2172
1903
|
readonly year: "year";
|
|
2173
1904
|
};
|
|
2174
1905
|
/**
|
|
2175
|
-
* The periods and price
|
|
1906
|
+
* The renewal's periods and price, chosen as in renewing.
|
|
2176
1907
|
*/
|
|
2177
1908
|
export interface RenewalOrderRequest {
|
|
2178
|
-
/**
|
|
1909
|
+
/** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
|
|
2179
1910
|
order_id: string;
|
|
2180
1911
|
/**
|
|
2181
1912
|
* As in renewing.
|
|
@@ -2196,10 +1927,7 @@ export interface AutoRenewSet {
|
|
|
2196
1927
|
auto_renew: boolean;
|
|
2197
1928
|
}
|
|
2198
1929
|
/**
|
|
2199
|
-
* `pending
|
|
2200
|
-
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
2201
|
-
* `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
|
|
2202
|
-
* its subscription.
|
|
1930
|
+
* `pending`: waiting to be set up. `completed`: set up, as confirmed by the service. `failed`: not set up; its amount was refunded to the original payment sources. `canceled`: withdrawn without delivery; any collected amount is returned. A completed item ends when its subscription is canceled.
|
|
2203
1931
|
*/
|
|
2204
1932
|
export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
|
|
2205
1933
|
export declare const OrderItemStatus: {
|
|
@@ -2209,7 +1937,7 @@ export declare const OrderItemStatus: {
|
|
|
2209
1937
|
readonly canceled: "canceled";
|
|
2210
1938
|
};
|
|
2211
1939
|
/**
|
|
2212
|
-
* `new` buys, `renew` extends a
|
|
1940
|
+
* `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms.
|
|
2213
1941
|
*/
|
|
2214
1942
|
export type OrderType = (typeof OrderType)[keyof typeof OrderType];
|
|
2215
1943
|
export declare const OrderType: {
|
|
@@ -2218,12 +1946,7 @@ export declare const OrderType: {
|
|
|
2218
1946
|
readonly modify: "modify";
|
|
2219
1947
|
};
|
|
2220
1948
|
/**
|
|
2221
|
-
* When a plan change takes effect
|
|
2222
|
-
*
|
|
2223
|
-
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2224
|
-
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2225
|
-
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2226
|
-
* usual. Renewing in the meantime moves all of this along with it.
|
|
1949
|
+
* When a plan change takes effect; `none` for anything that is not a change. A `period_end` order stays pending until the first period at the new price is paid. That period is invoiced shortly before the current paid period ends and starts when it ends; if the invoice is unpaid by then, the order is canceled and the subscription renews or ends as usual. A renewal in the meantime moves the change to the end of the renewed period.
|
|
2227
1950
|
*/
|
|
2228
1951
|
export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
|
|
2229
1952
|
export declare const OrderChangeEffective: {
|
|
@@ -2232,8 +1955,7 @@ export declare const OrderChangeEffective: {
|
|
|
2232
1955
|
readonly period_end: "period_end";
|
|
2233
1956
|
};
|
|
2234
1957
|
/**
|
|
2235
|
-
* How it was paid.
|
|
2236
|
-
* then names a removed payment method.
|
|
1958
|
+
* How it was paid. `payment_method_id` still names the payment method after it is removed.
|
|
2237
1959
|
*/
|
|
2238
1960
|
export interface PaidWith {
|
|
2239
1961
|
/**
|
|
@@ -2255,22 +1977,17 @@ export declare const OrderItemInterval: {
|
|
|
2255
1977
|
readonly month: "month";
|
|
2256
1978
|
readonly year: "year";
|
|
2257
1979
|
};
|
|
2258
|
-
/**
|
|
2259
|
-
* The payment timing of the selected price.
|
|
2260
|
-
*/
|
|
2261
|
-
export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
|
|
2262
|
-
export declare const OrderItemChargeType: {
|
|
2263
|
-
readonly postpaid: "postpaid";
|
|
2264
|
-
readonly prepaid: "prepaid";
|
|
2265
|
-
readonly one_time: "one_time";
|
|
2266
|
-
};
|
|
2267
1980
|
export type OrderItemConfiguration = {
|
|
2268
1981
|
[key: string]: unknown;
|
|
2269
1982
|
};
|
|
2270
1983
|
/**
|
|
2271
|
-
*
|
|
2272
|
-
|
|
2273
|
-
|
|
1984
|
+
* The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none.
|
|
1985
|
+
*/
|
|
1986
|
+
export type OrderItemDimensions = {
|
|
1987
|
+
[key: string]: string;
|
|
1988
|
+
};
|
|
1989
|
+
/**
|
|
1990
|
+
* The purchase terms frozen at placement. Monetary fields come from the order's invoice lines and are zero without an immediate charge, such as for a metered purchase. Later catalog changes do not reprice the line. A new service purchase has its pending subscription from placement.
|
|
2274
1991
|
*/
|
|
2275
1992
|
export interface OrderItem {
|
|
2276
1993
|
/** Whether new account discounts may apply to future renewals. A fixed operator renewal agreement disables automatic discounts; catalog repricing or a newly selected purchase agreement enables them. */
|
|
@@ -2280,11 +1997,7 @@ export interface OrderItem {
|
|
|
2280
1997
|
/** @minimum 0 */
|
|
2281
1998
|
position?: number;
|
|
2282
1999
|
configuration?: OrderItemConfiguration;
|
|
2283
|
-
/**
|
|
2284
|
-
* Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
|
|
2285
|
-
* pending subscription here; renewals and changes reference the existing subscription, which
|
|
2286
|
-
* keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
|
|
2287
|
-
*/
|
|
2000
|
+
/** The Billing subscription: the new pending subscription of a recurring purchase, or the existing one renewed or changed, which keeps its ID. Absent for a purchase without a subscription. */
|
|
2288
2001
|
subscription_id?: string;
|
|
2289
2002
|
interval: OrderItemInterval;
|
|
2290
2003
|
/** @minimum 1 */
|
|
@@ -2292,22 +2005,21 @@ export interface OrderItem {
|
|
|
2292
2005
|
termination_policy?: TerminationPolicy;
|
|
2293
2006
|
refund_policy?: RefundPolicy;
|
|
2294
2007
|
/**
|
|
2295
|
-
*
|
|
2296
|
-
* at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
|
|
2297
|
-
* no prepaid period shorter than the one bought.
|
|
2008
|
+
* Recurring licensed items only: the plan's one-month licensed price for this item's quantity, before tax and frozen at purchase, used to value time under a prorated refund or a downgrade. Null when the plan has no licensed period shorter than the one bought.
|
|
2298
2009
|
* @nullable
|
|
2299
2010
|
*/
|
|
2300
2011
|
refund_monthly_amount?: string | null;
|
|
2301
2012
|
/**
|
|
2302
|
-
*
|
|
2303
|
-
* purchase, used for time used short of a full month. Null when the plan has no postpaid price.
|
|
2013
|
+
* Recurring licensed items only, the plan's metered hourly price for this item's quantity before tax, frozen at purchase, used for time used short of a full month. Null when the licensed price has no meter.
|
|
2304
2014
|
* @nullable
|
|
2305
2015
|
*/
|
|
2306
2016
|
refund_hourly_amount?: string | null;
|
|
2307
2017
|
recurring_amount?: string;
|
|
2308
2018
|
setup_amount?: string;
|
|
2309
|
-
|
|
2310
|
-
|
|
2019
|
+
type: PriceType;
|
|
2020
|
+
usage_type: UsageType;
|
|
2021
|
+
/** The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none. */
|
|
2022
|
+
dimensions: OrderItemDimensions;
|
|
2311
2023
|
/** Total tax after discounts, including any tax already included in the price. */
|
|
2312
2024
|
tax_amount?: string;
|
|
2313
2025
|
/** The part of tax_amount already included in gross_amount; it is not charged again. */
|
|
@@ -2319,45 +2031,28 @@ export interface OrderItem {
|
|
|
2319
2031
|
product?: Product;
|
|
2320
2032
|
/** Which plan was bought. */
|
|
2321
2033
|
plan_id: string;
|
|
2322
|
-
/**
|
|
2323
|
-
* What it was called when bought. It does not follow later catalogue renames and is
|
|
2324
|
-
* not translated.
|
|
2325
|
-
*/
|
|
2034
|
+
/** The name when bought. */
|
|
2326
2035
|
plan_name: string;
|
|
2327
2036
|
quantity: string;
|
|
2328
|
-
/**
|
|
2329
|
-
* The unit amount of the price this line is charged under. Absent for a tiered price, which has no
|
|
2330
|
-
* single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
|
|
2331
|
-
* describes.
|
|
2332
|
-
*/
|
|
2037
|
+
/** The unit amount of the price the line is charged under. Absent for a tiered price, and for an immediate change, which is charged as `gross_amount` describes. */
|
|
2333
2038
|
unit_amount?: Money;
|
|
2334
2039
|
/**
|
|
2335
|
-
* Before discounts: the price applied to the quantity,
|
|
2336
|
-
*
|
|
2337
|
-
* the
|
|
2338
|
-
*
|
|
2339
|
-
* difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
|
|
2040
|
+
* Before discounts and setup fees: the price applied to the quantity, `unit_amount` times `quantity` for a per-
|
|
2041
|
+
* unit price, raised by any minimum charge. For an immediate upgrade it is the new price for the rest of the
|
|
2042
|
+
* paid period minus the amount paid for that time; a downgrade, or a change between equal period prices, charges
|
|
2043
|
+
* nothing.
|
|
2340
2044
|
*
|
|
2341
|
-
* Under an inclusive tax rate it includes tax,
|
|
2342
|
-
*
|
|
2343
|
-
* tax, and tax is added to it.
|
|
2045
|
+
* Under an inclusive tax rate it includes tax, shown in `tax_included_amount`, except for a renewal at agreed
|
|
2046
|
+
* terms, whose amount excludes tax.
|
|
2344
2047
|
*/
|
|
2345
2048
|
gross_amount?: Money;
|
|
2346
|
-
/**
|
|
2347
|
-
* The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
|
|
2348
|
-
* from the discount the subscription carries.
|
|
2349
|
-
*
|
|
2350
|
-
* A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
|
|
2351
|
-
* `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
|
|
2352
|
-
* the carried discount is already reflected in it: the renewal order also uses a coupon the account
|
|
2353
|
-
* holds, or the account's tax rate is inclusive.
|
|
2354
|
-
*/
|
|
2049
|
+
/** The reduction on this line, from the order's coupon and, for a renewal at agreed terms, from the subscription's carried discount. With a carried discount, `gross_amount` is `unit_amount` times `quantity`, except when the renewal order also uses an account coupon or the tax rate is inclusive: then `gross_amount` is the agreed amount, which already reflects the carried discount. */
|
|
2355
2050
|
discount_amount?: Money;
|
|
2356
2051
|
/** `gross_amount` less `discount_amount`. */
|
|
2357
2052
|
amount?: Money;
|
|
2358
2053
|
currency: string;
|
|
2359
2054
|
/**
|
|
2360
|
-
* The start of the service period this line paid for.
|
|
2055
|
+
* The start of the service period this line paid for. Fixed at placement for renewals and period-end changes, and for a licensed line of a new purchase when its invoice is paid. Absent for metered and one-time lines.
|
|
2361
2056
|
* @nullable
|
|
2362
2057
|
*/
|
|
2363
2058
|
period_start?: string | null;
|
|
@@ -2369,17 +2064,13 @@ export interface OrderItem {
|
|
|
2369
2064
|
status: OrderItemStatus;
|
|
2370
2065
|
}
|
|
2371
2066
|
/**
|
|
2372
|
-
* A recorded purchase with its invoice from placement; a zero-total invoice, such as for
|
|
2373
|
-
* admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
|
|
2374
|
-
* invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
|
|
2375
|
-
* order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
|
|
2376
|
-
* before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
|
|
2067
|
+
* A recorded purchase with its invoice from placement; a zero-total invoice, such as for a metered purchase, is issued and paid at placement in either checkout mode. Until checkout_confirmed_at is set, the invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the order cannot be accepted before then. Coupon fields describe the discount fixed then and are absent before. Payment and acceptance do not mean the resources were delivered.
|
|
2377
2068
|
*/
|
|
2378
2069
|
export interface Order {
|
|
2379
2070
|
coupon_id?: string;
|
|
2380
2071
|
coupon?: ObjectIdentity;
|
|
2381
2072
|
promotion_code_id?: string;
|
|
2382
|
-
/**
|
|
2073
|
+
/** The promotion code applied. Absent for an account discount. */
|
|
2383
2074
|
promotion_code?: string;
|
|
2384
2075
|
/** The order's invoice, the same as invoice.id. */
|
|
2385
2076
|
invoice_id: string;
|
|
@@ -2390,53 +2081,32 @@ export interface Order {
|
|
|
2390
2081
|
change_effective_at?: string;
|
|
2391
2082
|
id: string;
|
|
2392
2083
|
/**
|
|
2393
|
-
*
|
|
2394
|
-
* as a membership.
|
|
2084
|
+
* The project it was bought for. Absent for an account-level purchase, such as a membership.
|
|
2395
2085
|
* @nullable
|
|
2396
2086
|
*/
|
|
2397
2087
|
project_id?: string | null;
|
|
2398
|
-
/**
|
|
2399
|
-
* The project and its current name, for display. Absent for a purchase at account level,
|
|
2400
|
-
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2401
|
-
* `project_id` still identifies it then.
|
|
2402
|
-
*/
|
|
2088
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
|
|
2403
2089
|
project?: NamedIdentity | null;
|
|
2404
|
-
/**
|
|
2405
|
-
* The billing account the order was placed with. It does not change when the project is later
|
|
2406
|
-
* linked to another billing account. While this account is suspended or closed the order cannot
|
|
2407
|
-
* be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
|
|
2408
|
-
* when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
|
|
2409
|
-
*/
|
|
2090
|
+
/** The billing account the order was placed with, unchanged when the project is later linked to another account. While it is suspended or closed, the order cannot be accepted, and a period-end change's invoice is not issued and the change is called off when the current period ends; such requests fail with `BILLING_ACCOUNT_UNAVAILABLE`. */
|
|
2410
2091
|
billing_account_id?: number;
|
|
2411
2092
|
currency: string;
|
|
2412
|
-
/** `new` buys, `renew` extends a
|
|
2093
|
+
/** `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms. */
|
|
2413
2094
|
type: OrderType;
|
|
2414
2095
|
status: OrderStatus;
|
|
2415
|
-
/**
|
|
2416
|
-
* When a plan change takes effect. `none` on anything that is not a change.
|
|
2417
|
-
*
|
|
2418
|
-
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2419
|
-
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2420
|
-
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2421
|
-
* usual. Renewing in the meantime moves all of this along with it.
|
|
2422
|
-
*/
|
|
2096
|
+
/** When a plan change takes effect; `none` for anything that is not a change. A `period_end` order stays pending until the first period at the new price is paid. That period is invoiced shortly before the current paid period ends and starts when it ends; if the invoice is unpaid by then, the order is canceled and the subscription renews or ends as usual. A renewal in the meantime moves the change to the end of the renewed period. */
|
|
2423
2097
|
change_effective?: OrderChangeEffective;
|
|
2424
2098
|
/**
|
|
2425
|
-
* Acceptance deadline
|
|
2099
|
+
* Acceptance deadline; a pending order expires after it.
|
|
2426
2100
|
* @nullable
|
|
2427
2101
|
*/
|
|
2428
2102
|
expires_at?: string | null;
|
|
2429
2103
|
/**
|
|
2430
|
-
* When the discount and amount were fixed: at placement for automatic checkout
|
|
2431
|
-
* zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
|
|
2104
|
+
* When the discount and amount were fixed: at placement for automatic checkout or a zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
|
|
2432
2105
|
* @nullable
|
|
2433
2106
|
*/
|
|
2434
2107
|
checkout_confirmed_at?: string | null;
|
|
2435
2108
|
created_at: string;
|
|
2436
|
-
/**
|
|
2437
|
-
* What was bought. Present on a single order and on every order in a list, so a list
|
|
2438
|
-
* can be rendered without a further request per row.
|
|
2439
|
-
*/
|
|
2109
|
+
/** What was bought. */
|
|
2440
2110
|
items: OrderItem[];
|
|
2441
2111
|
}
|
|
2442
2112
|
export interface OrderList {
|
|
@@ -2444,8 +2114,7 @@ export interface OrderList {
|
|
|
2444
2114
|
pagination: OffsetPagination;
|
|
2445
2115
|
}
|
|
2446
2116
|
/**
|
|
2447
|
-
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
2448
|
-
* `voided` once Leaflow withdrew it.
|
|
2117
|
+
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn.
|
|
2449
2118
|
*/
|
|
2450
2119
|
export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
|
|
2451
2120
|
export declare const DiscountStatus: {
|
|
@@ -2462,9 +2131,7 @@ export declare const DiscountType: {
|
|
|
2462
2131
|
readonly free_setup: "free_setup";
|
|
2463
2132
|
};
|
|
2464
2133
|
/**
|
|
2465
|
-
* Whether the discount continues on renewals
|
|
2466
|
-
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
2467
|
-
* periods including the first, and `forever` continues on every renewal.
|
|
2134
|
+
* Whether the discount continues on renewals: `once` applies only to the purchase or renewal using the coupon, `recurring` for `frequency_duration` periods including the first, `forever` on every renewal.
|
|
2468
2135
|
*/
|
|
2469
2136
|
export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
|
|
2470
2137
|
export declare const DiscountFrequency: {
|
|
@@ -2473,26 +2140,18 @@ export declare const DiscountFrequency: {
|
|
|
2473
2140
|
readonly forever: "forever";
|
|
2474
2141
|
};
|
|
2475
2142
|
/**
|
|
2476
|
-
* A coupon held
|
|
2477
|
-
* to metered usage that the coupon covers.
|
|
2143
|
+
* A coupon held by the account for a period, applying without a code to the purchases and metered usage it covers.
|
|
2478
2144
|
*/
|
|
2479
2145
|
export interface Discount {
|
|
2480
2146
|
min_amount?: string;
|
|
2481
2147
|
billing_account_id?: number;
|
|
2482
2148
|
coupon_id: string;
|
|
2483
2149
|
promotion_code_id?: string;
|
|
2484
|
-
/**
|
|
2485
|
-
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
2486
|
-
* `voided` once Leaflow withdrew it.
|
|
2487
|
-
*/
|
|
2150
|
+
/** `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn. */
|
|
2488
2151
|
status: DiscountStatus;
|
|
2489
2152
|
voided_at?: string;
|
|
2490
2153
|
type: DiscountType;
|
|
2491
|
-
/**
|
|
2492
|
-
* Whether the discount continues on renewals of the purchased item. `once` applies only to the
|
|
2493
|
-
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
2494
|
-
* periods including the first, and `forever` continues on every renewal.
|
|
2495
|
-
*/
|
|
2154
|
+
/** Whether the discount continues on renewals: `once` applies only to the purchase or renewal using the coupon, `recurring` for `frequency_duration` periods including the first, `forever` on every renewal. */
|
|
2496
2155
|
frequency?: DiscountFrequency;
|
|
2497
2156
|
/** @minimum 1 */
|
|
2498
2157
|
frequency_duration?: number;
|
|
@@ -2504,10 +2163,7 @@ export interface Discount {
|
|
|
2504
2163
|
/** Caps a percentage discount. */
|
|
2505
2164
|
max_discount?: Money;
|
|
2506
2165
|
currency?: string;
|
|
2507
|
-
/**
|
|
2508
|
-
* What it may be used for. Absent means it applies to anything on the account,
|
|
2509
|
-
* including setup fees and traffic.
|
|
2510
|
-
*/
|
|
2166
|
+
/** What it may pay for. Absent means anything on the account, including setup fees and usage. */
|
|
2511
2167
|
applies_to: Applicability;
|
|
2512
2168
|
/** Restricted to your first purchase of anything it applies to. */
|
|
2513
2169
|
first_purchase_only?: boolean;
|
|
@@ -2527,7 +2183,7 @@ export interface OrderItemList {
|
|
|
2527
2183
|
pagination: OffsetPagination;
|
|
2528
2184
|
}
|
|
2529
2185
|
/**
|
|
2530
|
-
* Whether the quantity was paid for or granted free
|
|
2186
|
+
* Whether the quantity was paid for or granted free; both are consumed the same way.
|
|
2531
2187
|
*/
|
|
2532
2188
|
export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
|
|
2533
2189
|
export declare const AllowanceCategory: {
|
|
@@ -2558,7 +2214,7 @@ export interface Allowance {
|
|
|
2558
2214
|
meter: ObjectIdentity;
|
|
2559
2215
|
/** The unit it is counted in, such as `MiB`. */
|
|
2560
2216
|
unit?: string;
|
|
2561
|
-
/** Whether the quantity was paid for or granted free
|
|
2217
|
+
/** Whether the quantity was paid for or granted free; both are consumed the same way. */
|
|
2562
2218
|
category: AllowanceCategory;
|
|
2563
2219
|
/**
|
|
2564
2220
|
* Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
|
|
@@ -2570,16 +2226,12 @@ export interface Allowance {
|
|
|
2570
2226
|
quantity: string;
|
|
2571
2227
|
/** How much is left. */
|
|
2572
2228
|
remaining_quantity: string;
|
|
2573
|
-
/**
|
|
2574
|
-
* Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
|
|
2575
|
-
* precedence.
|
|
2576
|
-
*/
|
|
2229
|
+
/** Lower values are consumed first; at equal priority, earlier expiry and then earlier issuance. */
|
|
2577
2230
|
priority?: number;
|
|
2578
2231
|
status: AllowanceStatus;
|
|
2579
2232
|
valid_from: string;
|
|
2580
2233
|
/**
|
|
2581
|
-
* When
|
|
2582
|
-
* not carry over. Absent when it does not expire on its own.
|
|
2234
|
+
* When the allowance lapses; unused quantity is lost. Absent when it does not expire.
|
|
2583
2235
|
* @nullable
|
|
2584
2236
|
*/
|
|
2585
2237
|
valid_until?: string | null;
|
|
@@ -2622,8 +2274,7 @@ export interface Entitlement {
|
|
|
2622
2274
|
name?: string;
|
|
2623
2275
|
enabled: boolean;
|
|
2624
2276
|
/**
|
|
2625
|
-
* When the
|
|
2626
|
-
* has no end date.
|
|
2277
|
+
* When the providing subscription ends. Absent for a metered subscription.
|
|
2627
2278
|
* @nullable
|
|
2628
2279
|
*/
|
|
2629
2280
|
expires_at?: string | null;
|
|
@@ -2656,30 +2307,7 @@ export interface PlanList {
|
|
|
2656
2307
|
pagination: OffsetPagination;
|
|
2657
2308
|
}
|
|
2658
2309
|
/**
|
|
2659
|
-
* `
|
|
2660
|
-
* charges once.
|
|
2661
|
-
*/
|
|
2662
|
-
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
2663
|
-
export declare const PriceType: {
|
|
2664
|
-
readonly postpaid: "postpaid";
|
|
2665
|
-
readonly prepaid: "prepaid";
|
|
2666
|
-
readonly one_time: "one_time";
|
|
2667
|
-
};
|
|
2668
|
-
/**
|
|
2669
|
-
* How the amount is arrived at. `rated` means the rate depends on attributes such as
|
|
2670
|
-
* region or machine type, and is looked up on a price list.
|
|
2671
|
-
*/
|
|
2672
|
-
export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
|
|
2673
|
-
export declare const PriceBillingScheme: {
|
|
2674
|
-
readonly per_unit: "per_unit";
|
|
2675
|
-
readonly tiered: "tiered";
|
|
2676
|
-
readonly rated: "rated";
|
|
2677
|
-
};
|
|
2678
|
-
/**
|
|
2679
|
-
* `none` for a price that is not tiered, which is most of them.
|
|
2680
|
-
*
|
|
2681
|
-
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
2682
|
-
* everything at the rate of the band the total falls in.
|
|
2310
|
+
* How a ladder is walked: `graduated` charges each band at its own rate, `volume` charges everything at the rate of the band the total falls in. `none` when not tiered.
|
|
2683
2311
|
*/
|
|
2684
2312
|
export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
|
|
2685
2313
|
export declare const PriceTiersMode: {
|
|
@@ -2696,7 +2324,7 @@ export declare const PriceInterval: {
|
|
|
2696
2324
|
};
|
|
2697
2325
|
export interface Tier {
|
|
2698
2326
|
/**
|
|
2699
|
-
* The upper bound
|
|
2327
|
+
* The band's inclusive upper bound; null for the last band.
|
|
2700
2328
|
* @nullable
|
|
2701
2329
|
*/
|
|
2702
2330
|
up_to?: string | null;
|
|
@@ -2709,6 +2337,7 @@ export interface Price {
|
|
|
2709
2337
|
lookup_key?: string;
|
|
2710
2338
|
product: Product;
|
|
2711
2339
|
plan: ObjectIdentity;
|
|
2340
|
+
/** For a metered price with its own amounts, the meter it charges. For a licensed price, the meter its quantity is held on. Absent otherwise. */
|
|
2712
2341
|
meter_id?: string;
|
|
2713
2342
|
meter?: ObjectIdentity;
|
|
2714
2343
|
unit_quantity: string;
|
|
@@ -2720,39 +2349,25 @@ export interface Price {
|
|
|
2720
2349
|
id: string;
|
|
2721
2350
|
plan_id: string;
|
|
2722
2351
|
currency: string;
|
|
2723
|
-
/**
|
|
2724
|
-
* `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
|
|
2725
|
-
* charges once.
|
|
2726
|
-
*/
|
|
2727
2352
|
type: PriceType;
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
*/
|
|
2732
|
-
billing_scheme: PriceBillingScheme;
|
|
2353
|
+
usage_type: UsageType;
|
|
2354
|
+
/** Absent when the price delegates to a rate card, where the rate depends on attributes such as region or machine type. */
|
|
2355
|
+
billing_scheme?: BillingScheme;
|
|
2733
2356
|
/** Present for `per_unit`. */
|
|
2734
2357
|
unit_amount?: Money;
|
|
2735
|
-
/**
|
|
2736
|
-
* `none` for a price that is not tiered, which is most of them.
|
|
2737
|
-
*
|
|
2738
|
-
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
2739
|
-
* everything at the rate of the band the total falls in.
|
|
2740
|
-
*/
|
|
2358
|
+
/** How a ladder is walked: `graduated` charges each band at its own rate, `volume` charges everything at the rate of the band the total falls in. `none` when not tiered. */
|
|
2741
2359
|
tiers_mode?: PriceTiersMode;
|
|
2742
2360
|
/** Present for `tiered`, in ascending order. */
|
|
2743
2361
|
tiers?: Tier[];
|
|
2744
|
-
/**
|
|
2362
|
+
/** Present when the price delegates to a rate card, the price list its rates are read from. */
|
|
2745
2363
|
rate_card_id?: string;
|
|
2746
2364
|
/** The smallest quantity that can be bought. Absent means no lower bound. */
|
|
2747
2365
|
min_quantity?: string;
|
|
2748
|
-
/**
|
|
2749
|
-
* The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
|
|
2750
|
-
* rejected with BILLING_PRICE_INVALID and field=max_quantity.
|
|
2751
|
-
*/
|
|
2366
|
+
/** The largest quantity that may be bought; absent when there is no limit. A larger quantity is refused with `BILLING_PRICE_INVALID` and `field` `max_quantity`. */
|
|
2752
2367
|
max_quantity?: string;
|
|
2753
2368
|
/** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
|
|
2754
2369
|
quantity_step?: string;
|
|
2755
|
-
/** For
|
|
2370
|
+
/** For recurring licensed prices, how many interval units one period covers. */
|
|
2756
2371
|
interval_count?: number;
|
|
2757
2372
|
interval: PriceInterval;
|
|
2758
2373
|
setup_fee?: Money;
|
|
@@ -2762,18 +2377,20 @@ export interface PriceList {
|
|
|
2762
2377
|
pagination: OffsetPagination;
|
|
2763
2378
|
}
|
|
2764
2379
|
/**
|
|
2765
|
-
* The
|
|
2380
|
+
* The dimension values this rate applies to, such as region and machine type.
|
|
2766
2381
|
*/
|
|
2767
2382
|
export type RateDimensions = {
|
|
2768
2383
|
[key: string]: string;
|
|
2769
2384
|
};
|
|
2770
2385
|
/**
|
|
2771
|
-
*
|
|
2386
|
+
* Licensed rates only, the period the amount buys; `none` for metered rates.
|
|
2772
2387
|
*/
|
|
2773
|
-
export type
|
|
2774
|
-
export declare const
|
|
2775
|
-
readonly
|
|
2776
|
-
readonly
|
|
2388
|
+
export type RateInterval = (typeof RateInterval)[keyof typeof RateInterval];
|
|
2389
|
+
export declare const RateInterval: {
|
|
2390
|
+
readonly none: "none";
|
|
2391
|
+
readonly day: "day";
|
|
2392
|
+
readonly month: "month";
|
|
2393
|
+
readonly year: "year";
|
|
2777
2394
|
};
|
|
2778
2395
|
/**
|
|
2779
2396
|
* `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.
|
|
@@ -2786,22 +2403,24 @@ export declare const RateTiersMode: {
|
|
|
2786
2403
|
};
|
|
2787
2404
|
export interface Rate {
|
|
2788
2405
|
meter: ObjectIdentity;
|
|
2789
|
-
/** The unit readings
|
|
2406
|
+
/** The unit readings are reported in, such as `core-second`. */
|
|
2790
2407
|
unit?: string;
|
|
2791
|
-
/** The
|
|
2408
|
+
/** The dimension values this rate applies to, such as region and machine type. */
|
|
2792
2409
|
dimensions: RateDimensions;
|
|
2793
|
-
|
|
2794
|
-
|
|
2410
|
+
billing_scheme: BillingScheme;
|
|
2411
|
+
/** `metered` prices usage; `licensed` prices holding a quantity for one period. */
|
|
2412
|
+
usage_type: UsageType;
|
|
2413
|
+
/** Licensed rates only, the period the amount buys; `none` for metered rates. */
|
|
2414
|
+
interval: RateInterval;
|
|
2415
|
+
/** @nullable */
|
|
2416
|
+
interval_count?: number | null;
|
|
2795
2417
|
/** `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. */
|
|
2796
2418
|
tiers_mode: RateTiersMode;
|
|
2797
2419
|
/** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
|
|
2798
2420
|
unit_amount?: Money;
|
|
2799
2421
|
/** Present for a tiered rate, in ascending order. */
|
|
2800
2422
|
tiers?: Tier[];
|
|
2801
|
-
/**
|
|
2802
|
-
* How many measured units one amount covers. An hourly rate on a per-second meter is
|
|
2803
|
-
* `"3600"`.
|
|
2804
|
-
*/
|
|
2423
|
+
/** How many measured units one amount covers; an hourly rate on a per-second meter is `"3600"`. */
|
|
2805
2424
|
unit_quantity?: string;
|
|
2806
2425
|
currency: string;
|
|
2807
2426
|
effective_from: string;
|
|
@@ -2812,15 +2431,6 @@ export interface RateList {
|
|
|
2812
2431
|
items: Rate[];
|
|
2813
2432
|
pagination: OffsetPagination;
|
|
2814
2433
|
}
|
|
2815
|
-
/**
|
|
2816
|
-
* Narrows the selection when a plan offers more than one charge type.
|
|
2817
|
-
*/
|
|
2818
|
-
export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
|
|
2819
|
-
export declare const QuoteItemInputPriceType: {
|
|
2820
|
-
readonly postpaid: "postpaid";
|
|
2821
|
-
readonly prepaid: "prepaid";
|
|
2822
|
-
readonly one_time: "one_time";
|
|
2823
|
-
};
|
|
2824
2434
|
export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
|
|
2825
2435
|
export declare const QuoteItemInputInterval: {
|
|
2826
2436
|
readonly none: "none";
|
|
@@ -2829,23 +2439,13 @@ export declare const QuoteItemInputInterval: {
|
|
|
2829
2439
|
readonly year: "year";
|
|
2830
2440
|
};
|
|
2831
2441
|
/**
|
|
2832
|
-
* The
|
|
2833
|
-
*
|
|
2834
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
2835
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
2836
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
2837
|
-
*
|
|
2838
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
2839
|
-
* covering it is refused rather than priced at zero.
|
|
2442
|
+
* The dimension values the rate depends on, such as region, instance type or token kind: those of the usage for a metered estimate, and those of what is bought for a licensed price on a rate card. Required whenever the price uses a rate card; prices with their own amounts ignore them. Every key the meter declares must be given. A combination no rate covers is refused rather than priced at zero.
|
|
2840
2443
|
*/
|
|
2841
2444
|
export type QuoteItemInputDimensions = {
|
|
2842
2445
|
[key: string]: string;
|
|
2843
2446
|
};
|
|
2844
2447
|
/**
|
|
2845
|
-
* Identify a price
|
|
2846
|
-
* key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
|
|
2847
|
-
* postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
|
|
2848
|
-
* checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
|
|
2448
|
+
* Identify a price, or select one for a plan; give each resource's ID or lookup key, never both, and product_id with lookup keys. For a metered price, a meter or duration_seconds requests a usage estimate, which cannot be combined with a promotion code and is not a checkout amount. Without one, a metered item includes only any setup charge.
|
|
2849
2449
|
*/
|
|
2850
2450
|
export interface QuoteItemInput {
|
|
2851
2451
|
/**
|
|
@@ -2861,12 +2461,14 @@ export interface QuoteItemInput {
|
|
|
2861
2461
|
price_id?: string;
|
|
2862
2462
|
product_id?: ProductID;
|
|
2863
2463
|
plan_id?: string;
|
|
2864
|
-
/** Narrows the selection when a plan offers more than one
|
|
2865
|
-
price_type?:
|
|
2464
|
+
/** Narrows the selection when a plan offers more than one price type. */
|
|
2465
|
+
price_type?: PriceType;
|
|
2466
|
+
/** Narrows the selection when a plan offers more than one usage type. */
|
|
2467
|
+
usage_type?: UsageType;
|
|
2866
2468
|
interval?: QuoteItemInputInterval;
|
|
2867
2469
|
/** @minimum 1 */
|
|
2868
2470
|
interval_count?: number;
|
|
2869
|
-
/** Selects among
|
|
2471
|
+
/** Selects among licensed prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
|
|
2870
2472
|
termination_policy?: TerminationPolicy;
|
|
2871
2473
|
/** @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]))))))))))$ */
|
|
2872
2474
|
quantity: string;
|
|
@@ -2876,36 +2478,37 @@ export interface QuoteItemInput {
|
|
|
2876
2478
|
* @maxLength 128
|
|
2877
2479
|
*/
|
|
2878
2480
|
meter_lookup_key?: string;
|
|
2879
|
-
/**
|
|
2880
|
-
* The attributes the price depends on — region, instance type, token class.
|
|
2881
|
-
*
|
|
2882
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
2883
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
2884
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
2885
|
-
*
|
|
2886
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
2887
|
-
* covering it is refused rather than priced at zero.
|
|
2888
|
-
*/
|
|
2481
|
+
/** The dimension values the rate depends on, such as region, instance type or token kind: those of the usage for a metered estimate, and those of what is bought for a licensed price on a rate card. Required whenever the price uses a rate card; prices with their own amounts ignore them. Every key the meter declares must be given. A combination no rate covers is refused rather than priced at zero. */
|
|
2889
2482
|
dimensions?: QuoteItemInputDimensions;
|
|
2890
|
-
/**
|
|
2891
|
-
* For metered items, how long to price for. This allows an estimate such as "about
|
|
2892
|
-
* this much per month" to be shown before anything exists. The priced quantity is
|
|
2893
|
-
* `quantity` multiplied by this duration.
|
|
2894
|
-
*/
|
|
2483
|
+
/** For a metered estimate, how long to price for, in seconds; the priced quantity is `quantity` times this duration. */
|
|
2895
2484
|
duration_seconds?: number;
|
|
2896
2485
|
}
|
|
2486
|
+
/**
|
|
2487
|
+
* The values of the meter's presentation dimensions, present only when grouped by meter.
|
|
2488
|
+
*/
|
|
2489
|
+
export type SpendRowDimensions = {
|
|
2490
|
+
[key: string]: string;
|
|
2491
|
+
};
|
|
2897
2492
|
export interface SpendRow {
|
|
2898
2493
|
product?: Product;
|
|
2899
2494
|
plan_id?: string;
|
|
2900
2495
|
plan_name?: string;
|
|
2901
2496
|
/** Present only when grouped by resource. */
|
|
2902
2497
|
resource_id?: string;
|
|
2498
|
+
/** Present only when grouped by meter. */
|
|
2499
|
+
meter?: ObjectIdentity;
|
|
2500
|
+
/** Present only when grouped by meter. */
|
|
2501
|
+
unit?: string;
|
|
2502
|
+
/** Net usage quantity, present only when grouped by meter. */
|
|
2503
|
+
quantity?: string;
|
|
2504
|
+
/** The values of the meter's presentation dimensions, present only when grouped by meter. */
|
|
2505
|
+
dimensions?: SpendRowDimensions;
|
|
2903
2506
|
amount: Money;
|
|
2904
2507
|
currency: string;
|
|
2905
2508
|
}
|
|
2906
2509
|
export interface SpendRowList {
|
|
2907
2510
|
items: SpendRow[];
|
|
2908
|
-
/** The
|
|
2511
|
+
/** The total over all matching groups, not only the page returned. */
|
|
2909
2512
|
total: Money;
|
|
2910
2513
|
currency: string;
|
|
2911
2514
|
pagination: OffsetPagination;
|
|
@@ -2921,28 +2524,28 @@ export declare const ActiveResourceStatus: {
|
|
|
2921
2524
|
readonly closed: "closed";
|
|
2922
2525
|
};
|
|
2923
2526
|
/**
|
|
2924
|
-
* A resource
|
|
2527
|
+
* A resource charged continuously by the second.
|
|
2925
2528
|
*/
|
|
2926
2529
|
export interface ActiveResource {
|
|
2927
2530
|
id: string;
|
|
2928
2531
|
ended_at?: string;
|
|
2929
2532
|
suspended_at?: string;
|
|
2930
2533
|
state_changed_at?: string;
|
|
2931
|
-
/** The
|
|
2534
|
+
/** The metered subscription charged for this metering record. */
|
|
2932
2535
|
subscription_id: string;
|
|
2933
2536
|
resource_id: string;
|
|
2934
2537
|
product: Product;
|
|
2935
|
-
/**
|
|
2538
|
+
/** The resource type, as the owning service names it. */
|
|
2936
2539
|
resource_type?: string;
|
|
2937
2540
|
meter: ObjectIdentity;
|
|
2938
2541
|
unit?: string;
|
|
2939
|
-
/** How much is held
|
|
2542
|
+
/** How much is held, such as cores, MiB or cards; not how much was used. */
|
|
2940
2543
|
quantity: string;
|
|
2941
2544
|
dimensions?: ActiveResourceDimensions;
|
|
2942
2545
|
status: ActiveResourceStatus;
|
|
2943
2546
|
started_at: string;
|
|
2944
2547
|
project_id?: string;
|
|
2945
|
-
/** Usage has been generated up to this boundary; it
|
|
2548
|
+
/** Usage has been generated up to this boundary; it says nothing about invoicing or payment. */
|
|
2946
2549
|
usage_generated_until: string;
|
|
2947
2550
|
}
|
|
2948
2551
|
export interface ActiveResourceList {
|
|
@@ -2950,7 +2553,7 @@ export interface ActiveResourceList {
|
|
|
2950
2553
|
pagination: OffsetPagination;
|
|
2951
2554
|
}
|
|
2952
2555
|
/**
|
|
2953
|
-
* An estimate of the refundable value of
|
|
2556
|
+
* An estimate of the refundable value of an order or selected items; nothing is canceled or refunded.
|
|
2954
2557
|
*/
|
|
2955
2558
|
export interface OrderRefundQuoteInput {
|
|
2956
2559
|
order_id: string;
|
|
@@ -2962,33 +2565,24 @@ export interface OrderRefundQuoteInput {
|
|
|
2962
2565
|
order_item_ids?: string[];
|
|
2963
2566
|
}
|
|
2964
2567
|
/**
|
|
2965
|
-
*
|
|
2966
|
-
* refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
|
|
2967
|
-
* canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
|
|
2968
|
-
* combination returns BILLING_PURCHASE_INVALID with the offending field."
|
|
2568
|
+
* Quote exactly one target for the billing account: proposed items, an existing order, renewals, a cancellation or an order refund. Promotion codes apply only to proposed items or an existing order. An invalid combination fails with `BILLING_PURCHASE_INVALID` and the field.
|
|
2969
2569
|
*/
|
|
2970
2570
|
export interface QuoteRequest {
|
|
2971
2571
|
/**
|
|
2972
|
-
* The billing account to price for
|
|
2973
|
-
* with this account; renewals and cancellations must currently be paid for by it.
|
|
2572
|
+
* The billing account to price for; it must be yours. Existing orders must have been placed with it, and renewals and cancellations must currently be paid by it.
|
|
2974
2573
|
* @minimum 1
|
|
2975
2574
|
*/
|
|
2976
2575
|
billing_account_id: number;
|
|
2977
2576
|
/**
|
|
2978
|
-
* A proposed purchase priced in the account currency. Metered items may
|
|
2979
|
-
* quantities; those estimates are not amounts collectible at checkout.
|
|
2577
|
+
* A proposed purchase priced in the account's currency. Metered items may include usage estimates, which are not checkout amounts.
|
|
2980
2578
|
* @minItems 1
|
|
2981
2579
|
* @maxItems 100
|
|
2982
2580
|
*/
|
|
2983
2581
|
items?: QuoteItemInput[];
|
|
2984
|
-
/**
|
|
2985
|
-
* Preview paying this existing order. Its recorded purchase terms supply every line, and an order
|
|
2986
|
-
* whose terms are fixed returns its recorded amounts. A preview does not change the order.
|
|
2987
|
-
*/
|
|
2582
|
+
/** Preview paying this order. Its recorded terms supply every line, and an order whose terms are fixed returns its recorded amounts. The order does not change. */
|
|
2988
2583
|
order_id?: string;
|
|
2989
2584
|
/**
|
|
2990
|
-
* Preview renewing these subscriptions, each at most once
|
|
2991
|
-
* renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
|
|
2585
|
+
* Preview renewing these subscriptions, each at most once; each entry is a separate renewal order. To preview a promotion code, create a renewal order and quote it by order_id.
|
|
2992
2586
|
* @minItems 1
|
|
2993
2587
|
* @maxItems 100
|
|
2994
2588
|
*/
|
|
@@ -3002,9 +2596,7 @@ export interface QuoteRequest {
|
|
|
3002
2596
|
refund?: OrderRefundQuoteInput;
|
|
3003
2597
|
}
|
|
3004
2598
|
/**
|
|
3005
|
-
* How tax applies to the customer, as in Stripe
|
|
3006
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
3007
|
-
* invoices state this. Only operators change it.
|
|
2599
|
+
* How tax applies to the customer, as in Stripe: `none` taxes normally, `exempt` charges no tax, `reverse` charges no tax under the reverse-charge mechanism, stated on invoices. Only operators change it.
|
|
3008
2600
|
*/
|
|
3009
2601
|
export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
|
|
3010
2602
|
export declare const ContactTaxExempt: {
|
|
@@ -3013,7 +2605,7 @@ export declare const ContactTaxExempt: {
|
|
|
3013
2605
|
readonly reverse: "reverse";
|
|
3014
2606
|
};
|
|
3015
2607
|
/**
|
|
3016
|
-
* A billing
|
|
2608
|
+
* A contact of a billing account with one address. An account can hold several; a contact is not a login.
|
|
3017
2609
|
*/
|
|
3018
2610
|
export interface Contact {
|
|
3019
2611
|
id: string;
|
|
@@ -3041,11 +2633,7 @@ export interface Contact {
|
|
|
3041
2633
|
address_postal_code?: string;
|
|
3042
2634
|
/** @pattern ^([A-Z]{2})?$ */
|
|
3043
2635
|
address_country?: string;
|
|
3044
|
-
/**
|
|
3045
|
-
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
3046
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
3047
|
-
* invoices state this. Only operators change it.
|
|
3048
|
-
*/
|
|
2636
|
+
/** How tax applies to the customer, as in Stripe: `none` taxes normally, `exempt` charges no tax, `reverse` charges no tax under the reverse-charge mechanism, stated on invoices. Only operators change it. */
|
|
3049
2637
|
tax_exempt: ContactTaxExempt;
|
|
3050
2638
|
active: boolean;
|
|
3051
2639
|
created_at: string;
|
|
@@ -3121,14 +2709,14 @@ export interface StatementAmounts {
|
|
|
3121
2709
|
total: Money;
|
|
3122
2710
|
}
|
|
3123
2711
|
/**
|
|
3124
|
-
* One billing account's usage billing for one UTC calendar month, summed over
|
|
2712
|
+
* One billing account's usage billing for one UTC calendar month, summed over its statements. Not payable itself; each statement's invoice is collected on its own.
|
|
3125
2713
|
*/
|
|
3126
2714
|
export interface MonthlyStatement {
|
|
3127
2715
|
billing_account_id: number;
|
|
3128
2716
|
currency: string;
|
|
3129
2717
|
period_start: string;
|
|
3130
2718
|
period_end: string;
|
|
3131
|
-
/** True after the period's final closing, which applies minimum charges
|
|
2719
|
+
/** True after the period's final closing, which applies the month's minimum charges. Usage priced later is billed in supplement statements and added here. */
|
|
3132
2720
|
finalized: boolean;
|
|
3133
2721
|
finalized_at?: string;
|
|
3134
2722
|
/** Statements of the period, including the open one. */
|
|
@@ -3151,7 +2739,7 @@ export declare const StatementStatus: {
|
|
|
3151
2739
|
readonly closed: "closed";
|
|
3152
2740
|
};
|
|
3153
2741
|
/**
|
|
3154
|
-
* interim
|
|
2742
|
+
* `interim`: a closing before the period's usage is final, without minimum charges. `final`: the first closing after the period ended and its late usage was settled, applying the period's minimum charges. `supplement`: a closing after the final one, for usage priced late. An open statement is interim.
|
|
3155
2743
|
*/
|
|
3156
2744
|
export type StatementType = (typeof StatementType)[keyof typeof StatementType];
|
|
3157
2745
|
export declare const StatementType: {
|
|
@@ -3160,7 +2748,7 @@ export declare const StatementType: {
|
|
|
3160
2748
|
readonly supplement: "supplement";
|
|
3161
2749
|
};
|
|
3162
2750
|
/**
|
|
3163
|
-
* An account's consumption for one billing period
|
|
2751
|
+
* An account's consumption for one billing period up to one closing. Usage is invoiced after every settlement run, about hourly: each closing issues an invoice for the usage priced since the previous one and collects it from credits and balance, and later usage goes into the next statement of the same period. A closed statement does not change. The period's consumption is the sum of its statements.
|
|
3164
2752
|
*/
|
|
3165
2753
|
export interface Statement {
|
|
3166
2754
|
id: string;
|
|
@@ -3172,7 +2760,7 @@ export interface Statement {
|
|
|
3172
2760
|
sequence: number;
|
|
3173
2761
|
status: StatementStatus;
|
|
3174
2762
|
type: StatementType;
|
|
3175
|
-
/** True while the statement is open. The estimate
|
|
2763
|
+
/** True while the statement is open. The estimate prices the period's usage so far at tier prices and adds tax for the current invoice contact. Minimum charges are added at the period's final closing, and a tier reduction larger than this statement's charges is credited to the period's earlier invoices at closing. */
|
|
3176
2764
|
estimated: boolean;
|
|
3177
2765
|
amounts: StatementAmounts;
|
|
3178
2766
|
closed_at?: string;
|
|
@@ -3186,11 +2774,19 @@ export interface StatementList {
|
|
|
3186
2774
|
items: Statement[];
|
|
3187
2775
|
pagination: OffsetPagination;
|
|
3188
2776
|
}
|
|
2777
|
+
/**
|
|
2778
|
+
* The values of the meter's presentation dimensions, such as the model and token kind. Included only when grouping by meter, which splits each meter by these values.
|
|
2779
|
+
*/
|
|
2780
|
+
export type StatementItemDimensions = {
|
|
2781
|
+
[key: string]: string;
|
|
2782
|
+
};
|
|
3189
2783
|
export interface StatementItem {
|
|
3190
2784
|
project_id?: string;
|
|
3191
2785
|
product_id?: string;
|
|
3192
2786
|
meter_id?: string;
|
|
3193
2787
|
unit?: string;
|
|
2788
|
+
/** The values of the meter's presentation dimensions, such as the model and token kind. Included only when grouping by meter, which splits each meter by these values. */
|
|
2789
|
+
dimensions?: StatementItemDimensions;
|
|
3194
2790
|
/** Net usage quantity. Included only when grouping by meter. */
|
|
3195
2791
|
quantity?: string;
|
|
3196
2792
|
deducted_quantity?: string;
|