@leaflow/sdk 0.0.0-dev.352.g85966ed → 0.0.0-dev.353.g74313e0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/type/funds/v1/generated/models.d.ts +4 -4
- package/dist/billing/type/funds/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/models.d.ts +375 -779
- package/dist/billing/type/order/v1/generated/models.js +12 -44
- package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/billing/type/order/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/billing/type/order/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/billing/type/order/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/billing/type/order/v1/generated/validators/contact.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/currency.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/billing/type/order/v1/generated/validators/discount.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/billing/type/order/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/billing/type/order/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/billing/type/order/v1/generated/validators/order.zod.js +10 -12
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/billing/type/order/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/billing/type/order/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/billing/type/order/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/placedOrder.zod.d.ts +0 -1
- package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/billing/type/order/v1/generated/validators/price.zod.js +14 -11
- package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/billing/type/order/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/billing/type/order/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/billing/type/order/v1/generated/validators/priceType.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/priceType.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/productID.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +6 -3
- package/dist/billing/type/order/v1/generated/validators/quote.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/billing/type/order/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/billing/type/order/v1/generated/validators/rate.zod.js +14 -6
- package/dist/billing/type/order/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/billing/type/order/v1/generated/validators/refund.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/statement.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/billing/type/order/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/billing/type/order/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/tier.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/billing/type/order/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/billing/type/order/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/billing/type/order/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/billing/type/order/v1/generated/validators/usageType.zod.d.ts +14 -0
- package/dist/billing/type/order/v1/generated/validators/usageType.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/billing/type/quote/v1/generated/models.d.ts +4 -4
- package/dist/billing/type/quote/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/v1/generated/functions.d.ts +176 -310
- package/dist/billing/v1/generated/functions.js +175 -309
- package/dist/billing/v1/generated/models.d.ts +425 -863
- package/dist/billing/v1/generated/models.js +13 -49
- package/dist/billing/v1/generated/schemas.zod.d.ts +166 -383
- package/dist/billing/v1/generated/schemas.zod.js +213 -372
- package/dist/billing/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/billing/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/billing/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/billing/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/billing/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/billing/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/billing/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/billing/v1/generated/validators/billingScheme.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/billingScheme.zod.js +11 -0
- package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/billing/v1/generated/validators/contact.zod.js +2 -2
- package/dist/billing/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/billing/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/billing/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/billing/v1/generated/validators/currency.zod.js +1 -1
- package/dist/billing/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/billing/v1/generated/validators/discount.zod.js +4 -4
- package/dist/billing/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/billing/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/billing/v1/generated/validators/funds.zod.js +4 -4
- package/dist/billing/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/billing/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/billing/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/billing/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/billing/v1/generated/validators/listInvoicesParams.zod.d.ts +0 -1
- package/dist/billing/v1/generated/validators/listPricesParams.zod.d.ts +5 -2
- package/dist/billing/v1/generated/validators/listPricesParams.zod.js +4 -1
- package/dist/billing/v1/generated/validators/listSpendParams.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/listSpendParams.zod.js +3 -1
- package/dist/billing/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/billing/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/billing/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/billing/v1/generated/validators/order.zod.js +10 -12
- package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/billing/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/billing/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/billing/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/billing/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/billing/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/billing/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/billing/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/billing/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/billing/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/billing/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/price.zod.js +14 -11
- package/dist/billing/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/billing/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/billing/v1/generated/validators/priceType.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/priceType.zod.js +11 -0
- package/dist/billing/v1/generated/validators/productID.zod.js +1 -1
- package/dist/billing/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/billing/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/billing/v1/generated/validators/quote.zod.d.ts +6 -3
- package/dist/billing/v1/generated/validators/quote.zod.js +4 -4
- package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/billing/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/billing/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/billing/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/billing/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/billing/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/billing/v1/generated/validators/rate.zod.js +14 -6
- package/dist/billing/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/billing/v1/generated/validators/refund.zod.js +3 -3
- package/dist/billing/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/billing/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/billing/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/billing/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/billing/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/billing/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/billing/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/billing/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/billing/v1/generated/validators/statement.zod.js +2 -2
- package/dist/billing/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/billing/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/billing/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/billing/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/billing/v1/generated/validators/tier.zod.js +1 -1
- package/dist/billing/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/billing/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/billing/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/billing/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/billing/v1/generated/validators/usageType.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/usageType.zod.js +11 -0
- package/dist/billing/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/canopy/v1/generated/models.d.ts +375 -779
- package/dist/canopy/v1/generated/models.js +12 -44
- package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/canopy/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/billingScheme.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/billingScheme.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/canopy/v1/generated/validators/contact.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/canopy/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/currency.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/canopy/v1/generated/validators/discount.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/canopy/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/funds.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/canopy/v1/generated/validators/order.zod.js +10 -12
- package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/canopy/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +0 -1
- package/dist/canopy/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/canopy/v1/generated/validators/price.zod.js +14 -11
- package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/canopy/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/canopy/v1/generated/validators/priceType.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/priceType.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/productID.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +6 -3
- package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/canopy/v1/generated/validators/rate.zod.js +14 -6
- package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/canopy/v1/generated/validators/refund.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/statement.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/tier.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/canopy/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/canopy/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/canopy/v1/generated/validators/usageType.zod.d.ts +39 -0
- package/dist/canopy/v1/generated/validators/usageType.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/compute/v1/generated/models.d.ts +4 -4
- package/dist/compute/v1/generated/schemas.zod.d.ts +18 -18
- package/dist/compute/v1/generated/validators/allocateFloatingIPQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/allocateFloatingIPRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/backupService.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/billingChoice.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/bootDisk.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createBackupCapacityPackQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createBackupCapacityPackRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/createDiskQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createDiskRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createImageQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createImageRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskTypeListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskTypeResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/funds.zod.js +4 -4
- package/dist/compute/v1/generated/validators/iPv4PoolListResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/iPv4PoolResource.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/instanceTypeListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/instanceTypeResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/launchInstanceQuoteRequestBody.zod.d.ts +3 -3
- package/dist/compute/v1/generated/validators/launchInstanceRequestBody.zod.d.ts +3 -3
- package/dist/compute/v1/generated/validators/newBootDisk.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/newCompute.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/newFloatingIP.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/pricing.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/pricingOption.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/regionListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/regionResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/restoreBackupQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/restoreBackupRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/setSnapshotQuotaQuoteRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/setSnapshotQuotaRequestBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/snapshotQuota.zod.d.ts +2 -2
- package/dist/membership/v1/generated/models.d.ts +375 -779
- package/dist/membership/v1/generated/models.js +12 -44
- package/dist/membership/v1/generated/validators/accountBalance.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/accountBalance.zod.js +8 -8
- package/dist/membership/v1/generated/validators/activeResource.zod.js +8 -5
- package/dist/membership/v1/generated/validators/allowance.zod.js +3 -3
- package/dist/membership/v1/generated/validators/applicability.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/applicability.zod.js +12 -3
- package/dist/membership/v1/generated/validators/applicablePlan.zod.js +1 -1
- package/dist/membership/v1/generated/validators/billingAccount.zod.js +5 -5
- package/dist/membership/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
- package/dist/membership/v1/generated/validators/billingScheme.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/billingScheme.zod.js +11 -0
- package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellation.zod.js +4 -4
- package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +3 -3
- package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationItem.zod.js +6 -5
- package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
- package/dist/membership/v1/generated/validators/contact.zod.js +2 -2
- package/dist/membership/v1/generated/validators/creditGrant.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/creditGroup.zod.d.ts +22 -11
- package/dist/membership/v1/generated/validators/creditGroup.zod.js +1 -1
- package/dist/membership/v1/generated/validators/creditNote.zod.js +4 -4
- package/dist/membership/v1/generated/validators/currency6ff0ec7.zod.js +1 -1
- package/dist/membership/v1/generated/validators/discount.zod.d.ts +23 -12
- package/dist/membership/v1/generated/validators/discount.zod.js +4 -4
- package/dist/membership/v1/generated/validators/discountList.zod.d.ts +23 -12
- package/dist/membership/v1/generated/validators/entitlement.zod.js +1 -1
- package/dist/membership/v1/generated/validators/funds.zod.js +4 -4
- package/dist/membership/v1/generated/validators/invoice.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoice.zod.js +8 -8
- package/dist/membership/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/invoiceItem.zod.js +6 -4
- package/dist/membership/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/invoiceItemProration.zod.js +1 -3
- package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoiceStatus.zod.js +2 -2
- package/dist/membership/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/invoiceSummary.zod.js +3 -3
- package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/monthlyStatement.zod.js +2 -2
- package/dist/membership/v1/generated/validators/objectIdentity.zod.js +1 -1
- package/dist/membership/v1/generated/validators/order.zod.d.ts +7 -4
- package/dist/membership/v1/generated/validators/order.zod.js +10 -12
- package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/orderItem.zod.js +16 -14
- package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/orderItemStatus.zod.js +1 -1
- package/dist/membership/v1/generated/validators/orderList.zod.d.ts +7 -4
- package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/membership/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
- package/dist/membership/v1/generated/validators/orderStatus.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paidWith.zod.js +1 -1
- package/dist/membership/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
- package/dist/membership/v1/generated/validators/payTogetherRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/paymentAction.zod.js +4 -4
- package/dist/membership/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
- package/dist/membership/v1/generated/validators/paymentOption.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
- package/dist/membership/v1/generated/validators/paymentPreview.zod.js +4 -4
- package/dist/membership/v1/generated/validators/paymentResult.zod.js +5 -8
- package/dist/membership/v1/generated/validators/paymentStatus.zod.js +1 -1
- package/dist/membership/v1/generated/validators/placedOrder.zod.d.ts +0 -1
- package/dist/membership/v1/generated/validators/price.zod.d.ts +7 -5
- package/dist/membership/v1/generated/validators/price.zod.js +14 -11
- package/dist/membership/v1/generated/validators/priceList.zod.d.ts +7 -5
- package/dist/membership/v1/generated/validators/priceOption.zod.d.ts +7 -5
- package/dist/membership/v1/generated/validators/priceOption.zod.js +7 -3
- package/dist/membership/v1/generated/validators/priceType.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/priceType.zod.js +11 -0
- package/dist/membership/v1/generated/validators/productID.zod.js +1 -1
- package/dist/membership/v1/generated/validators/projectAssignment.zod.js +2 -2
- package/dist/membership/v1/generated/validators/purchaseOperation.zod.js +1 -1
- package/dist/membership/v1/generated/validators/quote.zod.d.ts +6 -3
- package/dist/membership/v1/generated/validators/quote.zod.js +4 -4
- package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/membership/v1/generated/validators/quoteItem.zod.js +4 -4
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +8 -8
- package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +1 -1
- package/dist/membership/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
- package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
- package/dist/membership/v1/generated/validators/quoteRequest.zod.js +5 -5
- package/dist/membership/v1/generated/validators/quotedDiscount.zod.js +1 -1
- package/dist/membership/v1/generated/validators/rate.zod.d.ts +11 -0
- package/dist/membership/v1/generated/validators/rate.zod.js +14 -6
- package/dist/membership/v1/generated/validators/rateList.zod.d.ts +11 -0
- package/dist/membership/v1/generated/validators/refund.zod.js +3 -3
- package/dist/membership/v1/generated/validators/refundPolicy.zod.js +1 -1
- package/dist/membership/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/membership/v1/generated/validators/renewRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/renewalPrice.zod.js +1 -1
- package/dist/membership/v1/generated/validators/scheduledChange.zod.js +2 -2
- package/dist/membership/v1/generated/validators/spendRow.zod.d.ts +8 -0
- package/dist/membership/v1/generated/validators/spendRow.zod.js +11 -0
- package/dist/membership/v1/generated/validators/spendRowList.zod.d.ts +8 -0
- package/dist/membership/v1/generated/validators/spendRowList.zod.js +1 -1
- package/dist/membership/v1/generated/validators/statement.zod.js +2 -2
- package/dist/membership/v1/generated/validators/statementItem.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/statementItem.zod.js +4 -0
- package/dist/membership/v1/generated/validators/statementSummary.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/statementType.zod.js +1 -1
- package/dist/membership/v1/generated/validators/subscription.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/subscription.zod.js +20 -14
- package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
- package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
- package/dist/membership/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
- package/dist/membership/v1/generated/validators/terminationPolicy.zod.js +1 -1
- package/dist/membership/v1/generated/validators/tier.zod.js +1 -1
- package/dist/membership/v1/generated/validators/topUp.zod.js +8 -8
- package/dist/membership/v1/generated/validators/topUpCreate.zod.js +4 -4
- package/dist/membership/v1/generated/validators/transaction.zod.js +6 -6
- package/dist/membership/v1/generated/validators/usageCharge.zod.js +4 -7
- package/dist/membership/v1/generated/validators/usageType.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/usageType.zod.js +11 -0
- package/dist/membership/v1/generated/validators/withdrawal.zod.js +2 -2
- package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +2 -2
- package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +1 -1
- package/dist/routes.d.ts +4 -4
- package/dist/routes.js +4 -4
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* OpenAPI spec version: v1
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* Whether a
|
|
9
|
+
* 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.
|
|
10
10
|
*/
|
|
11
11
|
export type TerminationPolicy = (typeof TerminationPolicy)[keyof typeof TerminationPolicy];
|
|
12
12
|
export declare const TerminationPolicy: {
|
|
@@ -14,16 +14,7 @@ export declare const TerminationPolicy: {
|
|
|
14
14
|
readonly period_end: "period_end";
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* none refunds nothing. prorated refunds the amount paid for the current period minus the value of
|
|
18
|
-
* the time used, never below zero and never more than what remains unrefunded. The time used runs
|
|
19
|
-
* from the period start to the effective cancellation time and is valued at the plan's
|
|
20
|
-
* shorter-period prices in the same currency, frozen at purchase as the order item's
|
|
21
|
-
* refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
|
|
22
|
-
* price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
|
|
23
|
-
* second. When the plan has no prepaid period shorter than the one bought, the time used is valued
|
|
24
|
-
* at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
|
|
25
|
-
* and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
|
|
26
|
-
* paid is refunded in the same proportion as the amount it was paid on.
|
|
17
|
+
* `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.
|
|
27
18
|
*/
|
|
28
19
|
export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
|
|
29
20
|
export declare const RefundPolicy: {
|
|
@@ -45,7 +36,7 @@ export declare const QuoteRenewalInterval: {
|
|
|
45
36
|
readonly year: "year";
|
|
46
37
|
};
|
|
47
38
|
/**
|
|
48
|
-
* Price renewing a
|
|
39
|
+
* Price renewing a licensed subscription. Give `price_id`, or `interval` with
|
|
49
40
|
* `interval_count`, to renew for another term at the price currently sold for it. Naming
|
|
50
41
|
* the current term, or giving neither, renews at the agreed amount. A term sold at several
|
|
51
42
|
* prices that differ in termination policy is refused with 409
|
|
@@ -85,9 +76,7 @@ export declare const QuoteRenewalResultInterval: {
|
|
|
85
76
|
*/
|
|
86
77
|
export type Money = string;
|
|
87
78
|
/**
|
|
88
|
-
* What renewing would charge. Renewing the same subscription for the same term and
|
|
89
|
-
* of periods charges exactly `total`, unless prices or the discounts the account holds
|
|
90
|
-
* change in between.
|
|
79
|
+
* 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.
|
|
91
80
|
*/
|
|
92
81
|
export interface QuoteRenewalResult {
|
|
93
82
|
/** Which renewal of the request this answers. */
|
|
@@ -98,11 +87,7 @@ export interface QuoteRenewalResult {
|
|
|
98
87
|
interval: QuoteRenewalResultInterval;
|
|
99
88
|
interval_count: number;
|
|
100
89
|
periods: number;
|
|
101
|
-
/**
|
|
102
|
-
* The price of the periods before the discounts the account holds. A discount the
|
|
103
|
-
* subscription already carries is reflected here. Contains tax only where the price
|
|
104
|
-
* itself includes it.
|
|
105
|
-
*/
|
|
90
|
+
/** 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. */
|
|
106
91
|
amount: Money;
|
|
107
92
|
/** The reduction from a discount the account holds. */
|
|
108
93
|
discount_amount: Money;
|
|
@@ -117,25 +102,25 @@ export interface QuoteRenewalResult {
|
|
|
117
102
|
total: Money;
|
|
118
103
|
}
|
|
119
104
|
/**
|
|
120
|
-
* One fully calculated purchase, estimated
|
|
105
|
+
* One fully calculated purchase, estimated metered usage or recorded order item. Amounts use the
|
|
121
106
|
* billing-account currency. An item with no immediate charge has zero checkout amounts.
|
|
122
107
|
*/
|
|
123
108
|
export interface QuoteItem {
|
|
124
109
|
tax_amount: Money;
|
|
125
110
|
tax_included_amount: Money;
|
|
126
111
|
/**
|
|
127
|
-
*
|
|
112
|
+
* The zero-based request line index, or the recorded order item's position for an order quote.
|
|
128
113
|
* @minimum 0
|
|
129
114
|
*/
|
|
130
115
|
index: number;
|
|
131
116
|
/** Present for an existing order quote; identifies the recorded item being priced. */
|
|
132
117
|
order_item_id?: string;
|
|
133
|
-
/** The selected price,
|
|
118
|
+
/** The selected price, also when the request identified it indirectly. */
|
|
134
119
|
price_id: string;
|
|
135
120
|
plan_name: string;
|
|
136
121
|
/** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
|
|
137
122
|
unit_amount: Money | null;
|
|
138
|
-
/** The quantity priced
|
|
123
|
+
/** The quantity priced; with duration_seconds, quantity times the duration. */
|
|
139
124
|
quantity: string;
|
|
140
125
|
/** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
|
|
141
126
|
amount: Money;
|
|
@@ -146,16 +131,16 @@ export interface QuoteItem {
|
|
|
146
131
|
/**
|
|
147
132
|
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
148
133
|
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
149
|
-
* A
|
|
134
|
+
* A licensed purchase may instead be paid with an online payment method.
|
|
150
135
|
*/
|
|
151
136
|
export interface Funds {
|
|
152
137
|
/** Spendable balance after pending returns. */
|
|
153
138
|
available_balance_amount: Money;
|
|
154
|
-
/** Currently effective credits eligible for the quoted purchases or
|
|
139
|
+
/** Currently effective credits eligible for the quoted purchases or metered usage. Each grant is counted once. */
|
|
155
140
|
usable_credit_amount: Money;
|
|
156
|
-
/** Currently effective credits that cannot fund any quoted purchase or
|
|
141
|
+
/** Currently effective credits that cannot fund any quoted purchase or metered target. Unused eligible credits are not restricted. */
|
|
157
142
|
restricted_credit_amount: Money;
|
|
158
|
-
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new
|
|
143
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new metered purchase's admission requirement. */
|
|
159
144
|
required_balance_amount: Money;
|
|
160
145
|
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
161
146
|
balance_shortfall_amount: Money;
|
|
@@ -168,8 +153,7 @@ export declare const QuotedDiscountType: {
|
|
|
168
153
|
readonly account_discount: "account_discount";
|
|
169
154
|
};
|
|
170
155
|
/**
|
|
171
|
-
* The discount selected for this calculation.
|
|
172
|
-
* reserve a redemption. Discount amounts are reported on the quote and its lines.
|
|
156
|
+
* The discount selected for this calculation, not applied and not reserved. Amounts are on the quote and its lines.
|
|
173
157
|
*/
|
|
174
158
|
export interface QuotedDiscount {
|
|
175
159
|
type: QuotedDiscountType;
|
|
@@ -197,30 +181,35 @@ export interface NamedIdentity {
|
|
|
197
181
|
/** @maxLength 255 */
|
|
198
182
|
name: string;
|
|
199
183
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
184
|
+
/**
|
|
185
|
+
* `one_time` charges once when bought. `recurring` charges again for every period, or for usage as it is settled.
|
|
186
|
+
*/
|
|
187
|
+
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
188
|
+
export declare const PriceType: {
|
|
204
189
|
readonly one_time: "one_time";
|
|
190
|
+
readonly recurring: "recurring";
|
|
205
191
|
};
|
|
206
192
|
/**
|
|
207
|
-
*
|
|
193
|
+
* `licensed` charges for the quantity bought, each period paid before it starts. `metered` charges for the usage
|
|
194
|
+
* reported, after it is settled; a metered subscription lasts until it is canceled. A one-time price is licensed.
|
|
195
|
+
*/
|
|
196
|
+
export type UsageType = (typeof UsageType)[keyof typeof UsageType];
|
|
197
|
+
export declare const UsageType: {
|
|
198
|
+
readonly licensed: "licensed";
|
|
199
|
+
readonly metered: "metered";
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* One subscription of the quoted cancellation.
|
|
208
203
|
*/
|
|
209
204
|
export interface CancellationRefundPreviewItem {
|
|
210
205
|
subscription_id: string;
|
|
211
206
|
plan_id: string;
|
|
212
207
|
plan_name: string;
|
|
213
|
-
/**
|
|
214
|
-
* The project and its current name, for display. Absent for a purchase at account level, and when the
|
|
215
|
-
* project details cannot be read at the moment.
|
|
216
|
-
*/
|
|
208
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read. */
|
|
217
209
|
project?: NamedIdentity | null;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
* cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
|
|
222
|
-
* until it is canceled and turns it back on.
|
|
223
|
-
*/
|
|
210
|
+
type: PriceType;
|
|
211
|
+
usage_type: UsageType;
|
|
212
|
+
/** 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. */
|
|
224
213
|
auto_renew: boolean;
|
|
225
214
|
unused_amount: Money;
|
|
226
215
|
refundable_amount: Money;
|
|
@@ -230,19 +219,19 @@ export interface CancellationRefundPreviewItem {
|
|
|
230
219
|
forfeited_amount: Money;
|
|
231
220
|
}
|
|
232
221
|
/**
|
|
233
|
-
* What the cancellation would return,
|
|
234
|
-
* `
|
|
222
|
+
* What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and
|
|
223
|
+
* `refundable_amount` when creating the cancellation.
|
|
235
224
|
*
|
|
236
|
-
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
|
|
237
|
-
*
|
|
238
|
-
* - `refundable_amount`: what is returned the way it was paid,
|
|
239
|
-
* `
|
|
240
|
-
* - `refund_amount`: the part returned to the balance or
|
|
225
|
+
* - `unused_amount`: before tax, the amount paid for the current periods minus the value of the time used,
|
|
226
|
+
* valued as refund policy `prorated` describes, whatever the refund terms say.
|
|
227
|
+
* - `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus
|
|
228
|
+
* `credit_amount`.
|
|
229
|
+
* - `refund_amount`: the part returned to the balance or the payment method.
|
|
241
230
|
* - `credit_amount`: the part restored to the credit grants that paid.
|
|
242
231
|
* - `tax_amount`: the tax included in `refundable_amount`.
|
|
243
232
|
* - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
|
|
244
233
|
*
|
|
245
|
-
*
|
|
234
|
+
* Metered and one-time subscriptions show zero; their usage until release is charged as usual.
|
|
246
235
|
*/
|
|
247
236
|
export interface CancellationRefundPreview {
|
|
248
237
|
mode: TerminationPolicy;
|
|
@@ -260,11 +249,7 @@ export interface CancellationRefundPreview {
|
|
|
260
249
|
items: CancellationRefundPreviewItem[];
|
|
261
250
|
}
|
|
262
251
|
/**
|
|
263
|
-
* An estimated refund to original payment sources. Before acceptance, cancellation returns the
|
|
264
|
-
* collected amount. For delivered service, only value funded by this order is included; renewals
|
|
265
|
-
* are evaluated under their own orders and the agreed termination terms apply. An unknown
|
|
266
|
-
* delivery outcome is not evidence that a refund is eligible. This calculation does not create
|
|
267
|
-
* a refund; the amount returned is determined when cancellation or termination is confirmed.
|
|
252
|
+
* 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.
|
|
268
253
|
*/
|
|
269
254
|
export interface OrderRefundQuote {
|
|
270
255
|
order_id: string;
|
|
@@ -274,21 +259,15 @@ export interface OrderRefundQuote {
|
|
|
274
259
|
currency: string;
|
|
275
260
|
}
|
|
276
261
|
/**
|
|
277
|
-
* A complete calculation in
|
|
278
|
-
* redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
|
|
279
|
-
* included in totals for reporting and are not collectible at checkout. Only an existing-order quote
|
|
280
|
-
* provides that order's checkout amount.
|
|
262
|
+
* 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.
|
|
281
263
|
*/
|
|
282
264
|
export interface Quote {
|
|
283
|
-
/** Account
|
|
265
|
+
/** Account funds for an existing-order checkout quote. Absent for usage estimates, refunds and cancellations. */
|
|
284
266
|
funds?: Funds;
|
|
285
267
|
subtotal: Money;
|
|
286
268
|
discount_amount: Money;
|
|
287
269
|
tax_amount: Money;
|
|
288
|
-
/**
|
|
289
|
-
* The discount evaluated for a purchase or order, without applying it. Null when none is selected or
|
|
290
|
-
* when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
|
|
291
|
-
*/
|
|
270
|
+
/** 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. */
|
|
292
271
|
discount: QuotedDiscount | null;
|
|
293
272
|
items: QuoteItem[];
|
|
294
273
|
renewals: QuoteRenewalResult[];
|
|
@@ -296,20 +275,15 @@ export interface Quote {
|
|
|
296
275
|
cancellation?: CancellationRefundPreview;
|
|
297
276
|
total: Money;
|
|
298
277
|
currency: string;
|
|
299
|
-
/** Present
|
|
278
|
+
/** Present when an order refund was requested. */
|
|
300
279
|
refund?: OrderRefundQuote;
|
|
301
280
|
}
|
|
302
281
|
/**
|
|
303
|
-
* A cancellation to quote: what ending these subscriptions together would return
|
|
304
|
-
* request; to compare, quote `immediate` and `period_end` separately.
|
|
305
|
-
*
|
|
306
|
-
* Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
|
|
307
|
-
* canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
|
|
308
|
-
* paid change still waiting to switch (`meta.order_id`).
|
|
282
|
+
* 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`).
|
|
309
283
|
*/
|
|
310
284
|
export interface QuoteCancellation {
|
|
311
285
|
/**
|
|
312
|
-
* The subscriptions to end together, all of one service
|
|
286
|
+
* The subscriptions to end together, all of one service, including every subscription released with a resource.
|
|
313
287
|
* @minItems 1
|
|
314
288
|
* @maxItems 50
|
|
315
289
|
*/
|
|
@@ -324,15 +298,12 @@ export interface CancellationCreate {
|
|
|
324
298
|
*/
|
|
325
299
|
subscription_ids: string[];
|
|
326
300
|
mode: TerminationPolicy;
|
|
327
|
-
/**
|
|
328
|
-
* For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
|
|
329
|
-
* at most ten minutes old. The refund is computed as of it. Now when omitted.
|
|
330
|
-
*/
|
|
301
|
+
/** 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. */
|
|
331
302
|
proration_date?: string;
|
|
332
|
-
/** The `refundable_amount
|
|
303
|
+
/** The quote's `refundable_amount`; the cancellation is refused when the refund differs. */
|
|
333
304
|
expected_refundable_amount: Money & string;
|
|
334
305
|
/**
|
|
335
|
-
* A note from the account holder
|
|
306
|
+
* A note from the account holder, kept with the cancellation.
|
|
336
307
|
* @maxLength 1024
|
|
337
308
|
*/
|
|
338
309
|
reason?: string;
|
|
@@ -347,7 +318,7 @@ export declare const CancellationStatus: {
|
|
|
347
318
|
readonly failed: "failed";
|
|
348
319
|
};
|
|
349
320
|
/**
|
|
350
|
-
* Who
|
|
321
|
+
* Who requested it; `project_deletion` means the project was deleted.
|
|
351
322
|
*/
|
|
352
323
|
export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
|
|
353
324
|
export declare const CancellationOrigin: {
|
|
@@ -355,17 +326,6 @@ export declare const CancellationOrigin: {
|
|
|
355
326
|
readonly operator: "operator";
|
|
356
327
|
readonly project_deletion: "project_deletion";
|
|
357
328
|
};
|
|
358
|
-
/**
|
|
359
|
-
* How the subscription is charged. Creating the cancellation turned automatic renewal off;
|
|
360
|
-
* withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
|
|
361
|
-
* `prepaid` one.
|
|
362
|
-
*/
|
|
363
|
-
export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
|
|
364
|
-
export declare const CancellationItemChargeType: {
|
|
365
|
-
readonly postpaid: "postpaid";
|
|
366
|
-
readonly prepaid: "prepaid";
|
|
367
|
-
readonly one_time: "one_time";
|
|
368
|
-
};
|
|
369
329
|
export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
|
|
370
330
|
export declare const CancellationItemStatus: {
|
|
371
331
|
readonly requested: "requested";
|
|
@@ -379,19 +339,19 @@ export declare const CancellationItemStatus: {
|
|
|
379
339
|
* One subscription of the cancellation.
|
|
380
340
|
*/
|
|
381
341
|
export interface CancellationItem {
|
|
382
|
-
/** The cancellation item
|
|
342
|
+
/** The subscription's cancellation item, the same as `Subscription.cancellation.id`. */
|
|
383
343
|
id: string;
|
|
384
344
|
subscription_id: string;
|
|
385
345
|
plan_id: string;
|
|
386
346
|
plan_name: string;
|
|
347
|
+
type: PriceType;
|
|
387
348
|
/**
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
* `prepaid` one.
|
|
349
|
+
* Creating the cancellation turned automatic renewal off; withdrawing it turns renewal back on
|
|
350
|
+
* for a `metered` subscription and leaves it off for a `licensed` one.
|
|
391
351
|
*/
|
|
392
|
-
|
|
352
|
+
usage_type: UsageType;
|
|
393
353
|
status: CancellationItemStatus;
|
|
394
|
-
/**
|
|
354
|
+
/** The release stopped or its result is unknown; present while the release needs resolution. */
|
|
395
355
|
failure_code?: string;
|
|
396
356
|
release_started_at?: string;
|
|
397
357
|
/** When the service ended, as confirmed by the service that provides it. */
|
|
@@ -421,20 +381,14 @@ export interface Cancellation {
|
|
|
421
381
|
scheduled_at?: string;
|
|
422
382
|
/** For `immediate`, the second the refund is computed as of. */
|
|
423
383
|
proration_date?: string;
|
|
424
|
-
/** Who
|
|
384
|
+
/** Who requested it; `project_deletion` means the project was deleted. */
|
|
425
385
|
origin: CancellationOrigin;
|
|
426
|
-
/**
|
|
427
|
-
* The billing account that paid for these subscriptions when the cancellation was created: the
|
|
428
|
-
* account of an account-level purchase, or the account the project was linked to.
|
|
429
|
-
*/
|
|
386
|
+
/** 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. */
|
|
430
387
|
billing_account_id: number;
|
|
431
388
|
currency: string;
|
|
432
|
-
/** The refund confirmed when
|
|
389
|
+
/** The refund confirmed when the cancellation was created. Absent when the platform created it. */
|
|
433
390
|
expected_refundable_amount?: Money;
|
|
434
|
-
/**
|
|
435
|
-
* Present with `failed`. A code of the service that provides the resources, such as a disk
|
|
436
|
-
* that can only be released with its server. Clients map it to their own wording.
|
|
437
|
-
*/
|
|
391
|
+
/** Present with `failed`: the owning service's code, such as for a disk that can only be released with its server. */
|
|
438
392
|
failure_code?: string;
|
|
439
393
|
requested_at: string;
|
|
440
394
|
completed_at?: string;
|
|
@@ -471,13 +425,11 @@ export declare const SubscriptionCancellationMode: {
|
|
|
471
425
|
readonly period_end: "period_end";
|
|
472
426
|
};
|
|
473
427
|
/**
|
|
474
|
-
* The latest cancellation
|
|
475
|
-
* item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
|
|
476
|
-
* confirmed end of service. A cancellation alone does not stop metering or issue a refund.
|
|
428
|
+
* 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.
|
|
477
429
|
*/
|
|
478
430
|
export interface SubscriptionCancellation {
|
|
479
431
|
reason?: string;
|
|
480
|
-
/** The cancellation this
|
|
432
|
+
/** The cancellation this item belongs to, with the other subscriptions released together. */
|
|
481
433
|
cancellation_id?: string;
|
|
482
434
|
id: string;
|
|
483
435
|
subscription_id: string;
|
|
@@ -511,7 +463,7 @@ export interface Error {
|
|
|
511
463
|
status: number;
|
|
512
464
|
}
|
|
513
465
|
/**
|
|
514
|
-
*
|
|
466
|
+
* The platform service's fixed identifier, such as compute, canopy or assistant.
|
|
515
467
|
* @minLength 1
|
|
516
468
|
* @maxLength 64
|
|
517
469
|
* @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
|
|
@@ -530,29 +482,22 @@ export declare const BillingAccountStatus: {
|
|
|
530
482
|
};
|
|
531
483
|
export interface BillingAccount {
|
|
532
484
|
/**
|
|
533
|
-
* The active contact used for
|
|
485
|
+
* The active contact used for invoices, of this account; null clears it.
|
|
534
486
|
* @nullable
|
|
535
487
|
*/
|
|
536
488
|
invoice_contact_id?: string | null;
|
|
537
489
|
id: number;
|
|
538
|
-
/**
|
|
490
|
+
/** Your name for the account. */
|
|
539
491
|
name?: string;
|
|
540
492
|
/** Fixed when the account was opened. */
|
|
541
493
|
currency: string;
|
|
542
494
|
status: BillingAccountStatus;
|
|
543
|
-
/**
|
|
544
|
-
* How far past the suspension threshold this account may go before its resources are
|
|
545
|
-
* suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
|
|
546
|
-
*/
|
|
495
|
+
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
547
496
|
grace_amount?: string;
|
|
548
|
-
/**
|
|
549
|
-
* How long this account has to top up after crossing the suspension threshold.
|
|
550
|
-
* 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
|
|
551
|
-
*/
|
|
497
|
+
/** 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. */
|
|
552
498
|
grace_period_seconds?: number;
|
|
553
499
|
/**
|
|
554
|
-
*
|
|
555
|
-
* Null or absent if the account is not closed or its historical close time is unknown.
|
|
500
|
+
* When the account was closed. Null if it is not closed or the time is unknown.
|
|
556
501
|
* @nullable
|
|
557
502
|
*/
|
|
558
503
|
readonly closed_at?: string | null;
|
|
@@ -569,7 +514,7 @@ export interface Currency {
|
|
|
569
514
|
*/
|
|
570
515
|
code: string;
|
|
571
516
|
/**
|
|
572
|
-
* Decimal places of the
|
|
517
|
+
* Decimal places of the ISO 4217 minor unit.
|
|
573
518
|
* @minimum 0
|
|
574
519
|
* @maximum 4
|
|
575
520
|
*/
|
|
@@ -596,7 +541,7 @@ export interface BillingAccountCreate {
|
|
|
596
541
|
}
|
|
597
542
|
export interface BillingAccountUpdate {
|
|
598
543
|
/**
|
|
599
|
-
* The active contact used for
|
|
544
|
+
* The active contact used for invoices, of this account; null clears it.
|
|
600
545
|
* @nullable
|
|
601
546
|
*/
|
|
602
547
|
invoice_contact_id?: string | null;
|
|
@@ -608,7 +553,7 @@ export interface BillingAccountList {
|
|
|
608
553
|
pagination: OffsetPagination;
|
|
609
554
|
}
|
|
610
555
|
/**
|
|
611
|
-
* A plan
|
|
556
|
+
* A plan referenced by an applicability; active is false once it is archived, and the reference still applies.
|
|
612
557
|
*/
|
|
613
558
|
export interface ApplicablePlan {
|
|
614
559
|
id: string;
|
|
@@ -616,24 +561,20 @@ export interface ApplicablePlan {
|
|
|
616
561
|
active: boolean;
|
|
617
562
|
}
|
|
618
563
|
/**
|
|
619
|
-
* A catalog object inlined for display.
|
|
564
|
+
* A catalog object, inlined for display.
|
|
620
565
|
*/
|
|
621
566
|
export interface ObjectIdentity {
|
|
622
567
|
lookup_key?: string;
|
|
623
568
|
id: string;
|
|
624
569
|
name: string;
|
|
625
570
|
}
|
|
626
|
-
|
|
627
|
-
|
|
571
|
+
/**
|
|
572
|
+
* `per_unit` multiplies a unit amount; `tiered` walks a ladder.
|
|
573
|
+
*/
|
|
574
|
+
export type BillingScheme = (typeof BillingScheme)[keyof typeof BillingScheme];
|
|
575
|
+
export declare const BillingScheme: {
|
|
628
576
|
readonly per_unit: "per_unit";
|
|
629
577
|
readonly tiered: "tiered";
|
|
630
|
-
readonly rated: "rated";
|
|
631
|
-
};
|
|
632
|
-
export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
|
|
633
|
-
export declare const PriceOptionType: {
|
|
634
|
-
readonly postpaid: "postpaid";
|
|
635
|
-
readonly prepaid: "prepaid";
|
|
636
|
-
readonly one_time: "one_time";
|
|
637
578
|
};
|
|
638
579
|
export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
|
|
639
580
|
export declare const PriceOptionInterval: {
|
|
@@ -643,16 +584,18 @@ export declare const PriceOptionInterval: {
|
|
|
643
584
|
readonly year: "year";
|
|
644
585
|
};
|
|
645
586
|
/**
|
|
646
|
-
* A price's display terms, including archived prices referenced by an applicability
|
|
587
|
+
* A price's display terms, including archived prices referenced by an applicability.
|
|
647
588
|
*/
|
|
648
589
|
export interface PriceOption {
|
|
649
590
|
product: Product;
|
|
650
591
|
plan: ObjectIdentity;
|
|
651
|
-
|
|
592
|
+
/** Absent when the price delegates to a rate card. */
|
|
593
|
+
billing_scheme?: BillingScheme;
|
|
652
594
|
unit_quantity: string;
|
|
653
595
|
id: string;
|
|
654
596
|
currency: string;
|
|
655
|
-
type:
|
|
597
|
+
type: PriceType;
|
|
598
|
+
usage_type: UsageType;
|
|
656
599
|
interval: PriceOptionInterval;
|
|
657
600
|
/** How many periods one purchase covers. */
|
|
658
601
|
interval_count?: number;
|
|
@@ -661,11 +604,7 @@ export interface PriceOption {
|
|
|
661
604
|
active: boolean;
|
|
662
605
|
}
|
|
663
606
|
/**
|
|
664
|
-
*
|
|
665
|
-
* zero-charge purchases. It does not mean the account's first purchase; use
|
|
666
|
-
* `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
|
|
667
|
-
* configuration or billing-term changes, including changes that increase or decrease
|
|
668
|
-
* the amount due and changes with no additional charge or refund.
|
|
607
|
+
* 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.
|
|
669
608
|
*/
|
|
670
609
|
export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
|
|
671
610
|
export declare const PurchaseOperation: {
|
|
@@ -674,20 +613,18 @@ export declare const PurchaseOperation: {
|
|
|
674
613
|
readonly modify: "modify";
|
|
675
614
|
};
|
|
676
615
|
/**
|
|
677
|
-
*
|
|
678
|
-
* given, subject to the charge type, operation and term conditions. Entries always include their
|
|
679
|
-
* display fields; archived plans and prices stay listed with active set to false.
|
|
616
|
+
* 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.
|
|
680
617
|
*/
|
|
681
618
|
export interface Applicability {
|
|
682
619
|
products?: Product[];
|
|
683
620
|
plans?: ApplicablePlan[];
|
|
684
621
|
prices?: PriceOption[];
|
|
685
|
-
|
|
622
|
+
/** The price types covered; empty covers both. */
|
|
623
|
+
price_types?: PriceType[];
|
|
624
|
+
/** The usage types covered; empty covers both. */
|
|
625
|
+
usage_types?: UsageType[];
|
|
686
626
|
operations?: PurchaseOperation[];
|
|
687
|
-
/**
|
|
688
|
-
* The shortest term a purchase may have, in months. A purchase with no term, such as
|
|
689
|
-
* metered usage, never qualifies while this is set.
|
|
690
|
-
*/
|
|
627
|
+
/** The shortest term a purchase may have, in months. Purchases without a term, such as metered usage, do not qualify while this is set. */
|
|
691
628
|
min_term_months?: number;
|
|
692
629
|
/** The longest term a purchase may have, in months. */
|
|
693
630
|
max_term_months?: number;
|
|
@@ -696,56 +633,42 @@ export interface Applicability {
|
|
|
696
633
|
excluded_prices?: PriceOption[];
|
|
697
634
|
}
|
|
698
635
|
export interface CreditGroup {
|
|
699
|
-
/** What the credit in this group may pay for
|
|
636
|
+
/** What the credit in this group may pay for; no restrictions means anything on the account. */
|
|
700
637
|
applies_to: Applicability;
|
|
701
638
|
/** Restricted to your first purchase of anything it applies to. */
|
|
702
639
|
first_purchase_only?: boolean;
|
|
703
640
|
amount: Money;
|
|
704
641
|
}
|
|
705
642
|
/**
|
|
706
|
-
*
|
|
643
|
+
* Balance, credits and unpaid charges, each reported separately.
|
|
707
644
|
*/
|
|
708
645
|
export interface AccountBalance {
|
|
709
646
|
/** 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. */
|
|
710
647
|
available_credit: Money;
|
|
711
|
-
/** Credit expected to pay unbilled_amount and due
|
|
648
|
+
/** 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. */
|
|
712
649
|
estimated_credit_applied: Money;
|
|
713
|
-
/** Current estimate of
|
|
650
|
+
/** Current estimate of priced usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
|
|
714
651
|
unbilled_amount: Money;
|
|
715
652
|
billing_account_id: number;
|
|
716
653
|
currency: string;
|
|
717
|
-
/**
|
|
718
|
-
* Prepaid funds in the account currency, excluding credits. May be negative after a payment
|
|
719
|
-
* dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
|
|
720
|
-
*/
|
|
654
|
+
/** 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. */
|
|
721
655
|
balance: Money;
|
|
722
|
-
/**
|
|
723
|
-
* The recorded remaining credit, including restricted grants. It is not withdrawable
|
|
724
|
-
* and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
|
|
725
|
-
* credits balance does not imply that due is zero.
|
|
726
|
-
*/
|
|
656
|
+
/** 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. */
|
|
727
657
|
credits: Money;
|
|
728
|
-
/** Currently valid credit
|
|
658
|
+
/** Currently valid credit restricted to certain products, operations or conditions; part of credits, not of balance. */
|
|
729
659
|
restricted_credits: Money;
|
|
730
|
-
/**
|
|
731
|
-
* Currently valid, unspent credit grouped by permitted use. Restrictions and
|
|
732
|
-
* validity dates determine which charges a group can cover, so these groups are not a general
|
|
733
|
-
* spendable balance and may differ from the recorded credits total.
|
|
734
|
-
*/
|
|
660
|
+
/** 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. */
|
|
735
661
|
credit_groups: CreditGroup[];
|
|
736
|
-
/** Amount still payable on issued invoices. The invoice of an order not yet accepted is
|
|
662
|
+
/** 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. */
|
|
737
663
|
due: Money;
|
|
738
664
|
pending_returns_amount: Money;
|
|
739
665
|
}
|
|
740
666
|
/**
|
|
741
|
-
* A project's assignment to a billing account
|
|
667
|
+
* A project's assignment to a billing account from effective_from until effective_to; an open assignment has no end.
|
|
742
668
|
*/
|
|
743
669
|
export interface ProjectAssignment {
|
|
744
670
|
project_id: string;
|
|
745
|
-
/**
|
|
746
|
-
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
747
|
-
* details cannot be read at the moment; `project_id` still identifies it.
|
|
748
|
-
*/
|
|
671
|
+
/** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
|
|
749
672
|
project?: NamedIdentity | null;
|
|
750
673
|
billing_account_id: number;
|
|
751
674
|
account_name?: string;
|
|
@@ -762,16 +685,7 @@ export interface SetProjectAssignmentRequest {
|
|
|
762
685
|
billing_account_id: number;
|
|
763
686
|
}
|
|
764
687
|
/**
|
|
765
|
-
* `pending` until the payment gateway reaches a result
|
|
766
|
-
*
|
|
767
|
-
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
768
|
-
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
769
|
-
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
770
|
-
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
771
|
-
* payment.
|
|
772
|
-
*
|
|
773
|
-
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
774
|
-
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
688
|
+
* `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.
|
|
775
689
|
*/
|
|
776
690
|
export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
|
|
777
691
|
export declare const TopUpStatus: {
|
|
@@ -786,8 +700,7 @@ export interface AccountIdentity {
|
|
|
786
700
|
currency: string;
|
|
787
701
|
}
|
|
788
702
|
/**
|
|
789
|
-
* Why a gateway payment was withdrawn
|
|
790
|
-
* allowed for payment. `requested_by_customer` means the customer canceled it.
|
|
703
|
+
* Why a gateway payment was withdrawn: `abandoned` when the customer did not complete it in time, `requested_by_customer` when the customer canceled it.
|
|
791
704
|
*/
|
|
792
705
|
export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
|
|
793
706
|
export declare const PaymentCancellationReason: {
|
|
@@ -801,83 +714,55 @@ export declare const PaymentActionType: {
|
|
|
801
714
|
readonly sdk: "sdk";
|
|
802
715
|
};
|
|
803
716
|
/**
|
|
804
|
-
* The customer's next
|
|
717
|
+
* The customer's next step; the payment outcome is reported separately.
|
|
805
718
|
*/
|
|
806
719
|
export interface PaymentAction {
|
|
807
720
|
type: PaymentActionType;
|
|
808
|
-
/**
|
|
721
|
+
/** The browser adapter for the action, for example stripe. */
|
|
809
722
|
provider?: string;
|
|
810
723
|
url?: string;
|
|
811
|
-
/** QR content to render
|
|
724
|
+
/** QR content to render, not an image URL. */
|
|
812
725
|
qr_code?: string;
|
|
813
|
-
/** Short-lived client credential for this payment
|
|
726
|
+
/** Short-lived client credential for confirming this payment in the browser. */
|
|
814
727
|
client_secret?: string;
|
|
815
728
|
public_key?: string;
|
|
816
729
|
}
|
|
817
730
|
/**
|
|
818
|
-
* A top-up attempt and its outcome. A successful top-up adds
|
|
731
|
+
* 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.
|
|
819
732
|
*/
|
|
820
733
|
export interface TopUp {
|
|
821
734
|
id: string;
|
|
822
735
|
billing_account_id: number;
|
|
823
736
|
account: AccountIdentity;
|
|
824
|
-
/** What is credited to the account, in
|
|
737
|
+
/** What is credited to the account, in its currency. */
|
|
825
738
|
amount: Money;
|
|
826
739
|
currency: string;
|
|
827
|
-
/**
|
|
828
|
-
* The part of this top-up still held in the balance. Pending refunds can temporarily
|
|
829
|
-
* reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
|
|
830
|
-
*/
|
|
740
|
+
/** 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. */
|
|
831
741
|
remaining_amount?: Money;
|
|
832
|
-
/**
|
|
833
|
-
* `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
|
|
834
|
-
*
|
|
835
|
-
* `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
|
|
836
|
-
* and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
|
|
837
|
-
* `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
|
|
838
|
-
* says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
|
|
839
|
-
* payment.
|
|
840
|
-
*
|
|
841
|
-
* `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
|
|
842
|
-
* attempt, the amount is credited as a separate `succeeded` top-up.
|
|
843
|
-
*/
|
|
742
|
+
/** `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. */
|
|
844
743
|
status: TopUpStatus;
|
|
845
744
|
cancellation_reason?: PaymentCancellationReason;
|
|
846
745
|
/** Which payment gateway collected it. */
|
|
847
746
|
payment_gateway?: string;
|
|
848
747
|
/** The selected payment method, such as card, wechat_pay or alipay. */
|
|
849
748
|
method_type?: string;
|
|
850
|
-
/**
|
|
851
|
-
* The currency the customer was actually charged in, when the checkout page collected a
|
|
852
|
-
* local one. Absent when it was the same as the account's.
|
|
853
|
-
*/
|
|
749
|
+
/** The currency the customer was charged in when the checkout collected a local currency; absent when it is the account's. */
|
|
854
750
|
presentment_currency?: string;
|
|
855
|
-
/**
|
|
856
|
-
* What was charged, in `presentment_currency`. It will not equal `amount`, and it is
|
|
857
|
-
* the figure that appears on the customer's card or wallet statement.
|
|
858
|
-
*/
|
|
751
|
+
/** The amount charged in `presentment_currency`, as shown on the customer's statement. */
|
|
859
752
|
presentment_amount?: Money;
|
|
860
|
-
/**
|
|
861
|
-
* Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
|
|
862
|
-
* passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
|
|
863
|
-
* such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
|
|
864
|
-
* such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
|
|
865
|
-
* to their own wording and treat an unknown value as a generic decline.
|
|
866
|
-
*/
|
|
753
|
+
/** 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. */
|
|
867
754
|
failure_reason?: string;
|
|
868
755
|
action?: PaymentAction;
|
|
869
756
|
created_at: string;
|
|
870
757
|
/**
|
|
871
|
-
* When the funds arrived
|
|
872
|
-
* reconciling against a statement uses this rather than the moment it was started.
|
|
873
|
-
* Absent until the payment completes.
|
|
758
|
+
* When the funds arrived, possibly days after `created_at`. Absent until the payment completes.
|
|
874
759
|
* @nullable
|
|
875
760
|
*/
|
|
876
761
|
settled_at?: string | null;
|
|
877
762
|
}
|
|
878
763
|
export interface TopUpCreate {
|
|
879
764
|
/**
|
|
880
|
-
* The gateway
|
|
765
|
+
* The gateway selected from the available payment options.
|
|
881
766
|
* @minLength 1
|
|
882
767
|
* @maxLength 32
|
|
883
768
|
*/
|
|
@@ -888,21 +773,12 @@ export interface TopUpCreate {
|
|
|
888
773
|
* @maxLength 64
|
|
889
774
|
*/
|
|
890
775
|
method_type: string;
|
|
891
|
-
/** The
|
|
776
|
+
/** The top-up ID, chosen by the caller. Read it after an uncertain response. */
|
|
892
777
|
id: string;
|
|
893
778
|
billing_account_id: number;
|
|
894
|
-
/**
|
|
895
|
-
* In the account's currency, and no finer than that currency's smallest unit:
|
|
896
|
-
* two decimals for most, none for the yen. A finer amount is refused here rather
|
|
897
|
-
* than at the checkout page, where the customer would see the gateway's own wording
|
|
898
|
-
* instead of an explanation.
|
|
899
|
-
*
|
|
900
|
-
* There is a minimum, which differs by currency. Below it the gateway's fee
|
|
901
|
-
* exceeds the top-up itself, so such a payment costs more to accept than it brings.
|
|
902
|
-
* The minimum in force is returned with the rejection.
|
|
903
|
-
*/
|
|
779
|
+
/** 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. */
|
|
904
780
|
amount: Money & string;
|
|
905
|
-
/** Charge a saved method instead of opening a checkout page. */
|
|
781
|
+
/** Charge a saved payment method instead of opening a checkout page. */
|
|
906
782
|
payment_method_id?: string;
|
|
907
783
|
/** Where to send the customer after checkout. */
|
|
908
784
|
return_url?: string;
|
|
@@ -914,14 +790,11 @@ export interface TopUpList {
|
|
|
914
790
|
export interface PaymentOptionMethod {
|
|
915
791
|
/** The value to send as `method_type`, such as card, wechat_pay or alipay. */
|
|
916
792
|
method_type: string;
|
|
917
|
-
/**
|
|
918
|
-
* Whether a method of this type can be saved with create-payment-method-setup and charged later
|
|
919
|
-
* without the customer present. Methods that are not reusable are paid anew each time.
|
|
920
|
-
*/
|
|
793
|
+
/** Whether this method type can be saved with create-payment-method-setup and charged later without the customer. */
|
|
921
794
|
reusable: boolean;
|
|
922
795
|
}
|
|
923
796
|
/**
|
|
924
|
-
* A
|
|
797
|
+
* A gateway accepting the account's currency, with its payment methods.
|
|
925
798
|
*/
|
|
926
799
|
export interface PaymentOption {
|
|
927
800
|
/** The value to send as `payment_gateway`. */
|
|
@@ -965,15 +838,10 @@ export interface PaymentMethodSetup {
|
|
|
965
838
|
billing_account_id: number;
|
|
966
839
|
}
|
|
967
840
|
/**
|
|
968
|
-
* What the payment gateway's browser library needs
|
|
969
|
-
* no address to redirect to: the form is rendered in the page, and the card goes straight
|
|
970
|
-
* from the browser to the gateway.
|
|
841
|
+
* 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.
|
|
971
842
|
*/
|
|
972
843
|
export interface PaymentMethodSetupResult {
|
|
973
|
-
/**
|
|
974
|
-
* The gateway's identifier for this attempt. Use it to tell a reloaded page apart
|
|
975
|
-
* from a second attempt.
|
|
976
|
-
*/
|
|
844
|
+
/** The gateway's identifier for this attempt. */
|
|
977
845
|
setup_id: string;
|
|
978
846
|
payment_gateway: string;
|
|
979
847
|
action: PaymentAction;
|
|
@@ -989,7 +857,7 @@ export interface PaymentMethodSetupResult {
|
|
|
989
857
|
*/
|
|
990
858
|
export interface PayInvoiceRequest {
|
|
991
859
|
/**
|
|
992
|
-
* Required to collect an online remainder. An existing attempt keeps its
|
|
860
|
+
* Required to collect an online remainder. An existing attempt keeps its gateway.
|
|
993
861
|
* @minLength 1
|
|
994
862
|
* @maxLength 32
|
|
995
863
|
*/
|
|
@@ -1000,51 +868,35 @@ export interface PayInvoiceRequest {
|
|
|
1000
868
|
* @maxLength 64
|
|
1001
869
|
*/
|
|
1002
870
|
method_type?: string;
|
|
1003
|
-
/**
|
|
871
|
+
/** A saved card of this billing account at the selected gateway. Omit to pay interactively. */
|
|
1004
872
|
payment_method_id?: string;
|
|
1005
|
-
/** Whether to apply the
|
|
873
|
+
/** Whether to apply the balance; credit grants are controlled by use_credits. */
|
|
1006
874
|
use_balance?: boolean;
|
|
1007
|
-
/** Apply eligible, unexpired credit grants before
|
|
875
|
+
/** Apply eligible, unexpired credit grants before the balance. Grants are never converted into balance. */
|
|
1008
876
|
use_credits?: boolean;
|
|
1009
877
|
return_url?: string;
|
|
1010
878
|
/**
|
|
1011
|
-
* The code to apply while the order's terms are not
|
|
1012
|
-
* account discount, or to keep the discount already recorded.
|
|
879
|
+
* 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.
|
|
1013
880
|
* @minLength 1
|
|
1014
881
|
* @maxLength 64
|
|
1015
882
|
*/
|
|
1016
883
|
promotion_code?: string;
|
|
1017
|
-
/**
|
|
1018
|
-
* The invoice total to expect, after discounts and tax and before credit grants or balance, as the
|
|
1019
|
-
* payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
|
|
1020
|
-
* and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
|
|
1021
|
-
*/
|
|
884
|
+
/** 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. */
|
|
1022
885
|
expected_amount?: Money & string;
|
|
1023
886
|
}
|
|
1024
887
|
/**
|
|
1025
|
-
* Name at least one invoice or order.
|
|
1026
|
-
* its currency; anything else is refused rather than partly paid.
|
|
888
|
+
* Name at least one invoice or order. All must belong to one account in its currency.
|
|
1027
889
|
*/
|
|
1028
890
|
export interface PayTogetherRequest {
|
|
1029
891
|
/** @maxItems 100 */
|
|
1030
892
|
invoice_ids?: string[];
|
|
1031
893
|
/** @maxItems 100 */
|
|
1032
894
|
order_ids?: string[];
|
|
1033
|
-
/**
|
|
1034
|
-
* The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
|
|
1035
|
-
* gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
|
|
1036
|
-
* the comparison.
|
|
1037
|
-
*/
|
|
895
|
+
/** 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. */
|
|
1038
896
|
expected_amount?: Money & string;
|
|
1039
897
|
}
|
|
1040
898
|
/**
|
|
1041
|
-
*
|
|
1042
|
-
*
|
|
1043
|
-
* succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
|
|
1044
|
-
* order rather than submitting another payment. requires_action means the customer must complete the
|
|
1045
|
-
* supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
|
|
1046
|
-
* declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
|
|
1047
|
-
* same or another method.
|
|
899
|
+
* `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.
|
|
1048
900
|
*/
|
|
1049
901
|
export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
|
|
1050
902
|
export declare const PaymentStatus: {
|
|
@@ -1070,7 +922,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1070
922
|
balance_applied: Money;
|
|
1071
923
|
}
|
|
1072
924
|
/**
|
|
1073
|
-
* What paying would take,
|
|
925
|
+
* What paying would take, calculated as paying does. Nothing is charged or reserved.
|
|
1074
926
|
*/
|
|
1075
927
|
export interface PaymentPreview {
|
|
1076
928
|
funds?: Funds;
|
|
@@ -1079,23 +931,19 @@ export interface PaymentPreview {
|
|
|
1079
931
|
amount_due: Money;
|
|
1080
932
|
/** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
|
|
1081
933
|
credit_applied: Money;
|
|
1082
|
-
/** The credit grants that would pay, in the order
|
|
934
|
+
/** The credit grants that would pay, in the order used. */
|
|
1083
935
|
credit_grants: AppliedCredit[];
|
|
1084
936
|
/** What the balance would pay. */
|
|
1085
937
|
balance_applied: Money;
|
|
1086
|
-
/** What would remain to
|
|
938
|
+
/** What would remain to pay online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
|
|
1087
939
|
gateway_amount: Money;
|
|
1088
940
|
/** The available balance after paying. */
|
|
1089
941
|
balance_after: Money;
|
|
1090
|
-
/** Paying together only
|
|
942
|
+
/** Paying together only: each invoice, in payment order. */
|
|
1091
943
|
invoices?: PaymentPreviewInvoice[];
|
|
1092
944
|
}
|
|
1093
945
|
/**
|
|
1094
|
-
* Present on refunds
|
|
1095
|
-
*
|
|
1096
|
-
* - `balance`: back to the account balance.
|
|
1097
|
-
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1098
|
-
* - `gateway`: back to the payment method it was paid with.
|
|
946
|
+
* 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.
|
|
1099
947
|
*/
|
|
1100
948
|
export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
|
|
1101
949
|
export declare const TransactionRefundDestination: {
|
|
@@ -1104,9 +952,7 @@ export declare const TransactionRefundDestination: {
|
|
|
1104
952
|
readonly gateway: "gateway";
|
|
1105
953
|
};
|
|
1106
954
|
/**
|
|
1107
|
-
* `failed
|
|
1108
|
-
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
1109
|
-
* an invoice the payment was meant to pay remains open for another payment.
|
|
955
|
+
* `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.
|
|
1110
956
|
*/
|
|
1111
957
|
export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
|
|
1112
958
|
export declare const TransactionStatus: {
|
|
@@ -1127,7 +973,7 @@ export declare const TransactionType: {
|
|
|
1127
973
|
readonly fee: "fee";
|
|
1128
974
|
};
|
|
1129
975
|
/**
|
|
1130
|
-
* A funds
|
|
976
|
+
* A funds movement with one source. Refunds name the original transaction. Unknown gateway results stay pending.
|
|
1131
977
|
*/
|
|
1132
978
|
export interface Transaction {
|
|
1133
979
|
invoice_id?: string;
|
|
@@ -1136,47 +982,22 @@ export interface Transaction {
|
|
|
1136
982
|
credit_grant_id?: string;
|
|
1137
983
|
credit_grant?: ObjectIdentity;
|
|
1138
984
|
refund_id?: string;
|
|
1139
|
-
/**
|
|
1140
|
-
* Present on refunds. Where this part of the refund goes.
|
|
1141
|
-
*
|
|
1142
|
-
* - `balance`: back to the account balance.
|
|
1143
|
-
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1144
|
-
* - `gateway`: back to the payment method it was paid with.
|
|
1145
|
-
*/
|
|
985
|
+
/** 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. */
|
|
1146
986
|
refund_destination?: TransactionRefundDestination;
|
|
1147
|
-
/**
|
|
1148
|
-
* `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
1149
|
-
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
1150
|
-
* an invoice the payment was meant to pay remains open for another payment.
|
|
1151
|
-
*/
|
|
987
|
+
/** `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. */
|
|
1152
988
|
status?: TransactionStatus;
|
|
1153
989
|
cancellation_reason?: PaymentCancellationReason;
|
|
1154
990
|
payment_gateway?: string;
|
|
1155
991
|
method_type?: string;
|
|
1156
|
-
/**
|
|
1157
|
-
* Why it failed. Present with `failed`. For a declined gateway payment the value is the
|
|
1158
|
-
* gateway's own code, passed on unchanged: the card issuer's decline code when there is one
|
|
1159
|
-
* (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
|
|
1160
|
-
* error code (Stripe's code, such as card_declined, expired_card or
|
|
1161
|
-
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1162
|
-
* unknown value as a generic decline.
|
|
1163
|
-
*/
|
|
992
|
+
/** 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. */
|
|
1164
993
|
failure_reason?: string;
|
|
1165
994
|
settled_at?: string;
|
|
1166
995
|
id: string;
|
|
1167
996
|
billing_account_id?: number;
|
|
1168
997
|
type: TransactionType;
|
|
1169
|
-
/**
|
|
1170
|
-
* Signed by type: positive for `topup` and `payment`, negative for `refund`.
|
|
1171
|
-
* An `adjustment` is positive when it adds to the balance and negative when it takes from
|
|
1172
|
-
* it. For the other types the sign does not tell the effect on the balance: a payment from
|
|
1173
|
-
* the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
|
|
1174
|
-
*/
|
|
998
|
+
/** 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. */
|
|
1175
999
|
amount: Money;
|
|
1176
|
-
/**
|
|
1177
|
-
* How much of this transaction is still available in the balance. Only top-ups, positive
|
|
1178
|
-
* adjustments and gateway payments later returned to the balance can be non-zero.
|
|
1179
|
-
*/
|
|
1000
|
+
/** 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. */
|
|
1180
1001
|
remaining_amount: Money;
|
|
1181
1002
|
currency: string;
|
|
1182
1003
|
reason?: string;
|
|
@@ -1184,53 +1005,31 @@ export interface Transaction {
|
|
|
1184
1005
|
}
|
|
1185
1006
|
export interface PaymentResult {
|
|
1186
1007
|
transactions: Transaction[];
|
|
1187
|
-
/** The gateway transaction, when one is involved.
|
|
1008
|
+
/** The gateway transaction, when one is involved. */
|
|
1188
1009
|
transaction_id?: string;
|
|
1189
1010
|
status: PaymentStatus;
|
|
1190
1011
|
amount_paid: Money;
|
|
1191
|
-
/**
|
|
1192
|
-
* What is still outstanding. Zero once the payment succeeds. Unchanged while
|
|
1193
|
-
* `processing`: nothing is collected until the gateway confirms it.
|
|
1194
|
-
*/
|
|
1012
|
+
/** What is still outstanding: zero once the payment succeeds, unchanged while `processing`. */
|
|
1195
1013
|
amount_due: Money;
|
|
1196
1014
|
currency: string;
|
|
1197
1015
|
credit_applied?: Money;
|
|
1198
1016
|
gateway_amount?: Money;
|
|
1199
1017
|
payment_gateway?: string;
|
|
1200
1018
|
method_type?: string;
|
|
1201
|
-
/**
|
|
1202
|
-
* The amount already paid from the account's balance toward this invoice. Retrying an online remainder
|
|
1203
|
-
* does not debit it again. A canceled purchase returns funds through its refund process.
|
|
1204
|
-
*/
|
|
1019
|
+
/** The amount already paid from balance toward this invoice; retrying the online remainder does not debit it again. */
|
|
1205
1020
|
balance_applied?: Money;
|
|
1206
1021
|
action?: PaymentAction;
|
|
1207
|
-
/**
|
|
1208
|
-
* Whether paying again is worth attempting. False for a refusal that will keep
|
|
1209
|
-
* happening — a closed account, an amount over a limit — so that a client does not
|
|
1210
|
-
* retry in a loop.
|
|
1211
|
-
*/
|
|
1022
|
+
/** Whether paying again can succeed. False for a refusal that will repeat, such as a closed account or an amount over a limit. */
|
|
1212
1023
|
retriable?: boolean;
|
|
1213
1024
|
/** @nullable */
|
|
1214
1025
|
invoice_id?: string | null;
|
|
1215
1026
|
/** @nullable */
|
|
1216
1027
|
order_id?: string | null;
|
|
1217
|
-
/**
|
|
1218
|
-
* Why the payment did not go through. Present with `failed`. For a declined gateway payment the
|
|
1219
|
-
* value is the gateway's own code, passed on unchanged: the card issuer's decline code when
|
|
1220
|
-
* there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
|
|
1221
|
-
* gateway's error code (Stripe's code, such as card_declined, expired_card or
|
|
1222
|
-
* payment_intent_authentication_failure). Clients map it to their own wording and treat an
|
|
1223
|
-
* unknown value as a generic decline.
|
|
1224
|
-
*/
|
|
1028
|
+
/** 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. */
|
|
1225
1029
|
failure_reason?: string;
|
|
1226
1030
|
}
|
|
1227
1031
|
/**
|
|
1228
|
-
*
|
|
1229
|
-
* the discount is applied and it is issued; other drafts are private to administrators.
|
|
1230
|
-
* An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
|
|
1231
|
-
* Unbilled usage remains separate from invoices until it is invoiced.
|
|
1232
|
-
* A refund does not change the status: a paid invoice stays paid, with the refunded part in
|
|
1233
|
-
* amount_refunded. void means collection has stopped and any funds received have been returned.
|
|
1032
|
+
* `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.
|
|
1234
1033
|
*/
|
|
1235
1034
|
export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
|
|
1236
1035
|
export declare const InvoiceStatus: {
|
|
@@ -1238,11 +1037,9 @@ export declare const InvoiceStatus: {
|
|
|
1238
1037
|
readonly open: "open";
|
|
1239
1038
|
readonly paid: "paid";
|
|
1240
1039
|
readonly void: "void";
|
|
1241
|
-
readonly uncollectible: "uncollectible";
|
|
1242
1040
|
};
|
|
1243
1041
|
/**
|
|
1244
|
-
* How tax applied to the customer when the invoice was issued
|
|
1245
|
-
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1042
|
+
* How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism.
|
|
1246
1043
|
*/
|
|
1247
1044
|
export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
|
|
1248
1045
|
export declare const InvoiceCustomerTaxExempt: {
|
|
@@ -1265,7 +1062,7 @@ export interface TaxItem {
|
|
|
1265
1062
|
currency: string;
|
|
1266
1063
|
}
|
|
1267
1064
|
export interface Invoice {
|
|
1268
|
-
/** Collection has
|
|
1065
|
+
/** Collection has stopped; accepted return obligations are completed. */
|
|
1269
1066
|
void_requested_at?: string;
|
|
1270
1067
|
due_at?: string;
|
|
1271
1068
|
amount_refunded?: string;
|
|
@@ -1285,16 +1082,16 @@ export interface Invoice {
|
|
|
1285
1082
|
/** Sum of the line discounts, taken off before tax. */
|
|
1286
1083
|
discount_amount?: Money;
|
|
1287
1084
|
tax_amount?: Money;
|
|
1288
|
-
/** Successful credit-grant payments included in amount_paid
|
|
1085
|
+
/** Successful credit-grant payments, included in amount_paid; they do not reduce the receivable or tax base. */
|
|
1289
1086
|
credit_applied?: Money;
|
|
1290
|
-
/** Subtotal less discount plus tax. Balance and credit grants
|
|
1087
|
+
/** Subtotal less discount plus tax. Balance and credit grants pay it; they do not reduce it. */
|
|
1291
1088
|
total: Money;
|
|
1292
1089
|
amount_paid?: Money;
|
|
1293
|
-
/** Issued
|
|
1090
|
+
/** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
|
|
1294
1091
|
pre_payment_credit_notes_amount: Money;
|
|
1295
|
-
/** Issued credit notes against payments already received
|
|
1092
|
+
/** Issued credit notes against payments already received; their refunds may not have completed. */
|
|
1296
1093
|
post_payment_credit_notes_amount: Money;
|
|
1297
|
-
/** What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
1094
|
+
/** 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. */
|
|
1298
1095
|
amount_due: Money;
|
|
1299
1096
|
/** @nullable */
|
|
1300
1097
|
period_start?: string | null;
|
|
@@ -1303,17 +1100,11 @@ export interface Invoice {
|
|
|
1303
1100
|
* @nullable
|
|
1304
1101
|
*/
|
|
1305
1102
|
period_end?: string | null;
|
|
1306
|
-
/**
|
|
1307
|
-
* Who this was billed to, as recorded when the invoice was issued. Later changes to
|
|
1308
|
-
* the account do not alter it.
|
|
1309
|
-
*/
|
|
1103
|
+
/** The billing details recorded when the invoice was issued. */
|
|
1310
1104
|
customer_name?: string;
|
|
1311
1105
|
customer_email?: string;
|
|
1312
1106
|
customer_tax_id?: string;
|
|
1313
|
-
/**
|
|
1314
|
-
* How tax applied to the customer when the invoice was issued. `reverse` means no tax was
|
|
1315
|
-
* charged because the customer accounts for it under the reverse-charge mechanism.
|
|
1316
|
-
*/
|
|
1107
|
+
/** How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism. */
|
|
1317
1108
|
customer_tax_exempt?: InvoiceCustomerTaxExempt;
|
|
1318
1109
|
customer_address_line1?: string;
|
|
1319
1110
|
customer_address_line2?: string;
|
|
@@ -1336,13 +1127,19 @@ export declare const InvoiceItemType: {
|
|
|
1336
1127
|
readonly setup: "setup";
|
|
1337
1128
|
readonly adjustment: "adjustment";
|
|
1338
1129
|
};
|
|
1130
|
+
/**
|
|
1131
|
+
* For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines.
|
|
1132
|
+
*/
|
|
1133
|
+
export type InvoiceItemDimensions = {
|
|
1134
|
+
[key: string]: string;
|
|
1135
|
+
};
|
|
1339
1136
|
/**
|
|
1340
1137
|
* The value of one paid period moved to the new configuration of a subscription.
|
|
1341
1138
|
*/
|
|
1342
1139
|
export interface InvoiceItemProration {
|
|
1343
1140
|
/** The earlier invoice line that paid for the period. */
|
|
1344
1141
|
credited_invoice_item_id: string;
|
|
1345
|
-
/** The
|
|
1142
|
+
/** The earlier invoice line's wording as recorded. */
|
|
1346
1143
|
description: string;
|
|
1347
1144
|
period_start: string;
|
|
1348
1145
|
/** Exclusive. */
|
|
@@ -1374,17 +1171,10 @@ export interface InvoiceItem {
|
|
|
1374
1171
|
type?: InvoiceItemType;
|
|
1375
1172
|
/** @nullable */
|
|
1376
1173
|
project_id?: string | null;
|
|
1377
|
-
/**
|
|
1378
|
-
* The project the charge was for and its current name, for display. Absent when the line is
|
|
1379
|
-
* not for a project, and when the project no longer exists or its details cannot be read at
|
|
1380
|
-
* the moment; `project_id` still identifies it then.
|
|
1381
|
-
*/
|
|
1174
|
+
/** 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. */
|
|
1382
1175
|
project?: NamedIdentity | null;
|
|
1383
1176
|
resource_id?: string;
|
|
1384
|
-
/**
|
|
1385
|
-
* The wording as recorded when the invoice was issued. It is not re-translated
|
|
1386
|
-
* afterwards, so that an invoice continues to read as it did when it was sent.
|
|
1387
|
-
*/
|
|
1177
|
+
/** The line's wording as recorded when the invoice was issued. */
|
|
1388
1178
|
description: string;
|
|
1389
1179
|
unit?: string;
|
|
1390
1180
|
quantity?: string;
|
|
@@ -1397,6 +1187,8 @@ export interface InvoiceItem {
|
|
|
1397
1187
|
period_start?: string | null;
|
|
1398
1188
|
/** @nullable */
|
|
1399
1189
|
period_end?: string | null;
|
|
1190
|
+
/** For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines. */
|
|
1191
|
+
dimensions?: InvoiceItemDimensions;
|
|
1400
1192
|
/**
|
|
1401
1193
|
* Present on a line that changes a subscription immediately, one entry for each paid period it
|
|
1402
1194
|
* covers. `amount` is the sum of `remaining_amount` minus `credited_amount` over the entries.
|
|
@@ -1445,9 +1237,7 @@ export declare const CreditNoteStatus: {
|
|
|
1445
1237
|
readonly void: "void";
|
|
1446
1238
|
};
|
|
1447
1239
|
/**
|
|
1448
|
-
* Why the note was issued. Notes
|
|
1449
|
-
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
1450
|
-
* issued by Leaflow on request.
|
|
1240
|
+
* 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.
|
|
1451
1241
|
*/
|
|
1452
1242
|
export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
|
|
1453
1243
|
export declare const CreditNoteReason: {
|
|
@@ -1461,7 +1251,7 @@ export declare const CreditNoteReason: {
|
|
|
1461
1251
|
readonly operator: "operator";
|
|
1462
1252
|
};
|
|
1463
1253
|
/**
|
|
1464
|
-
*
|
|
1254
|
+
* 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.
|
|
1465
1255
|
*/
|
|
1466
1256
|
export interface CreditNote {
|
|
1467
1257
|
id: string;
|
|
@@ -1476,18 +1266,14 @@ export interface CreditNote {
|
|
|
1476
1266
|
voided_at: string | null;
|
|
1477
1267
|
/** The reduction of unpaid receivables. A void note no longer reduces what is due. */
|
|
1478
1268
|
pre_payment_amount: Money;
|
|
1479
|
-
/** The credited part of payments already received
|
|
1269
|
+
/** The credited part of payments already received; its refund may not have completed. */
|
|
1480
1270
|
post_payment_amount: Money;
|
|
1481
1271
|
/**
|
|
1482
|
-
* The refund to the original payment sources
|
|
1272
|
+
* The refund to the original payment sources; null when no paid amount was credited.
|
|
1483
1273
|
* @nullable
|
|
1484
1274
|
*/
|
|
1485
1275
|
refund_id: string | null;
|
|
1486
|
-
/**
|
|
1487
|
-
* Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
|
|
1488
|
-
* `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
|
|
1489
|
-
* issued by Leaflow on request.
|
|
1490
|
-
*/
|
|
1276
|
+
/** 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. */
|
|
1491
1277
|
reason: CreditNoteReason;
|
|
1492
1278
|
}
|
|
1493
1279
|
export interface CreditNoteItem {
|
|
@@ -1506,7 +1292,7 @@ export interface CreditNoteItemList {
|
|
|
1506
1292
|
pagination: OffsetPagination;
|
|
1507
1293
|
}
|
|
1508
1294
|
/**
|
|
1509
|
-
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between
|
|
1295
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
|
|
1510
1296
|
* @deprecated
|
|
1511
1297
|
*/
|
|
1512
1298
|
export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
|
|
@@ -1534,22 +1320,19 @@ export declare const RefundStatus: {
|
|
|
1534
1320
|
readonly failed: "failed";
|
|
1535
1321
|
};
|
|
1536
1322
|
/**
|
|
1537
|
-
* Why the refund was made.
|
|
1538
|
-
* treat an unknown code as a refund without a stated reason.
|
|
1323
|
+
* Why the refund was made. New codes may be added; treat an unknown code as unspecified.
|
|
1539
1324
|
*
|
|
1540
1325
|
* - `provisioning_failed`: the purchase could not be delivered.
|
|
1541
|
-
* - `order_expired`: the order expired after part of it
|
|
1542
|
-
* - `order_canceled`: the
|
|
1543
|
-
* - `change_canceled`: a scheduled change was withdrawn after part of it
|
|
1544
|
-
* - `change_expired`: a scheduled change could not take effect
|
|
1545
|
-
* - `subscription_canceled`: the
|
|
1546
|
-
*
|
|
1547
|
-
* - `
|
|
1548
|
-
*
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1551
|
-
* zero or less.
|
|
1552
|
-
* - `usage_true_up`: usage priced again over the whole month cost less than was charged.
|
|
1326
|
+
* - `order_expired`: the order expired after part of it was paid.
|
|
1327
|
+
* - `order_canceled`: the order was canceled after part of it was paid.
|
|
1328
|
+
* - `change_canceled`: a scheduled change was withdrawn after part of it was paid.
|
|
1329
|
+
* - `change_expired`: a scheduled change could not take effect in time.
|
|
1330
|
+
* - `subscription_canceled`: the unused value of a canceled subscription, under its refund terms.
|
|
1331
|
+
* - `future_period_canceled`: a renewal that had not started was withdrawn.
|
|
1332
|
+
* - `downgrade_difference`: after a downgrade, the remaining paid value, valued as refund policy `prorated`
|
|
1333
|
+
* describes, minus the new configuration's cost for the remaining time at the change item's
|
|
1334
|
+
* `refund_monthly_amount` and `refund_hourly_amount`.
|
|
1335
|
+
* - `usage_true_up`: usage priced over the whole month cost less than was charged.
|
|
1553
1336
|
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
1554
1337
|
* - `operator`: made by the platform operator.
|
|
1555
1338
|
*/
|
|
@@ -1570,15 +1353,14 @@ export declare const RefundReason: {
|
|
|
1570
1353
|
export interface Refund {
|
|
1571
1354
|
transaction_id?: string;
|
|
1572
1355
|
cancellation_item_id?: string;
|
|
1573
|
-
/**
|
|
1356
|
+
/** The refund split by original payment source, with each result. Unknown gateway results stay pending. */
|
|
1574
1357
|
transactions: Transaction[];
|
|
1575
1358
|
id: string;
|
|
1576
1359
|
billing_account_id?: number;
|
|
1577
1360
|
/** @nullable */
|
|
1578
1361
|
invoice_id?: string | null;
|
|
1579
1362
|
/**
|
|
1580
|
-
* The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
|
|
1581
|
-
* the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
|
|
1363
|
+
* 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.
|
|
1582
1364
|
* @nullable
|
|
1583
1365
|
*/
|
|
1584
1366
|
order_id?: string | null;
|
|
@@ -1594,7 +1376,7 @@ export interface Refund {
|
|
|
1594
1376
|
settled_amount?: Money;
|
|
1595
1377
|
currency: string;
|
|
1596
1378
|
/**
|
|
1597
|
-
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between
|
|
1379
|
+
* Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
|
|
1598
1380
|
* @deprecated
|
|
1599
1381
|
*/
|
|
1600
1382
|
destination?: RefundDestination;
|
|
@@ -1621,7 +1403,7 @@ export interface RefundList {
|
|
|
1621
1403
|
pagination: OffsetPagination;
|
|
1622
1404
|
}
|
|
1623
1405
|
/**
|
|
1624
|
-
* The
|
|
1406
|
+
* The dimension values the rate was matched by, such as region and machine type.
|
|
1625
1407
|
*/
|
|
1626
1408
|
export type UsageChargeDimensions = {
|
|
1627
1409
|
[key: string]: string;
|
|
@@ -1630,26 +1412,23 @@ export interface UsageCharge {
|
|
|
1630
1412
|
subscription_id: string;
|
|
1631
1413
|
id: string;
|
|
1632
1414
|
project_id?: string;
|
|
1633
|
-
/**
|
|
1634
|
-
* The project and its current name, for display. Absent when the project no longer exists or its
|
|
1635
|
-
* details cannot be read at the moment; `project_id` still identifies it.
|
|
1636
|
-
*/
|
|
1415
|
+
/** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
|
|
1637
1416
|
project?: NamedIdentity | null;
|
|
1638
1417
|
product: Product;
|
|
1639
1418
|
/** Which resource this was charged for. Empty for charges not tied to one. */
|
|
1640
1419
|
resource_id?: string;
|
|
1641
1420
|
meter: ObjectIdentity;
|
|
1642
1421
|
unit?: string;
|
|
1643
|
-
/** The
|
|
1422
|
+
/** The dimension values the rate was matched by, such as region and machine type. */
|
|
1644
1423
|
dimensions?: UsageChargeDimensions;
|
|
1645
1424
|
window_start: string;
|
|
1646
1425
|
/** Exclusive. */
|
|
1647
1426
|
window_end: string;
|
|
1648
|
-
/**
|
|
1427
|
+
/** Quantity used before allowances. */
|
|
1649
1428
|
gross_quantity?: string;
|
|
1650
1429
|
/** How much of that was covered by an allowance. */
|
|
1651
1430
|
deducted_quantity?: string;
|
|
1652
|
-
/**
|
|
1431
|
+
/** The quantity charged: gross quantity less the part covered by allowances. */
|
|
1653
1432
|
quantity: string;
|
|
1654
1433
|
unit_amount?: Money;
|
|
1655
1434
|
amount: Money;
|
|
@@ -1671,12 +1450,6 @@ export interface UsageChargeList {
|
|
|
1671
1450
|
items: UsageCharge[];
|
|
1672
1451
|
pagination: OffsetPagination;
|
|
1673
1452
|
}
|
|
1674
|
-
export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
|
|
1675
|
-
export declare const SubscriptionChargeType: {
|
|
1676
|
-
readonly postpaid: "postpaid";
|
|
1677
|
-
readonly prepaid: "prepaid";
|
|
1678
|
-
readonly one_time: "one_time";
|
|
1679
|
-
};
|
|
1680
1453
|
export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
|
|
1681
1454
|
export declare const SubscriptionInterval: {
|
|
1682
1455
|
readonly none: "none";
|
|
@@ -1685,7 +1458,7 @@ export declare const SubscriptionInterval: {
|
|
|
1685
1458
|
readonly year: "year";
|
|
1686
1459
|
};
|
|
1687
1460
|
/**
|
|
1688
|
-
* An operation
|
|
1461
|
+
* 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.
|
|
1689
1462
|
*/
|
|
1690
1463
|
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
1691
1464
|
export declare const SubscriptionRestriction: {
|
|
@@ -1696,13 +1469,7 @@ export declare const SubscriptionRestriction: {
|
|
|
1696
1469
|
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
1697
1470
|
};
|
|
1698
1471
|
/**
|
|
1699
|
-
* Follows the items. `pending
|
|
1700
|
-
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
1701
|
-
* being set up. `completed` means every item was set up. `partially_completed` means some items were set up
|
|
1702
|
-
* and the others failed or were canceled and were refunded to their original payment sources. `failed` means
|
|
1703
|
-
* no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
|
|
1704
|
-
* `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
|
|
1705
|
-
* payment sources. No status establishes service delivery by itself.
|
|
1472
|
+
* 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.
|
|
1706
1473
|
*/
|
|
1707
1474
|
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
|
|
1708
1475
|
export declare const OrderStatus: {
|
|
@@ -1720,7 +1487,7 @@ export declare const ScheduledChangeInterval: {
|
|
|
1720
1487
|
readonly year: "year";
|
|
1721
1488
|
};
|
|
1722
1489
|
/**
|
|
1723
|
-
* The next accepted period-end change
|
|
1490
|
+
* The next accepted period-end change of the subscription: the target terms, applied at effective_at.
|
|
1724
1491
|
*/
|
|
1725
1492
|
export interface ScheduledChange {
|
|
1726
1493
|
order_id: string;
|
|
@@ -1731,7 +1498,7 @@ export interface ScheduledChange {
|
|
|
1731
1498
|
plan_name: string;
|
|
1732
1499
|
price_id: string;
|
|
1733
1500
|
quantity: string;
|
|
1734
|
-
/** The target
|
|
1501
|
+
/** The target licensed renewal amount before tax. */
|
|
1735
1502
|
recurring_amount: string;
|
|
1736
1503
|
currency: string;
|
|
1737
1504
|
interval: ScheduledChangeInterval;
|
|
@@ -1739,11 +1506,7 @@ export interface ScheduledChange {
|
|
|
1739
1506
|
interval_count: number;
|
|
1740
1507
|
}
|
|
1741
1508
|
/**
|
|
1742
|
-
* pending
|
|
1743
|
-
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
1744
|
-
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
1745
|
-
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
1746
|
-
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
1509
|
+
* `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.
|
|
1747
1510
|
*/
|
|
1748
1511
|
export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
|
|
1749
1512
|
export declare const SubscriptionStatus: {
|
|
@@ -1755,42 +1518,37 @@ export declare const SubscriptionStatus: {
|
|
|
1755
1518
|
readonly terminated: "terminated";
|
|
1756
1519
|
};
|
|
1757
1520
|
/**
|
|
1758
|
-
*
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
* then; postpaid usage starts only when the service reports actual delivery and metering.
|
|
1521
|
+
* The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none.
|
|
1522
|
+
*/
|
|
1523
|
+
export type SubscriptionDimensions = {
|
|
1524
|
+
[key: string]: string;
|
|
1525
|
+
};
|
|
1526
|
+
/**
|
|
1527
|
+
* A purchase that is billed, renewed and changed on its own, separate from the owning service's resource. A new
|
|
1528
|
+
* recurring purchase creates a pending subscription for each order line; its ID is returned on the order item
|
|
1529
|
+
* and stays the same through checkout, delivery, renewals and changes. A one-time purchase may create none.
|
|
1768
1530
|
*
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
*
|
|
1774
|
-
* original value. Technical state belongs to the owning service.
|
|
1531
|
+
* Pending and provisioning subscriptions grant no service. A subscription becomes provisioning when the owning
|
|
1532
|
+
* service accepts the order, and active when the service confirms delivery, which sets started_at; payment
|
|
1533
|
+
* changes neither. Licensed service periods start at delivery, and metered usage is charged as the service
|
|
1534
|
+
* reports it. Canceling or failing an undelivered purchase cancels its subscriptions without starting a period.
|
|
1535
|
+
* Renewals use recurring_amount and the agreed interval; paid periods keep their value.
|
|
1775
1536
|
*
|
|
1776
|
-
* A
|
|
1777
|
-
*
|
|
1778
|
-
* Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
|
|
1779
|
-
* the owning service enforces current holdings against the purchased count.
|
|
1537
|
+
* A shared capacity limit, such as a regional snapshot quota, has one subscription for the purchased quantity
|
|
1538
|
+
* rather than one per item.
|
|
1780
1539
|
*/
|
|
1781
1540
|
export interface Subscription {
|
|
1782
1541
|
/** 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. */
|
|
1783
1542
|
renewal_discounts_enabled?: boolean;
|
|
1784
1543
|
currency: string;
|
|
1785
|
-
|
|
1544
|
+
type: PriceType;
|
|
1545
|
+
usage_type: UsageType;
|
|
1546
|
+
/** The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none. */
|
|
1547
|
+
dimensions: SubscriptionDimensions;
|
|
1786
1548
|
interval: SubscriptionInterval;
|
|
1787
1549
|
/** @minimum 1 */
|
|
1788
1550
|
interval_count?: number;
|
|
1789
|
-
/**
|
|
1790
|
-
* Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
|
|
1791
|
-
* Pending subscriptions show base terms until paying the order fixes any new continuing discount.
|
|
1792
|
-
* Absent for other charge types.
|
|
1793
|
-
*/
|
|
1551
|
+
/** 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. */
|
|
1794
1552
|
recurring_amount?: string;
|
|
1795
1553
|
termination_policy?: TerminationPolicy;
|
|
1796
1554
|
refund_policy?: RefundPolicy;
|
|
@@ -1799,17 +1557,14 @@ export interface Subscription {
|
|
|
1799
1557
|
coupon?: ObjectIdentity;
|
|
1800
1558
|
/** @minimum 0 */
|
|
1801
1559
|
discounted_renewals_remaining?: number;
|
|
1802
|
-
/** The operations currently prevented on the subscription, sorted
|
|
1560
|
+
/** The operations currently prevented on the subscription, sorted; it is suspended while this contains `billing.subscriptions.use`. */
|
|
1803
1561
|
restrictions?: SubscriptionRestriction[];
|
|
1804
1562
|
billing_cycle_anchor?: string;
|
|
1805
1563
|
cancellation?: SubscriptionCancellation;
|
|
1806
|
-
/** The accepted period-end change
|
|
1564
|
+
/** The accepted period-end change scheduled for this subscription; null when there is none. */
|
|
1807
1565
|
scheduled_change?: ScheduledChange | null;
|
|
1808
1566
|
/**
|
|
1809
|
-
* The saved payment method automatic renewal charges after the account's
|
|
1810
|
-
* before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
|
|
1811
|
-
* saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
|
|
1812
|
-
* account that pays the renewal.
|
|
1567
|
+
* 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.
|
|
1813
1568
|
* @nullable
|
|
1814
1569
|
*/
|
|
1815
1570
|
default_payment_method_id?: string | null;
|
|
@@ -1820,16 +1575,11 @@ export interface Subscription {
|
|
|
1820
1575
|
account: AccountIdentity;
|
|
1821
1576
|
product_id: ProductID;
|
|
1822
1577
|
/**
|
|
1823
|
-
*
|
|
1824
|
-
* membership, which belongs to no single project.
|
|
1578
|
+
* The project it is for. Absent for an account-level purchase, such as a membership.
|
|
1825
1579
|
* @nullable
|
|
1826
1580
|
*/
|
|
1827
1581
|
project_id?: string | null;
|
|
1828
|
-
/**
|
|
1829
|
-
* The project and its current name, for display. Absent for a purchase at account level,
|
|
1830
|
-
* and when the project no longer exists or its details cannot be read at the moment;
|
|
1831
|
-
* `project_id` still identifies it then.
|
|
1832
|
-
*/
|
|
1582
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
|
|
1833
1583
|
project?: NamedIdentity | null;
|
|
1834
1584
|
product: Product;
|
|
1835
1585
|
plan_id: string;
|
|
@@ -1837,35 +1587,26 @@ export interface Subscription {
|
|
|
1837
1587
|
price_id: string;
|
|
1838
1588
|
quantity: string;
|
|
1839
1589
|
/**
|
|
1840
|
-
* When a
|
|
1841
|
-
* Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
|
|
1842
|
-
* its purchase has been paid, and for postpaid subscriptions.
|
|
1590
|
+
* 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.
|
|
1843
1591
|
* @nullable
|
|
1844
1592
|
*/
|
|
1845
1593
|
current_term_end?: string | null;
|
|
1846
1594
|
/**
|
|
1847
|
-
* Start of the service period in effect now. Null when none is, including for
|
|
1595
|
+
* Start of the service period in effect now. Null when none is, including for metered subscriptions.
|
|
1848
1596
|
* @nullable
|
|
1849
1597
|
*/
|
|
1850
1598
|
current_period_start?: string | null;
|
|
1851
1599
|
/**
|
|
1852
|
-
* End of the service period in effect now
|
|
1853
|
-
* this. Null when no period is in effect, including for postpaid subscriptions.
|
|
1600
|
+
* 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.
|
|
1854
1601
|
* @nullable
|
|
1855
1602
|
*/
|
|
1856
1603
|
current_period_end?: string | null;
|
|
1857
|
-
/**
|
|
1604
|
+
/** 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. */
|
|
1858
1605
|
auto_renew: boolean;
|
|
1859
|
-
/**
|
|
1860
|
-
* pending means the purchase relationship exists but its order has not been accepted.
|
|
1861
|
-
* provisioning means the service accepted the order and is delivering. For a service-owned
|
|
1862
|
-
* purchase, only confirmed delivery moves it to active; paying alone does not.
|
|
1863
|
-
* canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
|
|
1864
|
-
* terminated means an administrator or the owning service immediately ended the commercial relationship.
|
|
1865
|
-
*/
|
|
1606
|
+
/** `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. */
|
|
1866
1607
|
status: SubscriptionStatus;
|
|
1867
1608
|
/**
|
|
1868
|
-
*
|
|
1609
|
+
* When service started. Null until a new subscription becomes active, also after payment.
|
|
1869
1610
|
* @nullable
|
|
1870
1611
|
*/
|
|
1871
1612
|
started_at?: string | null;
|
|
@@ -1892,10 +1633,7 @@ export interface RenewalPrice {
|
|
|
1892
1633
|
/** What renewing for this term costs, for the quantity held. */
|
|
1893
1634
|
amount?: Money;
|
|
1894
1635
|
currency?: string;
|
|
1895
|
-
/**
|
|
1896
|
-
* The term this item already bills at. Renewing for it uses the price bought
|
|
1897
|
-
* originally, so a later price change does not affect it.
|
|
1898
|
-
*/
|
|
1636
|
+
/** The term the subscription renews at now; renewing for it keeps the agreed price. */
|
|
1899
1637
|
current: boolean;
|
|
1900
1638
|
}
|
|
1901
1639
|
export interface RenewalPriceList {
|
|
@@ -1912,14 +1650,10 @@ export declare const RenewRequestInterval: {
|
|
|
1912
1650
|
readonly year: "year";
|
|
1913
1651
|
};
|
|
1914
1652
|
export interface RenewRequest {
|
|
1915
|
-
/**
|
|
1653
|
+
/** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
|
|
1916
1654
|
order_id: string;
|
|
1917
1655
|
/**
|
|
1918
|
-
* How many further periods to buy, each at the price
|
|
1919
|
-
*
|
|
1920
|
-
* Buying twelve monthly periods is not the same as buying one yearly term: a longer
|
|
1921
|
-
* term is usually sold at a lower price, and that price is only reached by naming the
|
|
1922
|
-
* interval. Use `interval_count` and `interval` for that.
|
|
1656
|
+
* 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.
|
|
1923
1657
|
* @minimum 1
|
|
1924
1658
|
*/
|
|
1925
1659
|
periods?: number;
|
|
@@ -1958,10 +1692,10 @@ export declare const RenewalOrderRequestInterval: {
|
|
|
1958
1692
|
readonly year: "year";
|
|
1959
1693
|
};
|
|
1960
1694
|
/**
|
|
1961
|
-
* The periods and price
|
|
1695
|
+
* The renewal's periods and price, chosen as in renewing.
|
|
1962
1696
|
*/
|
|
1963
1697
|
export interface RenewalOrderRequest {
|
|
1964
|
-
/**
|
|
1698
|
+
/** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
|
|
1965
1699
|
order_id: string;
|
|
1966
1700
|
/**
|
|
1967
1701
|
* As in renewing.
|
|
@@ -1982,10 +1716,7 @@ export interface AutoRenewSet {
|
|
|
1982
1716
|
auto_renew: boolean;
|
|
1983
1717
|
}
|
|
1984
1718
|
/**
|
|
1985
|
-
* `pending
|
|
1986
|
-
* `failed` was not set up and its amount was refunded to the original payment sources.
|
|
1987
|
-
* `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
|
|
1988
|
-
* its subscription.
|
|
1719
|
+
* `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.
|
|
1989
1720
|
*/
|
|
1990
1721
|
export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
|
|
1991
1722
|
export declare const OrderItemStatus: {
|
|
@@ -1995,7 +1726,7 @@ export declare const OrderItemStatus: {
|
|
|
1995
1726
|
readonly canceled: "canceled";
|
|
1996
1727
|
};
|
|
1997
1728
|
/**
|
|
1998
|
-
* `new` buys, `renew` extends a
|
|
1729
|
+
* `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms.
|
|
1999
1730
|
*/
|
|
2000
1731
|
export type OrderType = (typeof OrderType)[keyof typeof OrderType];
|
|
2001
1732
|
export declare const OrderType: {
|
|
@@ -2004,12 +1735,7 @@ export declare const OrderType: {
|
|
|
2004
1735
|
readonly modify: "modify";
|
|
2005
1736
|
};
|
|
2006
1737
|
/**
|
|
2007
|
-
* When a plan change takes effect
|
|
2008
|
-
*
|
|
2009
|
-
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2010
|
-
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2011
|
-
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2012
|
-
* usual. Renewing in the meantime moves all of this along with it.
|
|
1738
|
+
* 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.
|
|
2013
1739
|
*/
|
|
2014
1740
|
export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
|
|
2015
1741
|
export declare const OrderChangeEffective: {
|
|
@@ -2018,10 +1744,7 @@ export declare const OrderChangeEffective: {
|
|
|
2018
1744
|
readonly period_end: "period_end";
|
|
2019
1745
|
};
|
|
2020
1746
|
/**
|
|
2021
|
-
*
|
|
2022
|
-
* has an invoice from placement. A draft shows base prices until it is paid, when the discount is
|
|
2023
|
-
* applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
|
|
2024
|
-
* checkout mode. Neither establishes acceptance or delivery.
|
|
1747
|
+
* 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.
|
|
2025
1748
|
*/
|
|
2026
1749
|
export interface InvoiceSummary {
|
|
2027
1750
|
id: string;
|
|
@@ -2039,9 +1762,9 @@ export interface InvoiceSummary {
|
|
|
2039
1762
|
tax_amount: string;
|
|
2040
1763
|
total: string;
|
|
2041
1764
|
amount_paid: string;
|
|
2042
|
-
/** Issued
|
|
1765
|
+
/** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
|
|
2043
1766
|
pre_payment_credit_notes_amount: Money;
|
|
2044
|
-
/** Issued credit notes against payments already received
|
|
1767
|
+
/** Issued credit notes against payments already received; their refunds may not have completed. */
|
|
2045
1768
|
post_payment_credit_notes_amount: Money;
|
|
2046
1769
|
/**
|
|
2047
1770
|
* What is still collectible after unpaid credit notes and successful payments; never below zero.
|
|
@@ -2052,8 +1775,7 @@ export interface InvoiceSummary {
|
|
|
2052
1775
|
due_at?: string;
|
|
2053
1776
|
}
|
|
2054
1777
|
/**
|
|
2055
|
-
* How it was paid.
|
|
2056
|
-
* then names a removed payment method.
|
|
1778
|
+
* How it was paid. `payment_method_id` still names the payment method after it is removed.
|
|
2057
1779
|
*/
|
|
2058
1780
|
export interface PaidWith {
|
|
2059
1781
|
/**
|
|
@@ -2075,22 +1797,17 @@ export declare const OrderItemInterval: {
|
|
|
2075
1797
|
readonly month: "month";
|
|
2076
1798
|
readonly year: "year";
|
|
2077
1799
|
};
|
|
2078
|
-
/**
|
|
2079
|
-
* The payment timing of the selected price.
|
|
2080
|
-
*/
|
|
2081
|
-
export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
|
|
2082
|
-
export declare const OrderItemChargeType: {
|
|
2083
|
-
readonly postpaid: "postpaid";
|
|
2084
|
-
readonly prepaid: "prepaid";
|
|
2085
|
-
readonly one_time: "one_time";
|
|
2086
|
-
};
|
|
2087
1800
|
export type OrderItemConfiguration = {
|
|
2088
1801
|
[key: string]: unknown;
|
|
2089
1802
|
};
|
|
2090
1803
|
/**
|
|
2091
|
-
*
|
|
2092
|
-
|
|
2093
|
-
|
|
1804
|
+
* The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none.
|
|
1805
|
+
*/
|
|
1806
|
+
export type OrderItemDimensions = {
|
|
1807
|
+
[key: string]: string;
|
|
1808
|
+
};
|
|
1809
|
+
/**
|
|
1810
|
+
* 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.
|
|
2094
1811
|
*/
|
|
2095
1812
|
export interface OrderItem {
|
|
2096
1813
|
/** 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. */
|
|
@@ -2100,11 +1817,7 @@ export interface OrderItem {
|
|
|
2100
1817
|
/** @minimum 0 */
|
|
2101
1818
|
position?: number;
|
|
2102
1819
|
configuration?: OrderItemConfiguration;
|
|
2103
|
-
/**
|
|
2104
|
-
* Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
|
|
2105
|
-
* pending subscription here; renewals and changes reference the existing subscription, which
|
|
2106
|
-
* keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
|
|
2107
|
-
*/
|
|
1820
|
+
/** 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. */
|
|
2108
1821
|
subscription_id?: string;
|
|
2109
1822
|
interval: OrderItemInterval;
|
|
2110
1823
|
/** @minimum 1 */
|
|
@@ -2112,22 +1825,21 @@ export interface OrderItem {
|
|
|
2112
1825
|
termination_policy?: TerminationPolicy;
|
|
2113
1826
|
refund_policy?: RefundPolicy;
|
|
2114
1827
|
/**
|
|
2115
|
-
*
|
|
2116
|
-
* at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
|
|
2117
|
-
* no prepaid period shorter than the one bought.
|
|
1828
|
+
* 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.
|
|
2118
1829
|
* @nullable
|
|
2119
1830
|
*/
|
|
2120
1831
|
refund_monthly_amount?: string | null;
|
|
2121
1832
|
/**
|
|
2122
|
-
*
|
|
2123
|
-
* purchase, used for time used short of a full month. Null when the plan has no postpaid price.
|
|
1833
|
+
* 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.
|
|
2124
1834
|
* @nullable
|
|
2125
1835
|
*/
|
|
2126
1836
|
refund_hourly_amount?: string | null;
|
|
2127
1837
|
recurring_amount?: string;
|
|
2128
1838
|
setup_amount?: string;
|
|
2129
|
-
|
|
2130
|
-
|
|
1839
|
+
type: PriceType;
|
|
1840
|
+
usage_type: UsageType;
|
|
1841
|
+
/** The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none. */
|
|
1842
|
+
dimensions: OrderItemDimensions;
|
|
2131
1843
|
/** Total tax after discounts, including any tax already included in the price. */
|
|
2132
1844
|
tax_amount?: string;
|
|
2133
1845
|
/** The part of tax_amount already included in gross_amount; it is not charged again. */
|
|
@@ -2139,45 +1851,28 @@ export interface OrderItem {
|
|
|
2139
1851
|
product?: Product;
|
|
2140
1852
|
/** Which plan was bought. */
|
|
2141
1853
|
plan_id: string;
|
|
2142
|
-
/**
|
|
2143
|
-
* What it was called when bought. It does not follow later catalogue renames and is
|
|
2144
|
-
* not translated.
|
|
2145
|
-
*/
|
|
1854
|
+
/** The name when bought. */
|
|
2146
1855
|
plan_name: string;
|
|
2147
1856
|
quantity: string;
|
|
2148
|
-
/**
|
|
2149
|
-
* The unit amount of the price this line is charged under. Absent for a tiered price, which has no
|
|
2150
|
-
* single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
|
|
2151
|
-
* describes.
|
|
2152
|
-
*/
|
|
1857
|
+
/** 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. */
|
|
2153
1858
|
unit_amount?: Money;
|
|
2154
1859
|
/**
|
|
2155
|
-
* Before discounts: the price applied to the quantity,
|
|
2156
|
-
*
|
|
2157
|
-
* the
|
|
2158
|
-
*
|
|
2159
|
-
* difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
|
|
1860
|
+
* Before discounts and setup fees: the price applied to the quantity, `unit_amount` times `quantity` for a per-
|
|
1861
|
+
* unit price, raised by any minimum charge. For an immediate upgrade it is the new price for the rest of the
|
|
1862
|
+
* paid period minus the amount paid for that time; a downgrade, or a change between equal period prices, charges
|
|
1863
|
+
* nothing.
|
|
2160
1864
|
*
|
|
2161
|
-
* Under an inclusive tax rate it includes tax,
|
|
2162
|
-
*
|
|
2163
|
-
* tax, and tax is added to it.
|
|
1865
|
+
* Under an inclusive tax rate it includes tax, shown in `tax_included_amount`, except for a renewal at agreed
|
|
1866
|
+
* terms, whose amount excludes tax.
|
|
2164
1867
|
*/
|
|
2165
1868
|
gross_amount?: Money;
|
|
2166
|
-
/**
|
|
2167
|
-
* The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
|
|
2168
|
-
* from the discount the subscription carries.
|
|
2169
|
-
*
|
|
2170
|
-
* A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
|
|
2171
|
-
* `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
|
|
2172
|
-
* the carried discount is already reflected in it: the renewal order also uses a coupon the account
|
|
2173
|
-
* holds, or the account's tax rate is inclusive.
|
|
2174
|
-
*/
|
|
1869
|
+
/** 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. */
|
|
2175
1870
|
discount_amount?: Money;
|
|
2176
1871
|
/** `gross_amount` less `discount_amount`. */
|
|
2177
1872
|
amount?: Money;
|
|
2178
1873
|
currency: string;
|
|
2179
1874
|
/**
|
|
2180
|
-
* The start of the service period this line paid for.
|
|
1875
|
+
* 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.
|
|
2181
1876
|
* @nullable
|
|
2182
1877
|
*/
|
|
2183
1878
|
period_start?: string | null;
|
|
@@ -2189,17 +1884,13 @@ export interface OrderItem {
|
|
|
2189
1884
|
status: OrderItemStatus;
|
|
2190
1885
|
}
|
|
2191
1886
|
/**
|
|
2192
|
-
* A recorded purchase with its invoice from placement; a zero-total invoice, such as for
|
|
2193
|
-
* admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
|
|
2194
|
-
* invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
|
|
2195
|
-
* order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
|
|
2196
|
-
* before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
|
|
1887
|
+
* 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.
|
|
2197
1888
|
*/
|
|
2198
1889
|
export interface Order {
|
|
2199
1890
|
coupon_id?: string;
|
|
2200
1891
|
coupon?: ObjectIdentity;
|
|
2201
1892
|
promotion_code_id?: string;
|
|
2202
|
-
/**
|
|
1893
|
+
/** The promotion code applied. Absent for an account discount. */
|
|
2203
1894
|
promotion_code?: string;
|
|
2204
1895
|
/** The order's invoice, the same as invoice.id. */
|
|
2205
1896
|
invoice_id: string;
|
|
@@ -2210,53 +1901,32 @@ export interface Order {
|
|
|
2210
1901
|
change_effective_at?: string;
|
|
2211
1902
|
id: string;
|
|
2212
1903
|
/**
|
|
2213
|
-
*
|
|
2214
|
-
* as a membership.
|
|
1904
|
+
* The project it was bought for. Absent for an account-level purchase, such as a membership.
|
|
2215
1905
|
* @nullable
|
|
2216
1906
|
*/
|
|
2217
1907
|
project_id?: string | null;
|
|
2218
|
-
/**
|
|
2219
|
-
* The project and its current name, for display. Absent for a purchase at account level,
|
|
2220
|
-
* and when the project no longer exists or its details cannot be read at the moment;
|
|
2221
|
-
* `project_id` still identifies it then.
|
|
2222
|
-
*/
|
|
1908
|
+
/** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
|
|
2223
1909
|
project?: NamedIdentity | null;
|
|
2224
|
-
/**
|
|
2225
|
-
* The billing account the order was placed with. It does not change when the project is later
|
|
2226
|
-
* linked to another billing account. While this account is suspended or closed the order cannot
|
|
2227
|
-
* be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
|
|
2228
|
-
* when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
|
|
2229
|
-
*/
|
|
1910
|
+
/** 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`. */
|
|
2230
1911
|
billing_account_id?: number;
|
|
2231
1912
|
currency: string;
|
|
2232
|
-
/** `new` buys, `renew` extends a
|
|
1913
|
+
/** `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms. */
|
|
2233
1914
|
type: OrderType;
|
|
2234
1915
|
status: OrderStatus;
|
|
2235
|
-
/**
|
|
2236
|
-
* When a plan change takes effect. `none` on anything that is not a change.
|
|
2237
|
-
*
|
|
2238
|
-
* `period_end` orders stay pending until the first period at the new price is paid. That period
|
|
2239
|
-
* is invoiced shortly before the current paid period ends and starts when it ends; if the
|
|
2240
|
-
* invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
|
|
2241
|
-
* usual. Renewing in the meantime moves all of this along with it.
|
|
2242
|
-
*/
|
|
1916
|
+
/** 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. */
|
|
2243
1917
|
change_effective?: OrderChangeEffective;
|
|
2244
1918
|
/**
|
|
2245
|
-
* Acceptance deadline
|
|
1919
|
+
* Acceptance deadline; a pending order expires after it.
|
|
2246
1920
|
* @nullable
|
|
2247
1921
|
*/
|
|
2248
1922
|
expires_at?: string | null;
|
|
2249
1923
|
/**
|
|
2250
|
-
* When the discount and amount were fixed: at placement for automatic checkout
|
|
2251
|
-
* zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
|
|
1924
|
+
* 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.
|
|
2252
1925
|
* @nullable
|
|
2253
1926
|
*/
|
|
2254
1927
|
checkout_confirmed_at?: string | null;
|
|
2255
1928
|
created_at: string;
|
|
2256
|
-
/**
|
|
2257
|
-
* What was bought. Present on a single order and on every order in a list, so a list
|
|
2258
|
-
* can be rendered without a further request per row.
|
|
2259
|
-
*/
|
|
1929
|
+
/** What was bought. */
|
|
2260
1930
|
items: OrderItem[];
|
|
2261
1931
|
}
|
|
2262
1932
|
export interface OrderList {
|
|
@@ -2264,8 +1934,7 @@ export interface OrderList {
|
|
|
2264
1934
|
pagination: OffsetPagination;
|
|
2265
1935
|
}
|
|
2266
1936
|
/**
|
|
2267
|
-
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
2268
|
-
* `voided` once Leaflow withdrew it.
|
|
1937
|
+
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn.
|
|
2269
1938
|
*/
|
|
2270
1939
|
export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
|
|
2271
1940
|
export declare const DiscountStatus: {
|
|
@@ -2282,9 +1951,7 @@ export declare const DiscountType: {
|
|
|
2282
1951
|
readonly free_setup: "free_setup";
|
|
2283
1952
|
};
|
|
2284
1953
|
/**
|
|
2285
|
-
* Whether the discount continues on renewals
|
|
2286
|
-
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
2287
|
-
* periods including the first, and `forever` continues on every renewal.
|
|
1954
|
+
* 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.
|
|
2288
1955
|
*/
|
|
2289
1956
|
export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
|
|
2290
1957
|
export declare const DiscountFrequency: {
|
|
@@ -2293,26 +1960,18 @@ export declare const DiscountFrequency: {
|
|
|
2293
1960
|
readonly forever: "forever";
|
|
2294
1961
|
};
|
|
2295
1962
|
/**
|
|
2296
|
-
* A coupon held
|
|
2297
|
-
* to metered usage that the coupon covers.
|
|
1963
|
+
* A coupon held by the account for a period, applying without a code to the purchases and metered usage it covers.
|
|
2298
1964
|
*/
|
|
2299
1965
|
export interface Discount {
|
|
2300
1966
|
min_amount?: string;
|
|
2301
1967
|
billing_account_id?: number;
|
|
2302
1968
|
coupon_id: string;
|
|
2303
1969
|
promotion_code_id?: string;
|
|
2304
|
-
/**
|
|
2305
|
-
* `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
|
|
2306
|
-
* `voided` once Leaflow withdrew it.
|
|
2307
|
-
*/
|
|
1970
|
+
/** `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn. */
|
|
2308
1971
|
status: DiscountStatus;
|
|
2309
1972
|
voided_at?: string;
|
|
2310
1973
|
type: DiscountType;
|
|
2311
|
-
/**
|
|
2312
|
-
* Whether the discount continues on renewals of the purchased item. `once` applies only to the
|
|
2313
|
-
* purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
|
|
2314
|
-
* periods including the first, and `forever` continues on every renewal.
|
|
2315
|
-
*/
|
|
1974
|
+
/** 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. */
|
|
2316
1975
|
frequency?: DiscountFrequency;
|
|
2317
1976
|
/** @minimum 1 */
|
|
2318
1977
|
frequency_duration?: number;
|
|
@@ -2324,10 +1983,7 @@ export interface Discount {
|
|
|
2324
1983
|
/** Caps a percentage discount. */
|
|
2325
1984
|
max_discount?: Money;
|
|
2326
1985
|
currency?: string;
|
|
2327
|
-
/**
|
|
2328
|
-
* What it may be used for. Absent means it applies to anything on the account,
|
|
2329
|
-
* including setup fees and traffic.
|
|
2330
|
-
*/
|
|
1986
|
+
/** What it may pay for. Absent means anything on the account, including setup fees and usage. */
|
|
2331
1987
|
applies_to: Applicability;
|
|
2332
1988
|
/** Restricted to your first purchase of anything it applies to. */
|
|
2333
1989
|
first_purchase_only?: boolean;
|
|
@@ -2347,7 +2003,7 @@ export interface OrderItemList {
|
|
|
2347
2003
|
pagination: OffsetPagination;
|
|
2348
2004
|
}
|
|
2349
2005
|
/**
|
|
2350
|
-
* Whether the quantity was paid for or granted free
|
|
2006
|
+
* Whether the quantity was paid for or granted free; both are consumed the same way.
|
|
2351
2007
|
*/
|
|
2352
2008
|
export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
|
|
2353
2009
|
export declare const AllowanceCategory: {
|
|
@@ -2378,7 +2034,7 @@ export interface Allowance {
|
|
|
2378
2034
|
meter: ObjectIdentity;
|
|
2379
2035
|
/** The unit it is counted in, such as `MiB`. */
|
|
2380
2036
|
unit?: string;
|
|
2381
|
-
/** Whether the quantity was paid for or granted free
|
|
2037
|
+
/** Whether the quantity was paid for or granted free; both are consumed the same way. */
|
|
2382
2038
|
category: AllowanceCategory;
|
|
2383
2039
|
/**
|
|
2384
2040
|
* Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
|
|
@@ -2390,16 +2046,12 @@ export interface Allowance {
|
|
|
2390
2046
|
quantity: string;
|
|
2391
2047
|
/** How much is left. */
|
|
2392
2048
|
remaining_quantity: string;
|
|
2393
|
-
/**
|
|
2394
|
-
* Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
|
|
2395
|
-
* precedence.
|
|
2396
|
-
*/
|
|
2049
|
+
/** Lower values are consumed first; at equal priority, earlier expiry and then earlier issuance. */
|
|
2397
2050
|
priority?: number;
|
|
2398
2051
|
status: AllowanceStatus;
|
|
2399
2052
|
valid_from: string;
|
|
2400
2053
|
/**
|
|
2401
|
-
* When
|
|
2402
|
-
* not carry over. Absent when it does not expire on its own.
|
|
2054
|
+
* When the allowance lapses; unused quantity is lost. Absent when it does not expire.
|
|
2403
2055
|
* @nullable
|
|
2404
2056
|
*/
|
|
2405
2057
|
valid_until?: string | null;
|
|
@@ -2442,8 +2094,7 @@ export interface Entitlement {
|
|
|
2442
2094
|
name?: string;
|
|
2443
2095
|
enabled: boolean;
|
|
2444
2096
|
/**
|
|
2445
|
-
* When the
|
|
2446
|
-
* has no end date.
|
|
2097
|
+
* When the providing subscription ends. Absent for a metered subscription.
|
|
2447
2098
|
* @nullable
|
|
2448
2099
|
*/
|
|
2449
2100
|
expires_at?: string | null;
|
|
@@ -2476,30 +2127,7 @@ export interface PlanList {
|
|
|
2476
2127
|
pagination: OffsetPagination;
|
|
2477
2128
|
}
|
|
2478
2129
|
/**
|
|
2479
|
-
* `
|
|
2480
|
-
* charges once.
|
|
2481
|
-
*/
|
|
2482
|
-
export type PriceType = (typeof PriceType)[keyof typeof PriceType];
|
|
2483
|
-
export declare const PriceType: {
|
|
2484
|
-
readonly postpaid: "postpaid";
|
|
2485
|
-
readonly prepaid: "prepaid";
|
|
2486
|
-
readonly one_time: "one_time";
|
|
2487
|
-
};
|
|
2488
|
-
/**
|
|
2489
|
-
* How the amount is arrived at. `rated` means the rate depends on attributes such as
|
|
2490
|
-
* region or machine type, and is looked up on a price list.
|
|
2491
|
-
*/
|
|
2492
|
-
export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
|
|
2493
|
-
export declare const PriceBillingScheme: {
|
|
2494
|
-
readonly per_unit: "per_unit";
|
|
2495
|
-
readonly tiered: "tiered";
|
|
2496
|
-
readonly rated: "rated";
|
|
2497
|
-
};
|
|
2498
|
-
/**
|
|
2499
|
-
* `none` for a price that is not tiered, which is most of them.
|
|
2500
|
-
*
|
|
2501
|
-
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
2502
|
-
* everything at the rate of the band the total falls in.
|
|
2130
|
+
* 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.
|
|
2503
2131
|
*/
|
|
2504
2132
|
export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
|
|
2505
2133
|
export declare const PriceTiersMode: {
|
|
@@ -2516,7 +2144,7 @@ export declare const PriceInterval: {
|
|
|
2516
2144
|
};
|
|
2517
2145
|
export interface Tier {
|
|
2518
2146
|
/**
|
|
2519
|
-
* The upper bound
|
|
2147
|
+
* The band's inclusive upper bound; null for the last band.
|
|
2520
2148
|
* @nullable
|
|
2521
2149
|
*/
|
|
2522
2150
|
up_to?: string | null;
|
|
@@ -2529,6 +2157,7 @@ export interface Price {
|
|
|
2529
2157
|
lookup_key?: string;
|
|
2530
2158
|
product: Product;
|
|
2531
2159
|
plan: ObjectIdentity;
|
|
2160
|
+
/** 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. */
|
|
2532
2161
|
meter_id?: string;
|
|
2533
2162
|
meter?: ObjectIdentity;
|
|
2534
2163
|
unit_quantity: string;
|
|
@@ -2540,39 +2169,25 @@ export interface Price {
|
|
|
2540
2169
|
id: string;
|
|
2541
2170
|
plan_id: string;
|
|
2542
2171
|
currency: string;
|
|
2543
|
-
/**
|
|
2544
|
-
* `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
|
|
2545
|
-
* charges once.
|
|
2546
|
-
*/
|
|
2547
2172
|
type: PriceType;
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
*/
|
|
2552
|
-
billing_scheme: PriceBillingScheme;
|
|
2173
|
+
usage_type: UsageType;
|
|
2174
|
+
/** Absent when the price delegates to a rate card, where the rate depends on attributes such as region or machine type. */
|
|
2175
|
+
billing_scheme?: BillingScheme;
|
|
2553
2176
|
/** Present for `per_unit`. */
|
|
2554
2177
|
unit_amount?: Money;
|
|
2555
|
-
/**
|
|
2556
|
-
* `none` for a price that is not tiered, which is most of them.
|
|
2557
|
-
*
|
|
2558
|
-
* Otherwise `graduated` charges each band at its own rate, and `volume` charges
|
|
2559
|
-
* everything at the rate of the band the total falls in.
|
|
2560
|
-
*/
|
|
2178
|
+
/** 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. */
|
|
2561
2179
|
tiers_mode?: PriceTiersMode;
|
|
2562
2180
|
/** Present for `tiered`, in ascending order. */
|
|
2563
2181
|
tiers?: Tier[];
|
|
2564
|
-
/**
|
|
2182
|
+
/** Present when the price delegates to a rate card, the price list its rates are read from. */
|
|
2565
2183
|
rate_card_id?: string;
|
|
2566
2184
|
/** The smallest quantity that can be bought. Absent means no lower bound. */
|
|
2567
2185
|
min_quantity?: string;
|
|
2568
|
-
/**
|
|
2569
|
-
* The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
|
|
2570
|
-
* rejected with BILLING_PRICE_INVALID and field=max_quantity.
|
|
2571
|
-
*/
|
|
2186
|
+
/** 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`. */
|
|
2572
2187
|
max_quantity?: string;
|
|
2573
2188
|
/** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
|
|
2574
2189
|
quantity_step?: string;
|
|
2575
|
-
/** For
|
|
2190
|
+
/** For recurring licensed prices, how many interval units one period covers. */
|
|
2576
2191
|
interval_count?: number;
|
|
2577
2192
|
interval: PriceInterval;
|
|
2578
2193
|
setup_fee?: Money;
|
|
@@ -2582,18 +2197,20 @@ export interface PriceList {
|
|
|
2582
2197
|
pagination: OffsetPagination;
|
|
2583
2198
|
}
|
|
2584
2199
|
/**
|
|
2585
|
-
* The
|
|
2200
|
+
* The dimension values this rate applies to, such as region and machine type.
|
|
2586
2201
|
*/
|
|
2587
2202
|
export type RateDimensions = {
|
|
2588
2203
|
[key: string]: string;
|
|
2589
2204
|
};
|
|
2590
2205
|
/**
|
|
2591
|
-
*
|
|
2206
|
+
* Licensed rates only, the period the amount buys; `none` for metered rates.
|
|
2592
2207
|
*/
|
|
2593
|
-
export type
|
|
2594
|
-
export declare const
|
|
2595
|
-
readonly
|
|
2596
|
-
readonly
|
|
2208
|
+
export type RateInterval = (typeof RateInterval)[keyof typeof RateInterval];
|
|
2209
|
+
export declare const RateInterval: {
|
|
2210
|
+
readonly none: "none";
|
|
2211
|
+
readonly day: "day";
|
|
2212
|
+
readonly month: "month";
|
|
2213
|
+
readonly year: "year";
|
|
2597
2214
|
};
|
|
2598
2215
|
/**
|
|
2599
2216
|
* `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.
|
|
@@ -2606,22 +2223,24 @@ export declare const RateTiersMode: {
|
|
|
2606
2223
|
};
|
|
2607
2224
|
export interface Rate {
|
|
2608
2225
|
meter: ObjectIdentity;
|
|
2609
|
-
/** The unit readings
|
|
2226
|
+
/** The unit readings are reported in, such as `core-second`. */
|
|
2610
2227
|
unit?: string;
|
|
2611
|
-
/** The
|
|
2228
|
+
/** The dimension values this rate applies to, such as region and machine type. */
|
|
2612
2229
|
dimensions: RateDimensions;
|
|
2613
|
-
|
|
2614
|
-
|
|
2230
|
+
billing_scheme: BillingScheme;
|
|
2231
|
+
/** `metered` prices usage; `licensed` prices holding a quantity for one period. */
|
|
2232
|
+
usage_type: UsageType;
|
|
2233
|
+
/** Licensed rates only, the period the amount buys; `none` for metered rates. */
|
|
2234
|
+
interval: RateInterval;
|
|
2235
|
+
/** @nullable */
|
|
2236
|
+
interval_count?: number | null;
|
|
2615
2237
|
/** `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. */
|
|
2616
2238
|
tiers_mode: RateTiersMode;
|
|
2617
2239
|
/** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
|
|
2618
2240
|
unit_amount?: Money;
|
|
2619
2241
|
/** Present for a tiered rate, in ascending order. */
|
|
2620
2242
|
tiers?: Tier[];
|
|
2621
|
-
/**
|
|
2622
|
-
* How many measured units one amount covers. An hourly rate on a per-second meter is
|
|
2623
|
-
* `"3600"`.
|
|
2624
|
-
*/
|
|
2243
|
+
/** How many measured units one amount covers; an hourly rate on a per-second meter is `"3600"`. */
|
|
2625
2244
|
unit_quantity?: string;
|
|
2626
2245
|
currency: string;
|
|
2627
2246
|
effective_from: string;
|
|
@@ -2632,15 +2251,6 @@ export interface RateList {
|
|
|
2632
2251
|
items: Rate[];
|
|
2633
2252
|
pagination: OffsetPagination;
|
|
2634
2253
|
}
|
|
2635
|
-
/**
|
|
2636
|
-
* Narrows the selection when a plan offers more than one charge type.
|
|
2637
|
-
*/
|
|
2638
|
-
export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
|
|
2639
|
-
export declare const QuoteItemInputPriceType: {
|
|
2640
|
-
readonly postpaid: "postpaid";
|
|
2641
|
-
readonly prepaid: "prepaid";
|
|
2642
|
-
readonly one_time: "one_time";
|
|
2643
|
-
};
|
|
2644
2254
|
export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
|
|
2645
2255
|
export declare const QuoteItemInputInterval: {
|
|
2646
2256
|
readonly none: "none";
|
|
@@ -2649,23 +2259,13 @@ export declare const QuoteItemInputInterval: {
|
|
|
2649
2259
|
readonly year: "year";
|
|
2650
2260
|
};
|
|
2651
2261
|
/**
|
|
2652
|
-
* The
|
|
2653
|
-
*
|
|
2654
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
2655
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
2656
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
2657
|
-
*
|
|
2658
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
2659
|
-
* covering it is refused rather than priced at zero.
|
|
2262
|
+
* 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.
|
|
2660
2263
|
*/
|
|
2661
2264
|
export type QuoteItemInputDimensions = {
|
|
2662
2265
|
[key: string]: string;
|
|
2663
2266
|
};
|
|
2664
2267
|
/**
|
|
2665
|
-
* Identify a price
|
|
2666
|
-
* key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
|
|
2667
|
-
* postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
|
|
2668
|
-
* checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
|
|
2268
|
+
* 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.
|
|
2669
2269
|
*/
|
|
2670
2270
|
export interface QuoteItemInput {
|
|
2671
2271
|
/**
|
|
@@ -2681,12 +2281,14 @@ export interface QuoteItemInput {
|
|
|
2681
2281
|
price_id?: string;
|
|
2682
2282
|
product_id?: ProductID;
|
|
2683
2283
|
plan_id?: string;
|
|
2684
|
-
/** Narrows the selection when a plan offers more than one
|
|
2685
|
-
price_type?:
|
|
2284
|
+
/** Narrows the selection when a plan offers more than one price type. */
|
|
2285
|
+
price_type?: PriceType;
|
|
2286
|
+
/** Narrows the selection when a plan offers more than one usage type. */
|
|
2287
|
+
usage_type?: UsageType;
|
|
2686
2288
|
interval?: QuoteItemInputInterval;
|
|
2687
2289
|
/** @minimum 1 */
|
|
2688
2290
|
interval_count?: number;
|
|
2689
|
-
/** Selects among
|
|
2291
|
+
/** Selects among licensed prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
|
|
2690
2292
|
termination_policy?: TerminationPolicy;
|
|
2691
2293
|
/** @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]))))))))))$ */
|
|
2692
2294
|
quantity: string;
|
|
@@ -2696,36 +2298,37 @@ export interface QuoteItemInput {
|
|
|
2696
2298
|
* @maxLength 128
|
|
2697
2299
|
*/
|
|
2698
2300
|
meter_lookup_key?: string;
|
|
2699
|
-
/**
|
|
2700
|
-
* The attributes the price depends on — region, instance type, token class.
|
|
2701
|
-
*
|
|
2702
|
-
* Required when the price draws its rates from a price list, which is how anything
|
|
2703
|
-
* sold by region or by machine type is priced. A price that carries a single unit
|
|
2704
|
-
* amount, or a ladder, has no attributes to give and takes none.
|
|
2705
|
-
*
|
|
2706
|
-
* Every attribute the meter declares must be present. A combination with no rate
|
|
2707
|
-
* covering it is refused rather than priced at zero.
|
|
2708
|
-
*/
|
|
2301
|
+
/** 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. */
|
|
2709
2302
|
dimensions?: QuoteItemInputDimensions;
|
|
2710
|
-
/**
|
|
2711
|
-
* For metered items, how long to price for. This allows an estimate such as "about
|
|
2712
|
-
* this much per month" to be shown before anything exists. The priced quantity is
|
|
2713
|
-
* `quantity` multiplied by this duration.
|
|
2714
|
-
*/
|
|
2303
|
+
/** For a metered estimate, how long to price for, in seconds; the priced quantity is `quantity` times this duration. */
|
|
2715
2304
|
duration_seconds?: number;
|
|
2716
2305
|
}
|
|
2306
|
+
/**
|
|
2307
|
+
* The values of the meter's presentation dimensions, present only when grouped by meter.
|
|
2308
|
+
*/
|
|
2309
|
+
export type SpendRowDimensions = {
|
|
2310
|
+
[key: string]: string;
|
|
2311
|
+
};
|
|
2717
2312
|
export interface SpendRow {
|
|
2718
2313
|
product?: Product;
|
|
2719
2314
|
plan_id?: string;
|
|
2720
2315
|
plan_name?: string;
|
|
2721
2316
|
/** Present only when grouped by resource. */
|
|
2722
2317
|
resource_id?: string;
|
|
2318
|
+
/** Present only when grouped by meter. */
|
|
2319
|
+
meter?: ObjectIdentity;
|
|
2320
|
+
/** Present only when grouped by meter. */
|
|
2321
|
+
unit?: string;
|
|
2322
|
+
/** Net usage quantity, present only when grouped by meter. */
|
|
2323
|
+
quantity?: string;
|
|
2324
|
+
/** The values of the meter's presentation dimensions, present only when grouped by meter. */
|
|
2325
|
+
dimensions?: SpendRowDimensions;
|
|
2723
2326
|
amount: Money;
|
|
2724
2327
|
currency: string;
|
|
2725
2328
|
}
|
|
2726
2329
|
export interface SpendRowList {
|
|
2727
2330
|
items: SpendRow[];
|
|
2728
|
-
/** The
|
|
2331
|
+
/** The total over all matching groups, not only the page returned. */
|
|
2729
2332
|
total: Money;
|
|
2730
2333
|
currency: string;
|
|
2731
2334
|
pagination: OffsetPagination;
|
|
@@ -2741,28 +2344,28 @@ export declare const ActiveResourceStatus: {
|
|
|
2741
2344
|
readonly closed: "closed";
|
|
2742
2345
|
};
|
|
2743
2346
|
/**
|
|
2744
|
-
* A resource
|
|
2347
|
+
* A resource charged continuously by the second.
|
|
2745
2348
|
*/
|
|
2746
2349
|
export interface ActiveResource {
|
|
2747
2350
|
id: string;
|
|
2748
2351
|
ended_at?: string;
|
|
2749
2352
|
suspended_at?: string;
|
|
2750
2353
|
state_changed_at?: string;
|
|
2751
|
-
/** The
|
|
2354
|
+
/** The metered subscription charged for this metering record. */
|
|
2752
2355
|
subscription_id: string;
|
|
2753
2356
|
resource_id: string;
|
|
2754
2357
|
product: Product;
|
|
2755
|
-
/**
|
|
2358
|
+
/** The resource type, as the owning service names it. */
|
|
2756
2359
|
resource_type?: string;
|
|
2757
2360
|
meter: ObjectIdentity;
|
|
2758
2361
|
unit?: string;
|
|
2759
|
-
/** How much is held
|
|
2362
|
+
/** How much is held, such as cores, MiB or cards; not how much was used. */
|
|
2760
2363
|
quantity: string;
|
|
2761
2364
|
dimensions?: ActiveResourceDimensions;
|
|
2762
2365
|
status: ActiveResourceStatus;
|
|
2763
2366
|
started_at: string;
|
|
2764
2367
|
project_id?: string;
|
|
2765
|
-
/** Usage has been generated up to this boundary; it
|
|
2368
|
+
/** Usage has been generated up to this boundary; it says nothing about invoicing or payment. */
|
|
2766
2369
|
usage_generated_until: string;
|
|
2767
2370
|
}
|
|
2768
2371
|
export interface ActiveResourceList {
|
|
@@ -2770,7 +2373,7 @@ export interface ActiveResourceList {
|
|
|
2770
2373
|
pagination: OffsetPagination;
|
|
2771
2374
|
}
|
|
2772
2375
|
/**
|
|
2773
|
-
* An estimate of the refundable value of
|
|
2376
|
+
* An estimate of the refundable value of an order or selected items; nothing is canceled or refunded.
|
|
2774
2377
|
*/
|
|
2775
2378
|
export interface OrderRefundQuoteInput {
|
|
2776
2379
|
order_id: string;
|
|
@@ -2782,33 +2385,24 @@ export interface OrderRefundQuoteInput {
|
|
|
2782
2385
|
order_item_ids?: string[];
|
|
2783
2386
|
}
|
|
2784
2387
|
/**
|
|
2785
|
-
*
|
|
2786
|
-
* refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
|
|
2787
|
-
* canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
|
|
2788
|
-
* combination returns BILLING_PURCHASE_INVALID with the offending field."
|
|
2388
|
+
* 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.
|
|
2789
2389
|
*/
|
|
2790
2390
|
export interface QuoteRequest {
|
|
2791
2391
|
/**
|
|
2792
|
-
* The billing account to price for
|
|
2793
|
-
* with this account; renewals and cancellations must currently be paid for by it.
|
|
2392
|
+
* 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.
|
|
2794
2393
|
* @minimum 1
|
|
2795
2394
|
*/
|
|
2796
2395
|
billing_account_id: number;
|
|
2797
2396
|
/**
|
|
2798
|
-
* A proposed purchase priced in the account currency. Metered items may
|
|
2799
|
-
* quantities; those estimates are not amounts collectible at checkout.
|
|
2397
|
+
* A proposed purchase priced in the account's currency. Metered items may include usage estimates, which are not checkout amounts.
|
|
2800
2398
|
* @minItems 1
|
|
2801
2399
|
* @maxItems 100
|
|
2802
2400
|
*/
|
|
2803
2401
|
items?: QuoteItemInput[];
|
|
2804
|
-
/**
|
|
2805
|
-
* Preview paying this existing order. Its recorded purchase terms supply every line, and an order
|
|
2806
|
-
* whose terms are fixed returns its recorded amounts. A preview does not change the order.
|
|
2807
|
-
*/
|
|
2402
|
+
/** 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. */
|
|
2808
2403
|
order_id?: string;
|
|
2809
2404
|
/**
|
|
2810
|
-
* Preview renewing these subscriptions, each at most once
|
|
2811
|
-
* renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
|
|
2405
|
+
* 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.
|
|
2812
2406
|
* @minItems 1
|
|
2813
2407
|
* @maxItems 100
|
|
2814
2408
|
*/
|
|
@@ -2847,7 +2441,7 @@ export declare const WithdrawalItemStatus: {
|
|
|
2847
2441
|
readonly reversed: "reversed";
|
|
2848
2442
|
};
|
|
2849
2443
|
/**
|
|
2850
|
-
* The original top-up and its refund
|
|
2444
|
+
* The original top-up and where its refund goes. Card details are included when the original payment method was saved.
|
|
2851
2445
|
*/
|
|
2852
2446
|
export interface WithdrawalSource {
|
|
2853
2447
|
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
@@ -2865,7 +2459,7 @@ export interface WithdrawalSource {
|
|
|
2865
2459
|
card_last4?: string;
|
|
2866
2460
|
}
|
|
2867
2461
|
/**
|
|
2868
|
-
*
|
|
2462
|
+
* 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.
|
|
2869
2463
|
*/
|
|
2870
2464
|
export interface WithdrawalItem {
|
|
2871
2465
|
source_transaction_id: string;
|
|
@@ -2890,7 +2484,7 @@ export interface WithdrawalItem {
|
|
|
2890
2484
|
payment_gateway: string;
|
|
2891
2485
|
method_type: string;
|
|
2892
2486
|
source: WithdrawalSource;
|
|
2893
|
-
/** The
|
|
2487
|
+
/** The gateway's failure code when a refund failed, or `refund_reversed` when a completed refund was reversed. Absent while pending or successful. */
|
|
2894
2488
|
failure_code?: string;
|
|
2895
2489
|
}
|
|
2896
2490
|
export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
|
|
@@ -2903,7 +2497,7 @@ export declare const WithdrawalStatus: {
|
|
|
2903
2497
|
readonly reversed: "reversed";
|
|
2904
2498
|
};
|
|
2905
2499
|
/**
|
|
2906
|
-
*
|
|
2500
|
+
* 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.
|
|
2907
2501
|
*/
|
|
2908
2502
|
export interface Withdrawal {
|
|
2909
2503
|
id: string;
|
|
@@ -2928,7 +2522,7 @@ export interface Withdrawal {
|
|
|
2928
2522
|
status: WithdrawalStatus;
|
|
2929
2523
|
created_at: string;
|
|
2930
2524
|
completed_at?: string;
|
|
2931
|
-
/**
|
|
2525
|
+
/** Who submitted the withdrawal; may differ from the account owner. */
|
|
2932
2526
|
created_by?: string;
|
|
2933
2527
|
}
|
|
2934
2528
|
export interface WithdrawalPreviewItem {
|
|
@@ -2986,9 +2580,7 @@ export interface WithdrawalItemList {
|
|
|
2986
2580
|
pagination: OffsetPagination;
|
|
2987
2581
|
}
|
|
2988
2582
|
/**
|
|
2989
|
-
* How tax applies to the customer, as in Stripe
|
|
2990
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
2991
|
-
* invoices state this. Only operators change it.
|
|
2583
|
+
* 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.
|
|
2992
2584
|
*/
|
|
2993
2585
|
export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
|
|
2994
2586
|
export declare const ContactTaxExempt: {
|
|
@@ -2997,7 +2589,7 @@ export declare const ContactTaxExempt: {
|
|
|
2997
2589
|
readonly reverse: "reverse";
|
|
2998
2590
|
};
|
|
2999
2591
|
/**
|
|
3000
|
-
* A billing
|
|
2592
|
+
* A contact of a billing account with one address. An account can hold several; a contact is not a login.
|
|
3001
2593
|
*/
|
|
3002
2594
|
export interface Contact {
|
|
3003
2595
|
id: string;
|
|
@@ -3025,11 +2617,7 @@ export interface Contact {
|
|
|
3025
2617
|
address_postal_code?: string;
|
|
3026
2618
|
/** @pattern ^([A-Z]{2})?$ */
|
|
3027
2619
|
address_country?: string;
|
|
3028
|
-
/**
|
|
3029
|
-
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
3030
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
3031
|
-
* invoices state this. Only operators change it.
|
|
3032
|
-
*/
|
|
2620
|
+
/** 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. */
|
|
3033
2621
|
tax_exempt: ContactTaxExempt;
|
|
3034
2622
|
active: boolean;
|
|
3035
2623
|
created_at: string;
|
|
@@ -3105,14 +2693,14 @@ export interface StatementAmounts {
|
|
|
3105
2693
|
total: Money;
|
|
3106
2694
|
}
|
|
3107
2695
|
/**
|
|
3108
|
-
* One billing account's usage billing for one UTC calendar month, summed over
|
|
2696
|
+
* 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.
|
|
3109
2697
|
*/
|
|
3110
2698
|
export interface MonthlyStatement {
|
|
3111
2699
|
billing_account_id: number;
|
|
3112
2700
|
currency: string;
|
|
3113
2701
|
period_start: string;
|
|
3114
2702
|
period_end: string;
|
|
3115
|
-
/** True after the period's final closing, which applies minimum charges
|
|
2703
|
+
/** 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. */
|
|
3116
2704
|
finalized: boolean;
|
|
3117
2705
|
finalized_at?: string;
|
|
3118
2706
|
/** Statements of the period, including the open one. */
|
|
@@ -3135,7 +2723,7 @@ export declare const StatementStatus: {
|
|
|
3135
2723
|
readonly closed: "closed";
|
|
3136
2724
|
};
|
|
3137
2725
|
/**
|
|
3138
|
-
* interim
|
|
2726
|
+
* `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.
|
|
3139
2727
|
*/
|
|
3140
2728
|
export type StatementType = (typeof StatementType)[keyof typeof StatementType];
|
|
3141
2729
|
export declare const StatementType: {
|
|
@@ -3144,7 +2732,7 @@ export declare const StatementType: {
|
|
|
3144
2732
|
readonly supplement: "supplement";
|
|
3145
2733
|
};
|
|
3146
2734
|
/**
|
|
3147
|
-
* An account's consumption for one billing period
|
|
2735
|
+
* 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.
|
|
3148
2736
|
*/
|
|
3149
2737
|
export interface Statement {
|
|
3150
2738
|
id: string;
|
|
@@ -3156,7 +2744,7 @@ export interface Statement {
|
|
|
3156
2744
|
sequence: number;
|
|
3157
2745
|
status: StatementStatus;
|
|
3158
2746
|
type: StatementType;
|
|
3159
|
-
/** True while the statement is open. The estimate
|
|
2747
|
+
/** 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. */
|
|
3160
2748
|
estimated: boolean;
|
|
3161
2749
|
amounts: StatementAmounts;
|
|
3162
2750
|
closed_at?: string;
|
|
@@ -3170,11 +2758,19 @@ export interface StatementList {
|
|
|
3170
2758
|
items: Statement[];
|
|
3171
2759
|
pagination: OffsetPagination;
|
|
3172
2760
|
}
|
|
2761
|
+
/**
|
|
2762
|
+
* 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.
|
|
2763
|
+
*/
|
|
2764
|
+
export type StatementItemDimensions = {
|
|
2765
|
+
[key: string]: string;
|
|
2766
|
+
};
|
|
3173
2767
|
export interface StatementItem {
|
|
3174
2768
|
project_id?: string;
|
|
3175
2769
|
product_id?: string;
|
|
3176
2770
|
meter_id?: string;
|
|
3177
2771
|
unit?: string;
|
|
2772
|
+
/** 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. */
|
|
2773
|
+
dimensions?: StatementItemDimensions;
|
|
3178
2774
|
/** Net usage quantity. Included only when grouping by meter. */
|
|
3179
2775
|
quantity?: string;
|
|
3180
2776
|
deducted_quantity?: string;
|
|
@@ -3200,7 +2796,7 @@ export interface StatementSummary {
|
|
|
3200
2796
|
*/
|
|
3201
2797
|
export type ErrorResponse = Error;
|
|
3202
2798
|
/**
|
|
3203
|
-
* Unchanged since the `ETag
|
|
2799
|
+
* Unchanged since the given `ETag`; no body.
|
|
3204
2800
|
*/
|
|
3205
2801
|
export type NotModifiedResponse = void;
|
|
3206
2802
|
export type FromParameter = string;
|
|
@@ -3209,14 +2805,11 @@ export type FromParameter = string;
|
|
|
3209
2805
|
*/
|
|
3210
2806
|
export type ToParameter = string;
|
|
3211
2807
|
/**
|
|
3212
|
-
*
|
|
2808
|
+
* Only this account of yours; all when omitted.
|
|
3213
2809
|
*/
|
|
3214
2810
|
export type AccountIdQueryParameter = number;
|
|
3215
2811
|
/**
|
|
3216
|
-
* The `ETag`
|
|
3217
|
-
* answer is `304` with no body.
|
|
3218
|
-
*
|
|
3219
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
2812
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3220
2813
|
*/
|
|
3221
2814
|
export type IfNoneMatchParameter = string;
|
|
3222
2815
|
export type FromRequiredParameter = string;
|
|
@@ -3225,7 +2818,7 @@ export type FromRequiredParameter = string;
|
|
|
3225
2818
|
*/
|
|
3226
2819
|
export type ToRequiredParameter = string;
|
|
3227
2820
|
/**
|
|
3228
|
-
*
|
|
2821
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3229
2822
|
*/
|
|
3230
2823
|
export type ProjectIdsQueryParameter = string[];
|
|
3231
2824
|
export type ListWithdrawalItemsParams = {
|
|
@@ -3328,7 +2921,7 @@ export type ListProjectAssignmentsParams = {
|
|
|
3328
2921
|
page_size?: number;
|
|
3329
2922
|
billing_account_id?: number;
|
|
3330
2923
|
/**
|
|
3331
|
-
*
|
|
2924
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3332
2925
|
* @minItems 1
|
|
3333
2926
|
* @maxItems 100
|
|
3334
2927
|
*/
|
|
@@ -3348,7 +2941,7 @@ export type ListTopUpsParams = {
|
|
|
3348
2941
|
*/
|
|
3349
2942
|
page_size?: number;
|
|
3350
2943
|
/**
|
|
3351
|
-
*
|
|
2944
|
+
* Only this account of yours; all when omitted.
|
|
3352
2945
|
*/
|
|
3353
2946
|
billing_account_id?: AccountIdQueryParameter;
|
|
3354
2947
|
};
|
|
@@ -3366,13 +2959,13 @@ export type ListPaymentMethodsParams = {
|
|
|
3366
2959
|
*/
|
|
3367
2960
|
page_size?: number;
|
|
3368
2961
|
/**
|
|
3369
|
-
*
|
|
2962
|
+
* Only this account of yours; all when omitted.
|
|
3370
2963
|
*/
|
|
3371
2964
|
billing_account_id?: AccountIdQueryParameter;
|
|
3372
2965
|
};
|
|
3373
2966
|
export type PreviewInvoicePaymentParams = {
|
|
3374
2967
|
/**
|
|
3375
|
-
* As in paying
|
|
2968
|
+
* As in paying; used only while the order's terms are not fixed.
|
|
3376
2969
|
* @minLength 1
|
|
3377
2970
|
* @maxLength 64
|
|
3378
2971
|
*/
|
|
@@ -3400,12 +2993,12 @@ export type ListInvoicesParams = {
|
|
|
3400
2993
|
*/
|
|
3401
2994
|
page_size?: number;
|
|
3402
2995
|
/**
|
|
3403
|
-
*
|
|
2996
|
+
* Only this account of yours; all when omitted.
|
|
3404
2997
|
*/
|
|
3405
2998
|
billing_account_id?: AccountIdQueryParameter;
|
|
3406
2999
|
status?: InvoiceStatus;
|
|
3407
3000
|
/**
|
|
3408
|
-
* Only invoices
|
|
3001
|
+
* Only invoices with a charge from this subscription; amounts are for the whole invoice.
|
|
3409
3002
|
*/
|
|
3410
3003
|
subscription_id?: string;
|
|
3411
3004
|
from?: FromParameter;
|
|
@@ -3442,7 +3035,7 @@ export type ListTransactionsParams = {
|
|
|
3442
3035
|
*/
|
|
3443
3036
|
page_size?: number;
|
|
3444
3037
|
/**
|
|
3445
|
-
*
|
|
3038
|
+
* Only this account of yours; all when omitted.
|
|
3446
3039
|
*/
|
|
3447
3040
|
billing_account_id?: AccountIdQueryParameter;
|
|
3448
3041
|
from?: FromParameter;
|
|
@@ -3465,7 +3058,7 @@ export type ListAccountDiscountsParams = {
|
|
|
3465
3058
|
*/
|
|
3466
3059
|
page_size?: number;
|
|
3467
3060
|
/**
|
|
3468
|
-
*
|
|
3061
|
+
* Only this account of yours; all when omitted.
|
|
3469
3062
|
*/
|
|
3470
3063
|
billing_account_id?: AccountIdQueryParameter;
|
|
3471
3064
|
};
|
|
@@ -3483,7 +3076,7 @@ export type ListCreditGrantsParams = {
|
|
|
3483
3076
|
*/
|
|
3484
3077
|
page_size?: number;
|
|
3485
3078
|
/**
|
|
3486
|
-
*
|
|
3079
|
+
* Only this account of yours; all when omitted.
|
|
3487
3080
|
*/
|
|
3488
3081
|
billing_account_id?: AccountIdQueryParameter;
|
|
3489
3082
|
status?: ListCreditGrantsStatus;
|
|
@@ -3509,7 +3102,7 @@ export type ListCreditNotesParams = {
|
|
|
3509
3102
|
*/
|
|
3510
3103
|
page_size?: number;
|
|
3511
3104
|
/**
|
|
3512
|
-
*
|
|
3105
|
+
* Only this account of yours; all when omitted.
|
|
3513
3106
|
*/
|
|
3514
3107
|
billing_account_id?: AccountIdQueryParameter;
|
|
3515
3108
|
/**
|
|
@@ -3545,7 +3138,7 @@ export type ListRefundsParams = {
|
|
|
3545
3138
|
*/
|
|
3546
3139
|
page_size?: number;
|
|
3547
3140
|
/**
|
|
3548
|
-
*
|
|
3141
|
+
* Only this account of yours; all when omitted.
|
|
3549
3142
|
*/
|
|
3550
3143
|
billing_account_id?: AccountIdQueryParameter;
|
|
3551
3144
|
/**
|
|
@@ -3553,9 +3146,7 @@ export type ListRefundsParams = {
|
|
|
3553
3146
|
*/
|
|
3554
3147
|
invoice_id?: string;
|
|
3555
3148
|
/**
|
|
3556
|
-
*
|
|
3557
|
-
* purchase that could not be delivered, and those it caused on an earlier invoice, such as
|
|
3558
|
-
* the difference returned after a downgrade.
|
|
3149
|
+
* Refunds of this order: those of its invoice, such as for an undeliverable purchase, and those it caused on an earlier invoice, such as a downgrade difference.
|
|
3559
3150
|
*/
|
|
3560
3151
|
order_id?: string;
|
|
3561
3152
|
};
|
|
@@ -3573,7 +3164,7 @@ export type ListUsageChargesParams = {
|
|
|
3573
3164
|
*/
|
|
3574
3165
|
page_size?: number;
|
|
3575
3166
|
/**
|
|
3576
|
-
*
|
|
3167
|
+
* Only this account of yours; all when omitted.
|
|
3577
3168
|
*/
|
|
3578
3169
|
billing_account_id?: AccountIdQueryParameter;
|
|
3579
3170
|
product_id?: ProductID;
|
|
@@ -3588,7 +3179,7 @@ export type ListUsageChargesParams = {
|
|
|
3588
3179
|
*/
|
|
3589
3180
|
to?: ToParameter;
|
|
3590
3181
|
/**
|
|
3591
|
-
*
|
|
3182
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3592
3183
|
* @minItems 1
|
|
3593
3184
|
* @maxItems 100
|
|
3594
3185
|
*/
|
|
@@ -3611,11 +3202,11 @@ export type ListSubscriptionsParams = {
|
|
|
3611
3202
|
*/
|
|
3612
3203
|
page_size?: number;
|
|
3613
3204
|
/**
|
|
3614
|
-
*
|
|
3205
|
+
* Only this account of yours; all when omitted.
|
|
3615
3206
|
*/
|
|
3616
3207
|
billing_account_id?: AccountIdQueryParameter;
|
|
3617
3208
|
/**
|
|
3618
|
-
*
|
|
3209
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3619
3210
|
* @minItems 1
|
|
3620
3211
|
* @maxItems 100
|
|
3621
3212
|
*/
|
|
@@ -3635,7 +3226,7 @@ export type ListCancellationsParams = {
|
|
|
3635
3226
|
*/
|
|
3636
3227
|
page_size?: number;
|
|
3637
3228
|
/**
|
|
3638
|
-
*
|
|
3229
|
+
* Only this account of yours; all when omitted.
|
|
3639
3230
|
*/
|
|
3640
3231
|
billing_account_id?: AccountIdQueryParameter;
|
|
3641
3232
|
/**
|
|
@@ -3647,7 +3238,7 @@ export type ListCancellationsParams = {
|
|
|
3647
3238
|
*/
|
|
3648
3239
|
status?: ListCancellationsStatus;
|
|
3649
3240
|
/**
|
|
3650
|
-
*
|
|
3241
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3651
3242
|
* @minItems 1
|
|
3652
3243
|
* @maxItems 100
|
|
3653
3244
|
*/
|
|
@@ -3691,7 +3282,7 @@ export type ListAllowancesParams = {
|
|
|
3691
3282
|
*/
|
|
3692
3283
|
page_size?: number;
|
|
3693
3284
|
/**
|
|
3694
|
-
*
|
|
3285
|
+
* Only this account of yours; all when omitted.
|
|
3695
3286
|
*/
|
|
3696
3287
|
billing_account_id?: AccountIdQueryParameter;
|
|
3697
3288
|
/**
|
|
@@ -3701,7 +3292,7 @@ export type ListAllowancesParams = {
|
|
|
3701
3292
|
status?: ListAllowancesStatus;
|
|
3702
3293
|
product_id?: ProductID;
|
|
3703
3294
|
/**
|
|
3704
|
-
*
|
|
3295
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3705
3296
|
* @minItems 1
|
|
3706
3297
|
* @maxItems 100
|
|
3707
3298
|
*/
|
|
@@ -3728,7 +3319,7 @@ export type ListOrdersParams = {
|
|
|
3728
3319
|
*/
|
|
3729
3320
|
page_size?: number;
|
|
3730
3321
|
/**
|
|
3731
|
-
*
|
|
3322
|
+
* Only this account of yours; all when omitted.
|
|
3732
3323
|
*/
|
|
3733
3324
|
billing_account_id?: AccountIdQueryParameter;
|
|
3734
3325
|
status?: OrderStatus;
|
|
@@ -3738,7 +3329,7 @@ export type ListOrdersParams = {
|
|
|
3738
3329
|
*/
|
|
3739
3330
|
to?: ToParameter;
|
|
3740
3331
|
/**
|
|
3741
|
-
*
|
|
3332
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3742
3333
|
* @minItems 1
|
|
3743
3334
|
* @maxItems 100
|
|
3744
3335
|
*/
|
|
@@ -3772,11 +3363,11 @@ export type ListEntitlementsParams = {
|
|
|
3772
3363
|
*/
|
|
3773
3364
|
page_size?: number;
|
|
3774
3365
|
/**
|
|
3775
|
-
*
|
|
3366
|
+
* Only this account of yours; all when omitted.
|
|
3776
3367
|
*/
|
|
3777
3368
|
billing_account_id?: AccountIdQueryParameter;
|
|
3778
3369
|
/**
|
|
3779
|
-
*
|
|
3370
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3780
3371
|
* @minItems 1
|
|
3781
3372
|
* @maxItems 100
|
|
3782
3373
|
*/
|
|
@@ -3797,7 +3388,7 @@ export type ListFeatureGrantsParams = {
|
|
|
3797
3388
|
*/
|
|
3798
3389
|
page_size?: number;
|
|
3799
3390
|
/**
|
|
3800
|
-
*
|
|
3391
|
+
* Only this account of yours; all when omitted.
|
|
3801
3392
|
*/
|
|
3802
3393
|
billing_account_id?: AccountIdQueryParameter;
|
|
3803
3394
|
product_id?: ProductID;
|
|
@@ -3824,22 +3415,17 @@ export type ListPricesParams = {
|
|
|
3824
3415
|
currency: string;
|
|
3825
3416
|
product_id?: ProductID;
|
|
3826
3417
|
/**
|
|
3827
|
-
* Narrows to one
|
|
3418
|
+
* Narrows to one price type.
|
|
3828
3419
|
*/
|
|
3829
|
-
type?:
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
readonly prepaid: "prepaid";
|
|
3835
|
-
readonly one_time: "one_time";
|
|
3420
|
+
type?: PriceType;
|
|
3421
|
+
/**
|
|
3422
|
+
* Narrows to one usage type.
|
|
3423
|
+
*/
|
|
3424
|
+
usage_type?: UsageType;
|
|
3836
3425
|
};
|
|
3837
3426
|
export type ListPricesHeaders = {
|
|
3838
3427
|
/**
|
|
3839
|
-
* The `ETag`
|
|
3840
|
-
* answer is `304` with no body.
|
|
3841
|
-
*
|
|
3842
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3428
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3843
3429
|
*/
|
|
3844
3430
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3845
3431
|
};
|
|
@@ -3859,37 +3445,25 @@ export type ListProductsParams = {
|
|
|
3859
3445
|
};
|
|
3860
3446
|
export type ListProductsHeaders = {
|
|
3861
3447
|
/**
|
|
3862
|
-
* The `ETag`
|
|
3863
|
-
* answer is `304` with no body.
|
|
3864
|
-
*
|
|
3865
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3448
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3866
3449
|
*/
|
|
3867
3450
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3868
3451
|
};
|
|
3869
3452
|
export type GetProductHeaders = {
|
|
3870
3453
|
/**
|
|
3871
|
-
* The `ETag`
|
|
3872
|
-
* answer is `304` with no body.
|
|
3873
|
-
*
|
|
3874
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3454
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3875
3455
|
*/
|
|
3876
3456
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3877
3457
|
};
|
|
3878
3458
|
export type GetPlanHeaders = {
|
|
3879
3459
|
/**
|
|
3880
|
-
* The `ETag`
|
|
3881
|
-
* answer is `304` with no body.
|
|
3882
|
-
*
|
|
3883
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3460
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3884
3461
|
*/
|
|
3885
3462
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3886
3463
|
};
|
|
3887
3464
|
export type GetPriceHeaders = {
|
|
3888
3465
|
/**
|
|
3889
|
-
* The `ETag`
|
|
3890
|
-
* answer is `304` with no body.
|
|
3891
|
-
*
|
|
3892
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3466
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3893
3467
|
*/
|
|
3894
3468
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3895
3469
|
};
|
|
@@ -3910,10 +3484,7 @@ export type ListPlansParams = {
|
|
|
3910
3484
|
};
|
|
3911
3485
|
export type ListPlansHeaders = {
|
|
3912
3486
|
/**
|
|
3913
|
-
* The `ETag`
|
|
3914
|
-
* answer is `304` with no body.
|
|
3915
|
-
*
|
|
3916
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3487
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3917
3488
|
*/
|
|
3918
3489
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3919
3490
|
};
|
|
@@ -3934,10 +3505,7 @@ export type ListPricesByPlanParams = {
|
|
|
3934
3505
|
};
|
|
3935
3506
|
export type ListPricesByPlanHeaders = {
|
|
3936
3507
|
/**
|
|
3937
|
-
* The `ETag`
|
|
3938
|
-
* answer is `304` with no body.
|
|
3939
|
-
*
|
|
3940
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3508
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3941
3509
|
*/
|
|
3942
3510
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3943
3511
|
};
|
|
@@ -3959,16 +3527,13 @@ export type ListRatesParams = {
|
|
|
3959
3527
|
*/
|
|
3960
3528
|
meter_id?: string;
|
|
3961
3529
|
/**
|
|
3962
|
-
*
|
|
3530
|
+
* Rates in effect at this moment; defaults to now.
|
|
3963
3531
|
*/
|
|
3964
3532
|
at?: string;
|
|
3965
3533
|
};
|
|
3966
3534
|
export type ListRatesHeaders = {
|
|
3967
3535
|
/**
|
|
3968
|
-
* The `ETag`
|
|
3969
|
-
* answer is `304` with no body.
|
|
3970
|
-
*
|
|
3971
|
-
* Send it on every catalogue read. An unchanged catalogue is answered without a body.
|
|
3536
|
+
* The `ETag` of an earlier response. When the catalogue has not changed since, the response is `304` with no body.
|
|
3972
3537
|
*/
|
|
3973
3538
|
"If-None-Match"?: IfNoneMatchParameter;
|
|
3974
3539
|
};
|
|
@@ -3987,11 +3552,11 @@ export type ListActiveResourcesParams = {
|
|
|
3987
3552
|
page_size?: number;
|
|
3988
3553
|
resource_id?: string;
|
|
3989
3554
|
/**
|
|
3990
|
-
*
|
|
3555
|
+
* Only this account of yours; all when omitted.
|
|
3991
3556
|
*/
|
|
3992
3557
|
billing_account_id?: AccountIdQueryParameter;
|
|
3993
3558
|
/**
|
|
3994
|
-
*
|
|
3559
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
3995
3560
|
* @minItems 1
|
|
3996
3561
|
* @maxItems 100
|
|
3997
3562
|
*/
|
|
@@ -4014,11 +3579,7 @@ export type ListSpendParams = {
|
|
|
4014
3579
|
*/
|
|
4015
3580
|
to: ToRequiredParameter;
|
|
4016
3581
|
/**
|
|
4017
|
-
* `plan` groups by the plan of the price each charge was priced with,
|
|
4018
|
-
* subscription changes plan. `resource` groups by the resource each charge names. Items billed under their own
|
|
4019
|
-
* identifier — a disk, a public address — appear as their own rows rather than under
|
|
4020
|
-
* the machine they are attached to, since the relationship between them is known to
|
|
4021
|
-
* the owning service and not here.
|
|
3582
|
+
* `plan` groups by the plan of the price each charge was priced with, unchanged after the subscription changes plan. `resource` groups by the resource each charge names; a disk or an address billed under its own identifier is its own row. `meter` groups by meter and the values of its presentation dimensions, such as the model and token kind, and includes the quantity used.
|
|
4022
3583
|
*/
|
|
4023
3584
|
group_by?: ListSpendGroupBy;
|
|
4024
3585
|
/**
|
|
@@ -4038,11 +3599,11 @@ export type ListSpendParams = {
|
|
|
4038
3599
|
*/
|
|
4039
3600
|
page_size?: number;
|
|
4040
3601
|
/**
|
|
4041
|
-
* The
|
|
3602
|
+
* The billing account whose currency and charges the report uses; it must be authorized.
|
|
4042
3603
|
*/
|
|
4043
3604
|
billing_account_id: number;
|
|
4044
3605
|
/**
|
|
4045
|
-
*
|
|
3606
|
+
* Only records of these projects. Omit for all projects and account-level records. It does not grant access to other billing accounts.
|
|
4046
3607
|
* @minItems 1
|
|
4047
3608
|
* @maxItems 100
|
|
4048
3609
|
*/
|
|
@@ -4053,6 +3614,7 @@ export declare const ListSpendGroupBy: {
|
|
|
4053
3614
|
readonly product: "product";
|
|
4054
3615
|
readonly plan: "plan";
|
|
4055
3616
|
readonly resource: "resource";
|
|
3617
|
+
readonly meter: "meter";
|
|
4056
3618
|
};
|
|
4057
3619
|
export type ListMonthlyStatementsParams = {
|
|
4058
3620
|
billing_account_id?: number;
|