@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.
Files changed (558) hide show
  1. package/dist/billing/type/funds/v1/generated/models.d.ts +4 -4
  2. package/dist/billing/type/funds/v1/generated/validators/funds.zod.js +4 -4
  3. package/dist/billing/type/order/v1/generated/models.d.ts +375 -779
  4. package/dist/billing/type/order/v1/generated/models.js +12 -44
  5. package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  6. package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.js +8 -8
  7. package/dist/billing/type/order/v1/generated/validators/activeResource.zod.js +8 -5
  8. package/dist/billing/type/order/v1/generated/validators/allowance.zod.js +3 -3
  9. package/dist/billing/type/order/v1/generated/validators/applicability.zod.d.ts +22 -11
  10. package/dist/billing/type/order/v1/generated/validators/applicability.zod.js +12 -3
  11. package/dist/billing/type/order/v1/generated/validators/applicablePlan.zod.js +1 -1
  12. package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +5 -5
  13. package/dist/billing/type/order/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  14. package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.d.ts +14 -0
  15. package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.js +11 -0
  16. package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +6 -3
  17. package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +4 -4
  18. package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +3 -3
  19. package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  20. package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.js +6 -5
  21. package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  22. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  23. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  24. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  25. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  26. package/dist/billing/type/order/v1/generated/validators/contact.zod.js +2 -2
  27. package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  28. package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  29. package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  30. package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.js +1 -1
  31. package/dist/billing/type/order/v1/generated/validators/creditNote.zod.js +4 -4
  32. package/dist/billing/type/order/v1/generated/validators/currency.zod.js +1 -1
  33. package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +23 -12
  34. package/dist/billing/type/order/v1/generated/validators/discount.zod.js +4 -4
  35. package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +23 -12
  36. package/dist/billing/type/order/v1/generated/validators/entitlement.zod.js +1 -1
  37. package/dist/billing/type/order/v1/generated/validators/funds.zod.js +4 -4
  38. package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +0 -1
  39. package/dist/billing/type/order/v1/generated/validators/invoice.zod.js +8 -8
  40. package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  41. package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.js +6 -4
  42. package/dist/billing/type/order/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  43. package/dist/billing/type/order/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  44. package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  45. package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  46. package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.js +2 -2
  47. package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  48. package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.js +3 -3
  49. package/dist/billing/type/order/v1/generated/validators/monthlyStatement.zod.js +2 -2
  50. package/dist/billing/type/order/v1/generated/validators/objectIdentity.zod.js +1 -1
  51. package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +7 -4
  52. package/dist/billing/type/order/v1/generated/validators/order.zod.js +10 -12
  53. package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +7 -3
  54. package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +16 -14
  55. package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  56. package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.js +1 -1
  57. package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +7 -4
  58. package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  59. package/dist/billing/type/order/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  60. package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.js +1 -1
  61. package/dist/billing/type/order/v1/generated/validators/paidWith.zod.js +1 -1
  62. package/dist/billing/type/order/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  63. package/dist/billing/type/order/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  64. package/dist/billing/type/order/v1/generated/validators/paymentAction.zod.js +4 -4
  65. package/dist/billing/type/order/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  66. package/dist/billing/type/order/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  67. package/dist/billing/type/order/v1/generated/validators/paymentOption.zod.js +1 -1
  68. package/dist/billing/type/order/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  69. package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.js +4 -4
  70. package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.js +5 -8
  71. package/dist/billing/type/order/v1/generated/validators/paymentStatus.zod.js +1 -1
  72. package/dist/billing/type/order/v1/generated/validators/placedOrder.zod.d.ts +0 -1
  73. package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +7 -5
  74. package/dist/billing/type/order/v1/generated/validators/price.zod.js +14 -11
  75. package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +7 -5
  76. package/dist/billing/type/order/v1/generated/validators/priceOption.zod.d.ts +7 -5
  77. package/dist/billing/type/order/v1/generated/validators/priceOption.zod.js +7 -3
  78. package/dist/billing/type/order/v1/generated/validators/priceType.zod.d.ts +14 -0
  79. package/dist/billing/type/order/v1/generated/validators/priceType.zod.js +11 -0
  80. package/dist/billing/type/order/v1/generated/validators/productID.zod.js +1 -1
  81. package/dist/billing/type/order/v1/generated/validators/projectAssignment.zod.js +2 -2
  82. package/dist/billing/type/order/v1/generated/validators/purchaseOperation.zod.js +1 -1
  83. package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +6 -3
  84. package/dist/billing/type/order/v1/generated/validators/quote.zod.js +4 -4
  85. package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +2 -2
  86. package/dist/billing/type/order/v1/generated/validators/quoteItem.zod.js +4 -4
  87. package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  88. package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +8 -8
  89. package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +1 -1
  90. package/dist/billing/type/order/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  91. package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  92. package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.js +5 -5
  93. package/dist/billing/type/order/v1/generated/validators/quotedDiscount.zod.js +1 -1
  94. package/dist/billing/type/order/v1/generated/validators/rate.zod.d.ts +11 -0
  95. package/dist/billing/type/order/v1/generated/validators/rate.zod.js +14 -6
  96. package/dist/billing/type/order/v1/generated/validators/rateList.zod.d.ts +11 -0
  97. package/dist/billing/type/order/v1/generated/validators/refund.zod.js +3 -3
  98. package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +1 -1
  99. package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +1 -1
  100. package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +2 -2
  101. package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  102. package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +1 -1
  103. package/dist/billing/type/order/v1/generated/validators/scheduledChange.zod.js +2 -2
  104. package/dist/billing/type/order/v1/generated/validators/spendRow.zod.d.ts +8 -0
  105. package/dist/billing/type/order/v1/generated/validators/spendRow.zod.js +11 -0
  106. package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  107. package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.js +1 -1
  108. package/dist/billing/type/order/v1/generated/validators/statement.zod.js +2 -2
  109. package/dist/billing/type/order/v1/generated/validators/statementItem.zod.d.ts +1 -0
  110. package/dist/billing/type/order/v1/generated/validators/statementItem.zod.js +4 -0
  111. package/dist/billing/type/order/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  112. package/dist/billing/type/order/v1/generated/validators/statementType.zod.js +1 -1
  113. package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +7 -3
  114. package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +20 -14
  115. package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  116. package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  117. package/dist/billing/type/order/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  118. package/dist/billing/type/order/v1/generated/validators/terminationPolicy.zod.js +1 -1
  119. package/dist/billing/type/order/v1/generated/validators/tier.zod.js +1 -1
  120. package/dist/billing/type/order/v1/generated/validators/topUp.zod.js +8 -8
  121. package/dist/billing/type/order/v1/generated/validators/topUpCreate.zod.js +4 -4
  122. package/dist/billing/type/order/v1/generated/validators/transaction.zod.js +6 -6
  123. package/dist/billing/type/order/v1/generated/validators/usageCharge.zod.js +4 -7
  124. package/dist/billing/type/order/v1/generated/validators/usageType.zod.d.ts +14 -0
  125. package/dist/billing/type/order/v1/generated/validators/usageType.zod.js +11 -0
  126. package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +2 -2
  127. package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +2 -2
  128. package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +1 -1
  129. package/dist/billing/type/quote/v1/generated/models.d.ts +4 -4
  130. package/dist/billing/type/quote/v1/generated/validators/funds.zod.js +4 -4
  131. package/dist/billing/v1/generated/functions.d.ts +176 -310
  132. package/dist/billing/v1/generated/functions.js +175 -309
  133. package/dist/billing/v1/generated/models.d.ts +425 -863
  134. package/dist/billing/v1/generated/models.js +13 -49
  135. package/dist/billing/v1/generated/schemas.zod.d.ts +166 -383
  136. package/dist/billing/v1/generated/schemas.zod.js +213 -372
  137. package/dist/billing/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  138. package/dist/billing/v1/generated/validators/accountBalance.zod.js +8 -8
  139. package/dist/billing/v1/generated/validators/activeResource.zod.js +8 -5
  140. package/dist/billing/v1/generated/validators/allowance.zod.js +3 -3
  141. package/dist/billing/v1/generated/validators/applicability.zod.d.ts +22 -11
  142. package/dist/billing/v1/generated/validators/applicability.zod.js +12 -3
  143. package/dist/billing/v1/generated/validators/applicablePlan.zod.js +1 -1
  144. package/dist/billing/v1/generated/validators/billingAccount.zod.js +5 -5
  145. package/dist/billing/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  146. package/dist/billing/v1/generated/validators/billingScheme.zod.d.ts +14 -0
  147. package/dist/billing/v1/generated/validators/billingScheme.zod.js +11 -0
  148. package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +6 -3
  149. package/dist/billing/v1/generated/validators/cancellation.zod.js +4 -4
  150. package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +3 -3
  151. package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  152. package/dist/billing/v1/generated/validators/cancellationItem.zod.js +6 -5
  153. package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  154. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  155. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  156. package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  157. package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  158. package/dist/billing/v1/generated/validators/contact.zod.js +2 -2
  159. package/dist/billing/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  160. package/dist/billing/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  161. package/dist/billing/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  162. package/dist/billing/v1/generated/validators/creditGroup.zod.js +1 -1
  163. package/dist/billing/v1/generated/validators/creditNote.zod.js +4 -4
  164. package/dist/billing/v1/generated/validators/currency.zod.js +1 -1
  165. package/dist/billing/v1/generated/validators/discount.zod.d.ts +23 -12
  166. package/dist/billing/v1/generated/validators/discount.zod.js +4 -4
  167. package/dist/billing/v1/generated/validators/discountList.zod.d.ts +23 -12
  168. package/dist/billing/v1/generated/validators/entitlement.zod.js +1 -1
  169. package/dist/billing/v1/generated/validators/funds.zod.js +4 -4
  170. package/dist/billing/v1/generated/validators/invoice.zod.d.ts +0 -1
  171. package/dist/billing/v1/generated/validators/invoice.zod.js +8 -8
  172. package/dist/billing/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  173. package/dist/billing/v1/generated/validators/invoiceItem.zod.js +6 -4
  174. package/dist/billing/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  175. package/dist/billing/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  176. package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  177. package/dist/billing/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  178. package/dist/billing/v1/generated/validators/invoiceStatus.zod.js +2 -2
  179. package/dist/billing/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  180. package/dist/billing/v1/generated/validators/invoiceSummary.zod.js +3 -3
  181. package/dist/billing/v1/generated/validators/listInvoicesParams.zod.d.ts +0 -1
  182. package/dist/billing/v1/generated/validators/listPricesParams.zod.d.ts +5 -2
  183. package/dist/billing/v1/generated/validators/listPricesParams.zod.js +4 -1
  184. package/dist/billing/v1/generated/validators/listSpendParams.zod.d.ts +1 -0
  185. package/dist/billing/v1/generated/validators/listSpendParams.zod.js +3 -1
  186. package/dist/billing/v1/generated/validators/monthlyStatement.zod.js +2 -2
  187. package/dist/billing/v1/generated/validators/objectIdentity.zod.js +1 -1
  188. package/dist/billing/v1/generated/validators/order.zod.d.ts +7 -4
  189. package/dist/billing/v1/generated/validators/order.zod.js +10 -12
  190. package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +7 -3
  191. package/dist/billing/v1/generated/validators/orderItem.zod.js +16 -14
  192. package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  193. package/dist/billing/v1/generated/validators/orderItemStatus.zod.js +1 -1
  194. package/dist/billing/v1/generated/validators/orderList.zod.d.ts +7 -4
  195. package/dist/billing/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  196. package/dist/billing/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  197. package/dist/billing/v1/generated/validators/orderStatus.zod.js +1 -1
  198. package/dist/billing/v1/generated/validators/paidWith.zod.js +1 -1
  199. package/dist/billing/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  200. package/dist/billing/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  201. package/dist/billing/v1/generated/validators/paymentAction.zod.js +4 -4
  202. package/dist/billing/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  203. package/dist/billing/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  204. package/dist/billing/v1/generated/validators/paymentOption.zod.js +1 -1
  205. package/dist/billing/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  206. package/dist/billing/v1/generated/validators/paymentPreview.zod.js +4 -4
  207. package/dist/billing/v1/generated/validators/paymentResult.zod.js +5 -8
  208. package/dist/billing/v1/generated/validators/paymentStatus.zod.js +1 -1
  209. package/dist/billing/v1/generated/validators/price.zod.d.ts +7 -5
  210. package/dist/billing/v1/generated/validators/price.zod.js +14 -11
  211. package/dist/billing/v1/generated/validators/priceList.zod.d.ts +7 -5
  212. package/dist/billing/v1/generated/validators/priceOption.zod.d.ts +7 -5
  213. package/dist/billing/v1/generated/validators/priceOption.zod.js +7 -3
  214. package/dist/billing/v1/generated/validators/priceType.zod.d.ts +14 -0
  215. package/dist/billing/v1/generated/validators/priceType.zod.js +11 -0
  216. package/dist/billing/v1/generated/validators/productID.zod.js +1 -1
  217. package/dist/billing/v1/generated/validators/projectAssignment.zod.js +2 -2
  218. package/dist/billing/v1/generated/validators/purchaseOperation.zod.js +1 -1
  219. package/dist/billing/v1/generated/validators/quote.zod.d.ts +6 -3
  220. package/dist/billing/v1/generated/validators/quote.zod.js +4 -4
  221. package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +2 -2
  222. package/dist/billing/v1/generated/validators/quoteItem.zod.js +4 -4
  223. package/dist/billing/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  224. package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +8 -8
  225. package/dist/billing/v1/generated/validators/quoteRenewal.zod.js +1 -1
  226. package/dist/billing/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  227. package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  228. package/dist/billing/v1/generated/validators/quoteRequest.zod.js +5 -5
  229. package/dist/billing/v1/generated/validators/quotedDiscount.zod.js +1 -1
  230. package/dist/billing/v1/generated/validators/rate.zod.d.ts +11 -0
  231. package/dist/billing/v1/generated/validators/rate.zod.js +14 -6
  232. package/dist/billing/v1/generated/validators/rateList.zod.d.ts +11 -0
  233. package/dist/billing/v1/generated/validators/refund.zod.js +3 -3
  234. package/dist/billing/v1/generated/validators/refundPolicy.zod.js +1 -1
  235. package/dist/billing/v1/generated/validators/refundReason.zod.js +1 -1
  236. package/dist/billing/v1/generated/validators/renewRequest.zod.js +2 -2
  237. package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  238. package/dist/billing/v1/generated/validators/renewalPrice.zod.js +1 -1
  239. package/dist/billing/v1/generated/validators/scheduledChange.zod.js +2 -2
  240. package/dist/billing/v1/generated/validators/spendRow.zod.d.ts +8 -0
  241. package/dist/billing/v1/generated/validators/spendRow.zod.js +11 -0
  242. package/dist/billing/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  243. package/dist/billing/v1/generated/validators/spendRowList.zod.js +1 -1
  244. package/dist/billing/v1/generated/validators/statement.zod.js +2 -2
  245. package/dist/billing/v1/generated/validators/statementItem.zod.d.ts +1 -0
  246. package/dist/billing/v1/generated/validators/statementItem.zod.js +4 -0
  247. package/dist/billing/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  248. package/dist/billing/v1/generated/validators/statementType.zod.js +1 -1
  249. package/dist/billing/v1/generated/validators/subscription.zod.d.ts +7 -3
  250. package/dist/billing/v1/generated/validators/subscription.zod.js +20 -14
  251. package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  252. package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  253. package/dist/billing/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  254. package/dist/billing/v1/generated/validators/terminationPolicy.zod.js +1 -1
  255. package/dist/billing/v1/generated/validators/tier.zod.js +1 -1
  256. package/dist/billing/v1/generated/validators/topUp.zod.js +8 -8
  257. package/dist/billing/v1/generated/validators/topUpCreate.zod.js +4 -4
  258. package/dist/billing/v1/generated/validators/transaction.zod.js +6 -6
  259. package/dist/billing/v1/generated/validators/usageCharge.zod.js +4 -7
  260. package/dist/billing/v1/generated/validators/usageType.zod.d.ts +14 -0
  261. package/dist/billing/v1/generated/validators/usageType.zod.js +11 -0
  262. package/dist/billing/v1/generated/validators/withdrawal.zod.js +2 -2
  263. package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +2 -2
  264. package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +1 -1
  265. package/dist/canopy/v1/generated/models.d.ts +375 -779
  266. package/dist/canopy/v1/generated/models.js +12 -44
  267. package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  268. package/dist/canopy/v1/generated/validators/accountBalance.zod.js +8 -8
  269. package/dist/canopy/v1/generated/validators/activeResource.zod.js +8 -5
  270. package/dist/canopy/v1/generated/validators/allowance.zod.js +3 -3
  271. package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +22 -11
  272. package/dist/canopy/v1/generated/validators/applicability.zod.js +12 -3
  273. package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +1 -1
  274. package/dist/canopy/v1/generated/validators/billingAccount.zod.js +5 -5
  275. package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  276. package/dist/canopy/v1/generated/validators/billingScheme.zod.d.ts +39 -0
  277. package/dist/canopy/v1/generated/validators/billingScheme.zod.js +36 -0
  278. package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +6 -3
  279. package/dist/canopy/v1/generated/validators/cancellation.zod.js +4 -4
  280. package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +3 -3
  281. package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  282. package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +6 -5
  283. package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  284. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  285. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  286. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  287. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  288. package/dist/canopy/v1/generated/validators/contact.zod.js +2 -2
  289. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +0 -1
  290. package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  291. package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  292. package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  293. package/dist/canopy/v1/generated/validators/creditGroup.zod.js +1 -1
  294. package/dist/canopy/v1/generated/validators/creditNote.zod.js +4 -4
  295. package/dist/canopy/v1/generated/validators/currency.zod.js +1 -1
  296. package/dist/canopy/v1/generated/validators/discount.zod.d.ts +23 -12
  297. package/dist/canopy/v1/generated/validators/discount.zod.js +4 -4
  298. package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +23 -12
  299. package/dist/canopy/v1/generated/validators/entitlement.zod.js +1 -1
  300. package/dist/canopy/v1/generated/validators/funds.zod.js +4 -4
  301. package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +0 -1
  302. package/dist/canopy/v1/generated/validators/invoice.zod.js +8 -8
  303. package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  304. package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +6 -4
  305. package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  306. package/dist/canopy/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  307. package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  308. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  309. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +2 -2
  310. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  311. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +3 -3
  312. package/dist/canopy/v1/generated/validators/monthlyStatement.zod.js +2 -2
  313. package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +1 -1
  314. package/dist/canopy/v1/generated/validators/order.zod.d.ts +7 -4
  315. package/dist/canopy/v1/generated/validators/order.zod.js +10 -12
  316. package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +7 -3
  317. package/dist/canopy/v1/generated/validators/orderItem.zod.js +16 -14
  318. package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  319. package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +1 -1
  320. package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +7 -4
  321. package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  322. package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  323. package/dist/canopy/v1/generated/validators/orderStatus.zod.js +1 -1
  324. package/dist/canopy/v1/generated/validators/paidWith.zod.js +1 -1
  325. package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  326. package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  327. package/dist/canopy/v1/generated/validators/paymentAction.zod.js +4 -4
  328. package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  329. package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  330. package/dist/canopy/v1/generated/validators/paymentOption.zod.js +1 -1
  331. package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  332. package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +4 -4
  333. package/dist/canopy/v1/generated/validators/paymentResult.zod.js +5 -8
  334. package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +1 -1
  335. package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +0 -1
  336. package/dist/canopy/v1/generated/validators/price.zod.d.ts +7 -5
  337. package/dist/canopy/v1/generated/validators/price.zod.js +14 -11
  338. package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +7 -5
  339. package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +7 -5
  340. package/dist/canopy/v1/generated/validators/priceOption.zod.js +7 -3
  341. package/dist/canopy/v1/generated/validators/priceType.zod.d.ts +39 -0
  342. package/dist/canopy/v1/generated/validators/priceType.zod.js +36 -0
  343. package/dist/canopy/v1/generated/validators/productID.zod.js +1 -1
  344. package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +2 -2
  345. package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +1 -1
  346. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +6 -3
  347. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +4 -4
  348. package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +6 -3
  349. package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +2 -2
  350. package/dist/canopy/v1/generated/validators/quoteItem.zod.js +4 -4
  351. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  352. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +8 -8
  353. package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +1 -1
  354. package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  355. package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  356. package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +5 -5
  357. package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +1 -1
  358. package/dist/canopy/v1/generated/validators/rate.zod.d.ts +11 -0
  359. package/dist/canopy/v1/generated/validators/rate.zod.js +14 -6
  360. package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +11 -0
  361. package/dist/canopy/v1/generated/validators/refund.zod.js +3 -3
  362. package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +1 -1
  363. package/dist/canopy/v1/generated/validators/refundReason.zod.js +1 -1
  364. package/dist/canopy/v1/generated/validators/renewRequest.zod.js +2 -2
  365. package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  366. package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +1 -1
  367. package/dist/canopy/v1/generated/validators/scheduledChange.zod.js +2 -2
  368. package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +8 -0
  369. package/dist/canopy/v1/generated/validators/spendRow.zod.js +11 -0
  370. package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  371. package/dist/canopy/v1/generated/validators/spendRowList.zod.js +1 -1
  372. package/dist/canopy/v1/generated/validators/statement.zod.js +2 -2
  373. package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +1 -0
  374. package/dist/canopy/v1/generated/validators/statementItem.zod.js +4 -0
  375. package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  376. package/dist/canopy/v1/generated/validators/statementType.zod.js +1 -1
  377. package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +7 -3
  378. package/dist/canopy/v1/generated/validators/subscription.zod.js +20 -14
  379. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  380. package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  381. package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  382. package/dist/canopy/v1/generated/validators/terminationPolicy.zod.js +1 -1
  383. package/dist/canopy/v1/generated/validators/tier.zod.js +1 -1
  384. package/dist/canopy/v1/generated/validators/topUp.zod.js +8 -8
  385. package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +4 -4
  386. package/dist/canopy/v1/generated/validators/transaction.zod.js +6 -6
  387. package/dist/canopy/v1/generated/validators/usageCharge.zod.js +4 -7
  388. package/dist/canopy/v1/generated/validators/usageType.zod.d.ts +39 -0
  389. package/dist/canopy/v1/generated/validators/usageType.zod.js +36 -0
  390. package/dist/canopy/v1/generated/validators/withdrawal.zod.js +2 -2
  391. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +2 -2
  392. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +1 -1
  393. package/dist/compute/v1/generated/models.d.ts +4 -4
  394. package/dist/compute/v1/generated/schemas.zod.d.ts +18 -18
  395. package/dist/compute/v1/generated/validators/allocateFloatingIPQuoteRequestBody.zod.d.ts +1 -1
  396. package/dist/compute/v1/generated/validators/allocateFloatingIPRequestBody.zod.d.ts +1 -1
  397. package/dist/compute/v1/generated/validators/backupService.zod.d.ts +2 -2
  398. package/dist/compute/v1/generated/validators/billingChoice.zod.d.ts +1 -1
  399. package/dist/compute/v1/generated/validators/bootDisk.zod.d.ts +1 -1
  400. package/dist/compute/v1/generated/validators/createBackupCapacityPackQuoteRequestBody.zod.d.ts +1 -1
  401. package/dist/compute/v1/generated/validators/createBackupCapacityPackRequestBody.zod.d.ts +1 -1
  402. package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +2 -2
  403. package/dist/compute/v1/generated/validators/createDiskQuoteRequestBody.zod.d.ts +1 -1
  404. package/dist/compute/v1/generated/validators/createDiskRequestBody.zod.d.ts +1 -1
  405. package/dist/compute/v1/generated/validators/createImageQuoteRequestBody.zod.d.ts +1 -1
  406. package/dist/compute/v1/generated/validators/createImageRequestBody.zod.d.ts +1 -1
  407. package/dist/compute/v1/generated/validators/diskTypeListResponseBody.zod.d.ts +1 -1
  408. package/dist/compute/v1/generated/validators/diskTypeResource.zod.d.ts +1 -1
  409. package/dist/compute/v1/generated/validators/funds.zod.js +4 -4
  410. package/dist/compute/v1/generated/validators/iPv4PoolListResponseBody.zod.d.ts +2 -2
  411. package/dist/compute/v1/generated/validators/iPv4PoolResource.zod.d.ts +2 -2
  412. package/dist/compute/v1/generated/validators/instanceTypeListResponseBody.zod.d.ts +1 -1
  413. package/dist/compute/v1/generated/validators/instanceTypeResource.zod.d.ts +1 -1
  414. package/dist/compute/v1/generated/validators/launchInstanceQuoteRequestBody.zod.d.ts +3 -3
  415. package/dist/compute/v1/generated/validators/launchInstanceRequestBody.zod.d.ts +3 -3
  416. package/dist/compute/v1/generated/validators/newBootDisk.zod.d.ts +1 -1
  417. package/dist/compute/v1/generated/validators/newCompute.zod.d.ts +1 -1
  418. package/dist/compute/v1/generated/validators/newFloatingIP.zod.d.ts +1 -1
  419. package/dist/compute/v1/generated/validators/pricing.zod.d.ts +1 -1
  420. package/dist/compute/v1/generated/validators/pricingOption.zod.d.ts +1 -1
  421. package/dist/compute/v1/generated/validators/regionListResponseBody.zod.d.ts +1 -1
  422. package/dist/compute/v1/generated/validators/regionResource.zod.d.ts +1 -1
  423. package/dist/compute/v1/generated/validators/restoreBackupQuoteRequestBody.zod.d.ts +1 -1
  424. package/dist/compute/v1/generated/validators/restoreBackupRequestBody.zod.d.ts +1 -1
  425. package/dist/compute/v1/generated/validators/setSnapshotQuotaQuoteRequestBody.zod.d.ts +1 -1
  426. package/dist/compute/v1/generated/validators/setSnapshotQuotaRequestBody.zod.d.ts +1 -1
  427. package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +2 -2
  428. package/dist/compute/v1/generated/validators/snapshotQuota.zod.d.ts +2 -2
  429. package/dist/membership/v1/generated/models.d.ts +375 -779
  430. package/dist/membership/v1/generated/models.js +12 -44
  431. package/dist/membership/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  432. package/dist/membership/v1/generated/validators/accountBalance.zod.js +8 -8
  433. package/dist/membership/v1/generated/validators/activeResource.zod.js +8 -5
  434. package/dist/membership/v1/generated/validators/allowance.zod.js +3 -3
  435. package/dist/membership/v1/generated/validators/applicability.zod.d.ts +22 -11
  436. package/dist/membership/v1/generated/validators/applicability.zod.js +12 -3
  437. package/dist/membership/v1/generated/validators/applicablePlan.zod.js +1 -1
  438. package/dist/membership/v1/generated/validators/billingAccount.zod.js +5 -5
  439. package/dist/membership/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  440. package/dist/membership/v1/generated/validators/billingScheme.zod.d.ts +14 -0
  441. package/dist/membership/v1/generated/validators/billingScheme.zod.js +11 -0
  442. package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +6 -3
  443. package/dist/membership/v1/generated/validators/cancellation.zod.js +4 -4
  444. package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +3 -3
  445. package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  446. package/dist/membership/v1/generated/validators/cancellationItem.zod.js +6 -5
  447. package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  448. package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  449. package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  450. package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  451. package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  452. package/dist/membership/v1/generated/validators/contact.zod.js +2 -2
  453. package/dist/membership/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  454. package/dist/membership/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  455. package/dist/membership/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  456. package/dist/membership/v1/generated/validators/creditGroup.zod.js +1 -1
  457. package/dist/membership/v1/generated/validators/creditNote.zod.js +4 -4
  458. package/dist/membership/v1/generated/validators/currency6ff0ec7.zod.js +1 -1
  459. package/dist/membership/v1/generated/validators/discount.zod.d.ts +23 -12
  460. package/dist/membership/v1/generated/validators/discount.zod.js +4 -4
  461. package/dist/membership/v1/generated/validators/discountList.zod.d.ts +23 -12
  462. package/dist/membership/v1/generated/validators/entitlement.zod.js +1 -1
  463. package/dist/membership/v1/generated/validators/funds.zod.js +4 -4
  464. package/dist/membership/v1/generated/validators/invoice.zod.d.ts +0 -1
  465. package/dist/membership/v1/generated/validators/invoice.zod.js +8 -8
  466. package/dist/membership/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  467. package/dist/membership/v1/generated/validators/invoiceItem.zod.js +6 -4
  468. package/dist/membership/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  469. package/dist/membership/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  470. package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  471. package/dist/membership/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  472. package/dist/membership/v1/generated/validators/invoiceStatus.zod.js +2 -2
  473. package/dist/membership/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  474. package/dist/membership/v1/generated/validators/invoiceSummary.zod.js +3 -3
  475. package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +0 -1
  476. package/dist/membership/v1/generated/validators/monthlyStatement.zod.js +2 -2
  477. package/dist/membership/v1/generated/validators/objectIdentity.zod.js +1 -1
  478. package/dist/membership/v1/generated/validators/order.zod.d.ts +7 -4
  479. package/dist/membership/v1/generated/validators/order.zod.js +10 -12
  480. package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +7 -3
  481. package/dist/membership/v1/generated/validators/orderItem.zod.js +16 -14
  482. package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  483. package/dist/membership/v1/generated/validators/orderItemStatus.zod.js +1 -1
  484. package/dist/membership/v1/generated/validators/orderList.zod.d.ts +7 -4
  485. package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  486. package/dist/membership/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  487. package/dist/membership/v1/generated/validators/orderStatus.zod.js +1 -1
  488. package/dist/membership/v1/generated/validators/paidWith.zod.js +1 -1
  489. package/dist/membership/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  490. package/dist/membership/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  491. package/dist/membership/v1/generated/validators/paymentAction.zod.js +4 -4
  492. package/dist/membership/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  493. package/dist/membership/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  494. package/dist/membership/v1/generated/validators/paymentOption.zod.js +1 -1
  495. package/dist/membership/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  496. package/dist/membership/v1/generated/validators/paymentPreview.zod.js +4 -4
  497. package/dist/membership/v1/generated/validators/paymentResult.zod.js +5 -8
  498. package/dist/membership/v1/generated/validators/paymentStatus.zod.js +1 -1
  499. package/dist/membership/v1/generated/validators/placedOrder.zod.d.ts +0 -1
  500. package/dist/membership/v1/generated/validators/price.zod.d.ts +7 -5
  501. package/dist/membership/v1/generated/validators/price.zod.js +14 -11
  502. package/dist/membership/v1/generated/validators/priceList.zod.d.ts +7 -5
  503. package/dist/membership/v1/generated/validators/priceOption.zod.d.ts +7 -5
  504. package/dist/membership/v1/generated/validators/priceOption.zod.js +7 -3
  505. package/dist/membership/v1/generated/validators/priceType.zod.d.ts +14 -0
  506. package/dist/membership/v1/generated/validators/priceType.zod.js +11 -0
  507. package/dist/membership/v1/generated/validators/productID.zod.js +1 -1
  508. package/dist/membership/v1/generated/validators/projectAssignment.zod.js +2 -2
  509. package/dist/membership/v1/generated/validators/purchaseOperation.zod.js +1 -1
  510. package/dist/membership/v1/generated/validators/quote.zod.d.ts +6 -3
  511. package/dist/membership/v1/generated/validators/quote.zod.js +4 -4
  512. package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +2 -2
  513. package/dist/membership/v1/generated/validators/quoteItem.zod.js +4 -4
  514. package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  515. package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +8 -8
  516. package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +1 -1
  517. package/dist/membership/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  518. package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  519. package/dist/membership/v1/generated/validators/quoteRequest.zod.js +5 -5
  520. package/dist/membership/v1/generated/validators/quotedDiscount.zod.js +1 -1
  521. package/dist/membership/v1/generated/validators/rate.zod.d.ts +11 -0
  522. package/dist/membership/v1/generated/validators/rate.zod.js +14 -6
  523. package/dist/membership/v1/generated/validators/rateList.zod.d.ts +11 -0
  524. package/dist/membership/v1/generated/validators/refund.zod.js +3 -3
  525. package/dist/membership/v1/generated/validators/refundPolicy.zod.js +1 -1
  526. package/dist/membership/v1/generated/validators/refundReason.zod.js +1 -1
  527. package/dist/membership/v1/generated/validators/renewRequest.zod.js +2 -2
  528. package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  529. package/dist/membership/v1/generated/validators/renewalPrice.zod.js +1 -1
  530. package/dist/membership/v1/generated/validators/scheduledChange.zod.js +2 -2
  531. package/dist/membership/v1/generated/validators/spendRow.zod.d.ts +8 -0
  532. package/dist/membership/v1/generated/validators/spendRow.zod.js +11 -0
  533. package/dist/membership/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  534. package/dist/membership/v1/generated/validators/spendRowList.zod.js +1 -1
  535. package/dist/membership/v1/generated/validators/statement.zod.js +2 -2
  536. package/dist/membership/v1/generated/validators/statementItem.zod.d.ts +1 -0
  537. package/dist/membership/v1/generated/validators/statementItem.zod.js +4 -0
  538. package/dist/membership/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  539. package/dist/membership/v1/generated/validators/statementType.zod.js +1 -1
  540. package/dist/membership/v1/generated/validators/subscription.zod.d.ts +7 -3
  541. package/dist/membership/v1/generated/validators/subscription.zod.js +20 -14
  542. package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  543. package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  544. package/dist/membership/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  545. package/dist/membership/v1/generated/validators/terminationPolicy.zod.js +1 -1
  546. package/dist/membership/v1/generated/validators/tier.zod.js +1 -1
  547. package/dist/membership/v1/generated/validators/topUp.zod.js +8 -8
  548. package/dist/membership/v1/generated/validators/topUpCreate.zod.js +4 -4
  549. package/dist/membership/v1/generated/validators/transaction.zod.js +6 -6
  550. package/dist/membership/v1/generated/validators/usageCharge.zod.js +4 -7
  551. package/dist/membership/v1/generated/validators/usageType.zod.d.ts +14 -0
  552. package/dist/membership/v1/generated/validators/usageType.zod.js +11 -0
  553. package/dist/membership/v1/generated/validators/withdrawal.zod.js +2 -2
  554. package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +2 -2
  555. package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +1 -1
  556. package/dist/routes.d.ts +4 -4
  557. package/dist/routes.js +4 -4
  558. package/package.json +1 -1
@@ -300,12 +300,7 @@ export interface MembershipList {
300
300
  pagination: OffsetPagination;
301
301
  }
302
302
  /**
303
- * A draft is not yet issued. The draft invoice of an order shows base prices until it is paid, when
304
- * the discount is applied and it is issued; other drafts are private to administrators.
305
- * An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
306
- * Unbilled usage remains separate from invoices until it is invoiced.
307
- * A refund does not change the status: a paid invoice stays paid, with the refunded part in
308
- * amount_refunded. void means collection has stopped and any funds received have been returned.
303
+ * `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.
309
304
  */
310
305
  export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
311
306
  export declare const InvoiceStatus: {
@@ -313,13 +308,9 @@ export declare const InvoiceStatus: {
313
308
  readonly open: "open";
314
309
  readonly paid: "paid";
315
310
  readonly void: "void";
316
- readonly uncollectible: "uncollectible";
317
311
  };
318
312
  /**
319
- * Purchase-related invoice amounts, without account contact details or payment methods. Every order
320
- * has an invoice from placement. A draft shows base prices until it is paid, when the discount is
321
- * applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
322
- * checkout mode. Neither establishes acceptance or delivery.
313
+ * 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.
323
314
  */
324
315
  export interface InvoiceSummary {
325
316
  id: string;
@@ -337,9 +328,9 @@ export interface InvoiceSummary {
337
328
  tax_amount: string;
338
329
  total: string;
339
330
  amount_paid: string;
340
- /** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
331
+ /** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
341
332
  pre_payment_credit_notes_amount: Money;
342
- /** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
333
+ /** Issued credit notes against payments already received; their refunds may not have completed. */
343
334
  post_payment_credit_notes_amount: Money;
344
335
  /**
345
336
  * What is still collectible after unpaid credit notes and successful payments; never below zero.
@@ -445,7 +436,7 @@ export declare const WithdrawalItemStatus: {
445
436
  readonly reversed: "reversed";
446
437
  };
447
438
  /**
448
- * The original top-up and its refund destination. Card details are included when the original payment method was saved; missing card details do not change the original refund route.
439
+ * The original top-up and where its refund goes. Card details are included when the original payment method was saved.
449
440
  */
450
441
  export interface WithdrawalSource {
451
442
  /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
@@ -463,7 +454,7 @@ export interface WithdrawalSource {
463
454
  card_last4?: string;
464
455
  }
465
456
  /**
466
- * The fixed principal deduction, withdrawal fee and exact refund obligation for one original top-up. Each item has its own refund; payment_gateway and method_type identify the original route.
457
+ * 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.
467
458
  */
468
459
  export interface WithdrawalItem {
469
460
  source_transaction_id: string;
@@ -488,7 +479,7 @@ export interface WithdrawalItem {
488
479
  payment_gateway: string;
489
480
  method_type: string;
490
481
  source: WithdrawalSource;
491
- /** The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful. */
482
+ /** The gateway's failure code when a refund failed, or `refund_reversed` when a completed refund was reversed. Absent while pending or successful. */
492
483
  failure_code?: string;
493
484
  }
494
485
  export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
@@ -501,7 +492,7 @@ export declare const WithdrawalStatus: {
501
492
  readonly reversed: "reversed";
502
493
  };
503
494
  /**
504
- * An account withdrawal to the original payment methods of its unused top-ups. Accepted amounts are fixed. deducted_amount, settled_amount and charged_fee_amount report completed source items. Failed items release their principal and fee reservations; successful items are retained when another source fails.
495
+ * 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.
505
496
  */
506
497
  export interface Withdrawal {
507
498
  id: string;
@@ -526,7 +517,7 @@ export interface Withdrawal {
526
517
  status: WithdrawalStatus;
527
518
  created_at: string;
528
519
  completed_at?: string;
529
- /** Identity that submitted this withdrawal. It can differ from the billing account owner. */
520
+ /** Who submitted the withdrawal; may differ from the account owner. */
530
521
  created_by?: string;
531
522
  }
532
523
  export interface WithdrawalPreviewItem {
@@ -584,7 +575,7 @@ export interface WithdrawalItemList {
584
575
  pagination: OffsetPagination;
585
576
  }
586
577
  /**
587
- * Whether a fulfilled purchase may end immediately or only after its paid term. Does not grant a refund. When absent, the terms are not configured and termination requires review.
578
+ * 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.
588
579
  */
589
580
  export type TerminationPolicy = (typeof TerminationPolicy)[keyof typeof TerminationPolicy];
590
581
  export declare const TerminationPolicy: {
@@ -592,16 +583,7 @@ export declare const TerminationPolicy: {
592
583
  readonly period_end: "period_end";
593
584
  };
594
585
  /**
595
- * none refunds nothing. prorated refunds the amount paid for the current period minus the value of
596
- * the time used, never below zero and never more than what remains unrefunded. The time used runs
597
- * from the period start to the effective cancellation time and is valued at the plan's
598
- * shorter-period prices in the same currency, frozen at purchase as the order item's
599
- * refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
600
- * price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
601
- * second. When the plan has no prepaid period shorter than the one bought, the time used is valued
602
- * at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
603
- * and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
604
- * paid is refunded in the same proportion as the amount it was paid on.
586
+ * `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.
605
587
  */
606
588
  export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
607
589
  export declare const RefundPolicy: {
@@ -623,7 +605,7 @@ export declare const QuoteRenewalInterval: {
623
605
  readonly year: "year";
624
606
  };
625
607
  /**
626
- * Price renewing a prepaid subscription. Give `price_id`, or `interval` with
608
+ * Price renewing a licensed subscription. Give `price_id`, or `interval` with
627
609
  * `interval_count`, to renew for another term at the price currently sold for it. Naming
628
610
  * the current term, or giving neither, renews at the agreed amount. A term sold at several
629
611
  * prices that differ in termination policy is refused with 409
@@ -651,9 +633,7 @@ export declare const QuoteRenewalResultInterval: {
651
633
  readonly year: "year";
652
634
  };
653
635
  /**
654
- * What renewing would charge. Renewing the same subscription for the same term and number
655
- * of periods charges exactly `total`, unless prices or the discounts the account holds
656
- * change in between.
636
+ * 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.
657
637
  */
658
638
  export interface QuoteRenewalResult {
659
639
  /** Which renewal of the request this answers. */
@@ -664,11 +644,7 @@ export interface QuoteRenewalResult {
664
644
  interval: QuoteRenewalResultInterval;
665
645
  interval_count: number;
666
646
  periods: number;
667
- /**
668
- * The price of the periods before the discounts the account holds. A discount the
669
- * subscription already carries is reflected here. Contains tax only where the price
670
- * itself includes it.
671
- */
647
+ /** 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. */
672
648
  amount: Money;
673
649
  /** The reduction from a discount the account holds. */
674
650
  discount_amount: Money;
@@ -683,25 +659,25 @@ export interface QuoteRenewalResult {
683
659
  total: Money;
684
660
  }
685
661
  /**
686
- * One fully calculated purchase, estimated postpaid usage or recorded order item. Amounts use the
662
+ * One fully calculated purchase, estimated metered usage or recorded order item. Amounts use the
687
663
  * billing-account currency. An item with no immediate charge has zero checkout amounts.
688
664
  */
689
665
  export interface QuoteItem {
690
666
  tax_amount: Money;
691
667
  tax_included_amount: Money;
692
668
  /**
693
- * Zero-based request line index, or the recorded order item's position for an order quote.
669
+ * The zero-based request line index, or the recorded order item's position for an order quote.
694
670
  * @minimum 0
695
671
  */
696
672
  index: number;
697
673
  /** Present for an existing order quote; identifies the recorded item being priced. */
698
674
  order_item_id?: string;
699
- /** The selected price, including when the request identified it indirectly. */
675
+ /** The selected price, also when the request identified it indirectly. */
700
676
  price_id: string;
701
677
  plan_name: string;
702
678
  /** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
703
679
  unit_amount: Money | null;
704
- /** The quantity priced. When duration_seconds is supplied for metered usage, this is quantity multiplied by that duration. */
680
+ /** The quantity priced; with duration_seconds, quantity times the duration. */
705
681
  quantity: string;
706
682
  /** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
707
683
  amount: Money;
@@ -712,16 +688,16 @@ export interface QuoteItem {
712
688
  /**
713
689
  * Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
714
690
  * Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
715
- * A prepaid purchase may instead use an online payment method.
691
+ * A licensed purchase may instead be paid with an online payment method.
716
692
  */
717
693
  export interface Funds {
718
694
  /** Spendable balance after pending returns. */
719
695
  available_balance_amount: Money;
720
- /** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
696
+ /** Currently effective credits eligible for the quoted purchases or metered usage. Each grant is counted once. */
721
697
  usable_credit_amount: Money;
722
- /** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
698
+ /** Currently effective credits that cannot fund any quoted purchase or metered target. Unused eligible credits are not restricted. */
723
699
  restricted_credit_amount: Money;
724
- /** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
700
+ /** Minimum spendable balance needed after eligible credits, covering immediate charges and every new metered purchase's admission requirement. */
725
701
  required_balance_amount: Money;
726
702
  /** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
727
703
  balance_shortfall_amount: Money;
@@ -734,8 +710,7 @@ export declare const QuotedDiscountType: {
734
710
  readonly account_discount: "account_discount";
735
711
  };
736
712
  /**
737
- * The discount selected for this calculation. Its presence in a quote does not apply it or
738
- * reserve a redemption. Discount amounts are reported on the quote and its lines.
713
+ * The discount selected for this calculation, not applied and not reserved. Amounts are on the quote and its lines.
739
714
  */
740
715
  export interface QuotedDiscount {
741
716
  type: QuotedDiscountType;
@@ -748,30 +723,35 @@ export interface QuotedDiscount {
748
723
  */
749
724
  promotion_code: string | null;
750
725
  }
751
- export type CancellationRefundPreviewItemChargeType = (typeof CancellationRefundPreviewItemChargeType)[keyof typeof CancellationRefundPreviewItemChargeType];
752
- export declare const CancellationRefundPreviewItemChargeType: {
753
- readonly postpaid: "postpaid";
754
- readonly prepaid: "prepaid";
726
+ /**
727
+ * `one_time` charges once when bought. `recurring` charges again for every period, or for usage as it is settled.
728
+ */
729
+ export type PriceType = (typeof PriceType)[keyof typeof PriceType];
730
+ export declare const PriceType: {
755
731
  readonly one_time: "one_time";
732
+ readonly recurring: "recurring";
756
733
  };
757
734
  /**
758
- * One subscription of the quoted cancellation. The amounts mean what they mean in the total.
735
+ * `licensed` charges for the quantity bought, each period paid before it starts. `metered` charges for the usage
736
+ * reported, after it is settled; a metered subscription lasts until it is canceled. A one-time price is licensed.
737
+ */
738
+ export type UsageType = (typeof UsageType)[keyof typeof UsageType];
739
+ export declare const UsageType: {
740
+ readonly licensed: "licensed";
741
+ readonly metered: "metered";
742
+ };
743
+ /**
744
+ * One subscription of the quoted cancellation.
759
745
  */
760
746
  export interface CancellationRefundPreviewItem {
761
747
  subscription_id: string;
762
748
  plan_id: string;
763
749
  plan_name: string;
764
- /**
765
- * The project and its current name, for display. Absent for a purchase at account level, and when the
766
- * project details cannot be read at the moment.
767
- */
750
+ /** The project and its current name. Absent for an account-level purchase or when the project cannot be read. */
768
751
  project?: NamedIdentity | null;
769
- charge_type: CancellationRefundPreviewItemChargeType;
770
- /**
771
- * Whether automatic renewal is on now. Creating the cancellation turns it off. Withdrawing the
772
- * cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
773
- * until it is canceled and turns it back on.
774
- */
752
+ type: PriceType;
753
+ usage_type: UsageType;
754
+ /** 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. */
775
755
  auto_renew: boolean;
776
756
  unused_amount: Money;
777
757
  refundable_amount: Money;
@@ -781,19 +761,19 @@ export interface CancellationRefundPreviewItem {
781
761
  forfeited_amount: Money;
782
762
  }
783
763
  /**
784
- * What the cancellation would return, subscription by subscription and in total, as of now. Give
785
- * `proration_date` and `refundable_amount` when creating the cancellation.
764
+ * What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and
765
+ * `refundable_amount` when creating the cancellation.
786
766
  *
787
- * - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
788
- * time used, valued as refund policy `prorated` describes, whatever the refund terms say.
789
- * - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
790
- * `refund_amount` plus `credit_amount`.
791
- * - `refund_amount`: the part returned to the balance or to the payment method.
767
+ * - `unused_amount`: before tax, the amount paid for the current periods minus the value of the time used,
768
+ * valued as refund policy `prorated` describes, whatever the refund terms say.
769
+ * - `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus
770
+ * `credit_amount`.
771
+ * - `refund_amount`: the part returned to the balance or the payment method.
792
772
  * - `credit_amount`: the part restored to the credit grants that paid.
793
773
  * - `tax_amount`: the tax included in `refundable_amount`.
794
774
  * - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
795
775
  *
796
- * Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
776
+ * Metered and one-time subscriptions show zero; their usage until release is charged as usual.
797
777
  */
798
778
  export interface CancellationRefundPreview {
799
779
  mode: TerminationPolicy;
@@ -811,11 +791,7 @@ export interface CancellationRefundPreview {
811
791
  items: CancellationRefundPreviewItem[];
812
792
  }
813
793
  /**
814
- * An estimated refund to original payment sources. Before acceptance, cancellation returns the
815
- * collected amount. For delivered service, only value funded by this order is included; renewals
816
- * are evaluated under their own orders and the agreed termination terms apply. An unknown
817
- * delivery outcome is not evidence that a refund is eligible. This calculation does not create
818
- * a refund; the amount returned is determined when cancellation or termination is confirmed.
794
+ * 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.
819
795
  */
820
796
  export interface OrderRefundQuote {
821
797
  order_id: string;
@@ -825,21 +801,15 @@ export interface OrderRefundQuote {
825
801
  currency: string;
826
802
  }
827
803
  /**
828
- * A complete calculation in one billing-account currency, without saving a quote or reserving funds or
829
- * redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
830
- * included in totals for reporting and are not collectible at checkout. Only an existing-order quote
831
- * provides that order's checkout amount.
804
+ * 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.
832
805
  */
833
806
  export interface Quote {
834
- /** Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews. */
807
+ /** Account funds for an existing-order checkout quote. Absent for usage estimates, refunds and cancellations. */
835
808
  funds?: Funds;
836
809
  subtotal: Money;
837
810
  discount_amount: Money;
838
811
  tax_amount: Money;
839
- /**
840
- * The discount evaluated for a purchase or order, without applying it. Null when none is selected or
841
- * when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
842
- */
812
+ /** 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. */
843
813
  discount: QuotedDiscount | null;
844
814
  items: QuoteItem[];
845
815
  renewals: QuoteRenewalResult[];
@@ -847,20 +817,15 @@ export interface Quote {
847
817
  cancellation?: CancellationRefundPreview;
848
818
  total: Money;
849
819
  currency: string;
850
- /** Present only when an order refund was requested. Nothing is collectible for this target. */
820
+ /** Present when an order refund was requested. */
851
821
  refund?: OrderRefundQuote;
852
822
  }
853
823
  /**
854
- * A cancellation to quote: what ending these subscriptions together would return. One mode per
855
- * request; to compare, quote `immediate` and `period_end` separately.
856
- *
857
- * Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
858
- * canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
859
- * paid change still waiting to switch (`meta.order_id`).
824
+ * 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`).
860
825
  */
861
826
  export interface QuoteCancellation {
862
827
  /**
863
- * The subscriptions to end together, all of one service. Every subscription released with a resource must be included.
828
+ * The subscriptions to end together, all of one service, including every subscription released with a resource.
864
829
  * @minItems 1
865
830
  * @maxItems 50
866
831
  */
@@ -875,15 +840,12 @@ export interface CancellationCreate {
875
840
  */
876
841
  subscription_ids: string[];
877
842
  mode: TerminationPolicy;
878
- /**
879
- * For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
880
- * at most ten minutes old. The refund is computed as of it. Now when omitted.
881
- */
843
+ /** 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. */
882
844
  proration_date?: string;
883
- /** The `refundable_amount` of the quote. The cancellation is refused when the refund differs. */
845
+ /** The quote's `refundable_amount`; the cancellation is refused when the refund differs. */
884
846
  expected_refundable_amount: Money & string;
885
847
  /**
886
- * A note from the account holder. It is kept with the cancellation and not shown elsewhere.
848
+ * A note from the account holder, kept with the cancellation.
887
849
  * @maxLength 1024
888
850
  */
889
851
  reason?: string;
@@ -898,7 +860,7 @@ export declare const CancellationStatus: {
898
860
  readonly failed: "failed";
899
861
  };
900
862
  /**
901
- * Who asked for it. `project_deletion` means the project was deleted.
863
+ * Who requested it; `project_deletion` means the project was deleted.
902
864
  */
903
865
  export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
904
866
  export declare const CancellationOrigin: {
@@ -906,17 +868,6 @@ export declare const CancellationOrigin: {
906
868
  readonly operator: "operator";
907
869
  readonly project_deletion: "project_deletion";
908
870
  };
909
- /**
910
- * How the subscription is charged. Creating the cancellation turned automatic renewal off;
911
- * withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
912
- * `prepaid` one.
913
- */
914
- export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
915
- export declare const CancellationItemChargeType: {
916
- readonly postpaid: "postpaid";
917
- readonly prepaid: "prepaid";
918
- readonly one_time: "one_time";
919
- };
920
871
  export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
921
872
  export declare const CancellationItemStatus: {
922
873
  readonly requested: "requested";
@@ -930,19 +881,19 @@ export declare const CancellationItemStatus: {
930
881
  * One subscription of the cancellation.
931
882
  */
932
883
  export interface CancellationItem {
933
- /** The cancellation item of this subscription, the same as `Subscription.cancellation.id`. */
884
+ /** The subscription's cancellation item, the same as `Subscription.cancellation.id`. */
934
885
  id: string;
935
886
  subscription_id: string;
936
887
  plan_id: string;
937
888
  plan_name: string;
889
+ type: PriceType;
938
890
  /**
939
- * How the subscription is charged. Creating the cancellation turned automatic renewal off;
940
- * withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
941
- * `prepaid` one.
891
+ * Creating the cancellation turned automatic renewal off; withdrawing it turns renewal back on
892
+ * for a `metered` subscription and leaves it off for a `licensed` one.
942
893
  */
943
- charge_type: CancellationItemChargeType;
894
+ usage_type: UsageType;
944
895
  status: CancellationItemStatus;
945
- /** Execution stopped or its result is unknown. Present while release still requires resolution; it does not establish refund eligibility. */
896
+ /** The release stopped or its result is unknown; present while the release needs resolution. */
946
897
  failure_code?: string;
947
898
  release_started_at?: string;
948
899
  /** When the service ended, as confirmed by the service that provides it. */
@@ -972,20 +923,14 @@ export interface Cancellation {
972
923
  scheduled_at?: string;
973
924
  /** For `immediate`, the second the refund is computed as of. */
974
925
  proration_date?: string;
975
- /** Who asked for it. `project_deletion` means the project was deleted. */
926
+ /** Who requested it; `project_deletion` means the project was deleted. */
976
927
  origin: CancellationOrigin;
977
- /**
978
- * The billing account that paid for these subscriptions when the cancellation was created: the
979
- * account of an account-level purchase, or the account the project was linked to.
980
- */
928
+ /** 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. */
981
929
  billing_account_id: number;
982
930
  currency: string;
983
- /** The refund confirmed when it was created. Absent when the platform created it. */
931
+ /** The refund confirmed when the cancellation was created. Absent when the platform created it. */
984
932
  expected_refundable_amount?: Money;
985
- /**
986
- * Present with `failed`. A code of the service that provides the resources, such as a disk
987
- * that can only be released with its server. Clients map it to their own wording.
988
- */
933
+ /** Present with `failed`: the owning service's code, such as for a disk that can only be released with its server. */
989
934
  failure_code?: string;
990
935
  requested_at: string;
991
936
  completed_at?: string;
@@ -1011,13 +956,11 @@ export declare const SubscriptionCancellationMode: {
1011
956
  readonly period_end: "period_end";
1012
957
  };
1013
958
  /**
1014
- * The latest cancellation that includes the subscription, with this subscription's item. `id` is the
1015
- * item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
1016
- * confirmed end of service. A cancellation alone does not stop metering or issue a refund.
959
+ * 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.
1017
960
  */
1018
961
  export interface SubscriptionCancellation {
1019
962
  reason?: string;
1020
- /** The cancellation this request belongs to, with the other subscriptions released together. */
963
+ /** The cancellation this item belongs to, with the other subscriptions released together. */
1021
964
  cancellation_id?: string;
1022
965
  id: string;
1023
966
  subscription_id: string;
@@ -1035,7 +978,7 @@ export interface SubscriptionCancellation {
1035
978
  }
1036
979
  export type ErrorA200529 = Error;
1037
980
  /**
1038
- * Immutable platform service identifier, such as compute, canopy or assistant.
981
+ * The platform service's fixed identifier, such as compute, canopy or assistant.
1039
982
  * @minLength 1
1040
983
  * @maxLength 64
1041
984
  * @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
@@ -1054,29 +997,22 @@ export declare const BillingAccountStatus: {
1054
997
  };
1055
998
  export interface BillingAccount {
1056
999
  /**
1057
- * The active contact used for invoicing. Must belong to this account; null clears the selection.
1000
+ * The active contact used for invoices, of this account; null clears it.
1058
1001
  * @nullable
1059
1002
  */
1060
1003
  invoice_contact_id?: string | null;
1061
1004
  id: number;
1062
- /** What you call this account. */
1005
+ /** Your name for the account. */
1063
1006
  name?: string;
1064
1007
  /** Fixed when the account was opened. */
1065
1008
  currency: string;
1066
1009
  status: BillingAccountStatus;
1067
- /**
1068
- * How far past the suspension threshold this account may go before its resources are
1069
- * suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
1070
- */
1010
+ /** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
1071
1011
  grace_amount?: string;
1072
- /**
1073
- * How long this account has to top up after crossing the suspension threshold.
1074
- * 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
1075
- */
1012
+ /** 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. */
1076
1013
  grace_period_seconds?: number;
1077
1014
  /**
1078
- * The actual time this account was closed, in UTC (RFC 3339).
1079
- * Null or absent if the account is not closed or its historical close time is unknown.
1015
+ * When the account was closed. Null if it is not closed or the time is unknown.
1080
1016
  * @nullable
1081
1017
  */
1082
1018
  readonly closed_at?: string | null;
@@ -1093,7 +1029,7 @@ export interface Currency6ff0ec7 {
1093
1029
  */
1094
1030
  code: string;
1095
1031
  /**
1096
- * Decimal places of the currency, the ISO 4217 minor unit.
1032
+ * Decimal places of the ISO 4217 minor unit.
1097
1033
  * @minimum 0
1098
1034
  * @maximum 4
1099
1035
  */
@@ -1121,7 +1057,7 @@ export interface BillingAccountCreate {
1121
1057
  }
1122
1058
  export interface BillingAccountUpdate {
1123
1059
  /**
1124
- * The active contact used for invoicing. Must belong to this account; null clears the selection.
1060
+ * The active contact used for invoices, of this account; null clears it.
1125
1061
  * @nullable
1126
1062
  */
1127
1063
  invoice_contact_id?: string | null;
@@ -1133,7 +1069,7 @@ export interface BillingAccountList {
1133
1069
  pagination: OffsetPagination;
1134
1070
  }
1135
1071
  /**
1136
- * A plan it refers to. active is false once the plan is archived; it still applies to subscriptions already on this plan.
1072
+ * A plan referenced by an applicability; active is false once it is archived, and the reference still applies.
1137
1073
  */
1138
1074
  export interface ApplicablePlan {
1139
1075
  id: string;
@@ -1141,24 +1077,20 @@ export interface ApplicablePlan {
1141
1077
  active: boolean;
1142
1078
  }
1143
1079
  /**
1144
- * A catalog object inlined for display.
1080
+ * A catalog object, inlined for display.
1145
1081
  */
1146
1082
  export interface ObjectIdentity {
1147
1083
  lookup_key?: string;
1148
1084
  id: string;
1149
1085
  name: string;
1150
1086
  }
1151
- export type PriceOptionBillingScheme = (typeof PriceOptionBillingScheme)[keyof typeof PriceOptionBillingScheme];
1152
- export declare const PriceOptionBillingScheme: {
1087
+ /**
1088
+ * `per_unit` multiplies a unit amount; `tiered` walks a ladder.
1089
+ */
1090
+ export type BillingScheme = (typeof BillingScheme)[keyof typeof BillingScheme];
1091
+ export declare const BillingScheme: {
1153
1092
  readonly per_unit: "per_unit";
1154
1093
  readonly tiered: "tiered";
1155
- readonly rated: "rated";
1156
- };
1157
- export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
1158
- export declare const PriceOptionType: {
1159
- readonly postpaid: "postpaid";
1160
- readonly prepaid: "prepaid";
1161
- readonly one_time: "one_time";
1162
1094
  };
1163
1095
  export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
1164
1096
  export declare const PriceOptionInterval: {
@@ -1168,16 +1100,18 @@ export declare const PriceOptionInterval: {
1168
1100
  readonly year: "year";
1169
1101
  };
1170
1102
  /**
1171
- * A price's display terms, including archived prices referenced by an applicability list.
1103
+ * A price's display terms, including archived prices referenced by an applicability.
1172
1104
  */
1173
1105
  export interface PriceOption {
1174
1106
  product: Product;
1175
1107
  plan: ObjectIdentity;
1176
- billing_scheme: PriceOptionBillingScheme;
1108
+ /** Absent when the price delegates to a rate card. */
1109
+ billing_scheme?: BillingScheme;
1177
1110
  unit_quantity: string;
1178
1111
  id: string;
1179
1112
  currency: string;
1180
- type: PriceOptionType;
1113
+ type: PriceType;
1114
+ usage_type: UsageType;
1181
1115
  interval: PriceOptionInterval;
1182
1116
  /** How many periods one purchase covers. */
1183
1117
  interval_count?: number;
@@ -1186,11 +1120,7 @@ export interface PriceOption {
1186
1120
  active: boolean;
1187
1121
  }
1188
1122
  /**
1189
- * Which purchase operation this applies to. `new` covers every new purchase, including
1190
- * zero-charge purchases. It does not mean the account's first purchase; use
1191
- * `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
1192
- * configuration or billing-term changes, including changes that increase or decrease
1193
- * the amount due and changes with no additional charge or refund.
1123
+ * 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.
1194
1124
  */
1195
1125
  export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
1196
1126
  export declare const PurchaseOperation: {
@@ -1199,20 +1129,18 @@ export declare const PurchaseOperation: {
1199
1129
  readonly modify: "modify";
1200
1130
  };
1201
1131
  /**
1202
- * Anything not excluded that matches an inclusion, or anything not excluded when no inclusion is
1203
- * given, subject to the charge type, operation and term conditions. Entries always include their
1204
- * display fields; archived plans and prices stay listed with active set to false.
1132
+ * 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.
1205
1133
  */
1206
1134
  export interface Applicability {
1207
1135
  products?: Product[];
1208
1136
  plans?: ApplicablePlan[];
1209
1137
  prices?: PriceOption[];
1210
- price_types?: string[];
1138
+ /** The price types covered; empty covers both. */
1139
+ price_types?: PriceType[];
1140
+ /** The usage types covered; empty covers both. */
1141
+ usage_types?: UsageType[];
1211
1142
  operations?: PurchaseOperation[];
1212
- /**
1213
- * The shortest term a purchase may have, in months. A purchase with no term, such as
1214
- * metered usage, never qualifies while this is set.
1215
- */
1143
+ /** The shortest term a purchase may have, in months. Purchases without a term, such as metered usage, do not qualify while this is set. */
1216
1144
  min_term_months?: number;
1217
1145
  /** The longest term a purchase may have, in months. */
1218
1146
  max_term_months?: number;
@@ -1221,56 +1149,42 @@ export interface Applicability {
1221
1149
  excluded_prices?: PriceOption[];
1222
1150
  }
1223
1151
  export interface CreditGroup {
1224
- /** What the credit in this group may pay for. No restrictions means anything on the account. */
1152
+ /** What the credit in this group may pay for; no restrictions means anything on the account. */
1225
1153
  applies_to: Applicability;
1226
1154
  /** Restricted to your first purchase of anything it applies to. */
1227
1155
  first_purchase_only?: boolean;
1228
1156
  amount: Money;
1229
1157
  }
1230
1158
  /**
1231
- * Account balance, credits, and unpaid charges are reported separately.
1159
+ * Balance, credits and unpaid charges, each reported separately.
1232
1160
  */
1233
1161
  export interface AccountBalance {
1234
1162
  /** 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. */
1235
1163
  available_credit: Money;
1236
- /** Credit expected to pay unbilled_amount and due. Each charge is matched to grants whose scope, validity and conditions it meets, in the order credit is applied at payment. Nothing is reserved or deducted until an invoice is paid, so credits still includes this amount. */
1164
+ /** 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. */
1237
1165
  estimated_credit_applied: Money;
1238
- /** Current estimate of rated usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
1166
+ /** Current estimate of priced usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
1239
1167
  unbilled_amount: Money;
1240
1168
  billing_account_id: number;
1241
1169
  currency: string;
1242
- /**
1243
- * Prepaid funds in the account currency, excluding credits. May be negative after a payment
1244
- * dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
1245
- */
1170
+ /** 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. */
1246
1171
  balance: Money;
1247
- /**
1248
- * The recorded remaining credit, including restricted grants. It is not withdrawable
1249
- * and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
1250
- * credits balance does not imply that due is zero.
1251
- */
1172
+ /** 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. */
1252
1173
  credits: Money;
1253
- /** Currently valid credit whose use has applicable product, operation or eligibility conditions. Included in credits, separate from the balance. */
1174
+ /** Currently valid credit restricted to certain products, operations or conditions; part of credits, not of balance. */
1254
1175
  restricted_credits: Money;
1255
- /**
1256
- * Currently valid, unspent credit grouped by permitted use. Restrictions and
1257
- * validity dates determine which charges a group can cover, so these groups are not a general
1258
- * spendable balance and may differ from the recorded credits total.
1259
- */
1176
+ /** 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. */
1260
1177
  credit_groups: CreditGroup[];
1261
- /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
1178
+ /** 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. */
1262
1179
  due: Money;
1263
1180
  pending_returns_amount: Money;
1264
1181
  }
1265
1182
  /**
1266
- * A project's assignment to a billing account for the interval from effective_from to effective_to. An open-ended assignment has no end time.
1183
+ * A project's assignment to a billing account from effective_from until effective_to; an open assignment has no end.
1267
1184
  */
1268
1185
  export interface ProjectAssignment {
1269
1186
  project_id: string;
1270
- /**
1271
- * The project and its current name, for display. Absent when the project no longer exists or its
1272
- * details cannot be read at the moment; `project_id` still identifies it.
1273
- */
1187
+ /** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
1274
1188
  project?: NamedIdentity | null;
1275
1189
  billing_account_id: number;
1276
1190
  account_name?: string;
@@ -1287,16 +1201,7 @@ export interface SetProjectAssignmentRequest {
1287
1201
  billing_account_id: number;
1288
1202
  }
1289
1203
  /**
1290
- * `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
1291
- *
1292
- * `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
1293
- * and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
1294
- * `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
1295
- * says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
1296
- * payment.
1297
- *
1298
- * `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
1299
- * attempt, the amount is credited as a separate `succeeded` top-up.
1204
+ * `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.
1300
1205
  */
1301
1206
  export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
1302
1207
  export declare const TopUpStatus: {
@@ -1311,8 +1216,7 @@ export interface AccountIdentity {
1311
1216
  currency: string;
1312
1217
  }
1313
1218
  /**
1314
- * Why a gateway payment was withdrawn. `abandoned` means the customer did not complete it within the time
1315
- * allowed for payment. `requested_by_customer` means the customer canceled it.
1219
+ * Why a gateway payment was withdrawn: `abandoned` when the customer did not complete it in time, `requested_by_customer` when the customer canceled it.
1316
1220
  */
1317
1221
  export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
1318
1222
  export declare const PaymentCancellationReason: {
@@ -1326,83 +1230,55 @@ export declare const PaymentActionType: {
1326
1230
  readonly sdk: "sdk";
1327
1231
  };
1328
1232
  /**
1329
- * The customer's next interaction. The gateway reports the actual payment outcome separately.
1233
+ * The customer's next step; the payment outcome is reported separately.
1330
1234
  */
1331
1235
  export interface PaymentAction {
1332
1236
  type: PaymentActionType;
1333
- /** Identifies the browser adapter for an SDK action, for example stripe. */
1237
+ /** The browser adapter for the action, for example stripe. */
1334
1238
  provider?: string;
1335
1239
  url?: string;
1336
- /** QR content to render and scan, not an image URL. */
1240
+ /** QR content to render, not an image URL. */
1337
1241
  qr_code?: string;
1338
- /** Short-lived client credential for this payment's browser confirmation. */
1242
+ /** Short-lived client credential for confirming this payment in the browser. */
1339
1243
  client_secret?: string;
1340
1244
  public_key?: string;
1341
1245
  }
1342
1246
  /**
1343
- * A top-up attempt and its outcome. A successful top-up adds a traceable amount to the balance; it is not a credit grant and has no associated invoice.
1247
+ * 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.
1344
1248
  */
1345
1249
  export interface TopUp {
1346
1250
  id: string;
1347
1251
  billing_account_id: number;
1348
1252
  account: AccountIdentity;
1349
- /** What is credited to the account, in the account's own currency. */
1253
+ /** What is credited to the account, in its currency. */
1350
1254
  amount: Money;
1351
1255
  currency: string;
1352
- /**
1353
- * The part of this top-up still held in the balance. Pending refunds can temporarily
1354
- * reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
1355
- */
1256
+ /** 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. */
1356
1257
  remaining_amount?: Money;
1357
- /**
1358
- * `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
1359
- *
1360
- * `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
1361
- * and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
1362
- * `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
1363
- * says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
1364
- * payment.
1365
- *
1366
- * `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
1367
- * attempt, the amount is credited as a separate `succeeded` top-up.
1368
- */
1258
+ /** `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. */
1369
1259
  status: TopUpStatus;
1370
1260
  cancellation_reason?: PaymentCancellationReason;
1371
1261
  /** Which payment gateway collected it. */
1372
1262
  payment_gateway?: string;
1373
1263
  /** The selected payment method, such as card, wechat_pay or alipay. */
1374
1264
  method_type?: string;
1375
- /**
1376
- * The currency the customer was actually charged in, when the checkout page collected a
1377
- * local one. Absent when it was the same as the account's.
1378
- */
1265
+ /** The currency the customer was charged in when the checkout collected a local currency; absent when it is the account's. */
1379
1266
  presentment_currency?: string;
1380
- /**
1381
- * What was charged, in `presentment_currency`. It will not equal `amount`, and it is
1382
- * the figure that appears on the customer's card or wallet statement.
1383
- */
1267
+ /** The amount charged in `presentment_currency`, as shown on the customer's statement. */
1384
1268
  presentment_amount?: Money;
1385
- /**
1386
- * Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
1387
- * passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
1388
- * such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
1389
- * such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
1390
- * to their own wording and treat an unknown value as a generic decline.
1391
- */
1269
+ /** 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. */
1392
1270
  failure_reason?: string;
1393
1271
  action?: PaymentAction;
1394
1272
  created_at: string;
1395
1273
  /**
1396
- * When the funds arrived. Later than `created_at` — by days for a bank transfer — so
1397
- * reconciling against a statement uses this rather than the moment it was started.
1398
- * Absent until the payment completes.
1274
+ * When the funds arrived, possibly days after `created_at`. Absent until the payment completes.
1399
1275
  * @nullable
1400
1276
  */
1401
1277
  settled_at?: string | null;
1402
1278
  }
1403
1279
  export interface TopUpCreate {
1404
1280
  /**
1405
- * The gateway explicitly selected from the available payment options.
1281
+ * The gateway selected from the available payment options.
1406
1282
  * @minLength 1
1407
1283
  * @maxLength 32
1408
1284
  */
@@ -1413,21 +1289,12 @@ export interface TopUpCreate {
1413
1289
  * @maxLength 64
1414
1290
  */
1415
1291
  method_type: string;
1416
- /** The ID of this top-up attempt. Keep it before submitting and query it after an uncertain response. */
1292
+ /** The top-up ID, chosen by the caller. Read it after an uncertain response. */
1417
1293
  id: string;
1418
1294
  billing_account_id: number;
1419
- /**
1420
- * In the account's currency, and no finer than that currency's smallest unit:
1421
- * two decimals for most, none for the yen. A finer amount is refused here rather
1422
- * than at the checkout page, where the customer would see the gateway's own wording
1423
- * instead of an explanation.
1424
- *
1425
- * There is a minimum, which differs by currency. Below it the gateway's fee
1426
- * exceeds the top-up itself, so such a payment costs more to accept than it brings.
1427
- * The minimum in force is returned with the rejection.
1428
- */
1295
+ /** 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. */
1429
1296
  amount: Money & string;
1430
- /** Charge a saved method instead of opening a checkout page. */
1297
+ /** Charge a saved payment method instead of opening a checkout page. */
1431
1298
  payment_method_id?: string;
1432
1299
  /** Where to send the customer after checkout. */
1433
1300
  return_url?: string;
@@ -1439,14 +1306,11 @@ export interface TopUpList {
1439
1306
  export interface PaymentOptionMethod {
1440
1307
  /** The value to send as `method_type`, such as card, wechat_pay or alipay. */
1441
1308
  method_type: string;
1442
- /**
1443
- * Whether a method of this type can be saved with create-payment-method-setup and charged later
1444
- * without the customer present. Methods that are not reusable are paid anew each time.
1445
- */
1309
+ /** Whether this method type can be saved with create-payment-method-setup and charged later without the customer. */
1446
1310
  reusable: boolean;
1447
1311
  }
1448
1312
  /**
1449
- * A payment gateway that accepts payment in the account's currency, with the methods it accepts.
1313
+ * A gateway accepting the account's currency, with its payment methods.
1450
1314
  */
1451
1315
  export interface PaymentOption {
1452
1316
  /** The value to send as `payment_gateway`. */
@@ -1490,15 +1354,10 @@ export interface PaymentMethodSetup {
1490
1354
  billing_account_id: number;
1491
1355
  }
1492
1356
  /**
1493
- * What the payment gateway's browser library needs in order to collect a card. There is
1494
- * no address to redirect to: the form is rendered in the page, and the card goes straight
1495
- * from the browser to the gateway.
1357
+ * 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.
1496
1358
  */
1497
1359
  export interface PaymentMethodSetupResult {
1498
- /**
1499
- * The gateway's identifier for this attempt. Use it to tell a reloaded page apart
1500
- * from a second attempt.
1501
- */
1360
+ /** The gateway's identifier for this attempt. */
1502
1361
  setup_id: string;
1503
1362
  payment_gateway: string;
1504
1363
  action: PaymentAction;
@@ -1514,7 +1373,7 @@ export interface PaymentMethodSetupResult {
1514
1373
  */
1515
1374
  export interface PayInvoiceRequest {
1516
1375
  /**
1517
- * Required to collect an online remainder. An existing attempt keeps its original gateway.
1376
+ * Required to collect an online remainder. An existing attempt keeps its gateway.
1518
1377
  * @minLength 1
1519
1378
  * @maxLength 32
1520
1379
  */
@@ -1525,51 +1384,35 @@ export interface PayInvoiceRequest {
1525
1384
  * @maxLength 64
1526
1385
  */
1527
1386
  method_type?: string;
1528
- /** Optional saved card owned by this billing account and belonging to the selected gateway. Omit to complete payment interactively. */
1387
+ /** A saved card of this billing account at the selected gateway. Omit to pay interactively. */
1529
1388
  payment_method_id?: string;
1530
- /** Whether to apply the available balance. Credit grants are controlled separately by use_credits. */
1389
+ /** Whether to apply the balance; credit grants are controlled by use_credits. */
1531
1390
  use_balance?: boolean;
1532
- /** Apply eligible, unexpired credit grants before using the balance. This never withdraws grants or converts them into balance. */
1391
+ /** Apply eligible, unexpired credit grants before the balance. Grants are never converted into balance. */
1533
1392
  use_credits?: boolean;
1534
1393
  return_url?: string;
1535
1394
  /**
1536
- * The code to apply while the order's terms are not yet fixed. Omit to apply the best applicable
1537
- * account discount, or to keep the discount already recorded.
1395
+ * 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.
1538
1396
  * @minLength 1
1539
1397
  * @maxLength 64
1540
1398
  */
1541
1399
  promotion_code?: string;
1542
- /**
1543
- * The invoice total to expect, after discounts and tax and before credit grants or balance, as the
1544
- * payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
1545
- * and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
1546
- */
1400
+ /** 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. */
1547
1401
  expected_amount?: Money & string;
1548
1402
  }
1549
1403
  /**
1550
- * Name at least one invoice or order. They must all belong to the same account and share
1551
- * its currency; anything else is refused rather than partly paid.
1404
+ * Name at least one invoice or order. All must belong to one account in its currency.
1552
1405
  */
1553
1406
  export interface PayTogetherRequest {
1554
1407
  /** @maxItems 100 */
1555
1408
  invoice_ids?: string[];
1556
1409
  /** @maxItems 100 */
1557
1410
  order_ids?: string[];
1558
- /**
1559
- * The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
1560
- * gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
1561
- * the comparison.
1562
- */
1411
+ /** 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. */
1563
1412
  expected_amount?: Money & string;
1564
1413
  }
1565
1414
  /**
1566
- * The current payment outcome.
1567
- *
1568
- * succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
1569
- * order rather than submitting another payment. requires_action means the customer must complete the
1570
- * supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
1571
- * declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
1572
- * same or another method.
1415
+ * `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.
1573
1416
  */
1574
1417
  export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
1575
1418
  export declare const PaymentStatus: {
@@ -1595,7 +1438,7 @@ export interface PaymentPreviewInvoice {
1595
1438
  balance_applied: Money;
1596
1439
  }
1597
1440
  /**
1598
- * What paying would take, computed as paying computes it. Nothing is charged or reserved.
1441
+ * What paying would take, calculated as paying does. Nothing is charged or reserved.
1599
1442
  */
1600
1443
  export interface PaymentPreview {
1601
1444
  funds?: Funds;
@@ -1604,23 +1447,19 @@ export interface PaymentPreview {
1604
1447
  amount_due: Money;
1605
1448
  /** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
1606
1449
  credit_applied: Money;
1607
- /** The credit grants that would pay, in the order they would be used. */
1450
+ /** The credit grants that would pay, in the order used. */
1608
1451
  credit_grants: AppliedCredit[];
1609
1452
  /** What the balance would pay. */
1610
1453
  balance_applied: Money;
1611
- /** What would remain to be paid online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
1454
+ /** What would remain to pay online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
1612
1455
  gateway_amount: Money;
1613
1456
  /** The available balance after paying. */
1614
1457
  balance_after: Money;
1615
- /** Paying together only. Each invoice, in the order it would be paid. */
1458
+ /** Paying together only: each invoice, in payment order. */
1616
1459
  invoices?: PaymentPreviewInvoice[];
1617
1460
  }
1618
1461
  /**
1619
- * Present on refunds. Where this part of the refund goes.
1620
- *
1621
- * - `balance`: back to the account balance.
1622
- * - `credit`: back to the credit grant that paid, which keeps its original expiry.
1623
- * - `gateway`: back to the payment method it was paid with.
1462
+ * 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.
1624
1463
  */
1625
1464
  export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
1626
1465
  export declare const TransactionRefundDestination: {
@@ -1629,9 +1468,7 @@ export declare const TransactionRefundDestination: {
1629
1468
  readonly gateway: "gateway";
1630
1469
  };
1631
1470
  /**
1632
- * `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
1633
- * it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
1634
- * an invoice the payment was meant to pay remains open for another payment.
1471
+ * `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.
1635
1472
  */
1636
1473
  export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
1637
1474
  export declare const TransactionStatus: {
@@ -1652,7 +1489,7 @@ export declare const TransactionType: {
1652
1489
  readonly fee: "fee";
1653
1490
  };
1654
1491
  /**
1655
- * A funds operation. Each payment has one source; refunds identify the original successful transaction. Unknown gateway results remain pending. Payments from the balance or a gateway are distinct from credit-grant payments.
1492
+ * A funds movement with one source. Refunds name the original transaction. Unknown gateway results stay pending.
1656
1493
  */
1657
1494
  export interface Transaction {
1658
1495
  invoice_id?: string;
@@ -1661,47 +1498,22 @@ export interface Transaction {
1661
1498
  credit_grant_id?: string;
1662
1499
  credit_grant?: ObjectIdentity;
1663
1500
  refund_id?: string;
1664
- /**
1665
- * Present on refunds. Where this part of the refund goes.
1666
- *
1667
- * - `balance`: back to the account balance.
1668
- * - `credit`: back to the credit grant that paid, which keeps its original expiry.
1669
- * - `gateway`: back to the payment method it was paid with.
1670
- */
1501
+ /** 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. */
1671
1502
  refund_destination?: TransactionRefundDestination;
1672
- /**
1673
- * `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
1674
- * it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
1675
- * an invoice the payment was meant to pay remains open for another payment.
1676
- */
1503
+ /** `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. */
1677
1504
  status?: TransactionStatus;
1678
1505
  cancellation_reason?: PaymentCancellationReason;
1679
1506
  payment_gateway?: string;
1680
1507
  method_type?: string;
1681
- /**
1682
- * Why it failed. Present with `failed`. For a declined gateway payment the value is the
1683
- * gateway's own code, passed on unchanged: the card issuer's decline code when there is one
1684
- * (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
1685
- * error code (Stripe's code, such as card_declined, expired_card or
1686
- * payment_intent_authentication_failure). Clients map it to their own wording and treat an
1687
- * unknown value as a generic decline.
1688
- */
1508
+ /** 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. */
1689
1509
  failure_reason?: string;
1690
1510
  settled_at?: string;
1691
1511
  id: string;
1692
1512
  billing_account_id?: number;
1693
1513
  type: TransactionType;
1694
- /**
1695
- * Signed by type: positive for `topup` and `payment`, negative for `refund`.
1696
- * An `adjustment` is positive when it adds to the balance and negative when it takes from
1697
- * it. For the other types the sign does not tell the effect on the balance: a payment from
1698
- * the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
1699
- */
1514
+ /** 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. */
1700
1515
  amount: Money;
1701
- /**
1702
- * How much of this transaction is still available in the balance. Only top-ups, positive
1703
- * adjustments and gateway payments later returned to the balance can be non-zero.
1704
- */
1516
+ /** 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. */
1705
1517
  remaining_amount: Money;
1706
1518
  currency: string;
1707
1519
  reason?: string;
@@ -1709,49 +1521,31 @@ export interface Transaction {
1709
1521
  }
1710
1522
  export interface PaymentResult {
1711
1523
  transactions: Transaction[];
1712
- /** The gateway transaction, when one is involved. Balance and credit-grant payments are separate transactions. */
1524
+ /** The gateway transaction, when one is involved. */
1713
1525
  transaction_id?: string;
1714
1526
  status: PaymentStatus;
1715
1527
  amount_paid: Money;
1716
- /**
1717
- * What is still outstanding. Zero once the payment succeeds. Unchanged while
1718
- * `processing`: nothing is collected until the gateway confirms it.
1719
- */
1528
+ /** What is still outstanding: zero once the payment succeeds, unchanged while `processing`. */
1720
1529
  amount_due: Money;
1721
1530
  currency: string;
1722
1531
  credit_applied?: Money;
1723
1532
  gateway_amount?: Money;
1724
1533
  payment_gateway?: string;
1725
1534
  method_type?: string;
1726
- /**
1727
- * The amount already paid from the account's balance toward this invoice. Retrying an online remainder
1728
- * does not debit it again. A canceled purchase returns funds through its refund process.
1729
- */
1535
+ /** The amount already paid from balance toward this invoice; retrying the online remainder does not debit it again. */
1730
1536
  balance_applied?: Money;
1731
1537
  action?: PaymentAction;
1732
- /**
1733
- * Whether paying again is worth attempting. False for a refusal that will keep
1734
- * happening — a closed account, an amount over a limit — so that a client does not
1735
- * retry in a loop.
1736
- */
1538
+ /** Whether paying again can succeed. False for a refusal that will repeat, such as a closed account or an amount over a limit. */
1737
1539
  retriable?: boolean;
1738
1540
  /** @nullable */
1739
1541
  invoice_id?: string | null;
1740
1542
  /** @nullable */
1741
1543
  order_id?: string | null;
1742
- /**
1743
- * Why the payment did not go through. Present with `failed`. For a declined gateway payment the
1744
- * value is the gateway's own code, passed on unchanged: the card issuer's decline code when
1745
- * there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
1746
- * gateway's error code (Stripe's code, such as card_declined, expired_card or
1747
- * payment_intent_authentication_failure). Clients map it to their own wording and treat an
1748
- * unknown value as a generic decline.
1749
- */
1544
+ /** 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. */
1750
1545
  failure_reason?: string;
1751
1546
  }
1752
1547
  /**
1753
- * How tax applied to the customer when the invoice was issued. `reverse` means no tax was
1754
- * charged because the customer accounts for it under the reverse-charge mechanism.
1548
+ * How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism.
1755
1549
  */
1756
1550
  export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
1757
1551
  export declare const InvoiceCustomerTaxExempt: {
@@ -1774,7 +1568,7 @@ export interface TaxItem {
1774
1568
  currency: string;
1775
1569
  }
1776
1570
  export interface Invoice {
1777
- /** Collection has been stopped; any accepted return obligations are completed before final voiding. */
1571
+ /** Collection has stopped; accepted return obligations are completed. */
1778
1572
  void_requested_at?: string;
1779
1573
  due_at?: string;
1780
1574
  amount_refunded?: string;
@@ -1794,16 +1588,16 @@ export interface Invoice {
1794
1588
  /** Sum of the line discounts, taken off before tax. */
1795
1589
  discount_amount?: Money;
1796
1590
  tax_amount?: Money;
1797
- /** Successful credit-grant payments included in amount_paid. Does not reduce the receivable or tax base. */
1591
+ /** Successful credit-grant payments, included in amount_paid; they do not reduce the receivable or tax base. */
1798
1592
  credit_applied?: Money;
1799
- /** Subtotal less discount plus tax. Balance and credit grants are payment sources, not reductions of the receivable. */
1593
+ /** Subtotal less discount plus tax. Balance and credit grants pay it; they do not reduce it. */
1800
1594
  total: Money;
1801
1595
  amount_paid?: Money;
1802
- /** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
1596
+ /** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
1803
1597
  pre_payment_credit_notes_amount: Money;
1804
- /** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
1598
+ /** Issued credit notes against payments already received; their refunds may not have completed. */
1805
1599
  post_payment_credit_notes_amount: Money;
1806
- /** What is still collectible after unpaid credit notes and successful payments; never below zero. A draft has none; its total is the base price, and a payment preview shows what paying it would collect. A paid or void invoice has none either. */
1600
+ /** 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. */
1807
1601
  amount_due: Money;
1808
1602
  /** @nullable */
1809
1603
  period_start?: string | null;
@@ -1812,17 +1606,11 @@ export interface Invoice {
1812
1606
  * @nullable
1813
1607
  */
1814
1608
  period_end?: string | null;
1815
- /**
1816
- * Who this was billed to, as recorded when the invoice was issued. Later changes to
1817
- * the account do not alter it.
1818
- */
1609
+ /** The billing details recorded when the invoice was issued. */
1819
1610
  customer_name?: string;
1820
1611
  customer_email?: string;
1821
1612
  customer_tax_id?: string;
1822
- /**
1823
- * How tax applied to the customer when the invoice was issued. `reverse` means no tax was
1824
- * charged because the customer accounts for it under the reverse-charge mechanism.
1825
- */
1613
+ /** How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism. */
1826
1614
  customer_tax_exempt?: InvoiceCustomerTaxExempt;
1827
1615
  customer_address_line1?: string;
1828
1616
  customer_address_line2?: string;
@@ -1845,13 +1633,19 @@ export declare const InvoiceItemType: {
1845
1633
  readonly setup: "setup";
1846
1634
  readonly adjustment: "adjustment";
1847
1635
  };
1636
+ /**
1637
+ * For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines.
1638
+ */
1639
+ export type InvoiceItemDimensions = {
1640
+ [key: string]: string;
1641
+ };
1848
1642
  /**
1849
1643
  * The value of one paid period moved to the new configuration of a subscription.
1850
1644
  */
1851
1645
  export interface InvoiceItemProration {
1852
1646
  /** The earlier invoice line that paid for the period. */
1853
1647
  credited_invoice_item_id: string;
1854
- /** The wording of the earlier invoice line as recorded when this invoice was created. */
1648
+ /** The earlier invoice line's wording as recorded. */
1855
1649
  description: string;
1856
1650
  period_start: string;
1857
1651
  /** Exclusive. */
@@ -1883,17 +1677,10 @@ export interface InvoiceItem {
1883
1677
  type?: InvoiceItemType;
1884
1678
  /** @nullable */
1885
1679
  project_id?: string | null;
1886
- /**
1887
- * The project the charge was for and its current name, for display. Absent when the line is
1888
- * not for a project, and when the project no longer exists or its details cannot be read at
1889
- * the moment; `project_id` still identifies it then.
1890
- */
1680
+ /** 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. */
1891
1681
  project?: NamedIdentity | null;
1892
1682
  resource_id?: string;
1893
- /**
1894
- * The wording as recorded when the invoice was issued. It is not re-translated
1895
- * afterwards, so that an invoice continues to read as it did when it was sent.
1896
- */
1683
+ /** The line's wording as recorded when the invoice was issued. */
1897
1684
  description: string;
1898
1685
  unit?: string;
1899
1686
  quantity?: string;
@@ -1906,6 +1693,8 @@ export interface InvoiceItem {
1906
1693
  period_start?: string | null;
1907
1694
  /** @nullable */
1908
1695
  period_end?: string | null;
1696
+ /** For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines. */
1697
+ dimensions?: InvoiceItemDimensions;
1909
1698
  /**
1910
1699
  * Present on a line that changes a subscription immediately, one entry for each paid period it
1911
1700
  * covers. `amount` is the sum of `remaining_amount` minus `credited_amount` over the entries.
@@ -1954,9 +1743,7 @@ export declare const CreditNoteStatus: {
1954
1743
  readonly void: "void";
1955
1744
  };
1956
1745
  /**
1957
- * Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
1958
- * `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
1959
- * issued by Leaflow on request.
1746
+ * 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.
1960
1747
  */
1961
1748
  export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
1962
1749
  export declare const CreditNoteReason: {
@@ -1970,7 +1757,7 @@ export declare const CreditNoteReason: {
1970
1757
  readonly operator: "operator";
1971
1758
  };
1972
1759
  /**
1973
- * An issued invoice reduction. Its credited amount is pre_payment_amount plus post_payment_amount. A paid credit records a return obligation; refund_id identifies its refund, whose outcome may still be pending. Original invoice amounts remain unchanged.
1760
+ * 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.
1974
1761
  */
1975
1762
  export interface CreditNote {
1976
1763
  id: string;
@@ -1985,18 +1772,14 @@ export interface CreditNote {
1985
1772
  voided_at: string | null;
1986
1773
  /** The reduction of unpaid receivables. A void note no longer reduces what is due. */
1987
1774
  pre_payment_amount: Money;
1988
- /** The credited part of payments already received. This is not proof that its refund has completed. */
1775
+ /** The credited part of payments already received; its refund may not have completed. */
1989
1776
  post_payment_amount: Money;
1990
1777
  /**
1991
- * The refund to the original payment sources, or null when no paid amount was credited.
1778
+ * The refund to the original payment sources; null when no paid amount was credited.
1992
1779
  * @nullable
1993
1780
  */
1994
1781
  refund_id: string | null;
1995
- /**
1996
- * Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
1997
- * `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
1998
- * issued by Leaflow on request.
1999
- */
1782
+ /** 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. */
2000
1783
  reason: CreditNoteReason;
2001
1784
  }
2002
1785
  export interface CreditNoteItem {
@@ -2015,7 +1798,7 @@ export interface CreditNoteItemList {
2015
1798
  pagination: OffsetPagination;
2016
1799
  }
2017
1800
  /**
2018
- * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
1801
+ * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
2019
1802
  * @deprecated
2020
1803
  */
2021
1804
  export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
@@ -2043,22 +1826,19 @@ export declare const RefundStatus: {
2043
1826
  readonly failed: "failed";
2044
1827
  };
2045
1828
  /**
2046
- * Why the refund was made. Clients map the code to their own wording. More codes may be added;
2047
- * treat an unknown code as a refund without a stated reason.
1829
+ * Why the refund was made. New codes may be added; treat an unknown code as unspecified.
2048
1830
  *
2049
1831
  * - `provisioning_failed`: the purchase could not be delivered.
2050
- * - `order_expired`: the order expired after part of it had been paid.
2051
- * - `order_canceled`: the account holder canceled the order after part of it had been paid.
2052
- * - `change_canceled`: a scheduled change was withdrawn after part of it had been paid.
2053
- * - `change_expired`: a scheduled change could not take effect before its time passed.
2054
- * - `subscription_canceled`: the subscription was canceled and its unused value returned under
2055
- * its refund terms.
2056
- * - `future_period_canceled`: a renewal that had not started yet was withdrawn.
2057
- * - `downgrade_difference`: after a downgrade, the remaining value of what was paid, valued as refund
2058
- * policy `prorated` describes, minus the new configuration's cost for the remaining time at the
2059
- * change item's `refund_monthly_amount` and `refund_hourly_amount`. Nothing is refunded when that is
2060
- * zero or less.
2061
- * - `usage_true_up`: usage priced again over the whole month cost less than was charged.
1832
+ * - `order_expired`: the order expired after part of it was paid.
1833
+ * - `order_canceled`: the order was canceled after part of it was paid.
1834
+ * - `change_canceled`: a scheduled change was withdrawn after part of it was paid.
1835
+ * - `change_expired`: a scheduled change could not take effect in time.
1836
+ * - `subscription_canceled`: the unused value of a canceled subscription, under its refund terms.
1837
+ * - `future_period_canceled`: a renewal that had not started was withdrawn.
1838
+ * - `downgrade_difference`: after a downgrade, the remaining paid value, valued as refund policy `prorated`
1839
+ * describes, minus the new configuration's cost for the remaining time at the change item's
1840
+ * `refund_monthly_amount` and `refund_hourly_amount`.
1841
+ * - `usage_true_up`: usage priced over the whole month cost less than was charged.
2062
1842
  * - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
2063
1843
  * - `operator`: made by the platform operator.
2064
1844
  */
@@ -2079,15 +1859,14 @@ export declare const RefundReason: {
2079
1859
  export interface Refund {
2080
1860
  transaction_id?: string;
2081
1861
  cancellation_item_id?: string;
2082
- /** Original funds-return split and each result. Unknown gateway results remain pending. */
1862
+ /** The refund split by original payment source, with each result. Unknown gateway results stay pending. */
2083
1863
  transactions: Transaction[];
2084
1864
  id: string;
2085
1865
  billing_account_id?: number;
2086
1866
  /** @nullable */
2087
1867
  invoice_id?: string | null;
2088
1868
  /**
2089
- * The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
2090
- * the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
1869
+ * 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.
2091
1870
  * @nullable
2092
1871
  */
2093
1872
  order_id?: string | null;
@@ -2103,7 +1882,7 @@ export interface Refund {
2103
1882
  settled_amount?: Money;
2104
1883
  currency: string;
2105
1884
  /**
2106
- * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
1885
+ * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
2107
1886
  * @deprecated
2108
1887
  */
2109
1888
  destination?: RefundDestination;
@@ -2130,7 +1909,7 @@ export interface RefundList {
2130
1909
  pagination: OffsetPagination;
2131
1910
  }
2132
1911
  /**
2133
- * The attributes the rate was chosen by, such as region and machine type.
1912
+ * The dimension values the rate was matched by, such as region and machine type.
2134
1913
  */
2135
1914
  export type UsageChargeDimensions = {
2136
1915
  [key: string]: string;
@@ -2139,26 +1918,23 @@ export interface UsageCharge {
2139
1918
  subscription_id: string;
2140
1919
  id: string;
2141
1920
  project_id?: string;
2142
- /**
2143
- * The project and its current name, for display. Absent when the project no longer exists or its
2144
- * details cannot be read at the moment; `project_id` still identifies it.
2145
- */
1921
+ /** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
2146
1922
  project?: NamedIdentity | null;
2147
1923
  product: Product;
2148
1924
  /** Which resource this was charged for. Empty for charges not tied to one. */
2149
1925
  resource_id?: string;
2150
1926
  meter: ObjectIdentity;
2151
1927
  unit?: string;
2152
- /** The attributes the rate was chosen by, such as region and machine type. */
1928
+ /** The dimension values the rate was matched by, such as region and machine type. */
2153
1929
  dimensions?: UsageChargeDimensions;
2154
1930
  window_start: string;
2155
1931
  /** Exclusive. */
2156
1932
  window_end: string;
2157
- /** How much was used, before any included allowance. */
1933
+ /** Quantity used before allowances. */
2158
1934
  gross_quantity?: string;
2159
1935
  /** How much of that was covered by an allowance. */
2160
1936
  deducted_quantity?: string;
2161
- /** What was charged for — the gross quantity less the part covered. */
1937
+ /** The quantity charged: gross quantity less the part covered by allowances. */
2162
1938
  quantity: string;
2163
1939
  unit_amount?: Money;
2164
1940
  amount: Money;
@@ -2180,12 +1956,6 @@ export interface UsageChargeList {
2180
1956
  items: UsageCharge[];
2181
1957
  pagination: OffsetPagination;
2182
1958
  }
2183
- export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
2184
- export declare const SubscriptionChargeType: {
2185
- readonly postpaid: "postpaid";
2186
- readonly prepaid: "prepaid";
2187
- readonly one_time: "one_time";
2188
- };
2189
1959
  export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
2190
1960
  export declare const SubscriptionInterval: {
2191
1961
  readonly none: "none";
@@ -2194,7 +1964,7 @@ export declare const SubscriptionInterval: {
2194
1964
  readonly year: "year";
2195
1965
  };
2196
1966
  /**
2197
- * An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.
1967
+ * 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.
2198
1968
  */
2199
1969
  export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
2200
1970
  export declare const SubscriptionRestriction: {
@@ -2205,13 +1975,7 @@ export declare const SubscriptionRestriction: {
2205
1975
  readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
2206
1976
  };
2207
1977
  /**
2208
- * Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
2209
- * whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
2210
- * being set up. `completed` means every item was set up. `partially_completed` means some items were set up
2211
- * and the others failed or were canceled and were refunded to their original payment sources. `failed` means
2212
- * no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
2213
- * `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
2214
- * payment sources. No status establishes service delivery by itself.
1978
+ * 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.
2215
1979
  */
2216
1980
  export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
2217
1981
  export declare const OrderStatus: {
@@ -2229,7 +1993,7 @@ export declare const ScheduledChangeInterval: {
2229
1993
  readonly year: "year";
2230
1994
  };
2231
1995
  /**
2232
- * The next accepted period-end change for a subscription. It describes the target terms and does not change the current subscription until effective_at.
1996
+ * The next accepted period-end change of the subscription: the target terms, applied at effective_at.
2233
1997
  */
2234
1998
  export interface ScheduledChange {
2235
1999
  order_id: string;
@@ -2240,7 +2004,7 @@ export interface ScheduledChange {
2240
2004
  plan_name: string;
2241
2005
  price_id: string;
2242
2006
  quantity: string;
2243
- /** The target prepaid renewal amount before tax. */
2007
+ /** The target licensed renewal amount before tax. */
2244
2008
  recurring_amount: string;
2245
2009
  currency: string;
2246
2010
  interval: ScheduledChangeInterval;
@@ -2248,11 +2012,7 @@ export interface ScheduledChange {
2248
2012
  interval_count: number;
2249
2013
  }
2250
2014
  /**
2251
- * pending means the purchase relationship exists but its order has not been accepted.
2252
- * provisioning means the service accepted the order and is delivering. For a service-owned
2253
- * purchase, only confirmed delivery moves it to active; paying alone does not.
2254
- * canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
2255
- * terminated means an administrator or the owning service immediately ended the commercial relationship.
2015
+ * `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.
2256
2016
  */
2257
2017
  export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
2258
2018
  export declare const SubscriptionStatus: {
@@ -2264,42 +2024,37 @@ export declare const SubscriptionStatus: {
2264
2024
  readonly terminated: "terminated";
2265
2025
  };
2266
2026
  /**
2267
- * An independently billed purchase relationship, separate from the owning service's resource.
2268
- * Placing a new prepaid or postpaid service order creates a pending subscription for each line
2269
- * in the same purchase transaction. Its ID is returned on the order item and remains stable
2270
- * through checkout and delivery. One order may create several subscriptions, such as an instance,
2271
- * its system disk and its address; it has no single subscription ID.
2272
- *
2273
- * Pending and provisioning do not grant service or accrue usage. A service-owned subscription
2274
- * becomes provisioning when the owning service accepts the order, and active when the service
2275
- * confirms delivery, with started_at set to the confirmed effective time; payment changes neither. Prepaid service periods start
2276
- * then; postpaid usage starts only when the service reports actual delivery and metering.
2027
+ * The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none.
2028
+ */
2029
+ export type SubscriptionDimensions = {
2030
+ [key: string]: string;
2031
+ };
2032
+ /**
2033
+ * A purchase that is billed, renewed and changed on its own, separate from the owning service's resource. A new
2034
+ * recurring purchase creates a pending subscription for each order line; its ID is returned on the order item
2035
+ * and stays the same through checkout, delivery, renewals and changes. A one-time purchase may create none.
2277
2036
  *
2278
- * One-time delivery may omit a subscription. Renewals reference and extend existing subscriptions
2279
- * rather than creating another; a change keeps the subscription ID and switches its terms when it
2280
- * takes effect. Canceling or failing an unfulfilled purchase sets its pending or provisioning
2281
- * subscriptions to canceled without starting a service period.
2282
- * Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their
2283
- * original value. Technical state belongs to the owning service.
2037
+ * Pending and provisioning subscriptions grant no service. A subscription becomes provisioning when the owning
2038
+ * service accepts the order, and active when the service confirms delivery, which sets started_at; payment
2039
+ * changes neither. Licensed service periods start at delivery, and metered usage is charged as the service
2040
+ * reports it. Canceling or failing an undelivered purchase cancels its subscriptions without starting a period.
2041
+ * Renewals use recurring_amount and the agreed interval; paid periods keep their value.
2284
2042
  *
2285
- * A purchased shared capacity limit, such as a regional snapshot count quota, can have its own
2286
- * subscription. Activating that capacity confirms delivery of the quota, not individual snapshots.
2287
- * Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
2288
- * the owning service enforces current holdings against the purchased count.
2043
+ * A shared capacity limit, such as a regional snapshot quota, has one subscription for the purchased quantity
2044
+ * rather than one per item.
2289
2045
  */
2290
2046
  export interface Subscription {
2291
2047
  /** 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. */
2292
2048
  renewal_discounts_enabled?: boolean;
2293
2049
  currency: string;
2294
- charge_type: SubscriptionChargeType;
2050
+ type: PriceType;
2051
+ usage_type: UsageType;
2052
+ /** The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none. */
2053
+ dimensions: SubscriptionDimensions;
2295
2054
  interval: SubscriptionInterval;
2296
2055
  /** @minimum 1 */
2297
2056
  interval_count?: number;
2298
- /**
2299
- * Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
2300
- * Pending subscriptions show base terms until paying the order fixes any new continuing discount.
2301
- * Absent for other charge types.
2302
- */
2057
+ /** 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. */
2303
2058
  recurring_amount?: string;
2304
2059
  termination_policy?: TerminationPolicy;
2305
2060
  refund_policy?: RefundPolicy;
@@ -2308,17 +2063,14 @@ export interface Subscription {
2308
2063
  coupon?: ObjectIdentity;
2309
2064
  /** @minimum 0 */
2310
2065
  discounted_renewals_remaining?: number;
2311
- /** The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use. */
2066
+ /** The operations currently prevented on the subscription, sorted; it is suspended while this contains `billing.subscriptions.use`. */
2312
2067
  restrictions?: SubscriptionRestriction[];
2313
2068
  billing_cycle_anchor?: string;
2314
2069
  cancellation?: SubscriptionCancellation;
2315
- /** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
2070
+ /** The accepted period-end change scheduled for this subscription; null when there is none. */
2316
2071
  scheduled_change?: ScheduledChange | null;
2317
2072
  /**
2318
- * The saved payment method automatic renewal charges after the account's balance and credits,
2319
- * before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
2320
- * saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
2321
- * account that pays the renewal.
2073
+ * 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.
2322
2074
  * @nullable
2323
2075
  */
2324
2076
  default_payment_method_id?: string | null;
@@ -2329,16 +2081,11 @@ export interface Subscription {
2329
2081
  account: AccountIdentity;
2330
2082
  product_id: ProductID;
2331
2083
  /**
2332
- * Which project this is for. Absent when it was bought at account level, such as a
2333
- * membership, which belongs to no single project.
2084
+ * The project it is for. Absent for an account-level purchase, such as a membership.
2334
2085
  * @nullable
2335
2086
  */
2336
2087
  project_id?: string | null;
2337
- /**
2338
- * The project and its current name, for display. Absent for a purchase at account level,
2339
- * and when the project no longer exists or its details cannot be read at the moment;
2340
- * `project_id` still identifies it then.
2341
- */
2088
+ /** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
2342
2089
  project?: NamedIdentity | null;
2343
2090
  product: Product;
2344
2091
  plan_id: string;
@@ -2346,35 +2093,26 @@ export interface Subscription {
2346
2093
  price_id: string;
2347
2094
  quantity: string;
2348
2095
  /**
2349
- * When a prepaid subscription renews or expires, the end of the last service period bought.
2350
- * Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
2351
- * its purchase has been paid, and for postpaid subscriptions.
2096
+ * 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.
2352
2097
  * @nullable
2353
2098
  */
2354
2099
  current_term_end?: string | null;
2355
2100
  /**
2356
- * Start of the service period in effect now. Null when none is, including for postpaid subscriptions.
2101
+ * Start of the service period in effect now. Null when none is, including for metered subscriptions.
2357
2102
  * @nullable
2358
2103
  */
2359
2104
  current_period_start?: string | null;
2360
2105
  /**
2361
- * End of the service period in effect now. Renewing in advance moves `current_term_end`, not
2362
- * this. Null when no period is in effect, including for postpaid subscriptions.
2106
+ * 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.
2363
2107
  * @nullable
2364
2108
  */
2365
2109
  current_period_end?: string | null;
2366
- /** A prepaid subscription renews automatically while this is on. A postpaid subscription always continues until it is canceled; this is true until a cancellation is requested and cannot be set. */
2110
+ /** 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. */
2367
2111
  auto_renew: boolean;
2368
- /**
2369
- * pending means the purchase relationship exists but its order has not been accepted.
2370
- * provisioning means the service accepted the order and is delivering. For a service-owned
2371
- * purchase, only confirmed delivery moves it to active; paying alone does not.
2372
- * canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
2373
- * terminated means an administrator or the owning service immediately ended the commercial relationship.
2374
- */
2112
+ /** `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. */
2375
2113
  status: SubscriptionStatus;
2376
2114
  /**
2377
- * Confirmed start of service. Null until a new subscription becomes active, including after payment.
2115
+ * When service started. Null until a new subscription becomes active, also after payment.
2378
2116
  * @nullable
2379
2117
  */
2380
2118
  started_at?: string | null;
@@ -2401,10 +2139,7 @@ export interface RenewalPrice {
2401
2139
  /** What renewing for this term costs, for the quantity held. */
2402
2140
  amount?: Money;
2403
2141
  currency?: string;
2404
- /**
2405
- * The term this item already bills at. Renewing for it uses the price bought
2406
- * originally, so a later price change does not affect it.
2407
- */
2142
+ /** The term the subscription renews at now; renewing for it keeps the agreed price. */
2408
2143
  current: boolean;
2409
2144
  }
2410
2145
  export interface RenewalPriceList {
@@ -2421,14 +2156,10 @@ export declare const RenewRequestInterval: {
2421
2156
  readonly year: "year";
2422
2157
  };
2423
2158
  export interface RenewRequest {
2424
- /** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
2159
+ /** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
2425
2160
  order_id: string;
2426
2161
  /**
2427
- * How many further periods to buy, each at the price this item already bills at.
2428
- *
2429
- * Buying twelve monthly periods is not the same as buying one yearly term: a longer
2430
- * term is usually sold at a lower price, and that price is only reached by naming the
2431
- * interval. Use `interval_count` and `interval` for that.
2162
+ * 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.
2432
2163
  * @minimum 1
2433
2164
  */
2434
2165
  periods?: number;
@@ -2467,10 +2198,10 @@ export declare const RenewalOrderRequestInterval: {
2467
2198
  readonly year: "year";
2468
2199
  };
2469
2200
  /**
2470
- * The periods and price of the renewal, chosen as in renewing.
2201
+ * The renewal's periods and price, chosen as in renewing.
2471
2202
  */
2472
2203
  export interface RenewalOrderRequest {
2473
- /** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
2204
+ /** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
2474
2205
  order_id: string;
2475
2206
  /**
2476
2207
  * As in renewing.
@@ -2491,10 +2222,7 @@ export interface AutoRenewSet {
2491
2222
  auto_renew: boolean;
2492
2223
  }
2493
2224
  /**
2494
- * `pending` is waiting to be set up. `completed` was confirmed by the service.
2495
- * `failed` was not set up and its amount was refunded to the original payment sources.
2496
- * `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
2497
- * its subscription.
2225
+ * `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.
2498
2226
  */
2499
2227
  export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
2500
2228
  export declare const OrderItemStatus: {
@@ -2504,7 +2232,7 @@ export declare const OrderItemStatus: {
2504
2232
  readonly canceled: "canceled";
2505
2233
  };
2506
2234
  /**
2507
- * `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms.
2235
+ * `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms.
2508
2236
  */
2509
2237
  export type OrderType = (typeof OrderType)[keyof typeof OrderType];
2510
2238
  export declare const OrderType: {
@@ -2513,12 +2241,7 @@ export declare const OrderType: {
2513
2241
  readonly modify: "modify";
2514
2242
  };
2515
2243
  /**
2516
- * When a plan change takes effect. `none` on anything that is not a change.
2517
- *
2518
- * `period_end` orders stay pending until the first period at the new price is paid. That period
2519
- * is invoiced shortly before the current paid period ends and starts when it ends; if the
2520
- * invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
2521
- * usual. Renewing in the meantime moves all of this along with it.
2244
+ * 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.
2522
2245
  */
2523
2246
  export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
2524
2247
  export declare const OrderChangeEffective: {
@@ -2527,8 +2250,7 @@ export declare const OrderChangeEffective: {
2527
2250
  readonly period_end: "period_end";
2528
2251
  };
2529
2252
  /**
2530
- * How it was paid. Removing the payment method afterwards does not change it; `payment_method_id`
2531
- * then names a removed payment method.
2253
+ * How it was paid. `payment_method_id` still names the payment method after it is removed.
2532
2254
  */
2533
2255
  export interface PaidWith {
2534
2256
  /**
@@ -2550,22 +2272,17 @@ export declare const OrderItemInterval: {
2550
2272
  readonly month: "month";
2551
2273
  readonly year: "year";
2552
2274
  };
2553
- /**
2554
- * The payment timing of the selected price.
2555
- */
2556
- export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
2557
- export declare const OrderItemChargeType: {
2558
- readonly postpaid: "postpaid";
2559
- readonly prepaid: "prepaid";
2560
- readonly one_time: "one_time";
2561
- };
2562
2275
  export type OrderItemConfiguration = {
2563
2276
  [key: string]: unknown;
2564
2277
  };
2565
2278
  /**
2566
- * Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero
2567
- * for a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service
2568
- * purchase creates its pending subscription when this item is recorded, not when payment succeeds.
2279
+ * The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none.
2280
+ */
2281
+ export type OrderItemDimensions = {
2282
+ [key: string]: string;
2283
+ };
2284
+ /**
2285
+ * 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.
2569
2286
  */
2570
2287
  export interface OrderItem {
2571
2288
  /** 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. */
@@ -2575,11 +2292,7 @@ export interface OrderItem {
2575
2292
  /** @minimum 0 */
2576
2293
  position?: number;
2577
2294
  configuration?: OrderItemConfiguration;
2578
- /**
2579
- * Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
2580
- * pending subscription here; renewals and changes reference the existing subscription, which
2581
- * keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
2582
- */
2295
+ /** 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. */
2583
2296
  subscription_id?: string;
2584
2297
  interval: OrderItemInterval;
2585
2298
  /** @minimum 1 */
@@ -2587,22 +2300,21 @@ export interface OrderItem {
2587
2300
  termination_policy?: TerminationPolicy;
2588
2301
  refund_policy?: RefundPolicy;
2589
2302
  /**
2590
- * Prepaid items only: the plan's one-month prepaid price for this item's quantity before tax, frozen
2591
- * at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
2592
- * no prepaid period shorter than the one bought.
2303
+ * 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.
2593
2304
  * @nullable
2594
2305
  */
2595
2306
  refund_monthly_amount?: string | null;
2596
2307
  /**
2597
- * Prepaid items only: the plan's postpaid hourly price for this item's quantity before tax, frozen at
2598
- * purchase, used for time used short of a full month. Null when the plan has no postpaid price.
2308
+ * 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.
2599
2309
  * @nullable
2600
2310
  */
2601
2311
  refund_hourly_amount?: string | null;
2602
2312
  recurring_amount?: string;
2603
2313
  setup_amount?: string;
2604
- /** The payment timing of the selected price. */
2605
- charge_type: OrderItemChargeType;
2314
+ type: PriceType;
2315
+ usage_type: UsageType;
2316
+ /** The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none. */
2317
+ dimensions: OrderItemDimensions;
2606
2318
  /** Total tax after discounts, including any tax already included in the price. */
2607
2319
  tax_amount?: string;
2608
2320
  /** The part of tax_amount already included in gross_amount; it is not charged again. */
@@ -2614,45 +2326,28 @@ export interface OrderItem {
2614
2326
  product?: Product;
2615
2327
  /** Which plan was bought. */
2616
2328
  plan_id: string;
2617
- /**
2618
- * What it was called when bought. It does not follow later catalogue renames and is
2619
- * not translated.
2620
- */
2329
+ /** The name when bought. */
2621
2330
  plan_name: string;
2622
2331
  quantity: string;
2623
- /**
2624
- * The unit amount of the price this line is charged under. Absent for a tiered price, which has no
2625
- * single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
2626
- * describes.
2627
- */
2332
+ /** 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. */
2628
2333
  unit_amount?: Money;
2629
2334
  /**
2630
- * Before discounts: the price applied to the quantity, which for a per-unit price is `unit_amount`
2631
- * times `quantity`; a minimum charge can make it higher. For an upgrade that takes effect at once it is
2632
- * the new price for the time left in the paid period, at the subscription's own period price, minus
2633
- * the amount paid for that time, and the period end does not move; a downgrade charges nothing and may refund the
2634
- * difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
2335
+ * Before discounts and setup fees: the price applied to the quantity, `unit_amount` times `quantity` for a per-
2336
+ * unit price, raised by any minimum charge. For an immediate upgrade it is the new price for the rest of the
2337
+ * paid period minus the amount paid for that time; a downgrade, or a change between equal period prices, charges
2338
+ * nothing.
2635
2339
  *
2636
- * Under an inclusive tax rate it includes tax, as the price does, and the included part is
2637
- * `tax_included_amount`. A renewal at the agreed terms is the exception: the agreed amount excludes
2638
- * tax, and tax is added to it.
2340
+ * Under an inclusive tax rate it includes tax, shown in `tax_included_amount`, except for a renewal at agreed
2341
+ * terms, whose amount excludes tax.
2639
2342
  */
2640
2343
  gross_amount?: Money;
2641
- /**
2642
- * The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
2643
- * from the discount the subscription carries.
2644
- *
2645
- * A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
2646
- * `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
2647
- * the carried discount is already reflected in it: the renewal order also uses a coupon the account
2648
- * holds, or the account's tax rate is inclusive.
2649
- */
2344
+ /** 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. */
2650
2345
  discount_amount?: Money;
2651
2346
  /** `gross_amount` less `discount_amount`. */
2652
2347
  amount?: Money;
2653
2348
  currency: string;
2654
2349
  /**
2655
- * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
2350
+ * 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.
2656
2351
  * @nullable
2657
2352
  */
2658
2353
  period_start?: string | null;
@@ -2664,17 +2359,13 @@ export interface OrderItem {
2664
2359
  status: OrderItemStatus;
2665
2360
  }
2666
2361
  /**
2667
- * A recorded purchase with its invoice from placement; a zero-total invoice, such as for postpaid
2668
- * admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
2669
- * invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
2670
- * order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
2671
- * before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
2362
+ * 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.
2672
2363
  */
2673
2364
  export interface Order {
2674
2365
  coupon_id?: string;
2675
2366
  coupon?: ObjectIdentity;
2676
2367
  promotion_code_id?: string;
2677
- /** Code text frozen when the coupon was applied. Absent for an account discount. */
2368
+ /** The promotion code applied. Absent for an account discount. */
2678
2369
  promotion_code?: string;
2679
2370
  /** The order's invoice, the same as invoice.id. */
2680
2371
  invoice_id: string;
@@ -2685,53 +2376,32 @@ export interface Order {
2685
2376
  change_effective_at?: string;
2686
2377
  id: string;
2687
2378
  /**
2688
- * Which project it was bought for. Absent for a purchase made at account level, such
2689
- * as a membership.
2379
+ * The project it was bought for. Absent for an account-level purchase, such as a membership.
2690
2380
  * @nullable
2691
2381
  */
2692
2382
  project_id?: string | null;
2693
- /**
2694
- * The project and its current name, for display. Absent for a purchase at account level,
2695
- * and when the project no longer exists or its details cannot be read at the moment;
2696
- * `project_id` still identifies it then.
2697
- */
2383
+ /** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
2698
2384
  project?: NamedIdentity | null;
2699
- /**
2700
- * The billing account the order was placed with. It does not change when the project is later
2701
- * linked to another billing account. While this account is suspended or closed the order cannot
2702
- * be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
2703
- * when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
2704
- */
2385
+ /** 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`. */
2705
2386
  billing_account_id?: number;
2706
2387
  currency: string;
2707
- /** `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms. */
2388
+ /** `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms. */
2708
2389
  type: OrderType;
2709
2390
  status: OrderStatus;
2710
- /**
2711
- * When a plan change takes effect. `none` on anything that is not a change.
2712
- *
2713
- * `period_end` orders stay pending until the first period at the new price is paid. That period
2714
- * is invoiced shortly before the current paid period ends and starts when it ends; if the
2715
- * invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
2716
- * usual. Renewing in the meantime moves all of this along with it.
2717
- */
2391
+ /** 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. */
2718
2392
  change_effective?: OrderChangeEffective;
2719
2393
  /**
2720
- * Acceptance deadline. Pending orders can expire automatically.
2394
+ * Acceptance deadline; a pending order expires after it.
2721
2395
  * @nullable
2722
2396
  */
2723
2397
  expires_at?: string | null;
2724
2398
  /**
2725
- * When the discount and amount were fixed: at placement for automatic checkout and for a
2726
- * zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
2399
+ * 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.
2727
2400
  * @nullable
2728
2401
  */
2729
2402
  checkout_confirmed_at?: string | null;
2730
2403
  created_at: string;
2731
- /**
2732
- * What was bought. Present on a single order and on every order in a list, so a list
2733
- * can be rendered without a further request per row.
2734
- */
2404
+ /** What was bought. */
2735
2405
  items: OrderItem[];
2736
2406
  }
2737
2407
  export interface OrderList {
@@ -2739,8 +2409,7 @@ export interface OrderList {
2739
2409
  pagination: OffsetPagination;
2740
2410
  }
2741
2411
  /**
2742
- * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
2743
- * `voided` once Leaflow withdrew it.
2412
+ * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn.
2744
2413
  */
2745
2414
  export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
2746
2415
  export declare const DiscountStatus: {
@@ -2757,9 +2426,7 @@ export declare const DiscountType: {
2757
2426
  readonly free_setup: "free_setup";
2758
2427
  };
2759
2428
  /**
2760
- * Whether the discount continues on renewals of the purchased item. `once` applies only to the
2761
- * purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
2762
- * periods including the first, and `forever` continues on every renewal.
2429
+ * 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.
2763
2430
  */
2764
2431
  export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
2765
2432
  export declare const DiscountFrequency: {
@@ -2768,26 +2435,18 @@ export declare const DiscountFrequency: {
2768
2435
  readonly forever: "forever";
2769
2436
  };
2770
2437
  /**
2771
- * A coupon held on this account for a period. Within the period it applies without a code to purchases and
2772
- * to metered usage that the coupon covers.
2438
+ * A coupon held by the account for a period, applying without a code to the purchases and metered usage it covers.
2773
2439
  */
2774
2440
  export interface Discount {
2775
2441
  min_amount?: string;
2776
2442
  billing_account_id?: number;
2777
2443
  coupon_id: string;
2778
2444
  promotion_code_id?: string;
2779
- /**
2780
- * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
2781
- * `voided` once Leaflow withdrew it.
2782
- */
2445
+ /** `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn. */
2783
2446
  status: DiscountStatus;
2784
2447
  voided_at?: string;
2785
2448
  type: DiscountType;
2786
- /**
2787
- * Whether the discount continues on renewals of the purchased item. `once` applies only to the
2788
- * purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
2789
- * periods including the first, and `forever` continues on every renewal.
2790
- */
2449
+ /** 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. */
2791
2450
  frequency?: DiscountFrequency;
2792
2451
  /** @minimum 1 */
2793
2452
  frequency_duration?: number;
@@ -2799,10 +2458,7 @@ export interface Discount {
2799
2458
  /** Caps a percentage discount. */
2800
2459
  max_discount?: Money;
2801
2460
  currency?: string;
2802
- /**
2803
- * What it may be used for. Absent means it applies to anything on the account,
2804
- * including setup fees and traffic.
2805
- */
2461
+ /** What it may pay for. Absent means anything on the account, including setup fees and usage. */
2806
2462
  applies_to: Applicability;
2807
2463
  /** Restricted to your first purchase of anything it applies to. */
2808
2464
  first_purchase_only?: boolean;
@@ -2822,7 +2478,7 @@ export interface OrderItemList {
2822
2478
  pagination: OffsetPagination;
2823
2479
  }
2824
2480
  /**
2825
- * Whether the quantity was paid for or granted free of charge. Both are consumed the same way.
2481
+ * Whether the quantity was paid for or granted free; both are consumed the same way.
2826
2482
  */
2827
2483
  export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
2828
2484
  export declare const AllowanceCategory: {
@@ -2853,7 +2509,7 @@ export interface Allowance {
2853
2509
  meter: ObjectIdentity;
2854
2510
  /** The unit it is counted in, such as `MiB`. */
2855
2511
  unit?: string;
2856
- /** Whether the quantity was paid for or granted free of charge. Both are consumed the same way. */
2512
+ /** Whether the quantity was paid for or granted free; both are consumed the same way. */
2857
2513
  category: AllowanceCategory;
2858
2514
  /**
2859
2515
  * Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
@@ -2865,16 +2521,12 @@ export interface Allowance {
2865
2521
  quantity: string;
2866
2522
  /** How much is left. */
2867
2523
  remaining_quantity: string;
2868
- /**
2869
- * Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
2870
- * precedence.
2871
- */
2524
+ /** Lower values are consumed first; at equal priority, earlier expiry and then earlier issuance. */
2872
2525
  priority?: number;
2873
2526
  status: AllowanceStatus;
2874
2527
  valid_from: string;
2875
2528
  /**
2876
- * When it lapses. Anything unused at that point is lost; it is not refunded and does
2877
- * not carry over. Absent when it does not expire on its own.
2529
+ * When the allowance lapses; unused quantity is lost. Absent when it does not expire.
2878
2530
  * @nullable
2879
2531
  */
2880
2532
  valid_until?: string | null;
@@ -2917,8 +2569,7 @@ export interface Entitlement {
2917
2569
  name?: string;
2918
2570
  enabled: boolean;
2919
2571
  /**
2920
- * When the subscription providing it ends. Absent for a metered subscription, which
2921
- * has no end date.
2572
+ * When the providing subscription ends. Absent for a metered subscription.
2922
2573
  * @nullable
2923
2574
  */
2924
2575
  expires_at?: string | null;
@@ -2953,30 +2604,7 @@ export interface PlanListC836db9 {
2953
2604
  }
2954
2605
  export type PlanListA200529 = PlanListC836db9;
2955
2606
  /**
2956
- * `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
2957
- * charges once.
2958
- */
2959
- export type PriceType = (typeof PriceType)[keyof typeof PriceType];
2960
- export declare const PriceType: {
2961
- readonly postpaid: "postpaid";
2962
- readonly prepaid: "prepaid";
2963
- readonly one_time: "one_time";
2964
- };
2965
- /**
2966
- * How the amount is arrived at. `rated` means the rate depends on attributes such as
2967
- * region or machine type, and is looked up on a price list.
2968
- */
2969
- export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
2970
- export declare const PriceBillingScheme: {
2971
- readonly per_unit: "per_unit";
2972
- readonly tiered: "tiered";
2973
- readonly rated: "rated";
2974
- };
2975
- /**
2976
- * `none` for a price that is not tiered, which is most of them.
2977
- *
2978
- * Otherwise `graduated` charges each band at its own rate, and `volume` charges
2979
- * everything at the rate of the band the total falls in.
2607
+ * 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.
2980
2608
  */
2981
2609
  export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
2982
2610
  export declare const PriceTiersMode: {
@@ -2993,7 +2621,7 @@ export declare const PriceInterval: {
2993
2621
  };
2994
2622
  export interface Tier {
2995
2623
  /**
2996
- * The upper bound of this band. Null on the last band, which has no bound.
2624
+ * The band's inclusive upper bound; null for the last band.
2997
2625
  * @nullable
2998
2626
  */
2999
2627
  up_to?: string | null;
@@ -3006,6 +2634,7 @@ export interface Price {
3006
2634
  lookup_key?: string;
3007
2635
  product: Product;
3008
2636
  plan: ObjectIdentity;
2637
+ /** 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. */
3009
2638
  meter_id?: string;
3010
2639
  meter?: ObjectIdentity;
3011
2640
  unit_quantity: string;
@@ -3017,39 +2646,25 @@ export interface Price {
3017
2646
  id: string;
3018
2647
  plan_id: string;
3019
2648
  currency: string;
3020
- /**
3021
- * `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
3022
- * charges once.
3023
- */
3024
2649
  type: PriceType;
3025
- /**
3026
- * How the amount is arrived at. `rated` means the rate depends on attributes such as
3027
- * region or machine type, and is looked up on a price list.
3028
- */
3029
- billing_scheme: PriceBillingScheme;
2650
+ usage_type: UsageType;
2651
+ /** Absent when the price delegates to a rate card, where the rate depends on attributes such as region or machine type. */
2652
+ billing_scheme?: BillingScheme;
3030
2653
  /** Present for `per_unit`. */
3031
2654
  unit_amount?: Money;
3032
- /**
3033
- * `none` for a price that is not tiered, which is most of them.
3034
- *
3035
- * Otherwise `graduated` charges each band at its own rate, and `volume` charges
3036
- * everything at the rate of the band the total falls in.
3037
- */
2655
+ /** 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. */
3038
2656
  tiers_mode?: PriceTiersMode;
3039
2657
  /** Present for `tiered`, in ascending order. */
3040
2658
  tiers?: Tier[];
3041
- /** For `rated` prices, the price list the rates are read from. */
2659
+ /** Present when the price delegates to a rate card, the price list its rates are read from. */
3042
2660
  rate_card_id?: string;
3043
2661
  /** The smallest quantity that can be bought. Absent means no lower bound. */
3044
2662
  min_quantity?: string;
3045
- /**
3046
- * The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
3047
- * rejected with BILLING_PRICE_INVALID and field=max_quantity.
3048
- */
2663
+ /** 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`. */
3049
2664
  max_quantity?: string;
3050
2665
  /** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
3051
2666
  quantity_step?: string;
3052
- /** For prepaid prices, how many periods one purchase covers. */
2667
+ /** For recurring licensed prices, how many interval units one period covers. */
3053
2668
  interval_count?: number;
3054
2669
  interval: PriceInterval;
3055
2670
  setup_fee?: Money;
@@ -3059,18 +2674,20 @@ export interface PriceList {
3059
2674
  pagination: OffsetPagination;
3060
2675
  }
3061
2676
  /**
3062
- * The attributes this rate applies to, such as region and machine type.
2677
+ * The dimension values this rate applies to, such as region and machine type.
3063
2678
  */
3064
2679
  export type RateDimensions = {
3065
2680
  [key: string]: string;
3066
2681
  };
3067
2682
  /**
3068
- * `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says.
2683
+ * Licensed rates only, the period the amount buys; `none` for metered rates.
3069
2684
  */
3070
- export type RateBillingScheme = (typeof RateBillingScheme)[keyof typeof RateBillingScheme];
3071
- export declare const RateBillingScheme: {
3072
- readonly per_unit: "per_unit";
3073
- readonly tiered: "tiered";
2685
+ export type RateInterval = (typeof RateInterval)[keyof typeof RateInterval];
2686
+ export declare const RateInterval: {
2687
+ readonly none: "none";
2688
+ readonly day: "day";
2689
+ readonly month: "month";
2690
+ readonly year: "year";
3074
2691
  };
3075
2692
  /**
3076
2693
  * `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.
@@ -3083,22 +2700,24 @@ export declare const RateTiersMode: {
3083
2700
  };
3084
2701
  export interface Rate {
3085
2702
  meter: ObjectIdentity;
3086
- /** The unit readings arrive in, such as `core-second`. */
2703
+ /** The unit readings are reported in, such as `core-second`. */
3087
2704
  unit?: string;
3088
- /** The attributes this rate applies to, such as region and machine type. */
2705
+ /** The dimension values this rate applies to, such as region and machine type. */
3089
2706
  dimensions: RateDimensions;
3090
- /** `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says. */
3091
- billing_scheme: RateBillingScheme;
2707
+ billing_scheme: BillingScheme;
2708
+ /** `metered` prices usage; `licensed` prices holding a quantity for one period. */
2709
+ usage_type: UsageType;
2710
+ /** Licensed rates only, the period the amount buys; `none` for metered rates. */
2711
+ interval: RateInterval;
2712
+ /** @nullable */
2713
+ interval_count?: number | null;
3092
2714
  /** `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. */
3093
2715
  tiers_mode: RateTiersMode;
3094
2716
  /** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
3095
2717
  unit_amount?: Money;
3096
2718
  /** Present for a tiered rate, in ascending order. */
3097
2719
  tiers?: Tier[];
3098
- /**
3099
- * How many measured units one amount covers. An hourly rate on a per-second meter is
3100
- * `"3600"`.
3101
- */
2720
+ /** How many measured units one amount covers; an hourly rate on a per-second meter is `"3600"`. */
3102
2721
  unit_quantity?: string;
3103
2722
  currency: string;
3104
2723
  effective_from: string;
@@ -3109,15 +2728,6 @@ export interface RateList {
3109
2728
  items: Rate[];
3110
2729
  pagination: OffsetPagination;
3111
2730
  }
3112
- /**
3113
- * Narrows the selection when a plan offers more than one charge type.
3114
- */
3115
- export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
3116
- export declare const QuoteItemInputPriceType: {
3117
- readonly postpaid: "postpaid";
3118
- readonly prepaid: "prepaid";
3119
- readonly one_time: "one_time";
3120
- };
3121
2731
  export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
3122
2732
  export declare const QuoteItemInputInterval: {
3123
2733
  readonly none: "none";
@@ -3126,23 +2736,13 @@ export declare const QuoteItemInputInterval: {
3126
2736
  readonly year: "year";
3127
2737
  };
3128
2738
  /**
3129
- * The attributes the price depends on — region, instance type, token class.
3130
- *
3131
- * Required when the price draws its rates from a price list, which is how anything
3132
- * sold by region or by machine type is priced. A price that carries a single unit
3133
- * amount, or a ladder, has no attributes to give and takes none.
3134
- *
3135
- * Every attribute the meter declares must be present. A combination with no rate
3136
- * covering it is refused rather than priced at zero.
2739
+ * 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.
3137
2740
  */
3138
2741
  export type QuoteItemInputDimensions = {
3139
2742
  [key: string]: string;
3140
2743
  };
3141
2744
  /**
3142
- * Identify a price directly, or select a price for a plan. For each resource give its ID or lookup
3143
- * key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
3144
- * postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
3145
- * checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
2745
+ * 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.
3146
2746
  */
3147
2747
  export interface QuoteItemInput {
3148
2748
  /**
@@ -3158,12 +2758,14 @@ export interface QuoteItemInput {
3158
2758
  price_id?: string;
3159
2759
  product_id?: ProductID;
3160
2760
  plan_id?: string;
3161
- /** Narrows the selection when a plan offers more than one charge type. */
3162
- price_type?: QuoteItemInputPriceType;
2761
+ /** Narrows the selection when a plan offers more than one price type. */
2762
+ price_type?: PriceType;
2763
+ /** Narrows the selection when a plan offers more than one usage type. */
2764
+ usage_type?: UsageType;
3163
2765
  interval?: QuoteItemInputInterval;
3164
2766
  /** @minimum 1 */
3165
2767
  interval_count?: number;
3166
- /** Selects among prepaid prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
2768
+ /** Selects among licensed prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
3167
2769
  termination_policy?: TerminationPolicy;
3168
2770
  /** @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]))))))))))$ */
3169
2771
  quantity: string;
@@ -3173,36 +2775,37 @@ export interface QuoteItemInput {
3173
2775
  * @maxLength 128
3174
2776
  */
3175
2777
  meter_lookup_key?: string;
3176
- /**
3177
- * The attributes the price depends on — region, instance type, token class.
3178
- *
3179
- * Required when the price draws its rates from a price list, which is how anything
3180
- * sold by region or by machine type is priced. A price that carries a single unit
3181
- * amount, or a ladder, has no attributes to give and takes none.
3182
- *
3183
- * Every attribute the meter declares must be present. A combination with no rate
3184
- * covering it is refused rather than priced at zero.
3185
- */
2778
+ /** 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. */
3186
2779
  dimensions?: QuoteItemInputDimensions;
3187
- /**
3188
- * For metered items, how long to price for. This allows an estimate such as "about
3189
- * this much per month" to be shown before anything exists. The priced quantity is
3190
- * `quantity` multiplied by this duration.
3191
- */
2780
+ /** For a metered estimate, how long to price for, in seconds; the priced quantity is `quantity` times this duration. */
3192
2781
  duration_seconds?: number;
3193
2782
  }
2783
+ /**
2784
+ * The values of the meter's presentation dimensions, present only when grouped by meter.
2785
+ */
2786
+ export type SpendRowDimensions = {
2787
+ [key: string]: string;
2788
+ };
3194
2789
  export interface SpendRow {
3195
2790
  product?: Product;
3196
2791
  plan_id?: string;
3197
2792
  plan_name?: string;
3198
2793
  /** Present only when grouped by resource. */
3199
2794
  resource_id?: string;
2795
+ /** Present only when grouped by meter. */
2796
+ meter?: ObjectIdentity;
2797
+ /** Present only when grouped by meter. */
2798
+ unit?: string;
2799
+ /** Net usage quantity, present only when grouped by meter. */
2800
+ quantity?: string;
2801
+ /** The values of the meter's presentation dimensions, present only when grouped by meter. */
2802
+ dimensions?: SpendRowDimensions;
3200
2803
  amount: Money;
3201
2804
  currency: string;
3202
2805
  }
3203
2806
  export interface SpendRowList {
3204
2807
  items: SpendRow[];
3205
- /** The sum over the whole period, not only the page returned. */
2808
+ /** The total over all matching groups, not only the page returned. */
3206
2809
  total: Money;
3207
2810
  currency: string;
3208
2811
  pagination: OffsetPagination;
@@ -3218,28 +2821,28 @@ export declare const ActiveResourceStatus: {
3218
2821
  readonly closed: "closed";
3219
2822
  };
3220
2823
  /**
3221
- * A resource currently accruing charges by the second.
2824
+ * A resource charged continuously by the second.
3222
2825
  */
3223
2826
  export interface ActiveResource {
3224
2827
  id: string;
3225
2828
  ended_at?: string;
3226
2829
  suspended_at?: string;
3227
2830
  state_changed_at?: string;
3228
- /** The postpaid subscription charged for this metering record, including shared services. */
2831
+ /** The metered subscription charged for this metering record. */
3229
2832
  subscription_id: string;
3230
2833
  resource_id: string;
3231
2834
  product: Product;
3232
- /** What it is, as its own service names it. */
2835
+ /** The resource type, as the owning service names it. */
3233
2836
  resource_type?: string;
3234
2837
  meter: ObjectIdentity;
3235
2838
  unit?: string;
3236
- /** How much is held — cores, MiB, cards. Not how much has been used. */
2839
+ /** How much is held, such as cores, MiB or cards; not how much was used. */
3237
2840
  quantity: string;
3238
2841
  dimensions?: ActiveResourceDimensions;
3239
2842
  status: ActiveResourceStatus;
3240
2843
  started_at: string;
3241
2844
  project_id?: string;
3242
- /** Usage has been generated up to this boundary; it does not imply invoicing or payment. */
2845
+ /** Usage has been generated up to this boundary; it says nothing about invoicing or payment. */
3243
2846
  usage_generated_until: string;
3244
2847
  }
3245
2848
  export interface ActiveResourceList {
@@ -3247,7 +2850,7 @@ export interface ActiveResourceList {
3247
2850
  pagination: OffsetPagination;
3248
2851
  }
3249
2852
  /**
3250
- * An estimate of the refundable value of one order or selected items. This does not cancel the order, stop service or create a refund.
2853
+ * An estimate of the refundable value of an order or selected items; nothing is canceled or refunded.
3251
2854
  */
3252
2855
  export interface OrderRefundQuoteInput {
3253
2856
  order_id: string;
@@ -3259,33 +2862,24 @@ export interface OrderRefundQuoteInput {
3259
2862
  order_item_ids?: string[];
3260
2863
  }
3261
2864
  /**
3262
- * "Quote exactly one target: proposed items, an existing order, renewals, a cancellation or an order
3263
- * refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
3264
- * canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
3265
- * combination returns BILLING_PURCHASE_INVALID with the offending field."
2865
+ * 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.
3266
2866
  */
3267
2867
  export interface QuoteRequest {
3268
2868
  /**
3269
- * The billing account to price for. It must belong to you. Existing orders must have been purchased
3270
- * with this account; renewals and cancellations must currently be paid for by it.
2869
+ * 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.
3271
2870
  * @minimum 1
3272
2871
  */
3273
2872
  billing_account_id: number;
3274
2873
  /**
3275
- * A proposed purchase priced in the account currency. Metered items may estimate specified usage
3276
- * quantities; those estimates are not amounts collectible at checkout.
2874
+ * A proposed purchase priced in the account's currency. Metered items may include usage estimates, which are not checkout amounts.
3277
2875
  * @minItems 1
3278
2876
  * @maxItems 100
3279
2877
  */
3280
2878
  items?: QuoteItemInput[];
3281
- /**
3282
- * Preview paying this existing order. Its recorded purchase terms supply every line, and an order
3283
- * whose terms are fixed returns its recorded amounts. A preview does not change the order.
3284
- */
2879
+ /** 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. */
3285
2880
  order_id?: string;
3286
2881
  /**
3287
- * Preview renewing these subscriptions, each at most once. Each entry represents a separate
3288
- * renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
2882
+ * 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.
3289
2883
  * @minItems 1
3290
2884
  * @maxItems 100
3291
2885
  */
@@ -3299,9 +2893,7 @@ export interface QuoteRequest {
3299
2893
  refund?: OrderRefundQuoteInput;
3300
2894
  }
3301
2895
  /**
3302
- * How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
3303
- * `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
3304
- * invoices state this. Only operators change it.
2896
+ * 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.
3305
2897
  */
3306
2898
  export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
3307
2899
  export declare const ContactTaxExempt: {
@@ -3310,7 +2902,7 @@ export declare const ContactTaxExempt: {
3310
2902
  readonly reverse: "reverse";
3311
2903
  };
3312
2904
  /**
3313
- * A billing-account contact profile with one address. An account can hold multiple contacts; this is not a login identity.
2905
+ * A contact of a billing account with one address. An account can hold several; a contact is not a login.
3314
2906
  */
3315
2907
  export interface Contact {
3316
2908
  id: string;
@@ -3338,11 +2930,7 @@ export interface Contact {
3338
2930
  address_postal_code?: string;
3339
2931
  /** @pattern ^([A-Z]{2})?$ */
3340
2932
  address_country?: string;
3341
- /**
3342
- * How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
3343
- * `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
3344
- * invoices state this. Only operators change it.
3345
- */
2933
+ /** 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. */
3346
2934
  tax_exempt: ContactTaxExempt;
3347
2935
  active: boolean;
3348
2936
  created_at: string;
@@ -3418,14 +3006,14 @@ export interface StatementAmounts {
3418
3006
  total: Money;
3419
3007
  }
3420
3008
  /**
3421
- * One billing account's usage billing for one UTC calendar month, summed over the month's statements. It is a summary, not something to pay; each closing's invoice is collected on its own.
3009
+ * 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.
3422
3010
  */
3423
3011
  export interface MonthlyStatement {
3424
3012
  billing_account_id: number;
3425
3013
  currency: string;
3426
3014
  period_start: string;
3427
3015
  period_end: string;
3428
- /** True after the period's final closing, which applies minimum charges for the whole month. Usage priced later is still billed in supplement statements and added here. */
3016
+ /** 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. */
3429
3017
  finalized: boolean;
3430
3018
  finalized_at?: string;
3431
3019
  /** Statements of the period, including the open one. */
@@ -3448,7 +3036,7 @@ export declare const StatementStatus: {
3448
3036
  readonly closed: "closed";
3449
3037
  };
3450
3038
  /**
3451
- * interim: a closing before the period's usage is final; minimum charges are not applied. final: the first closing after the period ended and its late usage was settled; minimum charges for the whole period are applied. supplement: a closing after the final one, for usage priced late. An open statement is interim.
3039
+ * `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.
3452
3040
  */
3453
3041
  export type StatementType = (typeof StatementType)[keyof typeof StatementType];
3454
3042
  export declare const StatementType: {
@@ -3457,7 +3045,7 @@ export declare const StatementType: {
3457
3045
  readonly supplement: "supplement";
3458
3046
  };
3459
3047
  /**
3460
- * An account's consumption for one billing period, collected at one closing. Usage is billed after every settlement run, about hourly; each closing issues an invoice for the usage priced since the previous closing and collects it from credits and balance at once, and later usage is collected in the next statement of the same period. A closed statement is never rewritten. The period's consumption is the sum of its statements.
3048
+ * 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.
3461
3049
  */
3462
3050
  export interface Statement {
3463
3051
  id: string;
@@ -3469,7 +3057,7 @@ export interface Statement {
3469
3057
  sequence: number;
3470
3058
  status: StatementStatus;
3471
3059
  type: StatementType;
3472
- /** True while the statement is open. The estimate applies tier pricing to the period's usage so far and adds tax for the current invoice contact. Minimum charges are added at the period's final closing, and a tier reduction larger than this statement's own charges is credited to earlier invoices of the period at closing. */
3060
+ /** 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. */
3473
3061
  estimated: boolean;
3474
3062
  amounts: StatementAmounts;
3475
3063
  closed_at?: string;
@@ -3483,11 +3071,19 @@ export interface StatementList {
3483
3071
  items: Statement[];
3484
3072
  pagination: OffsetPagination;
3485
3073
  }
3074
+ /**
3075
+ * 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.
3076
+ */
3077
+ export type StatementItemDimensions = {
3078
+ [key: string]: string;
3079
+ };
3486
3080
  export interface StatementItem {
3487
3081
  project_id?: string;
3488
3082
  product_id?: string;
3489
3083
  meter_id?: string;
3490
3084
  unit?: string;
3085
+ /** 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. */
3086
+ dimensions?: StatementItemDimensions;
3491
3087
  /** Net usage quantity. Included only when grouping by meter. */
3492
3088
  quantity?: string;
3493
3089
  deducted_quantity?: string;