@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
|
@@ -588,12 +588,7 @@ export interface CreateServiceRequestBody {
|
|
|
588
588
|
checkout?: CheckoutOptions;
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
|
-
*
|
|
592
|
-
* the discount is applied and it is issued; other drafts are private to administrators.
|
|
593
|
-
* An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
|
|
594
|
-
* Unbilled usage remains separate from invoices until it is invoiced.
|
|
595
|
-
* A refund does not change the status: a paid invoice stays paid, with the refunded part in
|
|
596
|
-
* amount_refunded. void means collection has stopped and any funds received have been returned.
|
|
591
|
+
* `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.
|
|
597
592
|
*/
|
|
598
593
|
export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
|
|
599
594
|
export declare const InvoiceStatus: {
|
|
@@ -601,13 +596,9 @@ export declare const InvoiceStatus: {
|
|
|
601
596
|
readonly open: "open";
|
|
602
597
|
readonly paid: "paid";
|
|
603
598
|
readonly void: "void";
|
|
604
|
-
readonly uncollectible: "uncollectible";
|
|
605
599
|
};
|
|
606
600
|
/**
|
|
607
|
-
*
|
|
608
|
-
* has an invoice from placement. A draft shows base prices until it is paid, when the discount is
|
|
609
|
-
* applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
|
|
610
|
-
* checkout mode. Neither establishes acceptance or delivery.
|
|
601
|
+
* 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.
|
|
611
602
|
*/
|
|
612
603
|
export interface InvoiceSummary {
|
|
613
604
|
id: string;
|
|
@@ -625,9 +616,9 @@ export interface InvoiceSummary {
|
|
|
625
616
|
tax_amount: string;
|
|
626
617
|
total: string;
|
|
627
618
|
amount_paid: string;
|
|
628
|
-
/** Issued
|
|
619
|
+
/** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
|
|
629
620
|
pre_payment_credit_notes_amount: Money;
|
|
630
|
-
/** Issued credit notes against payments already received
|
|
621
|
+
/** Issued credit notes against payments already received; their refunds may not have completed. */
|
|
631
622
|
post_payment_credit_notes_amount: Money;
|
|
632
623
|
/**
|
|
633
624
|
* What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
@@ -663,16 +654,16 @@ export interface CreateServiceResponseBody {
|
|
|
663
654
|
/**
|
|
664
655
|
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
665
656
|
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
666
|
-
* A
|
|
657
|
+
* A licensed purchase may instead be paid with an online payment method.
|
|
667
658
|
*/
|
|
668
659
|
export interface Funds {
|
|
669
660
|
/** Spendable balance after pending returns. */
|
|
670
661
|
available_balance_amount: Money;
|
|
671
|
-
/** Currently effective credits eligible for the quoted purchases or
|
|
662
|
+
/** Currently effective credits eligible for the quoted purchases or metered usage. Each grant is counted once. */
|
|
672
663
|
usable_credit_amount: Money;
|
|
673
|
-
/** Currently effective credits that cannot fund any quoted purchase or
|
|
664
|
+
/** Currently effective credits that cannot fund any quoted purchase or metered target. Unused eligible credits are not restricted. */
|
|
674
665
|
restricted_credit_amount: Money;
|
|
675
|
-
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new
|
|
666
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new metered purchase's admission requirement. */
|
|
676
667
|
required_balance_amount: Money;
|
|
677
668
|
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
678
669
|
balance_shortfall_amount: Money;
|
|
@@ -828,7 +819,7 @@ export declare const WithdrawalItemStatus: {
|
|
|
828
819
|
readonly reversed: "reversed";
|
|
829
820
|
};
|
|
830
821
|
/**
|
|
831
|
-
* The original top-up and its refund
|
|
822
|
+
* The original top-up and where its refund goes. Card details are included when the original payment method was saved.
|
|
832
823
|
*/
|
|
833
824
|
export interface WithdrawalSource {
|
|
834
825
|
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
@@ -846,7 +837,7 @@ export interface WithdrawalSource {
|
|
|
846
837
|
card_last4?: string;
|
|
847
838
|
}
|
|
848
839
|
/**
|
|
849
|
-
*
|
|
840
|
+
* 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.
|
|
850
841
|
*/
|
|
851
842
|
export interface WithdrawalItem {
|
|
852
843
|
source_transaction_id: string;
|
|
@@ -871,7 +862,7 @@ export interface WithdrawalItem {
|
|
|
871
862
|
payment_gateway: string;
|
|
872
863
|
method_type: string;
|
|
873
864
|
source: WithdrawalSource;
|
|
874
|
-
/** The
|
|
865
|
+
/** The gateway's failure code when a refund failed, or `refund_reversed` when a completed refund was reversed. Absent while pending or successful. */
|
|
875
866
|
failure_code?: string;
|
|
876
867
|
}
|
|
877
868
|
export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
|
|
@@ -884,7 +875,7 @@ export declare const WithdrawalStatus: {
|
|
|
884
875
|
readonly reversed: "reversed";
|
|
885
876
|
};
|
|
886
877
|
/**
|
|
887
|
-
*
|
|
878
|
+
* 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.
|
|
888
879
|
*/
|
|
889
880
|
export interface Withdrawal {
|
|
890
881
|
id: string;
|
|
@@ -909,7 +900,7 @@ export interface Withdrawal {
|
|
|
909
900
|
status: WithdrawalStatus;
|
|
910
901
|
created_at: string;
|
|
911
902
|
completed_at?: string;
|
|
912
|
-
/**
|
|
903
|
+
/** Who submitted the withdrawal; may differ from the account owner. */
|
|
913
904
|
created_by?: string;
|
|
914
905
|
}
|
|
915
906
|
export interface WithdrawalPreviewItem {
|
|
@@ -967,7 +958,7 @@ export interface WithdrawalItemList {
|
|
|
967
958
|
pagination: OffsetPagination;
|
|
968
959
|
}
|
|
969
960
|
/**
|
|
970
|
-
* Whether a
|
|
961
|
+
* 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.
|
|
971
962
|
*/
|
|
972
963
|
export type TerminationPolicy = (typeof TerminationPolicy)[keyof typeof TerminationPolicy];
|
|
973
964
|
export declare const TerminationPolicy: {
|
|
@@ -975,16 +966,7 @@ export declare const TerminationPolicy: {
|
|
|
975
966
|
readonly period_end: "period_end";
|
|
976
967
|
};
|
|
977
968
|
/**
|
|
978
|
-
* none refunds nothing. prorated refunds the amount paid for the current period minus the value of
|
|
979
|
-
* the time used, never below zero and never more than what remains unrefunded. The time used runs
|
|
980
|
-
* from the period start to the effective cancellation time and is valued at the plan's
|
|
981
|
-
* shorter-period prices in the same currency, frozen at purchase as the order item's
|
|
982
|
-
* refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
|
|
983
|
-
* price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
|
|
984
|
-
* second. When the plan has no prepaid period shorter than the one bought, the time used is valued
|
|
985
|
-
* at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
|
|
986
|
-
* and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
|
|
987
|
-
* paid is refunded in the same proportion as the amount it was paid on.
|
|
969
|
+
* `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.
|
|
988
970
|
*/
|
|
989
971
|
export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
|
|
990
972
|
export declare const RefundPolicy: {
|
|
@@ -1006,7 +988,7 @@ export declare const QuoteRenewalInterval: {
|
|
|
1006
988
|
readonly year: "year";
|
|
1007
989
|
};
|
|
1008
990
|
/**
|
|
1009
|
-
* Price renewing a
|
|
991
|
+
* Price renewing a licensed subscription. Give `price_id`, or `interval` with
|
|
1010
992
|
* `interval_count`, to renew for another term at the price currently sold for it. Naming
|
|
1011
993
|
* the current term, or giving neither, renews at the agreed amount. A term sold at several
|
|
1012
994
|
* prices that differ in termination policy is refused with 409
|
|
@@ -1034,9 +1016,7 @@ export declare const QuoteRenewalResultInterval: {
|
|
|
1034
1016
|
readonly year: "year";
|
|
1035
1017
|
};
|
|
1036
1018
|
/**
|
|
1037
|
-
* What renewing would charge. Renewing the same subscription for the same term and
|
|
1038
|
-
* of periods charges exactly `total`, unless prices or the discounts the account holds
|
|
1039
|
-
* change in between.
|
|
1019
|
+
* 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.
|
|
1040
1020
|
*/
|
|
1041
1021
|
export interface QuoteRenewalResult {
|
|
1042
1022
|
/** Which renewal of the request this answers. */
|
|
@@ -1047,11 +1027,7 @@ export interface QuoteRenewalResult {
|
|
|
1047
1027
|
interval: QuoteRenewalResultInterval;
|
|
1048
1028
|
interval_count: number;
|
|
1049
1029
|
periods: number;
|
|
1050
|
-
/**
|
|
1051
|
-
* The price of the periods before the discounts the account holds. A discount the
|
|
1052
|
-
* subscription already carries is reflected here. Contains tax only where the price
|
|
1053
|
-
* itself includes it.
|
|
1054
|
-
*/
|
|
1030
|
+
/** 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. */
|
|
1055
1031
|
amount: Money;
|
|
1056
1032
|
/** The reduction from a discount the account holds. */
|
|
1057
1033
|
discount_amount: Money;
|
|
@@ -1066,25 +1042,25 @@ export interface QuoteRenewalResult {
|
|
|
1066
1042
|
total: Money;
|
|
1067
1043
|
}
|
|
1068
1044
|
/**
|
|
1069
|
-
* One fully calculated purchase, estimated
|
|
1045
|
+
* One fully calculated purchase, estimated metered usage or recorded order item. Amounts use the
|
|
1070
1046
|
* billing-account currency. An item with no immediate charge has zero checkout amounts.
|
|
1071
1047
|
*/
|
|
1072
1048
|
export interface QuoteItem {
|
|
1073
1049
|
tax_amount: Money;
|
|
1074
1050
|
tax_included_amount: Money;
|
|
1075
1051
|
/**
|
|
1076
|
-
*
|
|
1052
|
+
* The zero-based request line index, or the recorded order item's position for an order quote.
|
|
1077
1053
|
* @minimum 0
|
|
1078
1054
|
*/
|
|
1079
1055
|
index: number;
|
|
1080
1056
|
/** Present for an existing order quote; identifies the recorded item being priced. */
|
|
1081
1057
|
order_item_id?: string;
|
|
1082
|
-
/** The selected price,
|
|
1058
|
+
/** The selected price, also when the request identified it indirectly. */
|
|
1083
1059
|
price_id: string;
|
|
1084
1060
|
plan_name: string;
|
|
1085
1061
|
/** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
|
|
1086
1062
|
unit_amount: Money | null;
|
|
1087
|
-
/** The quantity priced
|
|
1063
|
+
/** The quantity priced; with duration_seconds, quantity times the duration. */
|
|
1088
1064
|
quantity: string;
|
|
1089
1065
|
/** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
|
|
1090
1066
|
amount: Money;
|
|
@@ -1098,8 +1074,7 @@ export declare const QuotedDiscountType: {
|
|
|
1098
1074
|
readonly account_discount: "account_discount";
|
|
1099
1075
|
};
|
|
1100
1076
|
/**
|
|
1101
|
-
* The discount selected for this calculation.
|
|
1102
|
-
* reserve a redemption. Discount amounts are reported on the quote and its lines.
|
|
1077
|
+
* The discount selected for this calculation, not applied and not reserved. Amounts are on the quote and its lines.
|
|
1103
1078
|
*/
|
|
1104
1079
|
export interface QuotedDiscount {
|
|
1105
1080
|
type: QuotedDiscountType;
|
|
@@ -1127,30 +1102,35 @@ export interface NamedIdentity {
|
|
|
1127
1102
|
/** @maxLength 255 */
|
|
1128
1103
|
name: string;
|
|
1129
1104
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1105
|
+
/**
|
|
1106
|
+
* `one_time` charges once when bought. `recurring` charges again for every period, or for usage as it is settled.
|
|
1107
|
+
*/
|
|
1108
|
+
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
1109
|
+
export declare const PriceType: {
|
|
1134
1110
|
readonly one_time: "one_time";
|
|
1111
|
+
readonly recurring: "recurring";
|
|
1135
1112
|
};
|
|
1136
1113
|
/**
|
|
1137
|
-
*
|
|
1114
|
+
* `licensed` charges for the quantity bought, each period paid before it starts. `metered` charges for the usage
|
|
1115
|
+
* reported, after it is settled; a metered subscription lasts until it is canceled. A one-time price is licensed.
|
|
1116
|
+
*/
|
|
1117
|
+
export type UsageType = (typeof UsageType)[keyof typeof UsageType];
|
|
1118
|
+
export declare const UsageType: {
|
|
1119
|
+
readonly licensed: "licensed";
|
|
1120
|
+
readonly metered: "metered";
|
|
1121
|
+
};
|
|
1122
|
+
/**
|
|
1123
|
+
* One subscription of the quoted cancellation.
|
|
1138
1124
|
*/
|
|
1139
1125
|
export interface CancellationRefundPreviewItem {
|
|
1140
1126
|
subscription_id: string;
|
|
1141
1127
|
plan_id: string;
|
|
1142
1128
|
plan_name: string;
|
|
1143
|
-
/**
|
|
1144
|
-
* The project and its current name, for display. Absent for a purchase at account level, and when the
|
|
1145
|
-
* project details cannot be read at the moment.
|
|
1146
|
-
*/
|
|
1129
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read. */
|
|
1147
1130
|
project?: NamedIdentity | null;
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
* cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
|
|
1152
|
-
* until it is canceled and turns it back on.
|
|
1153
|
-
*/
|
|
1131
|
+
type: PriceType;
|
|
1132
|
+
usage_type: UsageType;
|
|
1133
|
+
/** 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. */
|
|
1154
1134
|
auto_renew: boolean;
|
|
1155
1135
|
unused_amount: Money;
|
|
1156
1136
|
refundable_amount: Money;
|
|
@@ -1160,19 +1140,19 @@ export interface CancellationRefundPreviewItem {
|
|
|
1160
1140
|
forfeited_amount: Money;
|
|
1161
1141
|
}
|
|
1162
1142
|
/**
|
|
1163
|
-
* What the cancellation would return,
|
|
1164
|
-
* `
|
|
1143
|
+
* What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and
|
|
1144
|
+
* `refundable_amount` when creating the cancellation.
|
|
1165
1145
|
*
|
|
1166
|
-
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
|
|
1167
|
-
*
|
|
1168
|
-
* - `refundable_amount`: what is returned the way it was paid,
|
|
1169
|
-
* `
|
|
1170
|
-
* - `refund_amount`: the part returned to the balance or
|
|
1146
|
+
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the time used,
|
|
1147
|
+
* valued as refund policy `prorated` describes, whatever the refund terms say.
|
|
1148
|
+
* - `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus
|
|
1149
|
+
* `credit_amount`.
|
|
1150
|
+
* - `refund_amount`: the part returned to the balance or the payment method.
|
|
1171
1151
|
* - `credit_amount`: the part restored to the credit grants that paid.
|
|
1172
1152
|
* - `tax_amount`: the tax included in `refundable_amount`.
|
|
1173
1153
|
* - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
|
|
1174
1154
|
*
|
|
1175
|
-
*
|
|
1155
|
+
* Metered and one-time subscriptions show zero; their usage until release is charged as usual.
|
|
1176
1156
|
*/
|
|
1177
1157
|
export interface CancellationRefundPreview {
|
|
1178
1158
|
mode: TerminationPolicy;
|
|
@@ -1190,11 +1170,7 @@ export interface CancellationRefundPreview {
|
|
|
1190
1170
|
items: CancellationRefundPreviewItem[];
|
|
1191
1171
|
}
|
|
1192
1172
|
/**
|
|
1193
|
-
* An estimated refund to original payment sources. Before acceptance, cancellation returns the
|
|
1194
|
-
* collected amount. For delivered service, only value funded by this order is included; renewals
|
|
1195
|
-
* are evaluated under their own orders and the agreed termination terms apply. An unknown
|
|
1196
|
-
* delivery outcome is not evidence that a refund is eligible. This calculation does not create
|
|
1197
|
-
* a refund; the amount returned is determined when cancellation or termination is confirmed.
|
|
1173
|
+
* 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.
|
|
1198
1174
|
*/
|
|
1199
1175
|
export interface OrderRefundQuote {
|
|
1200
1176
|
order_id: string;
|
|
@@ -1204,21 +1180,15 @@ export interface OrderRefundQuote {
|
|
|
1204
1180
|
currency: string;
|
|
1205
1181
|
}
|
|
1206
1182
|
/**
|
|
1207
|
-
* A complete calculation in
|
|
1208
|
-
* redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
|
|
1209
|
-
* included in totals for reporting and are not collectible at checkout. Only an existing-order quote
|
|
1210
|
-
* provides that order's checkout amount.
|
|
1183
|
+
* 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.
|
|
1211
1184
|
*/
|
|
1212
1185
|
export interface Quote5f60d00 {
|
|
1213
|
-
/** Account
|
|
1186
|
+
/** Account funds for an existing-order checkout quote. Absent for usage estimates, refunds and cancellations. */
|
|
1214
1187
|
funds?: Funds;
|
|
1215
1188
|
subtotal: Money;
|
|
1216
1189
|
discount_amount: Money;
|
|
1217
1190
|
tax_amount: Money;
|
|
1218
|
-
/**
|
|
1219
|
-
* The discount evaluated for a purchase or order, without applying it. Null when none is selected or
|
|
1220
|
-
* when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
|
|
1221
|
-
*/
|
|
1191
|
+
/** 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. */
|
|
1222
1192
|
discount: QuotedDiscount | null;
|
|
1223
1193
|
items: QuoteItem[];
|
|
1224
1194
|
renewals: QuoteRenewalResult[];
|
|
@@ -1226,21 +1196,16 @@ export interface Quote5f60d00 {
|
|
|
1226
1196
|
cancellation?: CancellationRefundPreview;
|
|
1227
1197
|
total: Money;
|
|
1228
1198
|
currency: string;
|
|
1229
|
-
/** Present
|
|
1199
|
+
/** Present when an order refund was requested. */
|
|
1230
1200
|
refund?: OrderRefundQuote;
|
|
1231
1201
|
}
|
|
1232
1202
|
export type QuoteA200529 = Quote5f60d00;
|
|
1233
1203
|
/**
|
|
1234
|
-
* A cancellation to quote: what ending these subscriptions together would return
|
|
1235
|
-
* request; to compare, quote `immediate` and `period_end` separately.
|
|
1236
|
-
*
|
|
1237
|
-
* Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
|
|
1238
|
-
* canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
|
|
1239
|
-
* paid change still waiting to switch (`meta.order_id`).
|
|
1204
|
+
* 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`).
|
|
1240
1205
|
*/
|
|
1241
1206
|
export interface QuoteCancellation {
|
|
1242
1207
|
/**
|
|
1243
|
-
* The subscriptions to end together, all of one service
|
|
1208
|
+
* The subscriptions to end together, all of one service, including every subscription released with a resource.
|
|
1244
1209
|
* @minItems 1
|
|
1245
1210
|
* @maxItems 50
|
|
1246
1211
|
*/
|
|
@@ -1255,15 +1220,12 @@ export interface CancellationCreate {
|
|
|
1255
1220
|
*/
|
|
1256
1221
|
subscription_ids: string[];
|
|
1257
1222
|
mode: TerminationPolicy;
|
|
1258
|
-
/**
|
|
1259
|
-
* For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
|
|
1260
|
-
* at most ten minutes old. The refund is computed as of it. Now when omitted.
|
|
1261
|
-
*/
|
|
1223
|
+
/** 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. */
|
|
1262
1224
|
proration_date?: string;
|
|
1263
|
-
/** The `refundable_amount
|
|
1225
|
+
/** The quote's `refundable_amount`; the cancellation is refused when the refund differs. */
|
|
1264
1226
|
expected_refundable_amount: Money & string;
|
|
1265
1227
|
/**
|
|
1266
|
-
* A note from the account holder
|
|
1228
|
+
* A note from the account holder, kept with the cancellation.
|
|
1267
1229
|
* @maxLength 1024
|
|
1268
1230
|
*/
|
|
1269
1231
|
reason?: string;
|
|
@@ -1278,7 +1240,7 @@ export declare const CancellationStatus: {
|
|
|
1278
1240
|
readonly failed: "failed";
|
|
1279
1241
|
};
|
|
1280
1242
|
/**
|
|
1281
|
-
* Who
|
|
1243
|
+
* Who requested it; `project_deletion` means the project was deleted.
|
|
1282
1244
|
*/
|
|
1283
1245
|
export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
|
|
1284
1246
|
export declare const CancellationOrigin: {
|
|
@@ -1286,17 +1248,6 @@ export declare const CancellationOrigin: {
|
|
|
1286
1248
|
readonly operator: "operator";
|
|
1287
1249
|
readonly project_deletion: "project_deletion";
|
|
1288
1250
|
};
|
|
1289
|
-
/**
|
|
1290
|
-
* How the subscription is charged. Creating the cancellation turned automatic renewal off;
|
|
1291
|
-
* withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
|
|
1292
|
-
* `prepaid` one.
|
|
1293
|
-
*/
|
|
1294
|
-
export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
|
|
1295
|
-
export declare const CancellationItemChargeType: {
|
|
1296
|
-
readonly postpaid: "postpaid";
|
|
1297
|
-
readonly prepaid: "prepaid";
|
|
1298
|
-
readonly one_time: "one_time";
|
|
1299
|
-
};
|
|
1300
1251
|
export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
|
|
1301
1252
|
export declare const CancellationItemStatus: {
|
|
1302
1253
|
readonly requested: "requested";
|
|
@@ -1310,19 +1261,19 @@ export declare const CancellationItemStatus: {
|
|
|
1310
1261
|
* One subscription of the cancellation.
|
|
1311
1262
|
*/
|
|
1312
1263
|
export interface CancellationItem {
|
|
1313
|
-
/** The cancellation item
|
|
1264
|
+
/** The subscription's cancellation item, the same as `Subscription.cancellation.id`. */
|
|
1314
1265
|
id: string;
|
|
1315
1266
|
subscription_id: string;
|
|
1316
1267
|
plan_id: string;
|
|
1317
1268
|
plan_name: string;
|
|
1269
|
+
type: PriceType;
|
|
1318
1270
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1321
|
-
* `prepaid` one.
|
|
1271
|
+
* Creating the cancellation turned automatic renewal off; withdrawing it turns renewal back on
|
|
1272
|
+
* for a `metered` subscription and leaves it off for a `licensed` one.
|
|
1322
1273
|
*/
|
|
1323
|
-
|
|
1274
|
+
usage_type: UsageType;
|
|
1324
1275
|
status: CancellationItemStatus;
|
|
1325
|
-
/**
|
|
1276
|
+
/** The release stopped or its result is unknown; present while the release needs resolution. */
|
|
1326
1277
|
failure_code?: string;
|
|
1327
1278
|
release_started_at?: string;
|
|
1328
1279
|
/** When the service ended, as confirmed by the service that provides it. */
|
|
@@ -1352,20 +1303,14 @@ export interface Cancellation {
|
|
|
1352
1303
|
scheduled_at?: string;
|
|
1353
1304
|
/** For `immediate`, the second the refund is computed as of. */
|
|
1354
1305
|
proration_date?: string;
|
|
1355
|
-
/** Who
|
|
1306
|
+
/** Who requested it; `project_deletion` means the project was deleted. */
|
|
1356
1307
|
origin: CancellationOrigin;
|
|
1357
|
-
/**
|
|
1358
|
-
* The billing account that paid for these subscriptions when the cancellation was created: the
|
|
1359
|
-
* account of an account-level purchase, or the account the project was linked to.
|
|
1360
|
-
*/
|
|
1308
|
+
/** 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. */
|
|
1361
1309
|
billing_account_id: number;
|
|
1362
1310
|
currency: string;
|
|
1363
|
-
/** The refund confirmed when
|
|
1311
|
+
/** The refund confirmed when the cancellation was created. Absent when the platform created it. */
|
|
1364
1312
|
expected_refundable_amount?: Money;
|
|
1365
|
-
/**
|
|
1366
|
-
* Present with `failed`. A code of the service that provides the resources, such as a disk
|
|
1367
|
-
* that can only be released with its server. Clients map it to their own wording.
|
|
1368
|
-
*/
|
|
1313
|
+
/** Present with `failed`: the owning service's code, such as for a disk that can only be released with its server. */
|
|
1369
1314
|
failure_code?: string;
|
|
1370
1315
|
requested_at: string;
|
|
1371
1316
|
completed_at?: string;
|
|
@@ -1391,13 +1336,11 @@ export declare const SubscriptionCancellationMode: {
|
|
|
1391
1336
|
readonly period_end: "period_end";
|
|
1392
1337
|
};
|
|
1393
1338
|
/**
|
|
1394
|
-
* The latest cancellation
|
|
1395
|
-
* item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
|
|
1396
|
-
* confirmed end of service. A cancellation alone does not stop metering or issue a refund.
|
|
1339
|
+
* 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.
|
|
1397
1340
|
*/
|
|
1398
1341
|
export interface SubscriptionCancellation {
|
|
1399
1342
|
reason?: string;
|
|
1400
|
-
/** The cancellation this
|
|
1343
|
+
/** The cancellation this item belongs to, with the other subscriptions released together. */
|
|
1401
1344
|
cancellation_id?: string;
|
|
1402
1345
|
id: string;
|
|
1403
1346
|
subscription_id: string;
|
|
@@ -1415,7 +1358,7 @@ export interface SubscriptionCancellation {
|
|
|
1415
1358
|
}
|
|
1416
1359
|
export type ErrorA200529 = Error;
|
|
1417
1360
|
/**
|
|
1418
|
-
*
|
|
1361
|
+
* The platform service's fixed identifier, such as compute, canopy or assistant.
|
|
1419
1362
|
* @minLength 1
|
|
1420
1363
|
* @maxLength 64
|
|
1421
1364
|
* @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
|
|
@@ -1434,29 +1377,22 @@ export declare const BillingAccountStatus: {
|
|
|
1434
1377
|
};
|
|
1435
1378
|
export interface BillingAccount {
|
|
1436
1379
|
/**
|
|
1437
|
-
* The active contact used for
|
|
1380
|
+
* The active contact used for invoices, of this account; null clears it.
|
|
1438
1381
|
* @nullable
|
|
1439
1382
|
*/
|
|
1440
1383
|
invoice_contact_id?: string | null;
|
|
1441
1384
|
id: number;
|
|
1442
|
-
/**
|
|
1385
|
+
/** Your name for the account. */
|
|
1443
1386
|
name?: string;
|
|
1444
1387
|
/** Fixed when the account was opened. */
|
|
1445
1388
|
currency: string;
|
|
1446
1389
|
status: BillingAccountStatus;
|
|
1447
|
-
/**
|
|
1448
|
-
* How far past the suspension threshold this account may go before its resources are
|
|
1449
|
-
* suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
|
|
1450
|
-
*/
|
|
1390
|
+
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
1451
1391
|
grace_amount?: string;
|
|
1452
|
-
/**
|
|
1453
|
-
* How long this account has to top up after crossing the suspension threshold.
|
|
1454
|
-
* 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
|
|
1455
|
-
*/
|
|
1392
|
+
/** 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. */
|
|
1456
1393
|
grace_period_seconds?: number;
|
|
1457
1394
|
/**
|
|
1458
|
-
*
|
|
1459
|
-
* Null or absent if the account is not closed or its historical close time is unknown.
|
|
1395
|
+
* When the account was closed. Null if it is not closed or the time is unknown.
|
|
1460
1396
|
* @nullable
|
|
1461
1397
|
*/
|
|
1462
1398
|
readonly closed_at?: string | null;
|
|
@@ -1473,7 +1409,7 @@ export interface Currency {
|
|
|
1473
1409
|
*/
|
|
1474
1410
|
code: string;
|
|
1475
1411
|
/**
|
|
1476
|
-
* Decimal places of the
|
|
1412
|
+
* Decimal places of the ISO 4217 minor unit.
|
|
1477
1413
|
* @minimum 0
|
|
1478
1414
|
* @maximum 4
|
|
1479
1415
|
*/
|
|
@@ -1500,7 +1436,7 @@ export interface BillingAccountCreate {
|
|
|
1500
1436
|
}
|
|
1501
1437
|
export interface BillingAccountUpdate {
|
|
1502
1438
|
/**
|
|
1503
|
-
* The active contact used for
|
|
1439
|
+
* The active contact used for invoices, of this account; null clears it.
|
|
1504
1440
|
* @nullable
|
|
1505
1441
|
*/
|
|
1506
1442
|
invoice_contact_id?: string | null;
|
|
@@ -1512,7 +1448,7 @@ export interface BillingAccountList {
|
|
|
1512
1448
|
pagination: OffsetPagination;
|
|
1513
1449
|
}
|
|
1514
1450
|
/**
|
|
1515
|
-
* A plan
|
|
1451
|
+
* A plan referenced by an applicability; active is false once it is archived, and the reference still applies.
|
|
1516
1452
|
*/
|
|
1517
1453
|
export interface ApplicablePlan {
|
|
1518
1454
|
id: string;
|
|
@@ -1520,24 +1456,20 @@ export interface ApplicablePlan {
|
|
|
1520
1456
|
active: boolean;
|
|
1521
1457
|
}
|
|
1522
1458
|
/**
|
|
1523
|
-
* A catalog object inlined for display.
|
|
1459
|
+
* A catalog object, inlined for display.
|
|
1524
1460
|
*/
|
|
1525
1461
|
export interface ObjectIdentity {
|
|
1526
1462
|
lookup_key?: string;
|
|
1527
1463
|
id: string;
|
|
1528
1464
|
name: string;
|
|
1529
1465
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1466
|
+
/**
|
|
1467
|
+
* `per_unit` multiplies a unit amount; `tiered` walks a ladder.
|
|
1468
|
+
*/
|
|
1469
|
+
export type BillingScheme = (typeof BillingScheme)[keyof typeof BillingScheme];
|
|
1470
|
+
export declare const BillingScheme: {
|
|
1532
1471
|
readonly per_unit: "per_unit";
|
|
1533
1472
|
readonly tiered: "tiered";
|
|
1534
|
-
readonly rated: "rated";
|
|
1535
|
-
};
|
|
1536
|
-
export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
|
|
1537
|
-
export declare const PriceOptionType: {
|
|
1538
|
-
readonly postpaid: "postpaid";
|
|
1539
|
-
readonly prepaid: "prepaid";
|
|
1540
|
-
readonly one_time: "one_time";
|
|
1541
1473
|
};
|
|
1542
1474
|
export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
|
|
1543
1475
|
export declare const PriceOptionInterval: {
|
|
@@ -1547,16 +1479,18 @@ export declare const PriceOptionInterval: {
|
|
|
1547
1479
|
readonly year: "year";
|
|
1548
1480
|
};
|
|
1549
1481
|
/**
|
|
1550
|
-
* A price's display terms, including archived prices referenced by an applicability
|
|
1482
|
+
* A price's display terms, including archived prices referenced by an applicability.
|
|
1551
1483
|
*/
|
|
1552
1484
|
export interface PriceOption {
|
|
1553
1485
|
product: Product;
|
|
1554
1486
|
plan: ObjectIdentity;
|
|
1555
|
-
|
|
1487
|
+
/** Absent when the price delegates to a rate card. */
|
|
1488
|
+
billing_scheme?: BillingScheme;
|
|
1556
1489
|
unit_quantity: string;
|
|
1557
1490
|
id: string;
|
|
1558
1491
|
currency: string;
|
|
1559
|
-
type:
|
|
1492
|
+
type: PriceType;
|
|
1493
|
+
usage_type: UsageType;
|
|
1560
1494
|
interval: PriceOptionInterval;
|
|
1561
1495
|
/** How many periods one purchase covers. */
|
|
1562
1496
|
interval_count?: number;
|
|
@@ -1565,11 +1499,7 @@ export interface PriceOption {
|
|
|
1565
1499
|
active: boolean;
|
|
1566
1500
|
}
|
|
1567
1501
|
/**
|
|
1568
|
-
*
|
|
1569
|
-
* zero-charge purchases. It does not mean the account's first purchase; use
|
|
1570
|
-
* `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
|
|
1571
|
-
* configuration or billing-term changes, including changes that increase or decrease
|
|
1572
|
-
* the amount due and changes with no additional charge or refund.
|
|
1502
|
+
* 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.
|
|
1573
1503
|
*/
|
|
1574
1504
|
export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
|
|
1575
1505
|
export declare const PurchaseOperation: {
|
|
@@ -1578,20 +1508,18 @@ export declare const PurchaseOperation: {
|
|
|
1578
1508
|
readonly modify: "modify";
|
|
1579
1509
|
};
|
|
1580
1510
|
/**
|
|
1581
|
-
*
|
|
1582
|
-
* given, subject to the charge type, operation and term conditions. Entries always include their
|
|
1583
|
-
* display fields; archived plans and prices stay listed with active set to false.
|
|
1511
|
+
* 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.
|
|
1584
1512
|
*/
|
|
1585
1513
|
export interface Applicability {
|
|
1586
1514
|
products?: Product[];
|
|
1587
1515
|
plans?: ApplicablePlan[];
|
|
1588
1516
|
prices?: PriceOption[];
|
|
1589
|
-
|
|
1517
|
+
/** The price types covered; empty covers both. */
|
|
1518
|
+
price_types?: PriceType[];
|
|
1519
|
+
/** The usage types covered; empty covers both. */
|
|
1520
|
+
usage_types?: UsageType[];
|
|
1590
1521
|
operations?: PurchaseOperation[];
|
|
1591
|
-
/**
|
|
1592
|
-
* The shortest term a purchase may have, in months. A purchase with no term, such as
|
|
1593
|
-
* metered usage, never qualifies while this is set.
|
|
1594
|
-
*/
|
|
1522
|
+
/** The shortest term a purchase may have, in months. Purchases without a term, such as metered usage, do not qualify while this is set. */
|
|
1595
1523
|
min_term_months?: number;
|
|
1596
1524
|
/** The longest term a purchase may have, in months. */
|
|
1597
1525
|
max_term_months?: number;
|
|
@@ -1600,56 +1528,42 @@ export interface Applicability {
|
|
|
1600
1528
|
excluded_prices?: PriceOption[];
|
|
1601
1529
|
}
|
|
1602
1530
|
export interface CreditGroup {
|
|
1603
|
-
/** What the credit in this group may pay for
|
|
1531
|
+
/** What the credit in this group may pay for; no restrictions means anything on the account. */
|
|
1604
1532
|
applies_to: Applicability;
|
|
1605
1533
|
/** Restricted to your first purchase of anything it applies to. */
|
|
1606
1534
|
first_purchase_only?: boolean;
|
|
1607
1535
|
amount: Money;
|
|
1608
1536
|
}
|
|
1609
1537
|
/**
|
|
1610
|
-
*
|
|
1538
|
+
* Balance, credits and unpaid charges, each reported separately.
|
|
1611
1539
|
*/
|
|
1612
1540
|
export interface AccountBalance {
|
|
1613
1541
|
/** 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. */
|
|
1614
1542
|
available_credit: Money;
|
|
1615
|
-
/** Credit expected to pay unbilled_amount and due
|
|
1543
|
+
/** 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. */
|
|
1616
1544
|
estimated_credit_applied: Money;
|
|
1617
|
-
/** Current estimate of
|
|
1545
|
+
/** Current estimate of priced usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
|
|
1618
1546
|
unbilled_amount: Money;
|
|
1619
1547
|
billing_account_id: number;
|
|
1620
1548
|
currency: string;
|
|
1621
|
-
/**
|
|
1622
|
-
* Prepaid funds in the account currency, excluding credits. May be negative after a payment
|
|
1623
|
-
* dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
|
|
1624
|
-
*/
|
|
1549
|
+
/** 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. */
|
|
1625
1550
|
balance: Money;
|
|
1626
|
-
/**
|
|
1627
|
-
* The recorded remaining credit, including restricted grants. It is not withdrawable
|
|
1628
|
-
* and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
|
|
1629
|
-
* credits balance does not imply that due is zero.
|
|
1630
|
-
*/
|
|
1551
|
+
/** 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. */
|
|
1631
1552
|
credits: Money;
|
|
1632
|
-
/** Currently valid credit
|
|
1553
|
+
/** Currently valid credit restricted to certain products, operations or conditions; part of credits, not of balance. */
|
|
1633
1554
|
restricted_credits: Money;
|
|
1634
|
-
/**
|
|
1635
|
-
* Currently valid, unspent credit grouped by permitted use. Restrictions and
|
|
1636
|
-
* validity dates determine which charges a group can cover, so these groups are not a general
|
|
1637
|
-
* spendable balance and may differ from the recorded credits total.
|
|
1638
|
-
*/
|
|
1555
|
+
/** 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. */
|
|
1639
1556
|
credit_groups: CreditGroup[];
|
|
1640
|
-
/** Amount still payable on issued invoices. The invoice of an order not yet accepted is
|
|
1557
|
+
/** 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. */
|
|
1641
1558
|
due: Money;
|
|
1642
1559
|
pending_returns_amount: Money;
|
|
1643
1560
|
}
|
|
1644
1561
|
/**
|
|
1645
|
-
* A project's assignment to a billing account
|
|
1562
|
+
* A project's assignment to a billing account from effective_from until effective_to; an open assignment has no end.
|
|
1646
1563
|
*/
|
|
1647
1564
|
export interface ProjectAssignment {
|
|
1648
1565
|
project_id: string;
|
|
1649
|
-
/**
|
|
1650
|
-
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
1651
|
-
* details cannot be read at the moment; `project_id` still identifies it.
|
|
1652
|
-
*/
|
|
1566
|
+
/** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
|
|
1653
1567
|
project?: NamedIdentity | null;
|
|
1654
1568
|
billing_account_id: number;
|
|
1655
1569
|
account_name?: string;
|
|
@@ -1666,16 +1580,7 @@ export interface SetProjectAssignmentRequest {
|
|
|
1666
1580
|
billing_account_id: number;
|
|
1667
1581
|
}
|
|
1668
1582
|
/**
|
|
1669
|
-
* `pending` until the payment gateway reaches a result
|
|
1670
|
-
*
|
|
1671
|
-
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
1672
|
-
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
1673
|
-
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1674
|
-
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1675
|
-
* payment.
|
|
1676
|
-
*
|
|
1677
|
-
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1678
|
-
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
1583
|
+
* `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.
|
|
1679
1584
|
*/
|
|
1680
1585
|
export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
|
|
1681
1586
|
export declare const TopUpStatus: {
|
|
@@ -1690,8 +1595,7 @@ export interface AccountIdentity {
|
|
|
1690
1595
|
currency: string;
|
|
1691
1596
|
}
|
|
1692
1597
|
/**
|
|
1693
|
-
* Why a gateway payment was withdrawn
|
|
1694
|
-
* allowed for payment. `requested_by_customer` means the customer canceled it.
|
|
1598
|
+
* Why a gateway payment was withdrawn: `abandoned` when the customer did not complete it in time, `requested_by_customer` when the customer canceled it.
|
|
1695
1599
|
*/
|
|
1696
1600
|
export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
|
|
1697
1601
|
export declare const PaymentCancellationReason: {
|
|
@@ -1705,83 +1609,55 @@ export declare const PaymentActionType: {
|
|
|
1705
1609
|
readonly sdk: "sdk";
|
|
1706
1610
|
};
|
|
1707
1611
|
/**
|
|
1708
|
-
* The customer's next
|
|
1612
|
+
* The customer's next step; the payment outcome is reported separately.
|
|
1709
1613
|
*/
|
|
1710
1614
|
export interface PaymentAction {
|
|
1711
1615
|
type: PaymentActionType;
|
|
1712
|
-
/**
|
|
1616
|
+
/** The browser adapter for the action, for example stripe. */
|
|
1713
1617
|
provider?: string;
|
|
1714
1618
|
url?: string;
|
|
1715
|
-
/** QR content to render
|
|
1619
|
+
/** QR content to render, not an image URL. */
|
|
1716
1620
|
qr_code?: string;
|
|
1717
|
-
/** Short-lived client credential for this payment
|
|
1621
|
+
/** Short-lived client credential for confirming this payment in the browser. */
|
|
1718
1622
|
client_secret?: string;
|
|
1719
1623
|
public_key?: string;
|
|
1720
1624
|
}
|
|
1721
1625
|
/**
|
|
1722
|
-
* A top-up attempt and its outcome. A successful top-up adds
|
|
1626
|
+
* 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.
|
|
1723
1627
|
*/
|
|
1724
1628
|
export interface TopUp {
|
|
1725
1629
|
id: string;
|
|
1726
1630
|
billing_account_id: number;
|
|
1727
1631
|
account: AccountIdentity;
|
|
1728
|
-
/** What is credited to the account, in
|
|
1632
|
+
/** What is credited to the account, in its currency. */
|
|
1729
1633
|
amount: Money;
|
|
1730
1634
|
currency: string;
|
|
1731
|
-
/**
|
|
1732
|
-
* The part of this top-up still held in the balance. Pending refunds can temporarily
|
|
1733
|
-
* reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
|
|
1734
|
-
*/
|
|
1635
|
+
/** 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. */
|
|
1735
1636
|
remaining_amount?: Money;
|
|
1736
|
-
/**
|
|
1737
|
-
* `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
|
|
1738
|
-
*
|
|
1739
|
-
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
1740
|
-
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
1741
|
-
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
1742
|
-
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
1743
|
-
* payment.
|
|
1744
|
-
*
|
|
1745
|
-
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
1746
|
-
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
1747
|
-
*/
|
|
1637
|
+
/** `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. */
|
|
1748
1638
|
status: TopUpStatus;
|
|
1749
1639
|
cancellation_reason?: PaymentCancellationReason;
|
|
1750
1640
|
/** Which payment gateway collected it. */
|
|
1751
1641
|
payment_gateway?: string;
|
|
1752
1642
|
/** The selected payment method, such as card, wechat_pay or alipay. */
|
|
1753
1643
|
method_type?: string;
|
|
1754
|
-
/**
|
|
1755
|
-
* The currency the customer was actually charged in, when the checkout page collected a
|
|
1756
|
-
* local one. Absent when it was the same as the account's.
|
|
1757
|
-
*/
|
|
1644
|
+
/** The currency the customer was charged in when the checkout collected a local currency; absent when it is the account's. */
|
|
1758
1645
|
presentment_currency?: string;
|
|
1759
|
-
/**
|
|
1760
|
-
* What was charged, in `presentment_currency`. It will not equal `amount`, and it is
|
|
1761
|
-
* the figure that appears on the customer's card or wallet statement.
|
|
1762
|
-
*/
|
|
1646
|
+
/** The amount charged in `presentment_currency`, as shown on the customer's statement. */
|
|
1763
1647
|
presentment_amount?: Money;
|
|
1764
|
-
/**
|
|
1765
|
-
* Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
|
|
1766
|
-
* passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
|
|
1767
|
-
* such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
|
|
1768
|
-
* such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
|
|
1769
|
-
* to their own wording and treat an unknown value as a generic decline.
|
|
1770
|
-
*/
|
|
1648
|
+
/** 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. */
|
|
1771
1649
|
failure_reason?: string;
|
|
1772
1650
|
action?: PaymentAction;
|
|
1773
1651
|
created_at: string;
|
|
1774
1652
|
/**
|
|
1775
|
-
* When the funds arrived
|
|
1776
|
-
* reconciling against a statement uses this rather than the moment it was started.
|
|
1777
|
-
* Absent until the payment completes.
|
|
1653
|
+
* When the funds arrived, possibly days after `created_at`. Absent until the payment completes.
|
|
1778
1654
|
* @nullable
|
|
1779
1655
|
*/
|
|
1780
1656
|
settled_at?: string | null;
|
|
1781
1657
|
}
|
|
1782
1658
|
export interface TopUpCreate {
|
|
1783
1659
|
/**
|
|
1784
|
-
* The gateway
|
|
1660
|
+
* The gateway selected from the available payment options.
|
|
1785
1661
|
* @minLength 1
|
|
1786
1662
|
* @maxLength 32
|
|
1787
1663
|
*/
|
|
@@ -1792,21 +1668,12 @@ export interface TopUpCreate {
|
|
|
1792
1668
|
* @maxLength 64
|
|
1793
1669
|
*/
|
|
1794
1670
|
method_type: string;
|
|
1795
|
-
/** The
|
|
1671
|
+
/** The top-up ID, chosen by the caller. Read it after an uncertain response. */
|
|
1796
1672
|
id: string;
|
|
1797
1673
|
billing_account_id: number;
|
|
1798
|
-
/**
|
|
1799
|
-
* In the account's currency, and no finer than that currency's smallest unit:
|
|
1800
|
-
* two decimals for most, none for the yen. A finer amount is refused here rather
|
|
1801
|
-
* than at the checkout page, where the customer would see the gateway's own wording
|
|
1802
|
-
* instead of an explanation.
|
|
1803
|
-
*
|
|
1804
|
-
* There is a minimum, which differs by currency. Below it the gateway's fee
|
|
1805
|
-
* exceeds the top-up itself, so such a payment costs more to accept than it brings.
|
|
1806
|
-
* The minimum in force is returned with the rejection.
|
|
1807
|
-
*/
|
|
1674
|
+
/** 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. */
|
|
1808
1675
|
amount: Money & string;
|
|
1809
|
-
/** Charge a saved method instead of opening a checkout page. */
|
|
1676
|
+
/** Charge a saved payment method instead of opening a checkout page. */
|
|
1810
1677
|
payment_method_id?: string;
|
|
1811
1678
|
/** Where to send the customer after checkout. */
|
|
1812
1679
|
return_url?: string;
|
|
@@ -1818,14 +1685,11 @@ export interface TopUpList {
|
|
|
1818
1685
|
export interface PaymentOptionMethod {
|
|
1819
1686
|
/** The value to send as `method_type`, such as card, wechat_pay or alipay. */
|
|
1820
1687
|
method_type: string;
|
|
1821
|
-
/**
|
|
1822
|
-
* Whether a method of this type can be saved with create-payment-method-setup and charged later
|
|
1823
|
-
* without the customer present. Methods that are not reusable are paid anew each time.
|
|
1824
|
-
*/
|
|
1688
|
+
/** Whether this method type can be saved with create-payment-method-setup and charged later without the customer. */
|
|
1825
1689
|
reusable: boolean;
|
|
1826
1690
|
}
|
|
1827
1691
|
/**
|
|
1828
|
-
* A
|
|
1692
|
+
* A gateway accepting the account's currency, with its payment methods.
|
|
1829
1693
|
*/
|
|
1830
1694
|
export interface PaymentOption {
|
|
1831
1695
|
/** The value to send as `payment_gateway`. */
|
|
@@ -1869,15 +1733,10 @@ export interface PaymentMethodSetup {
|
|
|
1869
1733
|
billing_account_id: number;
|
|
1870
1734
|
}
|
|
1871
1735
|
/**
|
|
1872
|
-
* What the payment gateway's browser library needs
|
|
1873
|
-
* no address to redirect to: the form is rendered in the page, and the card goes straight
|
|
1874
|
-
* from the browser to the gateway.
|
|
1736
|
+
* 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.
|
|
1875
1737
|
*/
|
|
1876
1738
|
export interface PaymentMethodSetupResult {
|
|
1877
|
-
/**
|
|
1878
|
-
* The gateway's identifier for this attempt. Use it to tell a reloaded page apart
|
|
1879
|
-
* from a second attempt.
|
|
1880
|
-
*/
|
|
1739
|
+
/** The gateway's identifier for this attempt. */
|
|
1881
1740
|
setup_id: string;
|
|
1882
1741
|
payment_gateway: string;
|
|
1883
1742
|
action: PaymentAction;
|
|
@@ -1893,7 +1752,7 @@ export interface PaymentMethodSetupResult {
|
|
|
1893
1752
|
*/
|
|
1894
1753
|
export interface PayInvoiceRequest {
|
|
1895
1754
|
/**
|
|
1896
|
-
* Required to collect an online remainder. An existing attempt keeps its
|
|
1755
|
+
* Required to collect an online remainder. An existing attempt keeps its gateway.
|
|
1897
1756
|
* @minLength 1
|
|
1898
1757
|
* @maxLength 32
|
|
1899
1758
|
*/
|
|
@@ -1904,51 +1763,35 @@ export interface PayInvoiceRequest {
|
|
|
1904
1763
|
* @maxLength 64
|
|
1905
1764
|
*/
|
|
1906
1765
|
method_type?: string;
|
|
1907
|
-
/**
|
|
1766
|
+
/** A saved card of this billing account at the selected gateway. Omit to pay interactively. */
|
|
1908
1767
|
payment_method_id?: string;
|
|
1909
|
-
/** Whether to apply the
|
|
1768
|
+
/** Whether to apply the balance; credit grants are controlled by use_credits. */
|
|
1910
1769
|
use_balance?: boolean;
|
|
1911
|
-
/** Apply eligible, unexpired credit grants before
|
|
1770
|
+
/** Apply eligible, unexpired credit grants before the balance. Grants are never converted into balance. */
|
|
1912
1771
|
use_credits?: boolean;
|
|
1913
1772
|
return_url?: string;
|
|
1914
1773
|
/**
|
|
1915
|
-
* The code to apply while the order's terms are not
|
|
1916
|
-
* account discount, or to keep the discount already recorded.
|
|
1774
|
+
* 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.
|
|
1917
1775
|
* @minLength 1
|
|
1918
1776
|
* @maxLength 64
|
|
1919
1777
|
*/
|
|
1920
1778
|
promotion_code?: string;
|
|
1921
|
-
/**
|
|
1922
|
-
* The invoice total to expect, after discounts and tax and before credit grants or balance, as the
|
|
1923
|
-
* payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
|
|
1924
|
-
* and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
|
|
1925
|
-
*/
|
|
1779
|
+
/** 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. */
|
|
1926
1780
|
expected_amount?: Money & string;
|
|
1927
1781
|
}
|
|
1928
1782
|
/**
|
|
1929
|
-
* Name at least one invoice or order.
|
|
1930
|
-
* its currency; anything else is refused rather than partly paid.
|
|
1783
|
+
* Name at least one invoice or order. All must belong to one account in its currency.
|
|
1931
1784
|
*/
|
|
1932
1785
|
export interface PayTogetherRequest {
|
|
1933
1786
|
/** @maxItems 100 */
|
|
1934
1787
|
invoice_ids?: string[];
|
|
1935
1788
|
/** @maxItems 100 */
|
|
1936
1789
|
order_ids?: string[];
|
|
1937
|
-
/**
|
|
1938
|
-
* The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
|
|
1939
|
-
* gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
|
|
1940
|
-
* the comparison.
|
|
1941
|
-
*/
|
|
1790
|
+
/** 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. */
|
|
1942
1791
|
expected_amount?: Money & string;
|
|
1943
1792
|
}
|
|
1944
1793
|
/**
|
|
1945
|
-
*
|
|
1946
|
-
*
|
|
1947
|
-
* succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
|
|
1948
|
-
* order rather than submitting another payment. requires_action means the customer must complete the
|
|
1949
|
-
* supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
|
|
1950
|
-
* declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
|
|
1951
|
-
* same or another method.
|
|
1794
|
+
* `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.
|
|
1952
1795
|
*/
|
|
1953
1796
|
export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
|
|
1954
1797
|
export declare const PaymentStatus: {
|
|
@@ -1974,7 +1817,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1974
1817
|
balance_applied: Money;
|
|
1975
1818
|
}
|
|
1976
1819
|
/**
|
|
1977
|
-
* What paying would take,
|
|
1820
|
+
* What paying would take, calculated as paying does. Nothing is charged or reserved.
|
|
1978
1821
|
*/
|
|
1979
1822
|
export interface PaymentPreview {
|
|
1980
1823
|
funds?: Funds;
|
|
@@ -1983,23 +1826,19 @@ export interface PaymentPreview {
|
|
|
1983
1826
|
amount_due: Money;
|
|
1984
1827
|
/** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
|
|
1985
1828
|
credit_applied: Money;
|
|
1986
|
-
/** The credit grants that would pay, in the order
|
|
1829
|
+
/** The credit grants that would pay, in the order used. */
|
|
1987
1830
|
credit_grants: AppliedCredit[];
|
|
1988
1831
|
/** What the balance would pay. */
|
|
1989
1832
|
balance_applied: Money;
|
|
1990
|
-
/** What would remain to
|
|
1833
|
+
/** What would remain to pay online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
|
|
1991
1834
|
gateway_amount: Money;
|
|
1992
1835
|
/** The available balance after paying. */
|
|
1993
1836
|
balance_after: Money;
|
|
1994
|
-
/** Paying together only
|
|
1837
|
+
/** Paying together only: each invoice, in payment order. */
|
|
1995
1838
|
invoices?: PaymentPreviewInvoice[];
|
|
1996
1839
|
}
|
|
1997
1840
|
/**
|
|
1998
|
-
* Present on refunds
|
|
1999
|
-
*
|
|
2000
|
-
* - `balance`: back to the account balance.
|
|
2001
|
-
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
2002
|
-
* - `gateway`: back to the payment method it was paid with.
|
|
1841
|
+
* 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.
|
|
2003
1842
|
*/
|
|
2004
1843
|
export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
|
|
2005
1844
|
export declare const TransactionRefundDestination: {
|
|
@@ -2008,9 +1847,7 @@ export declare const TransactionRefundDestination: {
|
|
|
2008
1847
|
readonly gateway: "gateway";
|
|
2009
1848
|
};
|
|
2010
1849
|
/**
|
|
2011
|
-
* `failed
|
|
2012
|
-
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
2013
|
-
* an invoice the payment was meant to pay remains open for another payment.
|
|
1850
|
+
* `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.
|
|
2014
1851
|
*/
|
|
2015
1852
|
export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
|
|
2016
1853
|
export declare const TransactionStatus: {
|
|
@@ -2031,7 +1868,7 @@ export declare const TransactionType: {
|
|
|
2031
1868
|
readonly fee: "fee";
|
|
2032
1869
|
};
|
|
2033
1870
|
/**
|
|
2034
|
-
* A funds
|
|
1871
|
+
* A funds movement with one source. Refunds name the original transaction. Unknown gateway results stay pending.
|
|
2035
1872
|
*/
|
|
2036
1873
|
export interface Transaction {
|
|
2037
1874
|
invoice_id?: string;
|
|
@@ -2040,47 +1877,22 @@ export interface Transaction {
|
|
|
2040
1877
|
credit_grant_id?: string;
|
|
2041
1878
|
credit_grant?: ObjectIdentity;
|
|
2042
1879
|
refund_id?: string;
|
|
2043
|
-
/**
|
|
2044
|
-
* Present on refunds. Where this part of the refund goes.
|
|
2045
|
-
*
|
|
2046
|
-
* - `balance`: back to the account balance.
|
|
2047
|
-
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
2048
|
-
* - `gateway`: back to the payment method it was paid with.
|
|
2049
|
-
*/
|
|
1880
|
+
/** 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. */
|
|
2050
1881
|
refund_destination?: TransactionRefundDestination;
|
|
2051
|
-
/**
|
|
2052
|
-
* `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
2053
|
-
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
2054
|
-
* an invoice the payment was meant to pay remains open for another payment.
|
|
2055
|
-
*/
|
|
1882
|
+
/** `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. */
|
|
2056
1883
|
status?: TransactionStatus;
|
|
2057
1884
|
cancellation_reason?: PaymentCancellationReason;
|
|
2058
1885
|
payment_gateway?: string;
|
|
2059
1886
|
method_type?: string;
|
|
2060
|
-
/**
|
|
2061
|
-
* Why it failed. Present with `failed`. For a declined gateway payment the value is the
|
|
2062
|
-
* gateway's own code, passed on unchanged: the card issuer's decline code when there is one
|
|
2063
|
-
* (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
|
|
2064
|
-
* error code (Stripe's code, such as card_declined, expired_card or
|
|
2065
|
-
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
2066
|
-
* unknown value as a generic decline.
|
|
2067
|
-
*/
|
|
1887
|
+
/** 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. */
|
|
2068
1888
|
failure_reason?: string;
|
|
2069
1889
|
settled_at?: string;
|
|
2070
1890
|
id: string;
|
|
2071
1891
|
billing_account_id?: number;
|
|
2072
1892
|
type: TransactionType;
|
|
2073
|
-
/**
|
|
2074
|
-
* Signed by type: positive for `topup` and `payment`, negative for `refund`.
|
|
2075
|
-
* An `adjustment` is positive when it adds to the balance and negative when it takes from
|
|
2076
|
-
* it. For the other types the sign does not tell the effect on the balance: a payment from
|
|
2077
|
-
* the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
|
|
2078
|
-
*/
|
|
1893
|
+
/** 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. */
|
|
2079
1894
|
amount: Money;
|
|
2080
|
-
/**
|
|
2081
|
-
* How much of this transaction is still available in the balance. Only top-ups, positive
|
|
2082
|
-
* adjustments and gateway payments later returned to the balance can be non-zero.
|
|
2083
|
-
*/
|
|
1895
|
+
/** 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. */
|
|
2084
1896
|
remaining_amount: Money;
|
|
2085
1897
|
currency: string;
|
|
2086
1898
|
reason?: string;
|
|
@@ -2088,49 +1900,31 @@ export interface Transaction {
|
|
|
2088
1900
|
}
|
|
2089
1901
|
export interface PaymentResult {
|
|
2090
1902
|
transactions: Transaction[];
|
|
2091
|
-
/** The gateway transaction, when one is involved.
|
|
1903
|
+
/** The gateway transaction, when one is involved. */
|
|
2092
1904
|
transaction_id?: string;
|
|
2093
1905
|
status: PaymentStatus;
|
|
2094
1906
|
amount_paid: Money;
|
|
2095
|
-
/**
|
|
2096
|
-
* What is still outstanding. Zero once the payment succeeds. Unchanged while
|
|
2097
|
-
* `processing`: nothing is collected until the gateway confirms it.
|
|
2098
|
-
*/
|
|
1907
|
+
/** What is still outstanding: zero once the payment succeeds, unchanged while `processing`. */
|
|
2099
1908
|
amount_due: Money;
|
|
2100
1909
|
currency: string;
|
|
2101
1910
|
credit_applied?: Money;
|
|
2102
1911
|
gateway_amount?: Money;
|
|
2103
1912
|
payment_gateway?: string;
|
|
2104
1913
|
method_type?: string;
|
|
2105
|
-
/**
|
|
2106
|
-
* The amount already paid from the account's balance toward this invoice. Retrying an online remainder
|
|
2107
|
-
* does not debit it again. A canceled purchase returns funds through its refund process.
|
|
2108
|
-
*/
|
|
1914
|
+
/** The amount already paid from balance toward this invoice; retrying the online remainder does not debit it again. */
|
|
2109
1915
|
balance_applied?: Money;
|
|
2110
1916
|
action?: PaymentAction;
|
|
2111
|
-
/**
|
|
2112
|
-
* Whether paying again is worth attempting. False for a refusal that will keep
|
|
2113
|
-
* happening — a closed account, an amount over a limit — so that a client does not
|
|
2114
|
-
* retry in a loop.
|
|
2115
|
-
*/
|
|
1917
|
+
/** Whether paying again can succeed. False for a refusal that will repeat, such as a closed account or an amount over a limit. */
|
|
2116
1918
|
retriable?: boolean;
|
|
2117
1919
|
/** @nullable */
|
|
2118
1920
|
invoice_id?: string | null;
|
|
2119
1921
|
/** @nullable */
|
|
2120
1922
|
order_id?: string | null;
|
|
2121
|
-
/**
|
|
2122
|
-
* Why the payment did not go through. Present with `failed`. For a declined gateway payment the
|
|
2123
|
-
* value is the gateway's own code, passed on unchanged: the card issuer's decline code when
|
|
2124
|
-
* there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
|
|
2125
|
-
* gateway's error code (Stripe's code, such as card_declined, expired_card or
|
|
2126
|
-
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
2127
|
-
* unknown value as a generic decline.
|
|
2128
|
-
*/
|
|
1923
|
+
/** 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. */
|
|
2129
1924
|
failure_reason?: string;
|
|
2130
1925
|
}
|
|
2131
1926
|
/**
|
|
2132
|
-
* How tax applied to the customer when the invoice was issued
|
|
2133
|
-
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1927
|
+
* How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism.
|
|
2134
1928
|
*/
|
|
2135
1929
|
export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
|
|
2136
1930
|
export declare const InvoiceCustomerTaxExempt: {
|
|
@@ -2153,7 +1947,7 @@ export interface TaxItem {
|
|
|
2153
1947
|
currency: string;
|
|
2154
1948
|
}
|
|
2155
1949
|
export interface Invoice {
|
|
2156
|
-
/** Collection has
|
|
1950
|
+
/** Collection has stopped; accepted return obligations are completed. */
|
|
2157
1951
|
void_requested_at?: string;
|
|
2158
1952
|
due_at?: string;
|
|
2159
1953
|
amount_refunded?: string;
|
|
@@ -2173,16 +1967,16 @@ export interface Invoice {
|
|
|
2173
1967
|
/** Sum of the line discounts, taken off before tax. */
|
|
2174
1968
|
discount_amount?: Money;
|
|
2175
1969
|
tax_amount?: Money;
|
|
2176
|
-
/** Successful credit-grant payments included in amount_paid
|
|
1970
|
+
/** Successful credit-grant payments, included in amount_paid; they do not reduce the receivable or tax base. */
|
|
2177
1971
|
credit_applied?: Money;
|
|
2178
|
-
/** Subtotal less discount plus tax. Balance and credit grants
|
|
1972
|
+
/** Subtotal less discount plus tax. Balance and credit grants pay it; they do not reduce it. */
|
|
2179
1973
|
total: Money;
|
|
2180
1974
|
amount_paid?: Money;
|
|
2181
|
-
/** Issued
|
|
1975
|
+
/** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
|
|
2182
1976
|
pre_payment_credit_notes_amount: Money;
|
|
2183
|
-
/** Issued credit notes against payments already received
|
|
1977
|
+
/** Issued credit notes against payments already received; their refunds may not have completed. */
|
|
2184
1978
|
post_payment_credit_notes_amount: Money;
|
|
2185
|
-
/** What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
1979
|
+
/** 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. */
|
|
2186
1980
|
amount_due: Money;
|
|
2187
1981
|
/** @nullable */
|
|
2188
1982
|
period_start?: string | null;
|
|
@@ -2191,17 +1985,11 @@ export interface Invoice {
|
|
|
2191
1985
|
* @nullable
|
|
2192
1986
|
*/
|
|
2193
1987
|
period_end?: string | null;
|
|
2194
|
-
/**
|
|
2195
|
-
* Who this was billed to, as recorded when the invoice was issued. Later changes to
|
|
2196
|
-
* the account do not alter it.
|
|
2197
|
-
*/
|
|
1988
|
+
/** The billing details recorded when the invoice was issued. */
|
|
2198
1989
|
customer_name?: string;
|
|
2199
1990
|
customer_email?: string;
|
|
2200
1991
|
customer_tax_id?: string;
|
|
2201
|
-
/**
|
|
2202
|
-
* How tax applied to the customer when the invoice was issued. `reverse` means no tax was
|
|
2203
|
-
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
2204
|
-
*/
|
|
1992
|
+
/** How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism. */
|
|
2205
1993
|
customer_tax_exempt?: InvoiceCustomerTaxExempt;
|
|
2206
1994
|
customer_address_line1?: string;
|
|
2207
1995
|
customer_address_line2?: string;
|
|
@@ -2224,13 +2012,19 @@ export declare const InvoiceItemType: {
|
|
|
2224
2012
|
readonly setup: "setup";
|
|
2225
2013
|
readonly adjustment: "adjustment";
|
|
2226
2014
|
};
|
|
2015
|
+
/**
|
|
2016
|
+
* For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines.
|
|
2017
|
+
*/
|
|
2018
|
+
export type InvoiceItemDimensions = {
|
|
2019
|
+
[key: string]: string;
|
|
2020
|
+
};
|
|
2227
2021
|
/**
|
|
2228
2022
|
* The value of one paid period moved to the new configuration of a subscription.
|
|
2229
2023
|
*/
|
|
2230
2024
|
export interface InvoiceItemProration {
|
|
2231
2025
|
/** The earlier invoice line that paid for the period. */
|
|
2232
2026
|
credited_invoice_item_id: string;
|
|
2233
|
-
/** The
|
|
2027
|
+
/** The earlier invoice line's wording as recorded. */
|
|
2234
2028
|
description: string;
|
|
2235
2029
|
period_start: string;
|
|
2236
2030
|
/** Exclusive. */
|
|
@@ -2262,17 +2056,10 @@ export interface InvoiceItem {
|
|
|
2262
2056
|
type?: InvoiceItemType;
|
|
2263
2057
|
/** @nullable */
|
|
2264
2058
|
project_id?: string | null;
|
|
2265
|
-
/**
|
|
2266
|
-
* The project the charge was for and its current name, for display. Absent when the line is
|
|
2267
|
-
* not for a project, and when the project no longer exists or its details cannot be read at
|
|
2268
|
-
* the moment; `project_id` still identifies it then.
|
|
2269
|
-
*/
|
|
2059
|
+
/** 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. */
|
|
2270
2060
|
project?: NamedIdentity | null;
|
|
2271
2061
|
resource_id?: string;
|
|
2272
|
-
/**
|
|
2273
|
-
* The wording as recorded when the invoice was issued. It is not re-translated
|
|
2274
|
-
* afterwards, so that an invoice continues to read as it did when it was sent.
|
|
2275
|
-
*/
|
|
2062
|
+
/** The line's wording as recorded when the invoice was issued. */
|
|
2276
2063
|
description: string;
|
|
2277
2064
|
unit?: string;
|
|
2278
2065
|
quantity?: string;
|
|
@@ -2285,6 +2072,8 @@ export interface InvoiceItem {
|
|
|
2285
2072
|
period_start?: string | null;
|
|
2286
2073
|
/** @nullable */
|
|
2287
2074
|
period_end?: string | null;
|
|
2075
|
+
/** For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines. */
|
|
2076
|
+
dimensions?: InvoiceItemDimensions;
|
|
2288
2077
|
/**
|
|
2289
2078
|
* Present on a line that changes a subscription immediately, one entry for each paid period it
|
|
2290
2079
|
* covers. `amount` is the sum of `remaining_amount` minus `credited_amount` over the entries.
|
|
@@ -2333,9 +2122,7 @@ export declare const CreditNoteStatus: {
|
|
|
2333
2122
|
readonly void: "void";
|
|
2334
2123
|
};
|
|
2335
2124
|
/**
|
|
2336
|
-
* Why the note was issued. Notes
|
|
2337
|
-
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
2338
|
-
* issued by Leaflow on request.
|
|
2125
|
+
* 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.
|
|
2339
2126
|
*/
|
|
2340
2127
|
export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
|
|
2341
2128
|
export declare const CreditNoteReason: {
|
|
@@ -2349,7 +2136,7 @@ export declare const CreditNoteReason: {
|
|
|
2349
2136
|
readonly operator: "operator";
|
|
2350
2137
|
};
|
|
2351
2138
|
/**
|
|
2352
|
-
*
|
|
2139
|
+
* 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.
|
|
2353
2140
|
*/
|
|
2354
2141
|
export interface CreditNote {
|
|
2355
2142
|
id: string;
|
|
@@ -2364,18 +2151,14 @@ export interface CreditNote {
|
|
|
2364
2151
|
voided_at: string | null;
|
|
2365
2152
|
/** The reduction of unpaid receivables. A void note no longer reduces what is due. */
|
|
2366
2153
|
pre_payment_amount: Money;
|
|
2367
|
-
/** The credited part of payments already received
|
|
2154
|
+
/** The credited part of payments already received; its refund may not have completed. */
|
|
2368
2155
|
post_payment_amount: Money;
|
|
2369
2156
|
/**
|
|
2370
|
-
* The refund to the original payment sources
|
|
2157
|
+
* The refund to the original payment sources; null when no paid amount was credited.
|
|
2371
2158
|
* @nullable
|
|
2372
2159
|
*/
|
|
2373
2160
|
refund_id: string | null;
|
|
2374
|
-
/**
|
|
2375
|
-
* Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
|
|
2376
|
-
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
2377
|
-
* issued by Leaflow on request.
|
|
2378
|
-
*/
|
|
2161
|
+
/** 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. */
|
|
2379
2162
|
reason: CreditNoteReason;
|
|
2380
2163
|
}
|
|
2381
2164
|
export interface CreditNoteItem {
|
|
@@ -2394,7 +2177,7 @@ export interface CreditNoteItemList {
|
|
|
2394
2177
|
pagination: OffsetPagination;
|
|
2395
2178
|
}
|
|
2396
2179
|
/**
|
|
2397
|
-
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between
|
|
2180
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
|
|
2398
2181
|
* @deprecated
|
|
2399
2182
|
*/
|
|
2400
2183
|
export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
|
|
@@ -2422,22 +2205,19 @@ export declare const RefundStatus: {
|
|
|
2422
2205
|
readonly failed: "failed";
|
|
2423
2206
|
};
|
|
2424
2207
|
/**
|
|
2425
|
-
* Why the refund was made.
|
|
2426
|
-
* treat an unknown code as a refund without a stated reason.
|
|
2208
|
+
* Why the refund was made. New codes may be added; treat an unknown code as unspecified.
|
|
2427
2209
|
*
|
|
2428
2210
|
* - `provisioning_failed`: the purchase could not be delivered.
|
|
2429
|
-
* - `order_expired`: the order expired after part of it
|
|
2430
|
-
* - `order_canceled`: the
|
|
2431
|
-
* - `change_canceled`: a scheduled change was withdrawn after part of it
|
|
2432
|
-
* - `change_expired`: a scheduled change could not take effect
|
|
2433
|
-
* - `subscription_canceled`: the
|
|
2434
|
-
*
|
|
2435
|
-
* - `
|
|
2436
|
-
*
|
|
2437
|
-
*
|
|
2438
|
-
*
|
|
2439
|
-
* zero or less.
|
|
2440
|
-
* - `usage_true_up`: usage priced again over the whole month cost less than was charged.
|
|
2211
|
+
* - `order_expired`: the order expired after part of it was paid.
|
|
2212
|
+
* - `order_canceled`: the order was canceled after part of it was paid.
|
|
2213
|
+
* - `change_canceled`: a scheduled change was withdrawn after part of it was paid.
|
|
2214
|
+
* - `change_expired`: a scheduled change could not take effect in time.
|
|
2215
|
+
* - `subscription_canceled`: the unused value of a canceled subscription, under its refund terms.
|
|
2216
|
+
* - `future_period_canceled`: a renewal that had not started was withdrawn.
|
|
2217
|
+
* - `downgrade_difference`: after a downgrade, the remaining paid value, valued as refund policy `prorated`
|
|
2218
|
+
* describes, minus the new configuration's cost for the remaining time at the change item's
|
|
2219
|
+
* `refund_monthly_amount` and `refund_hourly_amount`.
|
|
2220
|
+
* - `usage_true_up`: usage priced over the whole month cost less than was charged.
|
|
2441
2221
|
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
2442
2222
|
* - `operator`: made by the platform operator.
|
|
2443
2223
|
*/
|
|
@@ -2458,15 +2238,14 @@ export declare const RefundReason: {
|
|
|
2458
2238
|
export interface Refund {
|
|
2459
2239
|
transaction_id?: string;
|
|
2460
2240
|
cancellation_item_id?: string;
|
|
2461
|
-
/**
|
|
2241
|
+
/** The refund split by original payment source, with each result. Unknown gateway results stay pending. */
|
|
2462
2242
|
transactions: Transaction[];
|
|
2463
2243
|
id: string;
|
|
2464
2244
|
billing_account_id?: number;
|
|
2465
2245
|
/** @nullable */
|
|
2466
2246
|
invoice_id?: string | null;
|
|
2467
2247
|
/**
|
|
2468
|
-
* The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
|
|
2469
|
-
* the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
|
|
2248
|
+
* 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.
|
|
2470
2249
|
* @nullable
|
|
2471
2250
|
*/
|
|
2472
2251
|
order_id?: string | null;
|
|
@@ -2482,7 +2261,7 @@ export interface Refund {
|
|
|
2482
2261
|
settled_amount?: Money;
|
|
2483
2262
|
currency: string;
|
|
2484
2263
|
/**
|
|
2485
|
-
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between
|
|
2264
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
|
|
2486
2265
|
* @deprecated
|
|
2487
2266
|
*/
|
|
2488
2267
|
destination?: RefundDestination;
|
|
@@ -2509,7 +2288,7 @@ export interface RefundList {
|
|
|
2509
2288
|
pagination: OffsetPagination;
|
|
2510
2289
|
}
|
|
2511
2290
|
/**
|
|
2512
|
-
* The
|
|
2291
|
+
* The dimension values the rate was matched by, such as region and machine type.
|
|
2513
2292
|
*/
|
|
2514
2293
|
export type UsageChargeDimensions = {
|
|
2515
2294
|
[key: string]: string;
|
|
@@ -2518,26 +2297,23 @@ export interface UsageCharge {
|
|
|
2518
2297
|
subscription_id: string;
|
|
2519
2298
|
id: string;
|
|
2520
2299
|
project_id?: string;
|
|
2521
|
-
/**
|
|
2522
|
-
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
2523
|
-
* details cannot be read at the moment; `project_id` still identifies it.
|
|
2524
|
-
*/
|
|
2300
|
+
/** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
|
|
2525
2301
|
project?: NamedIdentity | null;
|
|
2526
2302
|
product: Product;
|
|
2527
2303
|
/** Which resource this was charged for. Empty for charges not tied to one. */
|
|
2528
2304
|
resource_id?: string;
|
|
2529
2305
|
meter: ObjectIdentity;
|
|
2530
2306
|
unit?: string;
|
|
2531
|
-
/** The
|
|
2307
|
+
/** The dimension values the rate was matched by, such as region and machine type. */
|
|
2532
2308
|
dimensions?: UsageChargeDimensions;
|
|
2533
2309
|
window_start: string;
|
|
2534
2310
|
/** Exclusive. */
|
|
2535
2311
|
window_end: string;
|
|
2536
|
-
/**
|
|
2312
|
+
/** Quantity used before allowances. */
|
|
2537
2313
|
gross_quantity?: string;
|
|
2538
2314
|
/** How much of that was covered by an allowance. */
|
|
2539
2315
|
deducted_quantity?: string;
|
|
2540
|
-
/**
|
|
2316
|
+
/** The quantity charged: gross quantity less the part covered by allowances. */
|
|
2541
2317
|
quantity: string;
|
|
2542
2318
|
unit_amount?: Money;
|
|
2543
2319
|
amount: Money;
|
|
@@ -2559,12 +2335,6 @@ export interface UsageChargeList {
|
|
|
2559
2335
|
items: UsageCharge[];
|
|
2560
2336
|
pagination: OffsetPagination;
|
|
2561
2337
|
}
|
|
2562
|
-
export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
|
|
2563
|
-
export declare const SubscriptionChargeType: {
|
|
2564
|
-
readonly postpaid: "postpaid";
|
|
2565
|
-
readonly prepaid: "prepaid";
|
|
2566
|
-
readonly one_time: "one_time";
|
|
2567
|
-
};
|
|
2568
2338
|
export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
|
|
2569
2339
|
export declare const SubscriptionInterval: {
|
|
2570
2340
|
readonly none: "none";
|
|
@@ -2573,7 +2343,7 @@ export declare const SubscriptionInterval: {
|
|
|
2573
2343
|
readonly year: "year";
|
|
2574
2344
|
};
|
|
2575
2345
|
/**
|
|
2576
|
-
* An operation
|
|
2346
|
+
* 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.
|
|
2577
2347
|
*/
|
|
2578
2348
|
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
2579
2349
|
export declare const SubscriptionRestriction: {
|
|
@@ -2584,13 +2354,7 @@ export declare const SubscriptionRestriction: {
|
|
|
2584
2354
|
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
2585
2355
|
};
|
|
2586
2356
|
/**
|
|
2587
|
-
* Follows the items. `pending
|
|
2588
|
-
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
2589
|
-
* being set up. `completed` means every item was set up. `partially_completed` means some items were set up
|
|
2590
|
-
* and the others failed or were canceled and were refunded to their original payment sources. `failed` means
|
|
2591
|
-
* no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
|
|
2592
|
-
* `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
|
|
2593
|
-
* payment sources. No status establishes service delivery by itself.
|
|
2357
|
+
* 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.
|
|
2594
2358
|
*/
|
|
2595
2359
|
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
|
|
2596
2360
|
export declare const OrderStatus: {
|
|
@@ -2608,7 +2372,7 @@ export declare const ScheduledChangeInterval: {
|
|
|
2608
2372
|
readonly year: "year";
|
|
2609
2373
|
};
|
|
2610
2374
|
/**
|
|
2611
|
-
* The next accepted period-end change
|
|
2375
|
+
* The next accepted period-end change of the subscription: the target terms, applied at effective_at.
|
|
2612
2376
|
*/
|
|
2613
2377
|
export interface ScheduledChange {
|
|
2614
2378
|
order_id: string;
|
|
@@ -2619,7 +2383,7 @@ export interface ScheduledChange {
|
|
|
2619
2383
|
plan_name: string;
|
|
2620
2384
|
price_id: string;
|
|
2621
2385
|
quantity: string;
|
|
2622
|
-
/** The target
|
|
2386
|
+
/** The target licensed renewal amount before tax. */
|
|
2623
2387
|
recurring_amount: string;
|
|
2624
2388
|
currency: string;
|
|
2625
2389
|
interval: ScheduledChangeInterval;
|
|
@@ -2627,11 +2391,7 @@ export interface ScheduledChange {
|
|
|
2627
2391
|
interval_count: number;
|
|
2628
2392
|
}
|
|
2629
2393
|
/**
|
|
2630
|
-
* pending
|
|
2631
|
-
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
2632
|
-
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
2633
|
-
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
2634
|
-
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
2394
|
+
* `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.
|
|
2635
2395
|
*/
|
|
2636
2396
|
export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
|
|
2637
2397
|
export declare const SubscriptionStatus: {
|
|
@@ -2643,42 +2403,37 @@ export declare const SubscriptionStatus: {
|
|
|
2643
2403
|
readonly terminated: "terminated";
|
|
2644
2404
|
};
|
|
2645
2405
|
/**
|
|
2646
|
-
*
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
*
|
|
2653
|
-
*
|
|
2654
|
-
*
|
|
2655
|
-
* then; postpaid usage starts only when the service reports actual delivery and metering.
|
|
2406
|
+
* The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none.
|
|
2407
|
+
*/
|
|
2408
|
+
export type SubscriptionDimensions = {
|
|
2409
|
+
[key: string]: string;
|
|
2410
|
+
};
|
|
2411
|
+
/**
|
|
2412
|
+
* A purchase that is billed, renewed and changed on its own, separate from the owning service's resource. A new
|
|
2413
|
+
* recurring purchase creates a pending subscription for each order line; its ID is returned on the order item
|
|
2414
|
+
* and stays the same through checkout, delivery, renewals and changes. A one-time purchase may create none.
|
|
2656
2415
|
*
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2659
|
-
*
|
|
2660
|
-
*
|
|
2661
|
-
*
|
|
2662
|
-
* original value. Technical state belongs to the owning service.
|
|
2416
|
+
* Pending and provisioning subscriptions grant no service. A subscription becomes provisioning when the owning
|
|
2417
|
+
* service accepts the order, and active when the service confirms delivery, which sets started_at; payment
|
|
2418
|
+
* changes neither. Licensed service periods start at delivery, and metered usage is charged as the service
|
|
2419
|
+
* reports it. Canceling or failing an undelivered purchase cancels its subscriptions without starting a period.
|
|
2420
|
+
* Renewals use recurring_amount and the agreed interval; paid periods keep their value.
|
|
2663
2421
|
*
|
|
2664
|
-
* A
|
|
2665
|
-
*
|
|
2666
|
-
* Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
|
|
2667
|
-
* the owning service enforces current holdings against the purchased count.
|
|
2422
|
+
* A shared capacity limit, such as a regional snapshot quota, has one subscription for the purchased quantity
|
|
2423
|
+
* rather than one per item.
|
|
2668
2424
|
*/
|
|
2669
2425
|
export interface Subscription {
|
|
2670
2426
|
/** 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. */
|
|
2671
2427
|
renewal_discounts_enabled?: boolean;
|
|
2672
2428
|
currency: string;
|
|
2673
|
-
|
|
2429
|
+
type: PriceType;
|
|
2430
|
+
usage_type: UsageType;
|
|
2431
|
+
/** The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none. */
|
|
2432
|
+
dimensions: SubscriptionDimensions;
|
|
2674
2433
|
interval: SubscriptionInterval;
|
|
2675
2434
|
/** @minimum 1 */
|
|
2676
2435
|
interval_count?: number;
|
|
2677
|
-
/**
|
|
2678
|
-
* Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
|
|
2679
|
-
* Pending subscriptions show base terms until paying the order fixes any new continuing discount.
|
|
2680
|
-
* Absent for other charge types.
|
|
2681
|
-
*/
|
|
2436
|
+
/** 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. */
|
|
2682
2437
|
recurring_amount?: string;
|
|
2683
2438
|
termination_policy?: TerminationPolicy;
|
|
2684
2439
|
refund_policy?: RefundPolicy;
|
|
@@ -2687,17 +2442,14 @@ export interface Subscription {
|
|
|
2687
2442
|
coupon?: ObjectIdentity;
|
|
2688
2443
|
/** @minimum 0 */
|
|
2689
2444
|
discounted_renewals_remaining?: number;
|
|
2690
|
-
/** The operations currently prevented on the subscription, sorted
|
|
2445
|
+
/** The operations currently prevented on the subscription, sorted; it is suspended while this contains `billing.subscriptions.use`. */
|
|
2691
2446
|
restrictions?: SubscriptionRestriction[];
|
|
2692
2447
|
billing_cycle_anchor?: string;
|
|
2693
2448
|
cancellation?: SubscriptionCancellation;
|
|
2694
|
-
/** The accepted period-end change
|
|
2449
|
+
/** The accepted period-end change scheduled for this subscription; null when there is none. */
|
|
2695
2450
|
scheduled_change?: ScheduledChange | null;
|
|
2696
2451
|
/**
|
|
2697
|
-
* The saved payment method automatic renewal charges after the account's
|
|
2698
|
-
* before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
|
|
2699
|
-
* saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
|
|
2700
|
-
* account that pays the renewal.
|
|
2452
|
+
* 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.
|
|
2701
2453
|
* @nullable
|
|
2702
2454
|
*/
|
|
2703
2455
|
default_payment_method_id?: string | null;
|
|
@@ -2708,16 +2460,11 @@ export interface Subscription {
|
|
|
2708
2460
|
account: AccountIdentity;
|
|
2709
2461
|
product_id: ProductID;
|
|
2710
2462
|
/**
|
|
2711
|
-
*
|
|
2712
|
-
* membership, which belongs to no single project.
|
|
2463
|
+
* The project it is for. Absent for an account-level purchase, such as a membership.
|
|
2713
2464
|
* @nullable
|
|
2714
2465
|
*/
|
|
2715
2466
|
project_id?: string | null;
|
|
2716
|
-
/**
|
|
2717
|
-
* The project and its current name, for display. Absent for a purchase at account level,
|
|
2718
|
-
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2719
|
-
* `project_id` still identifies it then.
|
|
2720
|
-
*/
|
|
2467
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
|
|
2721
2468
|
project?: NamedIdentity | null;
|
|
2722
2469
|
product: Product;
|
|
2723
2470
|
plan_id: string;
|
|
@@ -2725,35 +2472,26 @@ export interface Subscription {
|
|
|
2725
2472
|
price_id: string;
|
|
2726
2473
|
quantity: string;
|
|
2727
2474
|
/**
|
|
2728
|
-
* When a
|
|
2729
|
-
* Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
|
|
2730
|
-
* its purchase has been paid, and for postpaid subscriptions.
|
|
2475
|
+
* 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.
|
|
2731
2476
|
* @nullable
|
|
2732
2477
|
*/
|
|
2733
2478
|
current_term_end?: string | null;
|
|
2734
2479
|
/**
|
|
2735
|
-
* Start of the service period in effect now. Null when none is, including for
|
|
2480
|
+
* Start of the service period in effect now. Null when none is, including for metered subscriptions.
|
|
2736
2481
|
* @nullable
|
|
2737
2482
|
*/
|
|
2738
2483
|
current_period_start?: string | null;
|
|
2739
2484
|
/**
|
|
2740
|
-
* End of the service period in effect now
|
|
2741
|
-
* this. Null when no period is in effect, including for postpaid subscriptions.
|
|
2485
|
+
* 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.
|
|
2742
2486
|
* @nullable
|
|
2743
2487
|
*/
|
|
2744
2488
|
current_period_end?: string | null;
|
|
2745
|
-
/**
|
|
2489
|
+
/** 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. */
|
|
2746
2490
|
auto_renew: boolean;
|
|
2747
|
-
/**
|
|
2748
|
-
* pending means the purchase relationship exists but its order has not been accepted.
|
|
2749
|
-
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
2750
|
-
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
2751
|
-
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
2752
|
-
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
2753
|
-
*/
|
|
2491
|
+
/** `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. */
|
|
2754
2492
|
status: SubscriptionStatus;
|
|
2755
2493
|
/**
|
|
2756
|
-
*
|
|
2494
|
+
* When service started. Null until a new subscription becomes active, also after payment.
|
|
2757
2495
|
* @nullable
|
|
2758
2496
|
*/
|
|
2759
2497
|
started_at?: string | null;
|
|
@@ -2780,10 +2518,7 @@ export interface RenewalPrice {
|
|
|
2780
2518
|
/** What renewing for this term costs, for the quantity held. */
|
|
2781
2519
|
amount?: Money;
|
|
2782
2520
|
currency?: string;
|
|
2783
|
-
/**
|
|
2784
|
-
* The term this item already bills at. Renewing for it uses the price bought
|
|
2785
|
-
* originally, so a later price change does not affect it.
|
|
2786
|
-
*/
|
|
2521
|
+
/** The term the subscription renews at now; renewing for it keeps the agreed price. */
|
|
2787
2522
|
current: boolean;
|
|
2788
2523
|
}
|
|
2789
2524
|
export interface RenewalPriceList {
|
|
@@ -2800,14 +2535,10 @@ export declare const RenewRequestInterval: {
|
|
|
2800
2535
|
readonly year: "year";
|
|
2801
2536
|
};
|
|
2802
2537
|
export interface RenewRequest {
|
|
2803
|
-
/**
|
|
2538
|
+
/** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
|
|
2804
2539
|
order_id: string;
|
|
2805
2540
|
/**
|
|
2806
|
-
* How many further periods to buy, each at the price
|
|
2807
|
-
*
|
|
2808
|
-
* Buying twelve monthly periods is not the same as buying one yearly term: a longer
|
|
2809
|
-
* term is usually sold at a lower price, and that price is only reached by naming the
|
|
2810
|
-
* interval. Use `interval_count` and `interval` for that.
|
|
2541
|
+
* 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.
|
|
2811
2542
|
* @minimum 1
|
|
2812
2543
|
*/
|
|
2813
2544
|
periods?: number;
|
|
@@ -2846,10 +2577,10 @@ export declare const RenewalOrderRequestInterval: {
|
|
|
2846
2577
|
readonly year: "year";
|
|
2847
2578
|
};
|
|
2848
2579
|
/**
|
|
2849
|
-
* The periods and price
|
|
2580
|
+
* The renewal's periods and price, chosen as in renewing.
|
|
2850
2581
|
*/
|
|
2851
2582
|
export interface RenewalOrderRequest {
|
|
2852
|
-
/**
|
|
2583
|
+
/** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
|
|
2853
2584
|
order_id: string;
|
|
2854
2585
|
/**
|
|
2855
2586
|
* As in renewing.
|
|
@@ -2870,10 +2601,7 @@ export interface AutoRenewSet {
|
|
|
2870
2601
|
auto_renew: boolean;
|
|
2871
2602
|
}
|
|
2872
2603
|
/**
|
|
2873
|
-
* `pending
|
|
2874
|
-
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
2875
|
-
* `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
|
|
2876
|
-
* its subscription.
|
|
2604
|
+
* `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.
|
|
2877
2605
|
*/
|
|
2878
2606
|
export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
|
|
2879
2607
|
export declare const OrderItemStatus: {
|
|
@@ -2883,7 +2611,7 @@ export declare const OrderItemStatus: {
|
|
|
2883
2611
|
readonly canceled: "canceled";
|
|
2884
2612
|
};
|
|
2885
2613
|
/**
|
|
2886
|
-
* `new` buys, `renew` extends a
|
|
2614
|
+
* `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms.
|
|
2887
2615
|
*/
|
|
2888
2616
|
export type OrderType = (typeof OrderType)[keyof typeof OrderType];
|
|
2889
2617
|
export declare const OrderType: {
|
|
@@ -2892,12 +2620,7 @@ export declare const OrderType: {
|
|
|
2892
2620
|
readonly modify: "modify";
|
|
2893
2621
|
};
|
|
2894
2622
|
/**
|
|
2895
|
-
* When a plan change takes effect
|
|
2896
|
-
*
|
|
2897
|
-
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2898
|
-
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2899
|
-
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2900
|
-
* usual. Renewing in the meantime moves all of this along with it.
|
|
2623
|
+
* 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.
|
|
2901
2624
|
*/
|
|
2902
2625
|
export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
|
|
2903
2626
|
export declare const OrderChangeEffective: {
|
|
@@ -2906,8 +2629,7 @@ export declare const OrderChangeEffective: {
|
|
|
2906
2629
|
readonly period_end: "period_end";
|
|
2907
2630
|
};
|
|
2908
2631
|
/**
|
|
2909
|
-
* How it was paid.
|
|
2910
|
-
* then names a removed payment method.
|
|
2632
|
+
* How it was paid. `payment_method_id` still names the payment method after it is removed.
|
|
2911
2633
|
*/
|
|
2912
2634
|
export interface PaidWith {
|
|
2913
2635
|
/**
|
|
@@ -2929,22 +2651,17 @@ export declare const OrderItemInterval: {
|
|
|
2929
2651
|
readonly month: "month";
|
|
2930
2652
|
readonly year: "year";
|
|
2931
2653
|
};
|
|
2932
|
-
/**
|
|
2933
|
-
* The payment timing of the selected price.
|
|
2934
|
-
*/
|
|
2935
|
-
export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
|
|
2936
|
-
export declare const OrderItemChargeType: {
|
|
2937
|
-
readonly postpaid: "postpaid";
|
|
2938
|
-
readonly prepaid: "prepaid";
|
|
2939
|
-
readonly one_time: "one_time";
|
|
2940
|
-
};
|
|
2941
2654
|
export type OrderItemConfiguration = {
|
|
2942
2655
|
[key: string]: unknown;
|
|
2943
2656
|
};
|
|
2944
2657
|
/**
|
|
2945
|
-
*
|
|
2946
|
-
|
|
2947
|
-
|
|
2658
|
+
* The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none.
|
|
2659
|
+
*/
|
|
2660
|
+
export type OrderItemDimensions = {
|
|
2661
|
+
[key: string]: string;
|
|
2662
|
+
};
|
|
2663
|
+
/**
|
|
2664
|
+
* 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.
|
|
2948
2665
|
*/
|
|
2949
2666
|
export interface OrderItem {
|
|
2950
2667
|
/** 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. */
|
|
@@ -2954,11 +2671,7 @@ export interface OrderItem {
|
|
|
2954
2671
|
/** @minimum 0 */
|
|
2955
2672
|
position?: number;
|
|
2956
2673
|
configuration?: OrderItemConfiguration;
|
|
2957
|
-
/**
|
|
2958
|
-
* Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
|
|
2959
|
-
* pending subscription here; renewals and changes reference the existing subscription, which
|
|
2960
|
-
* keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
|
|
2961
|
-
*/
|
|
2674
|
+
/** 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. */
|
|
2962
2675
|
subscription_id?: string;
|
|
2963
2676
|
interval: OrderItemInterval;
|
|
2964
2677
|
/** @minimum 1 */
|
|
@@ -2966,22 +2679,21 @@ export interface OrderItem {
|
|
|
2966
2679
|
termination_policy?: TerminationPolicy;
|
|
2967
2680
|
refund_policy?: RefundPolicy;
|
|
2968
2681
|
/**
|
|
2969
|
-
*
|
|
2970
|
-
* at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
|
|
2971
|
-
* no prepaid period shorter than the one bought.
|
|
2682
|
+
* 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.
|
|
2972
2683
|
* @nullable
|
|
2973
2684
|
*/
|
|
2974
2685
|
refund_monthly_amount?: string | null;
|
|
2975
2686
|
/**
|
|
2976
|
-
*
|
|
2977
|
-
* purchase, used for time used short of a full month. Null when the plan has no postpaid price.
|
|
2687
|
+
* 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.
|
|
2978
2688
|
* @nullable
|
|
2979
2689
|
*/
|
|
2980
2690
|
refund_hourly_amount?: string | null;
|
|
2981
2691
|
recurring_amount?: string;
|
|
2982
2692
|
setup_amount?: string;
|
|
2983
|
-
|
|
2984
|
-
|
|
2693
|
+
type: PriceType;
|
|
2694
|
+
usage_type: UsageType;
|
|
2695
|
+
/** The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none. */
|
|
2696
|
+
dimensions: OrderItemDimensions;
|
|
2985
2697
|
/** Total tax after discounts, including any tax already included in the price. */
|
|
2986
2698
|
tax_amount?: string;
|
|
2987
2699
|
/** The part of tax_amount already included in gross_amount; it is not charged again. */
|
|
@@ -2993,45 +2705,28 @@ export interface OrderItem {
|
|
|
2993
2705
|
product?: Product;
|
|
2994
2706
|
/** Which plan was bought. */
|
|
2995
2707
|
plan_id: string;
|
|
2996
|
-
/**
|
|
2997
|
-
* What it was called when bought. It does not follow later catalogue renames and is
|
|
2998
|
-
* not translated.
|
|
2999
|
-
*/
|
|
2708
|
+
/** The name when bought. */
|
|
3000
2709
|
plan_name: string;
|
|
3001
2710
|
quantity: string;
|
|
3002
|
-
/**
|
|
3003
|
-
* The unit amount of the price this line is charged under. Absent for a tiered price, which has no
|
|
3004
|
-
* single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
|
|
3005
|
-
* describes.
|
|
3006
|
-
*/
|
|
2711
|
+
/** 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. */
|
|
3007
2712
|
unit_amount?: Money;
|
|
3008
2713
|
/**
|
|
3009
|
-
* Before discounts: the price applied to the quantity,
|
|
3010
|
-
*
|
|
3011
|
-
* the
|
|
3012
|
-
*
|
|
3013
|
-
* difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
|
|
2714
|
+
* Before discounts and setup fees: the price applied to the quantity, `unit_amount` times `quantity` for a per-
|
|
2715
|
+
* unit price, raised by any minimum charge. For an immediate upgrade it is the new price for the rest of the
|
|
2716
|
+
* paid period minus the amount paid for that time; a downgrade, or a change between equal period prices, charges
|
|
2717
|
+
* nothing.
|
|
3014
2718
|
*
|
|
3015
|
-
* Under an inclusive tax rate it includes tax,
|
|
3016
|
-
*
|
|
3017
|
-
* tax, and tax is added to it.
|
|
2719
|
+
* Under an inclusive tax rate it includes tax, shown in `tax_included_amount`, except for a renewal at agreed
|
|
2720
|
+
* terms, whose amount excludes tax.
|
|
3018
2721
|
*/
|
|
3019
2722
|
gross_amount?: Money;
|
|
3020
|
-
/**
|
|
3021
|
-
* The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
|
|
3022
|
-
* from the discount the subscription carries.
|
|
3023
|
-
*
|
|
3024
|
-
* A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
|
|
3025
|
-
* `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
|
|
3026
|
-
* the carried discount is already reflected in it: the renewal order also uses a coupon the account
|
|
3027
|
-
* holds, or the account's tax rate is inclusive.
|
|
3028
|
-
*/
|
|
2723
|
+
/** 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. */
|
|
3029
2724
|
discount_amount?: Money;
|
|
3030
2725
|
/** `gross_amount` less `discount_amount`. */
|
|
3031
2726
|
amount?: Money;
|
|
3032
2727
|
currency: string;
|
|
3033
2728
|
/**
|
|
3034
|
-
* The start of the service period this line paid for.
|
|
2729
|
+
* 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.
|
|
3035
2730
|
* @nullable
|
|
3036
2731
|
*/
|
|
3037
2732
|
period_start?: string | null;
|
|
@@ -3043,17 +2738,13 @@ export interface OrderItem {
|
|
|
3043
2738
|
status: OrderItemStatus;
|
|
3044
2739
|
}
|
|
3045
2740
|
/**
|
|
3046
|
-
* A recorded purchase with its invoice from placement; a zero-total invoice, such as for
|
|
3047
|
-
* admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
|
|
3048
|
-
* invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
|
|
3049
|
-
* order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
|
|
3050
|
-
* before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
|
|
2741
|
+
* 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.
|
|
3051
2742
|
*/
|
|
3052
2743
|
export interface Order {
|
|
3053
2744
|
coupon_id?: string;
|
|
3054
2745
|
coupon?: ObjectIdentity;
|
|
3055
2746
|
promotion_code_id?: string;
|
|
3056
|
-
/**
|
|
2747
|
+
/** The promotion code applied. Absent for an account discount. */
|
|
3057
2748
|
promotion_code?: string;
|
|
3058
2749
|
/** The order's invoice, the same as invoice.id. */
|
|
3059
2750
|
invoice_id: string;
|
|
@@ -3064,53 +2755,32 @@ export interface Order {
|
|
|
3064
2755
|
change_effective_at?: string;
|
|
3065
2756
|
id: string;
|
|
3066
2757
|
/**
|
|
3067
|
-
*
|
|
3068
|
-
* as a membership.
|
|
2758
|
+
* The project it was bought for. Absent for an account-level purchase, such as a membership.
|
|
3069
2759
|
* @nullable
|
|
3070
2760
|
*/
|
|
3071
2761
|
project_id?: string | null;
|
|
3072
|
-
/**
|
|
3073
|
-
* The project and its current name, for display. Absent for a purchase at account level,
|
|
3074
|
-
* and when the project no longer exists or its details cannot be read at the moment;
|
|
3075
|
-
* `project_id` still identifies it then.
|
|
3076
|
-
*/
|
|
2762
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
|
|
3077
2763
|
project?: NamedIdentity | null;
|
|
3078
|
-
/**
|
|
3079
|
-
* The billing account the order was placed with. It does not change when the project is later
|
|
3080
|
-
* linked to another billing account. While this account is suspended or closed the order cannot
|
|
3081
|
-
* be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
|
|
3082
|
-
* when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
|
|
3083
|
-
*/
|
|
2764
|
+
/** 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`. */
|
|
3084
2765
|
billing_account_id?: number;
|
|
3085
2766
|
currency: string;
|
|
3086
|
-
/** `new` buys, `renew` extends a
|
|
2767
|
+
/** `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms. */
|
|
3087
2768
|
type: OrderType;
|
|
3088
2769
|
status: OrderStatus;
|
|
3089
|
-
/**
|
|
3090
|
-
* When a plan change takes effect. `none` on anything that is not a change.
|
|
3091
|
-
*
|
|
3092
|
-
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
3093
|
-
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
3094
|
-
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
3095
|
-
* usual. Renewing in the meantime moves all of this along with it.
|
|
3096
|
-
*/
|
|
2770
|
+
/** 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. */
|
|
3097
2771
|
change_effective?: OrderChangeEffective;
|
|
3098
2772
|
/**
|
|
3099
|
-
* Acceptance deadline
|
|
2773
|
+
* Acceptance deadline; a pending order expires after it.
|
|
3100
2774
|
* @nullable
|
|
3101
2775
|
*/
|
|
3102
2776
|
expires_at?: string | null;
|
|
3103
2777
|
/**
|
|
3104
|
-
* When the discount and amount were fixed: at placement for automatic checkout
|
|
3105
|
-
* zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
|
|
2778
|
+
* 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.
|
|
3106
2779
|
* @nullable
|
|
3107
2780
|
*/
|
|
3108
2781
|
checkout_confirmed_at?: string | null;
|
|
3109
2782
|
created_at: string;
|
|
3110
|
-
/**
|
|
3111
|
-
* What was bought. Present on a single order and on every order in a list, so a list
|
|
3112
|
-
* can be rendered without a further request per row.
|
|
3113
|
-
*/
|
|
2783
|
+
/** What was bought. */
|
|
3114
2784
|
items: OrderItem[];
|
|
3115
2785
|
}
|
|
3116
2786
|
export interface OrderList {
|
|
@@ -3118,8 +2788,7 @@ export interface OrderList {
|
|
|
3118
2788
|
pagination: OffsetPagination;
|
|
3119
2789
|
}
|
|
3120
2790
|
/**
|
|
3121
|
-
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
3122
|
-
* `voided` once Leaflow withdrew it.
|
|
2791
|
+
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn.
|
|
3123
2792
|
*/
|
|
3124
2793
|
export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
|
|
3125
2794
|
export declare const DiscountStatus: {
|
|
@@ -3136,9 +2805,7 @@ export declare const DiscountType: {
|
|
|
3136
2805
|
readonly free_setup: "free_setup";
|
|
3137
2806
|
};
|
|
3138
2807
|
/**
|
|
3139
|
-
* Whether the discount continues on renewals
|
|
3140
|
-
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
3141
|
-
* periods including the first, and `forever` continues on every renewal.
|
|
2808
|
+
* 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.
|
|
3142
2809
|
*/
|
|
3143
2810
|
export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
|
|
3144
2811
|
export declare const DiscountFrequency: {
|
|
@@ -3147,26 +2814,18 @@ export declare const DiscountFrequency: {
|
|
|
3147
2814
|
readonly forever: "forever";
|
|
3148
2815
|
};
|
|
3149
2816
|
/**
|
|
3150
|
-
* A coupon held
|
|
3151
|
-
* to metered usage that the coupon covers.
|
|
2817
|
+
* A coupon held by the account for a period, applying without a code to the purchases and metered usage it covers.
|
|
3152
2818
|
*/
|
|
3153
2819
|
export interface Discount {
|
|
3154
2820
|
min_amount?: string;
|
|
3155
2821
|
billing_account_id?: number;
|
|
3156
2822
|
coupon_id: string;
|
|
3157
2823
|
promotion_code_id?: string;
|
|
3158
|
-
/**
|
|
3159
|
-
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
3160
|
-
* `voided` once Leaflow withdrew it.
|
|
3161
|
-
*/
|
|
2824
|
+
/** `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn. */
|
|
3162
2825
|
status: DiscountStatus;
|
|
3163
2826
|
voided_at?: string;
|
|
3164
2827
|
type: DiscountType;
|
|
3165
|
-
/**
|
|
3166
|
-
* Whether the discount continues on renewals of the purchased item. `once` applies only to the
|
|
3167
|
-
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
3168
|
-
* periods including the first, and `forever` continues on every renewal.
|
|
3169
|
-
*/
|
|
2828
|
+
/** 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. */
|
|
3170
2829
|
frequency?: DiscountFrequency;
|
|
3171
2830
|
/** @minimum 1 */
|
|
3172
2831
|
frequency_duration?: number;
|
|
@@ -3178,10 +2837,7 @@ export interface Discount {
|
|
|
3178
2837
|
/** Caps a percentage discount. */
|
|
3179
2838
|
max_discount?: Money;
|
|
3180
2839
|
currency?: string;
|
|
3181
|
-
/**
|
|
3182
|
-
* What it may be used for. Absent means it applies to anything on the account,
|
|
3183
|
-
* including setup fees and traffic.
|
|
3184
|
-
*/
|
|
2840
|
+
/** What it may pay for. Absent means anything on the account, including setup fees and usage. */
|
|
3185
2841
|
applies_to: Applicability;
|
|
3186
2842
|
/** Restricted to your first purchase of anything it applies to. */
|
|
3187
2843
|
first_purchase_only?: boolean;
|
|
@@ -3201,7 +2857,7 @@ export interface OrderItemList {
|
|
|
3201
2857
|
pagination: OffsetPagination;
|
|
3202
2858
|
}
|
|
3203
2859
|
/**
|
|
3204
|
-
* Whether the quantity was paid for or granted free
|
|
2860
|
+
* Whether the quantity was paid for or granted free; both are consumed the same way.
|
|
3205
2861
|
*/
|
|
3206
2862
|
export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
|
|
3207
2863
|
export declare const AllowanceCategory: {
|
|
@@ -3232,7 +2888,7 @@ export interface Allowance {
|
|
|
3232
2888
|
meter: ObjectIdentity;
|
|
3233
2889
|
/** The unit it is counted in, such as `MiB`. */
|
|
3234
2890
|
unit?: string;
|
|
3235
|
-
/** Whether the quantity was paid for or granted free
|
|
2891
|
+
/** Whether the quantity was paid for or granted free; both are consumed the same way. */
|
|
3236
2892
|
category: AllowanceCategory;
|
|
3237
2893
|
/**
|
|
3238
2894
|
* Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
|
|
@@ -3244,16 +2900,12 @@ export interface Allowance {
|
|
|
3244
2900
|
quantity: string;
|
|
3245
2901
|
/** How much is left. */
|
|
3246
2902
|
remaining_quantity: string;
|
|
3247
|
-
/**
|
|
3248
|
-
* Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
|
|
3249
|
-
* precedence.
|
|
3250
|
-
*/
|
|
2903
|
+
/** Lower values are consumed first; at equal priority, earlier expiry and then earlier issuance. */
|
|
3251
2904
|
priority?: number;
|
|
3252
2905
|
status: AllowanceStatus;
|
|
3253
2906
|
valid_from: string;
|
|
3254
2907
|
/**
|
|
3255
|
-
* When
|
|
3256
|
-
* not carry over. Absent when it does not expire on its own.
|
|
2908
|
+
* When the allowance lapses; unused quantity is lost. Absent when it does not expire.
|
|
3257
2909
|
* @nullable
|
|
3258
2910
|
*/
|
|
3259
2911
|
valid_until?: string | null;
|
|
@@ -3296,8 +2948,7 @@ export interface Entitlement {
|
|
|
3296
2948
|
name?: string;
|
|
3297
2949
|
enabled: boolean;
|
|
3298
2950
|
/**
|
|
3299
|
-
* When the
|
|
3300
|
-
* has no end date.
|
|
2951
|
+
* When the providing subscription ends. Absent for a metered subscription.
|
|
3301
2952
|
* @nullable
|
|
3302
2953
|
*/
|
|
3303
2954
|
expires_at?: string | null;
|
|
@@ -3330,30 +2981,7 @@ export interface PlanList {
|
|
|
3330
2981
|
pagination: OffsetPagination;
|
|
3331
2982
|
}
|
|
3332
2983
|
/**
|
|
3333
|
-
* `
|
|
3334
|
-
* charges once.
|
|
3335
|
-
*/
|
|
3336
|
-
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
3337
|
-
export declare const PriceType: {
|
|
3338
|
-
readonly postpaid: "postpaid";
|
|
3339
|
-
readonly prepaid: "prepaid";
|
|
3340
|
-
readonly one_time: "one_time";
|
|
3341
|
-
};
|
|
3342
|
-
/**
|
|
3343
|
-
* How the amount is arrived at. `rated` means the rate depends on attributes such as
|
|
3344
|
-
* region or machine type, and is looked up on a price list.
|
|
3345
|
-
*/
|
|
3346
|
-
export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
|
|
3347
|
-
export declare const PriceBillingScheme: {
|
|
3348
|
-
readonly per_unit: "per_unit";
|
|
3349
|
-
readonly tiered: "tiered";
|
|
3350
|
-
readonly rated: "rated";
|
|
3351
|
-
};
|
|
3352
|
-
/**
|
|
3353
|
-
* `none` for a price that is not tiered, which is most of them.
|
|
3354
|
-
*
|
|
3355
|
-
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
3356
|
-
* everything at the rate of the band the total falls in.
|
|
2984
|
+
* 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.
|
|
3357
2985
|
*/
|
|
3358
2986
|
export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
|
|
3359
2987
|
export declare const PriceTiersMode: {
|
|
@@ -3370,7 +2998,7 @@ export declare const PriceInterval: {
|
|
|
3370
2998
|
};
|
|
3371
2999
|
export interface Tier {
|
|
3372
3000
|
/**
|
|
3373
|
-
* The upper bound
|
|
3001
|
+
* The band's inclusive upper bound; null for the last band.
|
|
3374
3002
|
* @nullable
|
|
3375
3003
|
*/
|
|
3376
3004
|
up_to?: string | null;
|
|
@@ -3383,6 +3011,7 @@ export interface Price {
|
|
|
3383
3011
|
lookup_key?: string;
|
|
3384
3012
|
product: Product;
|
|
3385
3013
|
plan: ObjectIdentity;
|
|
3014
|
+
/** 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. */
|
|
3386
3015
|
meter_id?: string;
|
|
3387
3016
|
meter?: ObjectIdentity;
|
|
3388
3017
|
unit_quantity: string;
|
|
@@ -3394,39 +3023,25 @@ export interface Price {
|
|
|
3394
3023
|
id: string;
|
|
3395
3024
|
plan_id: string;
|
|
3396
3025
|
currency: string;
|
|
3397
|
-
/**
|
|
3398
|
-
* `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
|
|
3399
|
-
* charges once.
|
|
3400
|
-
*/
|
|
3401
3026
|
type: PriceType;
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
*/
|
|
3406
|
-
billing_scheme: PriceBillingScheme;
|
|
3027
|
+
usage_type: UsageType;
|
|
3028
|
+
/** Absent when the price delegates to a rate card, where the rate depends on attributes such as region or machine type. */
|
|
3029
|
+
billing_scheme?: BillingScheme;
|
|
3407
3030
|
/** Present for `per_unit`. */
|
|
3408
3031
|
unit_amount?: Money;
|
|
3409
|
-
/**
|
|
3410
|
-
* `none` for a price that is not tiered, which is most of them.
|
|
3411
|
-
*
|
|
3412
|
-
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
3413
|
-
* everything at the rate of the band the total falls in.
|
|
3414
|
-
*/
|
|
3032
|
+
/** 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. */
|
|
3415
3033
|
tiers_mode?: PriceTiersMode;
|
|
3416
3034
|
/** Present for `tiered`, in ascending order. */
|
|
3417
3035
|
tiers?: Tier[];
|
|
3418
|
-
/**
|
|
3036
|
+
/** Present when the price delegates to a rate card, the price list its rates are read from. */
|
|
3419
3037
|
rate_card_id?: string;
|
|
3420
3038
|
/** The smallest quantity that can be bought. Absent means no lower bound. */
|
|
3421
3039
|
min_quantity?: string;
|
|
3422
|
-
/**
|
|
3423
|
-
* The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
|
|
3424
|
-
* rejected with BILLING_PRICE_INVALID and field=max_quantity.
|
|
3425
|
-
*/
|
|
3040
|
+
/** 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`. */
|
|
3426
3041
|
max_quantity?: string;
|
|
3427
3042
|
/** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
|
|
3428
3043
|
quantity_step?: string;
|
|
3429
|
-
/** For
|
|
3044
|
+
/** For recurring licensed prices, how many interval units one period covers. */
|
|
3430
3045
|
interval_count?: number;
|
|
3431
3046
|
interval: PriceInterval;
|
|
3432
3047
|
setup_fee?: Money;
|
|
@@ -3436,18 +3051,20 @@ export interface PriceList {
|
|
|
3436
3051
|
pagination: OffsetPagination;
|
|
3437
3052
|
}
|
|
3438
3053
|
/**
|
|
3439
|
-
* The
|
|
3054
|
+
* The dimension values this rate applies to, such as region and machine type.
|
|
3440
3055
|
*/
|
|
3441
3056
|
export type RateDimensions = {
|
|
3442
3057
|
[key: string]: string;
|
|
3443
3058
|
};
|
|
3444
3059
|
/**
|
|
3445
|
-
*
|
|
3060
|
+
* Licensed rates only, the period the amount buys; `none` for metered rates.
|
|
3446
3061
|
*/
|
|
3447
|
-
export type
|
|
3448
|
-
export declare const
|
|
3449
|
-
readonly
|
|
3450
|
-
readonly
|
|
3062
|
+
export type RateInterval = (typeof RateInterval)[keyof typeof RateInterval];
|
|
3063
|
+
export declare const RateInterval: {
|
|
3064
|
+
readonly none: "none";
|
|
3065
|
+
readonly day: "day";
|
|
3066
|
+
readonly month: "month";
|
|
3067
|
+
readonly year: "year";
|
|
3451
3068
|
};
|
|
3452
3069
|
/**
|
|
3453
3070
|
* `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.
|
|
@@ -3460,22 +3077,24 @@ export declare const RateTiersMode: {
|
|
|
3460
3077
|
};
|
|
3461
3078
|
export interface Rate {
|
|
3462
3079
|
meter: ObjectIdentity;
|
|
3463
|
-
/** The unit readings
|
|
3080
|
+
/** The unit readings are reported in, such as `core-second`. */
|
|
3464
3081
|
unit?: string;
|
|
3465
|
-
/** The
|
|
3082
|
+
/** The dimension values this rate applies to, such as region and machine type. */
|
|
3466
3083
|
dimensions: RateDimensions;
|
|
3467
|
-
|
|
3468
|
-
|
|
3084
|
+
billing_scheme: BillingScheme;
|
|
3085
|
+
/** `metered` prices usage; `licensed` prices holding a quantity for one period. */
|
|
3086
|
+
usage_type: UsageType;
|
|
3087
|
+
/** Licensed rates only, the period the amount buys; `none` for metered rates. */
|
|
3088
|
+
interval: RateInterval;
|
|
3089
|
+
/** @nullable */
|
|
3090
|
+
interval_count?: number | null;
|
|
3469
3091
|
/** `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. */
|
|
3470
3092
|
tiers_mode: RateTiersMode;
|
|
3471
3093
|
/** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
|
|
3472
3094
|
unit_amount?: Money;
|
|
3473
3095
|
/** Present for a tiered rate, in ascending order. */
|
|
3474
3096
|
tiers?: Tier[];
|
|
3475
|
-
/**
|
|
3476
|
-
* How many measured units one amount covers. An hourly rate on a per-second meter is
|
|
3477
|
-
* `"3600"`.
|
|
3478
|
-
*/
|
|
3097
|
+
/** How many measured units one amount covers; an hourly rate on a per-second meter is `"3600"`. */
|
|
3479
3098
|
unit_quantity?: string;
|
|
3480
3099
|
currency: string;
|
|
3481
3100
|
effective_from: string;
|
|
@@ -3486,15 +3105,6 @@ export interface RateList {
|
|
|
3486
3105
|
items: Rate[];
|
|
3487
3106
|
pagination: OffsetPagination;
|
|
3488
3107
|
}
|
|
3489
|
-
/**
|
|
3490
|
-
* Narrows the selection when a plan offers more than one charge type.
|
|
3491
|
-
*/
|
|
3492
|
-
export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
|
|
3493
|
-
export declare const QuoteItemInputPriceType: {
|
|
3494
|
-
readonly postpaid: "postpaid";
|
|
3495
|
-
readonly prepaid: "prepaid";
|
|
3496
|
-
readonly one_time: "one_time";
|
|
3497
|
-
};
|
|
3498
3108
|
export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
|
|
3499
3109
|
export declare const QuoteItemInputInterval: {
|
|
3500
3110
|
readonly none: "none";
|
|
@@ -3503,23 +3113,13 @@ export declare const QuoteItemInputInterval: {
|
|
|
3503
3113
|
readonly year: "year";
|
|
3504
3114
|
};
|
|
3505
3115
|
/**
|
|
3506
|
-
* The
|
|
3507
|
-
*
|
|
3508
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
3509
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
3510
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
3511
|
-
*
|
|
3512
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
3513
|
-
* covering it is refused rather than priced at zero.
|
|
3116
|
+
* 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.
|
|
3514
3117
|
*/
|
|
3515
3118
|
export type QuoteItemInputDimensions = {
|
|
3516
3119
|
[key: string]: string;
|
|
3517
3120
|
};
|
|
3518
3121
|
/**
|
|
3519
|
-
* Identify a price
|
|
3520
|
-
* key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
|
|
3521
|
-
* postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
|
|
3522
|
-
* checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
|
|
3122
|
+
* 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.
|
|
3523
3123
|
*/
|
|
3524
3124
|
export interface QuoteItemInput {
|
|
3525
3125
|
/**
|
|
@@ -3535,12 +3135,14 @@ export interface QuoteItemInput {
|
|
|
3535
3135
|
price_id?: string;
|
|
3536
3136
|
product_id?: ProductID;
|
|
3537
3137
|
plan_id?: string;
|
|
3538
|
-
/** Narrows the selection when a plan offers more than one
|
|
3539
|
-
price_type?:
|
|
3138
|
+
/** Narrows the selection when a plan offers more than one price type. */
|
|
3139
|
+
price_type?: PriceType;
|
|
3140
|
+
/** Narrows the selection when a plan offers more than one usage type. */
|
|
3141
|
+
usage_type?: UsageType;
|
|
3540
3142
|
interval?: QuoteItemInputInterval;
|
|
3541
3143
|
/** @minimum 1 */
|
|
3542
3144
|
interval_count?: number;
|
|
3543
|
-
/** Selects among
|
|
3145
|
+
/** Selects among licensed prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
|
|
3544
3146
|
termination_policy?: TerminationPolicy;
|
|
3545
3147
|
/** @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]))))))))))$ */
|
|
3546
3148
|
quantity: string;
|
|
@@ -3550,36 +3152,37 @@ export interface QuoteItemInput {
|
|
|
3550
3152
|
* @maxLength 128
|
|
3551
3153
|
*/
|
|
3552
3154
|
meter_lookup_key?: string;
|
|
3553
|
-
/**
|
|
3554
|
-
* The attributes the price depends on — region, instance type, token class.
|
|
3555
|
-
*
|
|
3556
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
3557
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
3558
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
3559
|
-
*
|
|
3560
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
3561
|
-
* covering it is refused rather than priced at zero.
|
|
3562
|
-
*/
|
|
3155
|
+
/** 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. */
|
|
3563
3156
|
dimensions?: QuoteItemInputDimensions;
|
|
3564
|
-
/**
|
|
3565
|
-
* For metered items, how long to price for. This allows an estimate such as "about
|
|
3566
|
-
* this much per month" to be shown before anything exists. The priced quantity is
|
|
3567
|
-
* `quantity` multiplied by this duration.
|
|
3568
|
-
*/
|
|
3157
|
+
/** For a metered estimate, how long to price for, in seconds; the priced quantity is `quantity` times this duration. */
|
|
3569
3158
|
duration_seconds?: number;
|
|
3570
3159
|
}
|
|
3160
|
+
/**
|
|
3161
|
+
* The values of the meter's presentation dimensions, present only when grouped by meter.
|
|
3162
|
+
*/
|
|
3163
|
+
export type SpendRowDimensions = {
|
|
3164
|
+
[key: string]: string;
|
|
3165
|
+
};
|
|
3571
3166
|
export interface SpendRow {
|
|
3572
3167
|
product?: Product;
|
|
3573
3168
|
plan_id?: string;
|
|
3574
3169
|
plan_name?: string;
|
|
3575
3170
|
/** Present only when grouped by resource. */
|
|
3576
3171
|
resource_id?: string;
|
|
3172
|
+
/** Present only when grouped by meter. */
|
|
3173
|
+
meter?: ObjectIdentity;
|
|
3174
|
+
/** Present only when grouped by meter. */
|
|
3175
|
+
unit?: string;
|
|
3176
|
+
/** Net usage quantity, present only when grouped by meter. */
|
|
3177
|
+
quantity?: string;
|
|
3178
|
+
/** The values of the meter's presentation dimensions, present only when grouped by meter. */
|
|
3179
|
+
dimensions?: SpendRowDimensions;
|
|
3577
3180
|
amount: Money;
|
|
3578
3181
|
currency: string;
|
|
3579
3182
|
}
|
|
3580
3183
|
export interface SpendRowList {
|
|
3581
3184
|
items: SpendRow[];
|
|
3582
|
-
/** The
|
|
3185
|
+
/** The total over all matching groups, not only the page returned. */
|
|
3583
3186
|
total: Money;
|
|
3584
3187
|
currency: string;
|
|
3585
3188
|
pagination: OffsetPagination;
|
|
@@ -3595,28 +3198,28 @@ export declare const ActiveResourceStatus: {
|
|
|
3595
3198
|
readonly closed: "closed";
|
|
3596
3199
|
};
|
|
3597
3200
|
/**
|
|
3598
|
-
* A resource
|
|
3201
|
+
* A resource charged continuously by the second.
|
|
3599
3202
|
*/
|
|
3600
3203
|
export interface ActiveResource {
|
|
3601
3204
|
id: string;
|
|
3602
3205
|
ended_at?: string;
|
|
3603
3206
|
suspended_at?: string;
|
|
3604
3207
|
state_changed_at?: string;
|
|
3605
|
-
/** The
|
|
3208
|
+
/** The metered subscription charged for this metering record. */
|
|
3606
3209
|
subscription_id: string;
|
|
3607
3210
|
resource_id: string;
|
|
3608
3211
|
product: Product;
|
|
3609
|
-
/**
|
|
3212
|
+
/** The resource type, as the owning service names it. */
|
|
3610
3213
|
resource_type?: string;
|
|
3611
3214
|
meter: ObjectIdentity;
|
|
3612
3215
|
unit?: string;
|
|
3613
|
-
/** How much is held
|
|
3216
|
+
/** How much is held, such as cores, MiB or cards; not how much was used. */
|
|
3614
3217
|
quantity: string;
|
|
3615
3218
|
dimensions?: ActiveResourceDimensions;
|
|
3616
3219
|
status: ActiveResourceStatus;
|
|
3617
3220
|
started_at: string;
|
|
3618
3221
|
project_id?: string;
|
|
3619
|
-
/** Usage has been generated up to this boundary; it
|
|
3222
|
+
/** Usage has been generated up to this boundary; it says nothing about invoicing or payment. */
|
|
3620
3223
|
usage_generated_until: string;
|
|
3621
3224
|
}
|
|
3622
3225
|
export interface ActiveResourceList {
|
|
@@ -3624,7 +3227,7 @@ export interface ActiveResourceList {
|
|
|
3624
3227
|
pagination: OffsetPagination;
|
|
3625
3228
|
}
|
|
3626
3229
|
/**
|
|
3627
|
-
* An estimate of the refundable value of
|
|
3230
|
+
* An estimate of the refundable value of an order or selected items; nothing is canceled or refunded.
|
|
3628
3231
|
*/
|
|
3629
3232
|
export interface OrderRefundQuoteInput {
|
|
3630
3233
|
order_id: string;
|
|
@@ -3636,33 +3239,24 @@ export interface OrderRefundQuoteInput {
|
|
|
3636
3239
|
order_item_ids?: string[];
|
|
3637
3240
|
}
|
|
3638
3241
|
/**
|
|
3639
|
-
*
|
|
3640
|
-
* refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
|
|
3641
|
-
* canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
|
|
3642
|
-
* combination returns BILLING_PURCHASE_INVALID with the offending field."
|
|
3242
|
+
* 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.
|
|
3643
3243
|
*/
|
|
3644
3244
|
export interface QuoteRequest {
|
|
3645
3245
|
/**
|
|
3646
|
-
* The billing account to price for
|
|
3647
|
-
* with this account; renewals and cancellations must currently be paid for by it.
|
|
3246
|
+
* 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.
|
|
3648
3247
|
* @minimum 1
|
|
3649
3248
|
*/
|
|
3650
3249
|
billing_account_id: number;
|
|
3651
3250
|
/**
|
|
3652
|
-
* A proposed purchase priced in the account currency. Metered items may
|
|
3653
|
-
* quantities; those estimates are not amounts collectible at checkout.
|
|
3251
|
+
* A proposed purchase priced in the account's currency. Metered items may include usage estimates, which are not checkout amounts.
|
|
3654
3252
|
* @minItems 1
|
|
3655
3253
|
* @maxItems 100
|
|
3656
3254
|
*/
|
|
3657
3255
|
items?: QuoteItemInput[];
|
|
3658
|
-
/**
|
|
3659
|
-
* Preview paying this existing order. Its recorded purchase terms supply every line, and an order
|
|
3660
|
-
* whose terms are fixed returns its recorded amounts. A preview does not change the order.
|
|
3661
|
-
*/
|
|
3256
|
+
/** 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. */
|
|
3662
3257
|
order_id?: string;
|
|
3663
3258
|
/**
|
|
3664
|
-
* Preview renewing these subscriptions, each at most once
|
|
3665
|
-
* renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
|
|
3259
|
+
* 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.
|
|
3666
3260
|
* @minItems 1
|
|
3667
3261
|
* @maxItems 100
|
|
3668
3262
|
*/
|
|
@@ -3676,9 +3270,7 @@ export interface QuoteRequest {
|
|
|
3676
3270
|
refund?: OrderRefundQuoteInput;
|
|
3677
3271
|
}
|
|
3678
3272
|
/**
|
|
3679
|
-
* How tax applies to the customer, as in Stripe
|
|
3680
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
3681
|
-
* invoices state this. Only operators change it.
|
|
3273
|
+
* 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.
|
|
3682
3274
|
*/
|
|
3683
3275
|
export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
|
|
3684
3276
|
export declare const ContactTaxExempt: {
|
|
@@ -3687,7 +3279,7 @@ export declare const ContactTaxExempt: {
|
|
|
3687
3279
|
readonly reverse: "reverse";
|
|
3688
3280
|
};
|
|
3689
3281
|
/**
|
|
3690
|
-
* A billing
|
|
3282
|
+
* A contact of a billing account with one address. An account can hold several; a contact is not a login.
|
|
3691
3283
|
*/
|
|
3692
3284
|
export interface Contact {
|
|
3693
3285
|
id: string;
|
|
@@ -3715,11 +3307,7 @@ export interface Contact {
|
|
|
3715
3307
|
address_postal_code?: string;
|
|
3716
3308
|
/** @pattern ^([A-Z]{2})?$ */
|
|
3717
3309
|
address_country?: string;
|
|
3718
|
-
/**
|
|
3719
|
-
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
3720
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
3721
|
-
* invoices state this. Only operators change it.
|
|
3722
|
-
*/
|
|
3310
|
+
/** 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. */
|
|
3723
3311
|
tax_exempt: ContactTaxExempt;
|
|
3724
3312
|
active: boolean;
|
|
3725
3313
|
created_at: string;
|
|
@@ -3795,14 +3383,14 @@ export interface StatementAmounts {
|
|
|
3795
3383
|
total: Money;
|
|
3796
3384
|
}
|
|
3797
3385
|
/**
|
|
3798
|
-
* One billing account's usage billing for one UTC calendar month, summed over
|
|
3386
|
+
* 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.
|
|
3799
3387
|
*/
|
|
3800
3388
|
export interface MonthlyStatement {
|
|
3801
3389
|
billing_account_id: number;
|
|
3802
3390
|
currency: string;
|
|
3803
3391
|
period_start: string;
|
|
3804
3392
|
period_end: string;
|
|
3805
|
-
/** True after the period's final closing, which applies minimum charges
|
|
3393
|
+
/** 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. */
|
|
3806
3394
|
finalized: boolean;
|
|
3807
3395
|
finalized_at?: string;
|
|
3808
3396
|
/** Statements of the period, including the open one. */
|
|
@@ -3825,7 +3413,7 @@ export declare const StatementStatus: {
|
|
|
3825
3413
|
readonly closed: "closed";
|
|
3826
3414
|
};
|
|
3827
3415
|
/**
|
|
3828
|
-
* interim
|
|
3416
|
+
* `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.
|
|
3829
3417
|
*/
|
|
3830
3418
|
export type StatementType = (typeof StatementType)[keyof typeof StatementType];
|
|
3831
3419
|
export declare const StatementType: {
|
|
@@ -3834,7 +3422,7 @@ export declare const StatementType: {
|
|
|
3834
3422
|
readonly supplement: "supplement";
|
|
3835
3423
|
};
|
|
3836
3424
|
/**
|
|
3837
|
-
* An account's consumption for one billing period
|
|
3425
|
+
* 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.
|
|
3838
3426
|
*/
|
|
3839
3427
|
export interface Statement {
|
|
3840
3428
|
id: string;
|
|
@@ -3846,7 +3434,7 @@ export interface Statement {
|
|
|
3846
3434
|
sequence: number;
|
|
3847
3435
|
status: StatementStatus;
|
|
3848
3436
|
type: StatementType;
|
|
3849
|
-
/** True while the statement is open. The estimate
|
|
3437
|
+
/** 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. */
|
|
3850
3438
|
estimated: boolean;
|
|
3851
3439
|
amounts: StatementAmounts;
|
|
3852
3440
|
closed_at?: string;
|
|
@@ -3860,11 +3448,19 @@ export interface StatementList {
|
|
|
3860
3448
|
items: Statement[];
|
|
3861
3449
|
pagination: OffsetPagination;
|
|
3862
3450
|
}
|
|
3451
|
+
/**
|
|
3452
|
+
* 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.
|
|
3453
|
+
*/
|
|
3454
|
+
export type StatementItemDimensions = {
|
|
3455
|
+
[key: string]: string;
|
|
3456
|
+
};
|
|
3863
3457
|
export interface StatementItem {
|
|
3864
3458
|
project_id?: string;
|
|
3865
3459
|
product_id?: string;
|
|
3866
3460
|
meter_id?: string;
|
|
3867
3461
|
unit?: string;
|
|
3462
|
+
/** 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. */
|
|
3463
|
+
dimensions?: StatementItemDimensions;
|
|
3868
3464
|
/** Net usage quantity. Included only when grouping by meter. */
|
|
3869
3465
|
quantity?: string;
|
|
3870
3466
|
deducted_quantity?: string;
|