@leaflow/sdk 0.131.0 → 0.133.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (699) hide show
  1. package/dist/canopy/inference/v1/generated/functions.d.ts +100 -0
  2. package/dist/canopy/inference/v1/generated/functions.js +96 -0
  3. package/dist/canopy/inference/v1/generated/models.d.ts +74 -0
  4. package/dist/canopy/inference/v1/generated/models.js +4 -0
  5. package/dist/canopy/inference/v1/generated/schemas.zod.d.ts +40 -0
  6. package/dist/canopy/inference/v1/generated/schemas.zod.js +26 -0
  7. package/dist/canopy/inference/v1/generated/validators/chatCompletion.zod.d.ts +11 -0
  8. package/dist/canopy/inference/v1/generated/validators/chatCompletion.zod.js +9 -0
  9. package/dist/canopy/inference/v1/generated/validators/chatCompletionRequest.zod.d.ts +18 -0
  10. package/dist/canopy/inference/v1/generated/validators/chatCompletionRequest.zod.js +16 -0
  11. package/dist/canopy/inference/v1/generated/validators/embeddingRequest.zod.d.ts +20 -0
  12. package/dist/canopy/inference/v1/generated/validators/embeddingRequest.zod.js +17 -0
  13. package/dist/canopy/inference/v1/generated/validators/embeddingResponse.zod.d.ts +11 -0
  14. package/dist/canopy/inference/v1/generated/validators/embeddingResponse.zod.js +9 -0
  15. package/dist/canopy/inference/v1/generated/validators/error.zod.d.ts +18 -0
  16. package/dist/canopy/inference/v1/generated/validators/error.zod.js +16 -0
  17. package/dist/canopy/inference/v1/generated/validators/model.zod.d.ts +23 -0
  18. package/dist/canopy/inference/v1/generated/validators/model.zod.js +21 -0
  19. package/dist/canopy/inference/v1/generated/validators/modelList.zod.d.ts +26 -0
  20. package/dist/canopy/inference/v1/generated/validators/modelList.zod.js +13 -0
  21. package/dist/canopy/inference/v1/index.d.ts +3 -0
  22. package/dist/canopy/inference/v1/index.js +3 -0
  23. package/dist/canopy/v1/generated/functions.d.ts +1 -1
  24. package/dist/canopy/v1/generated/models.d.ts +1 -1
  25. package/dist/canopy/v1/generated/schemas.zod.d.ts +1 -1
  26. package/dist/canopy/v1/generated/schemas.zod.js +1 -1
  27. package/dist/canopy/v1/generated/validators/aPIKeyResource.zod.d.ts +1 -1
  28. package/dist/canopy/v1/generated/validators/aPIKeyResource.zod.js +1 -1
  29. package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.d.ts +1 -1
  30. package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.js +1 -1
  31. package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.d.ts +1 -1
  32. package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.js +1 -1
  33. package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +1 -1
  34. package/dist/canopy/v1/generated/validators/accountBalance.zod.js +1 -1
  35. package/dist/canopy/v1/generated/validators/accountIdentity.zod.d.ts +1 -1
  36. package/dist/canopy/v1/generated/validators/accountIdentity.zod.js +1 -1
  37. package/dist/canopy/v1/generated/validators/activeResource.zod.d.ts +1 -1
  38. package/dist/canopy/v1/generated/validators/activeResource.zod.js +1 -1
  39. package/dist/canopy/v1/generated/validators/activeResourceList.zod.d.ts +1 -1
  40. package/dist/canopy/v1/generated/validators/activeResourceList.zod.js +1 -1
  41. package/dist/canopy/v1/generated/validators/allowance.zod.d.ts +1 -1
  42. package/dist/canopy/v1/generated/validators/allowance.zod.js +1 -1
  43. package/dist/canopy/v1/generated/validators/allowanceList.zod.d.ts +1 -1
  44. package/dist/canopy/v1/generated/validators/allowanceList.zod.js +1 -1
  45. package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +1 -1
  46. package/dist/canopy/v1/generated/validators/applicability.zod.js +1 -1
  47. package/dist/canopy/v1/generated/validators/applicablePlan.zod.d.ts +1 -1
  48. package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +1 -1
  49. package/dist/canopy/v1/generated/validators/appliedCredit.zod.d.ts +1 -1
  50. package/dist/canopy/v1/generated/validators/appliedCredit.zod.js +1 -1
  51. package/dist/canopy/v1/generated/validators/autoRenewSet.zod.d.ts +1 -1
  52. package/dist/canopy/v1/generated/validators/autoRenewSet.zod.js +1 -1
  53. package/dist/canopy/v1/generated/validators/billingAccount.zod.d.ts +1 -1
  54. package/dist/canopy/v1/generated/validators/billingAccount.zod.js +1 -1
  55. package/dist/canopy/v1/generated/validators/billingAccountCreate.zod.d.ts +1 -1
  56. package/dist/canopy/v1/generated/validators/billingAccountCreate.zod.js +1 -1
  57. package/dist/canopy/v1/generated/validators/billingAccountList.zod.d.ts +1 -1
  58. package/dist/canopy/v1/generated/validators/billingAccountList.zod.js +1 -1
  59. package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.d.ts +1 -1
  60. package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  61. package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +1 -1
  62. package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.js +1 -1
  63. package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +1 -1
  64. package/dist/canopy/v1/generated/validators/cancellation.zod.js +1 -1
  65. package/dist/canopy/v1/generated/validators/cancellationCreate.zod.d.ts +1 -1
  66. package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +1 -1
  67. package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
  68. package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +1 -1
  69. package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +1 -1
  70. package/dist/canopy/v1/generated/validators/cancellationList.zod.js +1 -1
  71. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +1 -1
  72. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  73. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -1
  74. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -1
  75. package/dist/canopy/v1/generated/validators/checkoutMode.zod.d.ts +1 -1
  76. package/dist/canopy/v1/generated/validators/checkoutMode.zod.js +1 -1
  77. package/dist/canopy/v1/generated/validators/checkoutOptions.zod.d.ts +1 -1
  78. package/dist/canopy/v1/generated/validators/checkoutOptions.zod.js +1 -1
  79. package/dist/canopy/v1/generated/validators/contact.zod.d.ts +1 -1
  80. package/dist/canopy/v1/generated/validators/contact.zod.js +1 -1
  81. package/dist/canopy/v1/generated/validators/contactCreate.zod.d.ts +1 -1
  82. package/dist/canopy/v1/generated/validators/contactCreate.zod.js +1 -1
  83. package/dist/canopy/v1/generated/validators/contactList.zod.d.ts +1 -1
  84. package/dist/canopy/v1/generated/validators/contactList.zod.js +1 -1
  85. package/dist/canopy/v1/generated/validators/contactUpdate.zod.d.ts +1 -1
  86. package/dist/canopy/v1/generated/validators/contactUpdate.zod.js +1 -1
  87. package/dist/canopy/v1/generated/validators/createAPIKeyRequestBody.zod.d.ts +1 -1
  88. package/dist/canopy/v1/generated/validators/createAPIKeyRequestBody.zod.js +1 -1
  89. package/dist/canopy/v1/generated/validators/createServiceRequestBody.zod.d.ts +1 -1
  90. package/dist/canopy/v1/generated/validators/createServiceRequestBody.zod.js +1 -1
  91. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +1 -1
  92. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.js +1 -1
  93. package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +1 -1
  94. package/dist/canopy/v1/generated/validators/creditGrant.zod.js +1 -1
  95. package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +1 -1
  96. package/dist/canopy/v1/generated/validators/creditGrantList.zod.js +1 -1
  97. package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +1 -1
  98. package/dist/canopy/v1/generated/validators/creditGroup.zod.js +1 -1
  99. package/dist/canopy/v1/generated/validators/creditNote.zod.d.ts +1 -1
  100. package/dist/canopy/v1/generated/validators/creditNote.zod.js +1 -1
  101. package/dist/canopy/v1/generated/validators/creditNoteItem.zod.d.ts +1 -1
  102. package/dist/canopy/v1/generated/validators/creditNoteItem.zod.js +1 -1
  103. package/dist/canopy/v1/generated/validators/creditNoteItemList.zod.d.ts +1 -1
  104. package/dist/canopy/v1/generated/validators/creditNoteItemList.zod.js +1 -1
  105. package/dist/canopy/v1/generated/validators/creditNoteList.zod.d.ts +1 -1
  106. package/dist/canopy/v1/generated/validators/creditNoteList.zod.js +1 -1
  107. package/dist/canopy/v1/generated/validators/currency.zod.d.ts +1 -1
  108. package/dist/canopy/v1/generated/validators/currency.zod.js +1 -1
  109. package/dist/canopy/v1/generated/validators/currencyList.zod.d.ts +1 -1
  110. package/dist/canopy/v1/generated/validators/currencyList.zod.js +1 -1
  111. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +1 -1
  112. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.js +1 -1
  113. package/dist/canopy/v1/generated/validators/cursorPagination.zod.d.ts +1 -1
  114. package/dist/canopy/v1/generated/validators/cursorPagination.zod.js +1 -1
  115. package/dist/canopy/v1/generated/validators/discount.zod.d.ts +1 -1
  116. package/dist/canopy/v1/generated/validators/discount.zod.js +1 -1
  117. package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +1 -1
  118. package/dist/canopy/v1/generated/validators/discountList.zod.js +1 -1
  119. package/dist/canopy/v1/generated/validators/entitlement.zod.d.ts +1 -1
  120. package/dist/canopy/v1/generated/validators/entitlement.zod.js +1 -1
  121. package/dist/canopy/v1/generated/validators/entitlementList.zod.d.ts +1 -1
  122. package/dist/canopy/v1/generated/validators/entitlementList.zod.js +1 -1
  123. package/dist/canopy/v1/generated/validators/error.zod.d.ts +1 -1
  124. package/dist/canopy/v1/generated/validators/error.zod.js +1 -1
  125. package/dist/canopy/v1/generated/validators/errorA200529.zod.d.ts +1 -1
  126. package/dist/canopy/v1/generated/validators/errorA200529.zod.js +1 -1
  127. package/dist/canopy/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  128. package/dist/canopy/v1/generated/validators/featureGrant.zod.js +1 -1
  129. package/dist/canopy/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  130. package/dist/canopy/v1/generated/validators/featureGrantList.zod.js +1 -1
  131. package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  132. package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.js +1 -1
  133. package/dist/canopy/v1/generated/validators/getUsageSummaryParams.zod.d.ts +1 -1
  134. package/dist/canopy/v1/generated/validators/getUsageSummaryParams.zod.js +1 -1
  135. package/dist/canopy/v1/generated/validators/getUsageTimelineParams.zod.d.ts +1 -1
  136. package/dist/canopy/v1/generated/validators/getUsageTimelineParams.zod.js +1 -1
  137. package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +1 -1
  138. package/dist/canopy/v1/generated/validators/invoice.zod.js +1 -1
  139. package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +1 -1
  140. package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +1 -1
  141. package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +1 -1
  142. package/dist/canopy/v1/generated/validators/invoiceItemList.zod.js +1 -1
  143. package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +1 -1
  144. package/dist/canopy/v1/generated/validators/invoiceList.zod.js +1 -1
  145. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +1 -1
  146. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +1 -1
  147. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +1 -1
  148. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +1 -1
  149. package/dist/canopy/v1/generated/validators/issuedAPIKeyResource.zod.d.ts +1 -1
  150. package/dist/canopy/v1/generated/validators/issuedAPIKeyResource.zod.js +1 -1
  151. package/dist/canopy/v1/generated/validators/lengthAwarePageAPIKeyResource.zod.d.ts +1 -1
  152. package/dist/canopy/v1/generated/validators/lengthAwarePageAPIKeyResource.zod.js +1 -1
  153. package/dist/canopy/v1/generated/validators/listApiKeysParams.zod.d.ts +1 -1
  154. package/dist/canopy/v1/generated/validators/listApiKeysParams.zod.js +1 -1
  155. package/dist/canopy/v1/generated/validators/listRequestsParams.zod.d.ts +1 -1
  156. package/dist/canopy/v1/generated/validators/listRequestsParams.zod.js +1 -1
  157. package/dist/canopy/v1/generated/validators/listUsageByApiKeyParams.zod.d.ts +1 -1
  158. package/dist/canopy/v1/generated/validators/listUsageByApiKeyParams.zod.js +1 -1
  159. package/dist/canopy/v1/generated/validators/listUsageByModelParams.zod.d.ts +1 -1
  160. package/dist/canopy/v1/generated/validators/listUsageByModelParams.zod.js +1 -1
  161. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.d.ts +1 -1
  162. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.js +1 -1
  163. package/dist/canopy/v1/generated/validators/modelPricing.zod.d.ts +1 -1
  164. package/dist/canopy/v1/generated/validators/modelPricing.zod.js +1 -1
  165. package/dist/canopy/v1/generated/validators/modelResource.zod.d.ts +1 -1
  166. package/dist/canopy/v1/generated/validators/modelResource.zod.js +1 -1
  167. package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.d.ts +1 -1
  168. package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.js +1 -1
  169. package/dist/canopy/v1/generated/validators/modelUsageResource.zod.d.ts +1 -1
  170. package/dist/canopy/v1/generated/validators/modelUsageResource.zod.js +1 -1
  171. package/dist/canopy/v1/generated/validators/money.zod.d.ts +1 -1
  172. package/dist/canopy/v1/generated/validators/money.zod.js +1 -1
  173. package/dist/canopy/v1/generated/validators/monthlyStatement.zod.d.ts +1 -1
  174. package/dist/canopy/v1/generated/validators/monthlyStatement.zod.js +1 -1
  175. package/dist/canopy/v1/generated/validators/monthlyStatementList.zod.d.ts +1 -1
  176. package/dist/canopy/v1/generated/validators/monthlyStatementList.zod.js +1 -1
  177. package/dist/canopy/v1/generated/validators/namedIdentity.zod.d.ts +1 -1
  178. package/dist/canopy/v1/generated/validators/namedIdentity.zod.js +1 -1
  179. package/dist/canopy/v1/generated/validators/objectIdentity.zod.d.ts +1 -1
  180. package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +1 -1
  181. package/dist/canopy/v1/generated/validators/offsetPagination.zod.d.ts +1 -1
  182. package/dist/canopy/v1/generated/validators/offsetPagination.zod.js +1 -1
  183. package/dist/canopy/v1/generated/validators/order.zod.d.ts +1 -1
  184. package/dist/canopy/v1/generated/validators/order.zod.js +1 -1
  185. package/dist/canopy/v1/generated/validators/orderCancel.zod.d.ts +1 -1
  186. package/dist/canopy/v1/generated/validators/orderCancel.zod.js +1 -1
  187. package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +1 -1
  188. package/dist/canopy/v1/generated/validators/orderItem.zod.js +1 -1
  189. package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +1 -1
  190. package/dist/canopy/v1/generated/validators/orderItemList.zod.js +1 -1
  191. package/dist/canopy/v1/generated/validators/orderItemStatus.zod.d.ts +1 -1
  192. package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +1 -1
  193. package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +1 -1
  194. package/dist/canopy/v1/generated/validators/orderList.zod.js +1 -1
  195. package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.d.ts +1 -1
  196. package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  197. package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +1 -1
  198. package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  199. package/dist/canopy/v1/generated/validators/orderStatus.zod.d.ts +1 -1
  200. package/dist/canopy/v1/generated/validators/orderStatus.zod.js +1 -1
  201. package/dist/canopy/v1/generated/validators/paidWith.zod.d.ts +1 -1
  202. package/dist/canopy/v1/generated/validators/paidWith.zod.js +1 -1
  203. package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.d.ts +1 -1
  204. package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +1 -1
  205. package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.d.ts +1 -1
  206. package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +1 -1
  207. package/dist/canopy/v1/generated/validators/paymentAction.zod.d.ts +1 -1
  208. package/dist/canopy/v1/generated/validators/paymentAction.zod.js +1 -1
  209. package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.d.ts +1 -1
  210. package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  211. package/dist/canopy/v1/generated/validators/paymentMethod.zod.d.ts +1 -1
  212. package/dist/canopy/v1/generated/validators/paymentMethod.zod.js +1 -1
  213. package/dist/canopy/v1/generated/validators/paymentMethodList.zod.d.ts +1 -1
  214. package/dist/canopy/v1/generated/validators/paymentMethodList.zod.js +1 -1
  215. package/dist/canopy/v1/generated/validators/paymentMethodSetup.zod.d.ts +1 -1
  216. package/dist/canopy/v1/generated/validators/paymentMethodSetup.zod.js +1 -1
  217. package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +1 -1
  218. package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +1 -1
  219. package/dist/canopy/v1/generated/validators/paymentOption.zod.d.ts +1 -1
  220. package/dist/canopy/v1/generated/validators/paymentOption.zod.js +1 -1
  221. package/dist/canopy/v1/generated/validators/paymentOptionList.zod.d.ts +1 -1
  222. package/dist/canopy/v1/generated/validators/paymentOptionList.zod.js +1 -1
  223. package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.d.ts +1 -1
  224. package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  225. package/dist/canopy/v1/generated/validators/paymentPreview.zod.d.ts +1 -1
  226. package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +1 -1
  227. package/dist/canopy/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +1 -1
  228. package/dist/canopy/v1/generated/validators/paymentPreviewInvoice.zod.js +1 -1
  229. package/dist/canopy/v1/generated/validators/paymentResult.zod.d.ts +1 -1
  230. package/dist/canopy/v1/generated/validators/paymentResult.zod.js +1 -1
  231. package/dist/canopy/v1/generated/validators/paymentStatus.zod.d.ts +1 -1
  232. package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +1 -1
  233. package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +1 -1
  234. package/dist/canopy/v1/generated/validators/placedOrder.zod.js +1 -1
  235. package/dist/canopy/v1/generated/validators/plan.zod.d.ts +1 -1
  236. package/dist/canopy/v1/generated/validators/plan.zod.js +1 -1
  237. package/dist/canopy/v1/generated/validators/planFeature.zod.d.ts +1 -1
  238. package/dist/canopy/v1/generated/validators/planFeature.zod.js +1 -1
  239. package/dist/canopy/v1/generated/validators/planList.zod.d.ts +1 -1
  240. package/dist/canopy/v1/generated/validators/planList.zod.js +1 -1
  241. package/dist/canopy/v1/generated/validators/price.zod.d.ts +1 -1
  242. package/dist/canopy/v1/generated/validators/price.zod.js +1 -1
  243. package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +1 -1
  244. package/dist/canopy/v1/generated/validators/priceList.zod.js +1 -1
  245. package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +1 -1
  246. package/dist/canopy/v1/generated/validators/priceOption.zod.js +1 -1
  247. package/dist/canopy/v1/generated/validators/product.zod.d.ts +1 -1
  248. package/dist/canopy/v1/generated/validators/product.zod.js +1 -1
  249. package/dist/canopy/v1/generated/validators/productID.zod.d.ts +1 -1
  250. package/dist/canopy/v1/generated/validators/productID.zod.js +1 -1
  251. package/dist/canopy/v1/generated/validators/productList.zod.d.ts +1 -1
  252. package/dist/canopy/v1/generated/validators/productList.zod.js +1 -1
  253. package/dist/canopy/v1/generated/validators/projectAssignment.zod.d.ts +1 -1
  254. package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +1 -1
  255. package/dist/canopy/v1/generated/validators/projectAssignmentList.zod.d.ts +1 -1
  256. package/dist/canopy/v1/generated/validators/projectAssignmentList.zod.js +1 -1
  257. package/dist/canopy/v1/generated/validators/purchaseOperation.zod.d.ts +1 -1
  258. package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +1 -1
  259. package/dist/canopy/v1/generated/validators/quote.zod.d.ts +1 -1
  260. package/dist/canopy/v1/generated/validators/quote.zod.js +1 -1
  261. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +1 -1
  262. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +1 -1
  263. package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +1 -1
  264. package/dist/canopy/v1/generated/validators/quoteA200529.zod.js +1 -1
  265. package/dist/canopy/v1/generated/validators/quoteCancellation.zod.d.ts +1 -1
  266. package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +1 -1
  267. package/dist/canopy/v1/generated/validators/quoteItem.zod.d.ts +1 -1
  268. package/dist/canopy/v1/generated/validators/quoteItem.zod.js +1 -1
  269. package/dist/canopy/v1/generated/validators/quoteItemDc1fddb.zod.d.ts +1 -1
  270. package/dist/canopy/v1/generated/validators/quoteItemDc1fddb.zod.js +1 -1
  271. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
  272. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +1 -1
  273. package/dist/canopy/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
  274. package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +1 -1
  275. package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.d.ts +1 -1
  276. package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +1 -1
  277. package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +1 -1
  278. package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +1 -1
  279. package/dist/canopy/v1/generated/validators/quotedDiscount.zod.d.ts +1 -1
  280. package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +1 -1
  281. package/dist/canopy/v1/generated/validators/rate.zod.d.ts +1 -1
  282. package/dist/canopy/v1/generated/validators/rate.zod.js +1 -1
  283. package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +1 -1
  284. package/dist/canopy/v1/generated/validators/rateList.zod.js +1 -1
  285. package/dist/canopy/v1/generated/validators/refund.zod.d.ts +1 -1
  286. package/dist/canopy/v1/generated/validators/refund.zod.js +1 -1
  287. package/dist/canopy/v1/generated/validators/refundList.zod.d.ts +1 -1
  288. package/dist/canopy/v1/generated/validators/refundList.zod.js +1 -1
  289. package/dist/canopy/v1/generated/validators/refundPolicy.zod.d.ts +1 -1
  290. package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +1 -1
  291. package/dist/canopy/v1/generated/validators/refundReason.zod.d.ts +1 -1
  292. package/dist/canopy/v1/generated/validators/refundReason.zod.js +1 -1
  293. package/dist/canopy/v1/generated/validators/renewRequest.zod.d.ts +1 -1
  294. package/dist/canopy/v1/generated/validators/renewRequest.zod.js +1 -1
  295. package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
  296. package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +1 -1
  297. package/dist/canopy/v1/generated/validators/renewalPrice.zod.d.ts +1 -1
  298. package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +1 -1
  299. package/dist/canopy/v1/generated/validators/renewalPriceList.zod.d.ts +1 -1
  300. package/dist/canopy/v1/generated/validators/renewalPriceList.zod.js +1 -1
  301. package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +1 -1
  302. package/dist/canopy/v1/generated/validators/requestResource.zod.js +1 -1
  303. package/dist/canopy/v1/generated/validators/scheduledChange.zod.d.ts +1 -1
  304. package/dist/canopy/v1/generated/validators/scheduledChange.zod.js +1 -1
  305. package/dist/canopy/v1/generated/validators/serviceResource.zod.d.ts +1 -1
  306. package/dist/canopy/v1/generated/validators/serviceResource.zod.js +1 -1
  307. package/dist/canopy/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +1 -1
  308. package/dist/canopy/v1/generated/validators/setProjectAssignmentRequest.zod.js +1 -1
  309. package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +1 -1
  310. package/dist/canopy/v1/generated/validators/spendRow.zod.js +1 -1
  311. package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +1 -1
  312. package/dist/canopy/v1/generated/validators/spendRowList.zod.js +1 -1
  313. package/dist/canopy/v1/generated/validators/statement.zod.d.ts +1 -1
  314. package/dist/canopy/v1/generated/validators/statement.zod.js +1 -1
  315. package/dist/canopy/v1/generated/validators/statementAmounts.zod.d.ts +1 -1
  316. package/dist/canopy/v1/generated/validators/statementAmounts.zod.js +1 -1
  317. package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +1 -1
  318. package/dist/canopy/v1/generated/validators/statementItem.zod.js +1 -1
  319. package/dist/canopy/v1/generated/validators/statementList.zod.d.ts +1 -1
  320. package/dist/canopy/v1/generated/validators/statementList.zod.js +1 -1
  321. package/dist/canopy/v1/generated/validators/statementStatus.zod.d.ts +1 -1
  322. package/dist/canopy/v1/generated/validators/statementStatus.zod.js +1 -1
  323. package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +1 -1
  324. package/dist/canopy/v1/generated/validators/statementSummary.zod.js +1 -1
  325. package/dist/canopy/v1/generated/validators/statementType.zod.d.ts +1 -1
  326. package/dist/canopy/v1/generated/validators/statementType.zod.js +1 -1
  327. package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +1 -1
  328. package/dist/canopy/v1/generated/validators/subscription.zod.js +1 -1
  329. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
  330. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +1 -1
  331. package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  332. package/dist/canopy/v1/generated/validators/subscriptionList.zod.js +1 -1
  333. package/dist/canopy/v1/generated/validators/taxItem.zod.d.ts +1 -1
  334. package/dist/canopy/v1/generated/validators/taxItem.zod.js +1 -1
  335. package/dist/canopy/v1/generated/validators/terminationPolicy.zod.d.ts +1 -1
  336. package/dist/canopy/v1/generated/validators/terminationPolicy.zod.js +1 -1
  337. package/dist/canopy/v1/generated/validators/tier.zod.d.ts +1 -1
  338. package/dist/canopy/v1/generated/validators/tier.zod.js +1 -1
  339. package/dist/canopy/v1/generated/validators/tokenPrice.zod.d.ts +1 -1
  340. package/dist/canopy/v1/generated/validators/tokenPrice.zod.js +1 -1
  341. package/dist/canopy/v1/generated/validators/topUp.zod.d.ts +1 -1
  342. package/dist/canopy/v1/generated/validators/topUp.zod.js +1 -1
  343. package/dist/canopy/v1/generated/validators/topUpCreate.zod.d.ts +1 -1
  344. package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +1 -1
  345. package/dist/canopy/v1/generated/validators/topUpList.zod.d.ts +1 -1
  346. package/dist/canopy/v1/generated/validators/topUpList.zod.js +1 -1
  347. package/dist/canopy/v1/generated/validators/totalsResource.zod.d.ts +1 -1
  348. package/dist/canopy/v1/generated/validators/totalsResource.zod.js +1 -1
  349. package/dist/canopy/v1/generated/validators/transaction.zod.d.ts +1 -1
  350. package/dist/canopy/v1/generated/validators/transaction.zod.js +1 -1
  351. package/dist/canopy/v1/generated/validators/transactionList.zod.d.ts +1 -1
  352. package/dist/canopy/v1/generated/validators/transactionList.zod.js +1 -1
  353. package/dist/canopy/v1/generated/validators/transactionType.zod.d.ts +1 -1
  354. package/dist/canopy/v1/generated/validators/transactionType.zod.js +1 -1
  355. package/dist/canopy/v1/generated/validators/updateAPIKeyRequestBody.zod.d.ts +1 -1
  356. package/dist/canopy/v1/generated/validators/updateAPIKeyRequestBody.zod.js +1 -1
  357. package/dist/canopy/v1/generated/validators/usageBucketResource.zod.d.ts +1 -1
  358. package/dist/canopy/v1/generated/validators/usageBucketResource.zod.js +1 -1
  359. package/dist/canopy/v1/generated/validators/usageCharge.zod.d.ts +1 -1
  360. package/dist/canopy/v1/generated/validators/usageCharge.zod.js +1 -1
  361. package/dist/canopy/v1/generated/validators/usageChargeList.zod.d.ts +1 -1
  362. package/dist/canopy/v1/generated/validators/usageChargeList.zod.js +1 -1
  363. package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.d.ts +1 -1
  364. package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.js +1 -1
  365. package/dist/canopy/v1/generated/validators/withdrawal.zod.d.ts +1 -1
  366. package/dist/canopy/v1/generated/validators/withdrawal.zod.js +1 -1
  367. package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.d.ts +1 -1
  368. package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.js +1 -1
  369. package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.d.ts +1 -1
  370. package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.js +1 -1
  371. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.d.ts +1 -1
  372. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +1 -1
  373. package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.d.ts +1 -1
  374. package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.js +1 -1
  375. package/dist/canopy/v1/generated/validators/withdrawalList.zod.d.ts +1 -1
  376. package/dist/canopy/v1/generated/validators/withdrawalList.zod.js +1 -1
  377. package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.d.ts +1 -1
  378. package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.js +1 -1
  379. package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +1 -1
  380. package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.js +1 -1
  381. package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +1 -1
  382. package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.js +1 -1
  383. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.d.ts +1 -1
  384. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +1 -1
  385. package/dist/compute/v1/generated/models.d.ts +19 -3109
  386. package/dist/compute/v1/generated/models.js +5 -384
  387. package/dist/compute/v1/generated/validators/allocateFloatingIPResponseBody.zod.d.ts +1 -25
  388. package/dist/compute/v1/generated/validators/createBackupCapacityPackResponseBody.zod.d.ts +1 -23
  389. package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +1 -23
  390. package/dist/compute/v1/generated/validators/createDiskResponseBody.zod.d.ts +1 -23
  391. package/dist/compute/v1/generated/validators/createImageResponseBody.zod.d.ts +1 -23
  392. package/dist/compute/v1/generated/validators/floatingIPListResponseBody.zod.d.ts +0 -2
  393. package/dist/compute/v1/generated/validators/floatingIPResource.zod.d.ts +0 -2
  394. package/dist/compute/v1/generated/validators/floatingIPResource.zod.js +0 -8
  395. package/dist/compute/v1/generated/validators/iPv6ResponseBody.zod.d.ts +5 -0
  396. package/dist/compute/v1/generated/validators/iPv6ResponseBody.zod.js +3 -0
  397. package/dist/compute/v1/generated/validators/launchInstanceResponseBody.zod.d.ts +1 -23
  398. package/dist/compute/v1/generated/validators/placedOrder.zod.d.ts +1 -23
  399. package/dist/compute/v1/generated/validators/placedOrder.zod.js +8 -5
  400. package/dist/compute/v1/generated/validators/quote.zod.js +2 -2
  401. package/dist/compute/v1/generated/validators/quoteItem.zod.d.ts +3 -6
  402. package/dist/compute/v1/generated/validators/quoteItem.zod.js +11 -22
  403. package/dist/compute/v1/generated/validators/resizeDiskResponseBody.zod.d.ts +1 -23
  404. package/dist/compute/v1/generated/validators/resizeInstanceResponseBody.zod.d.ts +1 -23
  405. package/dist/compute/v1/generated/validators/setFloatingIPBandwidthResponseBody.zod.d.ts +1 -25
  406. package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +1 -23
  407. package/dist/index.d.ts +1 -0
  408. package/dist/index.js +1 -0
  409. package/dist/routes.d.ts +32 -0
  410. package/dist/routes.js +36 -0
  411. package/package.json +1 -1
  412. package/dist/compute/v1/generated/validators/accountBalance.zod.d.ts +0 -140
  413. package/dist/compute/v1/generated/validators/accountBalance.zod.js +0 -43
  414. package/dist/compute/v1/generated/validators/accountIdentity.zod.d.ts +0 -31
  415. package/dist/compute/v1/generated/validators/accountIdentity.zod.js +0 -29
  416. package/dist/compute/v1/generated/validators/activeResource.zod.d.ts +0 -57
  417. package/dist/compute/v1/generated/validators/activeResource.zod.js +0 -52
  418. package/dist/compute/v1/generated/validators/activeResourceList.zod.d.ts +0 -64
  419. package/dist/compute/v1/generated/validators/activeResourceList.zod.js +0 -30
  420. package/dist/compute/v1/generated/validators/allowance.zod.d.ts +0 -60
  421. package/dist/compute/v1/generated/validators/allowance.zod.js +0 -57
  422. package/dist/compute/v1/generated/validators/allowanceList.zod.d.ts +0 -67
  423. package/dist/compute/v1/generated/validators/allowanceList.zod.js +0 -30
  424. package/dist/compute/v1/generated/validators/applicability.zod.d.ts +0 -124
  425. package/dist/compute/v1/generated/validators/applicability.zod.js +0 -48
  426. package/dist/compute/v1/generated/validators/applicablePlan.zod.d.ts +0 -31
  427. package/dist/compute/v1/generated/validators/applicablePlan.zod.js +0 -31
  428. package/dist/compute/v1/generated/validators/appliedCredit.zod.d.ts +0 -31
  429. package/dist/compute/v1/generated/validators/appliedCredit.zod.js +0 -32
  430. package/dist/compute/v1/generated/validators/autoRenewSet.zod.d.ts +0 -29
  431. package/dist/compute/v1/generated/validators/autoRenewSet.zod.js +0 -27
  432. package/dist/compute/v1/generated/validators/billingAccount.zod.d.ts +0 -41
  433. package/dist/compute/v1/generated/validators/billingAccount.zod.js +0 -47
  434. package/dist/compute/v1/generated/validators/billingAccountCreate.zod.d.ts +0 -33
  435. package/dist/compute/v1/generated/validators/billingAccountCreate.zod.js +0 -31
  436. package/dist/compute/v1/generated/validators/billingAccountList.zod.d.ts +0 -48
  437. package/dist/compute/v1/generated/validators/billingAccountList.zod.js +0 -30
  438. package/dist/compute/v1/generated/validators/billingAccountUpdate.zod.d.ts +0 -31
  439. package/dist/compute/v1/generated/validators/billingAccountUpdate.zod.js +0 -32
  440. package/dist/compute/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +0 -37
  441. package/dist/compute/v1/generated/validators/cancelSubscriptionRequest.zod.js +0 -37
  442. package/dist/compute/v1/generated/validators/cancellation.zod.d.ts +0 -80
  443. package/dist/compute/v1/generated/validators/cancellation.zod.js +0 -55
  444. package/dist/compute/v1/generated/validators/cancellationCreate.zod.d.ts +0 -39
  445. package/dist/compute/v1/generated/validators/cancellationCreate.zod.js +0 -47
  446. package/dist/compute/v1/generated/validators/cancellationItem.zod.d.ts +0 -51
  447. package/dist/compute/v1/generated/validators/cancellationItem.zod.js +0 -51
  448. package/dist/compute/v1/generated/validators/cancellationList.zod.d.ts +0 -87
  449. package/dist/compute/v1/generated/validators/cancellationList.zod.js +0 -30
  450. package/dist/compute/v1/generated/validators/cancellationRefundPreview.zod.d.ts +0 -62
  451. package/dist/compute/v1/generated/validators/cancellationRefundPreview.zod.js +0 -48
  452. package/dist/compute/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +0 -47
  453. package/dist/compute/v1/generated/validators/cancellationRefundPreviewItem.zod.js +0 -47
  454. package/dist/compute/v1/generated/validators/contact.zod.d.ts +0 -57
  455. package/dist/compute/v1/generated/validators/contact.zod.js +0 -55
  456. package/dist/compute/v1/generated/validators/contactCreate.zod.d.ts +0 -48
  457. package/dist/compute/v1/generated/validators/contactCreate.zod.js +0 -46
  458. package/dist/compute/v1/generated/validators/contactList.zod.d.ts +0 -54
  459. package/dist/compute/v1/generated/validators/contactList.zod.js +0 -30
  460. package/dist/compute/v1/generated/validators/contactUpdate.zod.d.ts +0 -49
  461. package/dist/compute/v1/generated/validators/contactUpdate.zod.js +0 -47
  462. package/dist/compute/v1/generated/validators/creditGrant.zod.d.ts +0 -142
  463. package/dist/compute/v1/generated/validators/creditGrant.zod.js +0 -43
  464. package/dist/compute/v1/generated/validators/creditGrantList.zod.d.ts +0 -149
  465. package/dist/compute/v1/generated/validators/creditGrantList.zod.js +0 -30
  466. package/dist/compute/v1/generated/validators/creditGroup.zod.d.ts +0 -128
  467. package/dist/compute/v1/generated/validators/creditGroup.zod.js +0 -34
  468. package/dist/compute/v1/generated/validators/creditNote.zod.d.ts +0 -50
  469. package/dist/compute/v1/generated/validators/creditNote.zod.js +0 -56
  470. package/dist/compute/v1/generated/validators/creditNoteItem.zod.d.ts +0 -33
  471. package/dist/compute/v1/generated/validators/creditNoteItem.zod.js +0 -32
  472. package/dist/compute/v1/generated/validators/creditNoteItemList.zod.d.ts +0 -40
  473. package/dist/compute/v1/generated/validators/creditNoteItemList.zod.js +0 -30
  474. package/dist/compute/v1/generated/validators/creditNoteList.zod.d.ts +0 -57
  475. package/dist/compute/v1/generated/validators/creditNoteList.zod.js +0 -30
  476. package/dist/compute/v1/generated/validators/currency.zod.d.ts +0 -37
  477. package/dist/compute/v1/generated/validators/currency.zod.js +0 -46
  478. package/dist/compute/v1/generated/validators/currencyList.zod.d.ts +0 -39
  479. package/dist/compute/v1/generated/validators/currencyList.zod.js +0 -30
  480. package/dist/compute/v1/generated/validators/discount.zod.d.ts +0 -158
  481. package/dist/compute/v1/generated/validators/discount.zod.js +0 -60
  482. package/dist/compute/v1/generated/validators/discountList.zod.d.ts +0 -165
  483. package/dist/compute/v1/generated/validators/discountList.zod.js +0 -30
  484. package/dist/compute/v1/generated/validators/entitlement.zod.d.ts +0 -41
  485. package/dist/compute/v1/generated/validators/entitlement.zod.js +0 -36
  486. package/dist/compute/v1/generated/validators/entitlementList.zod.d.ts +0 -48
  487. package/dist/compute/v1/generated/validators/entitlementList.zod.js +0 -30
  488. package/dist/compute/v1/generated/validators/errorA200529.zod.d.ts +0 -32
  489. package/dist/compute/v1/generated/validators/errorA200529.zod.js +0 -26
  490. package/dist/compute/v1/generated/validators/featureGrant.zod.d.ts +0 -49
  491. package/dist/compute/v1/generated/validators/featureGrant.zod.js +0 -40
  492. package/dist/compute/v1/generated/validators/featureGrantList.zod.d.ts +0 -56
  493. package/dist/compute/v1/generated/validators/featureGrantList.zod.js +0 -30
  494. package/dist/compute/v1/generated/validators/featureGrantStatus.zod.d.ts +0 -32
  495. package/dist/compute/v1/generated/validators/featureGrantStatus.zod.js +0 -27
  496. package/dist/compute/v1/generated/validators/invoice.zod.d.ts +0 -79
  497. package/dist/compute/v1/generated/validators/invoice.zod.js +0 -69
  498. package/dist/compute/v1/generated/validators/invoiceItem.zod.d.ts +0 -57
  499. package/dist/compute/v1/generated/validators/invoiceItem.zod.js +0 -62
  500. package/dist/compute/v1/generated/validators/invoiceItemList.zod.d.ts +0 -64
  501. package/dist/compute/v1/generated/validators/invoiceItemList.zod.js +0 -30
  502. package/dist/compute/v1/generated/validators/invoiceList.zod.d.ts +0 -86
  503. package/dist/compute/v1/generated/validators/invoiceList.zod.js +0 -30
  504. package/dist/compute/v1/generated/validators/invoiceStatus.zod.d.ts +0 -33
  505. package/dist/compute/v1/generated/validators/invoiceStatus.zod.js +0 -27
  506. package/dist/compute/v1/generated/validators/invoiceSummary.zod.d.ts +0 -49
  507. package/dist/compute/v1/generated/validators/invoiceSummary.zod.js +0 -50
  508. package/dist/compute/v1/generated/validators/monthlyStatement.zod.d.ts +0 -52
  509. package/dist/compute/v1/generated/validators/monthlyStatement.zod.js +0 -46
  510. package/dist/compute/v1/generated/validators/monthlyStatementList.zod.d.ts +0 -59
  511. package/dist/compute/v1/generated/validators/monthlyStatementList.zod.js +0 -30
  512. package/dist/compute/v1/generated/validators/namedIdentity.zod.d.ts +0 -31
  513. package/dist/compute/v1/generated/validators/namedIdentity.zod.js +0 -31
  514. package/dist/compute/v1/generated/validators/objectIdentity.zod.d.ts +0 -31
  515. package/dist/compute/v1/generated/validators/objectIdentity.zod.js +0 -31
  516. package/dist/compute/v1/generated/validators/order.zod.d.ts +0 -158
  517. package/dist/compute/v1/generated/validators/order.zod.js +0 -81
  518. package/dist/compute/v1/generated/validators/orderCancel.zod.d.ts +0 -30
  519. package/dist/compute/v1/generated/validators/orderCancel.zod.js +0 -33
  520. package/dist/compute/v1/generated/validators/orderItem.zod.d.ts +0 -84
  521. package/dist/compute/v1/generated/validators/orderItem.zod.js +0 -94
  522. package/dist/compute/v1/generated/validators/orderItemList.zod.d.ts +0 -90
  523. package/dist/compute/v1/generated/validators/orderItemList.zod.js +0 -30
  524. package/dist/compute/v1/generated/validators/orderItemStatus.zod.d.ts +0 -32
  525. package/dist/compute/v1/generated/validators/orderItemStatus.zod.js +0 -27
  526. package/dist/compute/v1/generated/validators/orderList.zod.d.ts +0 -165
  527. package/dist/compute/v1/generated/validators/orderList.zod.js +0 -30
  528. package/dist/compute/v1/generated/validators/orderRefundQuote.zod.d.ts +0 -33
  529. package/dist/compute/v1/generated/validators/orderRefundQuote.zod.js +0 -34
  530. package/dist/compute/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +0 -31
  531. package/dist/compute/v1/generated/validators/orderRefundQuoteInput.zod.js +0 -36
  532. package/dist/compute/v1/generated/validators/orderStatus.zod.d.ts +0 -34
  533. package/dist/compute/v1/generated/validators/orderStatus.zod.js +0 -27
  534. package/dist/compute/v1/generated/validators/paidWith.zod.d.ts +0 -33
  535. package/dist/compute/v1/generated/validators/paidWith.zod.js +0 -41
  536. package/dist/compute/v1/generated/validators/payInvoiceRequest.zod.d.ts +0 -42
  537. package/dist/compute/v1/generated/validators/payInvoiceRequest.zod.js +0 -69
  538. package/dist/compute/v1/generated/validators/payTogetherRequest.zod.d.ts +0 -34
  539. package/dist/compute/v1/generated/validators/payTogetherRequest.zod.js +0 -37
  540. package/dist/compute/v1/generated/validators/paymentAction.zod.d.ts +0 -38
  541. package/dist/compute/v1/generated/validators/paymentAction.zod.js +0 -40
  542. package/dist/compute/v1/generated/validators/paymentCancellationReason.zod.d.ts +0 -30
  543. package/dist/compute/v1/generated/validators/paymentCancellationReason.zod.js +0 -27
  544. package/dist/compute/v1/generated/validators/paymentMethod.zod.d.ts +0 -41
  545. package/dist/compute/v1/generated/validators/paymentMethod.zod.js +0 -35
  546. package/dist/compute/v1/generated/validators/paymentMethodList.zod.d.ts +0 -48
  547. package/dist/compute/v1/generated/validators/paymentMethodList.zod.js +0 -30
  548. package/dist/compute/v1/generated/validators/paymentMethodSetup.zod.d.ts +0 -31
  549. package/dist/compute/v1/generated/validators/paymentMethodSetup.zod.js +0 -33
  550. package/dist/compute/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +0 -42
  551. package/dist/compute/v1/generated/validators/paymentMethodSetupResult.zod.js +0 -34
  552. package/dist/compute/v1/generated/validators/paymentOption.zod.d.ts +0 -33
  553. package/dist/compute/v1/generated/validators/paymentOption.zod.js +0 -31
  554. package/dist/compute/v1/generated/validators/paymentOptionList.zod.d.ts +0 -40
  555. package/dist/compute/v1/generated/validators/paymentOptionList.zod.js +0 -30
  556. package/dist/compute/v1/generated/validators/paymentOptionMethod.zod.d.ts +0 -30
  557. package/dist/compute/v1/generated/validators/paymentOptionMethod.zod.js +0 -32
  558. package/dist/compute/v1/generated/validators/paymentPreview.zod.d.ts +0 -46
  559. package/dist/compute/v1/generated/validators/paymentPreview.zod.js +0 -44
  560. package/dist/compute/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +0 -33
  561. package/dist/compute/v1/generated/validators/paymentPreviewInvoice.zod.js +0 -32
  562. package/dist/compute/v1/generated/validators/paymentResult.zod.d.ts +0 -103
  563. package/dist/compute/v1/generated/validators/paymentResult.zod.js +0 -55
  564. package/dist/compute/v1/generated/validators/paymentStatus.zod.d.ts +0 -32
  565. package/dist/compute/v1/generated/validators/paymentStatus.zod.js +0 -27
  566. package/dist/compute/v1/generated/validators/plan.zod.d.ts +0 -47
  567. package/dist/compute/v1/generated/validators/plan.zod.js +0 -39
  568. package/dist/compute/v1/generated/validators/planFeature.zod.d.ts +0 -34
  569. package/dist/compute/v1/generated/validators/planFeature.zod.js +0 -29
  570. package/dist/compute/v1/generated/validators/planList.zod.d.ts +0 -54
  571. package/dist/compute/v1/generated/validators/planList.zod.js +0 -30
  572. package/dist/compute/v1/generated/validators/price.zod.d.ts +0 -97
  573. package/dist/compute/v1/generated/validators/price.zod.js +0 -83
  574. package/dist/compute/v1/generated/validators/priceList.zod.d.ts +0 -104
  575. package/dist/compute/v1/generated/validators/priceList.zod.js +0 -30
  576. package/dist/compute/v1/generated/validators/priceOption.zod.d.ts +0 -60
  577. package/dist/compute/v1/generated/validators/priceOption.zod.js +0 -44
  578. package/dist/compute/v1/generated/validators/product.zod.d.ts +0 -31
  579. package/dist/compute/v1/generated/validators/product.zod.js +0 -30
  580. package/dist/compute/v1/generated/validators/productID.zod.d.ts +0 -29
  581. package/dist/compute/v1/generated/validators/productID.zod.js +0 -32
  582. package/dist/compute/v1/generated/validators/productList.zod.d.ts +0 -38
  583. package/dist/compute/v1/generated/validators/productList.zod.js +0 -30
  584. package/dist/compute/v1/generated/validators/projectAssignment.zod.d.ts +0 -38
  585. package/dist/compute/v1/generated/validators/projectAssignment.zod.js +0 -39
  586. package/dist/compute/v1/generated/validators/projectAssignmentList.zod.d.ts +0 -45
  587. package/dist/compute/v1/generated/validators/projectAssignmentList.zod.js +0 -30
  588. package/dist/compute/v1/generated/validators/purchaseOperation.zod.d.ts +0 -31
  589. package/dist/compute/v1/generated/validators/purchaseOperation.zod.js +0 -27
  590. package/dist/compute/v1/generated/validators/quote5f60d00.zod.d.ts +0 -115
  591. package/dist/compute/v1/generated/validators/quote5f60d00.zod.js +0 -46
  592. package/dist/compute/v1/generated/validators/quoteA200529.zod.d.ts +0 -115
  593. package/dist/compute/v1/generated/validators/quoteA200529.zod.js +0 -26
  594. package/dist/compute/v1/generated/validators/quoteCancellation.zod.d.ts +0 -34
  595. package/dist/compute/v1/generated/validators/quoteCancellation.zod.js +0 -36
  596. package/dist/compute/v1/generated/validators/quoteItemDc1fddb.zod.d.ts +0 -38
  597. package/dist/compute/v1/generated/validators/quoteItemDc1fddb.zod.js +0 -43
  598. package/dist/compute/v1/generated/validators/quoteItemInput.zod.d.ts +0 -58
  599. package/dist/compute/v1/generated/validators/quoteItemInput.zod.js +0 -57
  600. package/dist/compute/v1/generated/validators/quoteRenewal.zod.d.ts +0 -43
  601. package/dist/compute/v1/generated/validators/quoteRenewal.zod.js +0 -42
  602. package/dist/compute/v1/generated/validators/quoteRenewalResult.zod.d.ts +0 -43
  603. package/dist/compute/v1/generated/validators/quoteRenewalResult.zod.js +0 -40
  604. package/dist/compute/v1/generated/validators/quoteRequest.zod.d.ts +0 -88
  605. package/dist/compute/v1/generated/validators/quoteRequest.zod.js +0 -58
  606. package/dist/compute/v1/generated/validators/quotedDiscount.zod.d.ts +0 -35
  607. package/dist/compute/v1/generated/validators/quotedDiscount.zod.js +0 -37
  608. package/dist/compute/v1/generated/validators/rate.zod.d.ts +0 -54
  609. package/dist/compute/v1/generated/validators/rate.zod.js +0 -49
  610. package/dist/compute/v1/generated/validators/rateList.zod.d.ts +0 -61
  611. package/dist/compute/v1/generated/validators/rateList.zod.js +0 -30
  612. package/dist/compute/v1/generated/validators/refund.zod.d.ts +0 -109
  613. package/dist/compute/v1/generated/validators/refund.zod.js +0 -60
  614. package/dist/compute/v1/generated/validators/refundList.zod.d.ts +0 -116
  615. package/dist/compute/v1/generated/validators/refundList.zod.js +0 -30
  616. package/dist/compute/v1/generated/validators/refundPolicy.zod.d.ts +0 -30
  617. package/dist/compute/v1/generated/validators/refundPolicy.zod.js +0 -27
  618. package/dist/compute/v1/generated/validators/refundReason.zod.d.ts +0 -39
  619. package/dist/compute/v1/generated/validators/refundReason.zod.js +0 -39
  620. package/dist/compute/v1/generated/validators/renewRequest.zod.d.ts +0 -47
  621. package/dist/compute/v1/generated/validators/renewRequest.zod.js +0 -58
  622. package/dist/compute/v1/generated/validators/renewalOrderRequest.zod.d.ts +0 -41
  623. package/dist/compute/v1/generated/validators/renewalOrderRequest.zod.js +0 -41
  624. package/dist/compute/v1/generated/validators/renewalPrice.zod.d.ts +0 -46
  625. package/dist/compute/v1/generated/validators/renewalPrice.zod.js +0 -39
  626. package/dist/compute/v1/generated/validators/renewalPriceList.zod.d.ts +0 -53
  627. package/dist/compute/v1/generated/validators/renewalPriceList.zod.js +0 -30
  628. package/dist/compute/v1/generated/validators/scheduledChange.zod.d.ts +0 -50
  629. package/dist/compute/v1/generated/validators/scheduledChange.zod.js +0 -42
  630. package/dist/compute/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +0 -29
  631. package/dist/compute/v1/generated/validators/setProjectAssignmentRequest.zod.js +0 -27
  632. package/dist/compute/v1/generated/validators/spendRow.zod.d.ts +0 -38
  633. package/dist/compute/v1/generated/validators/spendRow.zod.js +0 -34
  634. package/dist/compute/v1/generated/validators/spendRowList.zod.d.ts +0 -47
  635. package/dist/compute/v1/generated/validators/spendRowList.zod.js +0 -33
  636. package/dist/compute/v1/generated/validators/statement.zod.d.ts +0 -55
  637. package/dist/compute/v1/generated/validators/statement.zod.js +0 -52
  638. package/dist/compute/v1/generated/validators/statementAmounts.zod.d.ts +0 -32
  639. package/dist/compute/v1/generated/validators/statementAmounts.zod.js +0 -31
  640. package/dist/compute/v1/generated/validators/statementItem.zod.d.ts +0 -35
  641. package/dist/compute/v1/generated/validators/statementItem.zod.js +0 -37
  642. package/dist/compute/v1/generated/validators/statementList.zod.d.ts +0 -62
  643. package/dist/compute/v1/generated/validators/statementList.zod.js +0 -30
  644. package/dist/compute/v1/generated/validators/statementStatus.zod.d.ts +0 -30
  645. package/dist/compute/v1/generated/validators/statementStatus.zod.js +0 -25
  646. package/dist/compute/v1/generated/validators/statementSummary.zod.d.ts +0 -51
  647. package/dist/compute/v1/generated/validators/statementSummary.zod.js +0 -35
  648. package/dist/compute/v1/generated/validators/statementType.zod.d.ts +0 -31
  649. package/dist/compute/v1/generated/validators/statementType.zod.js +0 -27
  650. package/dist/compute/v1/generated/validators/subscription.zod.d.ts +0 -151
  651. package/dist/compute/v1/generated/validators/subscription.zod.js +0 -113
  652. package/dist/compute/v1/generated/validators/subscriptionCancellation.zod.d.ts +0 -53
  653. package/dist/compute/v1/generated/validators/subscriptionCancellation.zod.js +0 -46
  654. package/dist/compute/v1/generated/validators/subscriptionList.zod.d.ts +0 -157
  655. package/dist/compute/v1/generated/validators/subscriptionList.zod.js +0 -30
  656. package/dist/compute/v1/generated/validators/taxItem.zod.d.ts +0 -37
  657. package/dist/compute/v1/generated/validators/taxItem.zod.js +0 -37
  658. package/dist/compute/v1/generated/validators/terminationPolicyA200529.zod.d.ts +0 -30
  659. package/dist/compute/v1/generated/validators/terminationPolicyA200529.zod.js +0 -26
  660. package/dist/compute/v1/generated/validators/terminationPolicyBfdab9f.zod.d.ts +0 -30
  661. package/dist/compute/v1/generated/validators/terminationPolicyBfdab9f.zod.js +0 -27
  662. package/dist/compute/v1/generated/validators/tier.zod.d.ts +0 -31
  663. package/dist/compute/v1/generated/validators/tier.zod.js +0 -33
  664. package/dist/compute/v1/generated/validators/topUp.zod.d.ts +0 -67
  665. package/dist/compute/v1/generated/validators/topUp.zod.js +0 -62
  666. package/dist/compute/v1/generated/validators/topUpCreate.zod.d.ts +0 -38
  667. package/dist/compute/v1/generated/validators/topUpCreate.zod.js +0 -50
  668. package/dist/compute/v1/generated/validators/topUpList.zod.d.ts +0 -74
  669. package/dist/compute/v1/generated/validators/topUpList.zod.js +0 -30
  670. package/dist/compute/v1/generated/validators/transaction.zod.d.ts +0 -70
  671. package/dist/compute/v1/generated/validators/transaction.zod.js +0 -64
  672. package/dist/compute/v1/generated/validators/transactionList.zod.d.ts +0 -77
  673. package/dist/compute/v1/generated/validators/transactionList.zod.js +0 -30
  674. package/dist/compute/v1/generated/validators/transactionType.zod.d.ts +0 -33
  675. package/dist/compute/v1/generated/validators/transactionType.zod.js +0 -27
  676. package/dist/compute/v1/generated/validators/usageCharge.zod.d.ts +0 -59
  677. package/dist/compute/v1/generated/validators/usageCharge.zod.js +0 -73
  678. package/dist/compute/v1/generated/validators/usageChargeList.zod.d.ts +0 -66
  679. package/dist/compute/v1/generated/validators/usageChargeList.zod.js +0 -30
  680. package/dist/compute/v1/generated/validators/withdrawal.zod.d.ts +0 -56
  681. package/dist/compute/v1/generated/validators/withdrawal.zod.js +0 -59
  682. package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.d.ts +0 -35
  683. package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.js +0 -33
  684. package/dist/compute/v1/generated/validators/withdrawalCreate.zod.d.ts +0 -41
  685. package/dist/compute/v1/generated/validators/withdrawalCreate.zod.js +0 -35
  686. package/dist/compute/v1/generated/validators/withdrawalItem.zod.d.ts +0 -62
  687. package/dist/compute/v1/generated/validators/withdrawalItem.zod.js +0 -53
  688. package/dist/compute/v1/generated/validators/withdrawalItemList.zod.d.ts +0 -64
  689. package/dist/compute/v1/generated/validators/withdrawalItemList.zod.js +0 -30
  690. package/dist/compute/v1/generated/validators/withdrawalList.zod.d.ts +0 -55
  691. package/dist/compute/v1/generated/validators/withdrawalList.zod.js +0 -30
  692. package/dist/compute/v1/generated/validators/withdrawalPreview.zod.d.ts +0 -56
  693. package/dist/compute/v1/generated/validators/withdrawalPreview.zod.js +0 -41
  694. package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +0 -44
  695. package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.js +0 -35
  696. package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +0 -31
  697. package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.js +0 -29
  698. package/dist/compute/v1/generated/validators/withdrawalSource.zod.d.ts +0 -39
  699. package/dist/compute/v1/generated/validators/withdrawalSource.zod.js +0 -39
@@ -901,16 +901,6 @@ export interface IPv4Binding {
901
901
  * Changing bandwidth updates this same resource, not another allocation.
902
902
  */
903
903
  export interface FloatingIPResource {
904
- /**
905
- * When the current or most recent address holding was allocated; null before an address is claimed.
906
- * @nullable
907
- */
908
- allocated_at: string | null;
909
- /**
910
- * When that address holding was released; null while held or before allocation.
911
- * @nullable
912
- */
913
- released_at: string | null;
914
904
  /**
915
905
  * The allocated public address. Null until the address is allocated.
916
906
  * @nullable
@@ -1633,10 +1623,21 @@ export interface RenamePrivateNetworkRequestBody {
1633
1623
  */
1634
1624
  name: string;
1635
1625
  }
1626
+ /**
1627
+ * `active` means IPv6 is fully available
1628
+ */
1629
+ export type IPv6ResponseBodyStatus = (typeof IPv6ResponseBodyStatus)[keyof typeof IPv6ResponseBodyStatus];
1630
+ export declare const IPv6ResponseBodyStatus: {
1631
+ readonly pending: "pending";
1632
+ readonly active: "active";
1633
+ readonly draining: "draining";
1634
+ };
1636
1635
  export interface IPv6ResponseBody {
1637
1636
  /** The allocated /64 prefix; empty while IPv6 is disabled */
1638
1637
  cidr: string;
1639
1638
  enabled: boolean;
1639
+ /** `active` means IPv6 is fully available */
1640
+ status: IPv6ResponseBodyStatus;
1640
1641
  }
1641
1642
  export interface RouteResource {
1642
1643
  /** System-owned peering route. Delete the peering to remove this route. */
@@ -1906,70 +1907,16 @@ export interface SetSnapshotQuotaRequestBody {
1906
1907
  proration_date?: string;
1907
1908
  }
1908
1909
  /**
1909
- * A draft is not yet issued. The draft invoice of an order shows base prices until it is paid, when
1910
- * the discount is applied and it is issued; other drafts are private to administrators.
1911
- * An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
1912
- * Unbilled usage remains separate from invoices until it is invoiced.
1913
- * A refund does not change the status: a paid invoice stays paid, with the refunded part in
1914
- * amount_refunded. void means collection has stopped and any funds received have been returned.
1915
- */
1916
- export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
1917
- export declare const InvoiceStatus: {
1918
- readonly draft: "draft";
1919
- readonly open: "open";
1920
- readonly paid: "paid";
1921
- readonly void: "void";
1922
- readonly uncollectible: "uncollectible";
1923
- };
1924
- /**
1925
- * Purchase-related invoice amounts, without account contact details or payment methods. Every order
1926
- * has an invoice from placement. A draft shows base prices until it is paid, when the discount is
1927
- * applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
1928
- * checkout mode. Neither establishes acceptance or delivery.
1929
- */
1930
- export interface InvoiceSummary {
1931
- id: string;
1932
- number?: string;
1933
- currency: string;
1934
- status: InvoiceStatus;
1935
- /**
1936
- * Sum of the line amounts before discounts. Where prices include tax, the tax contained in
1937
- * each line's discounted amount is taken out here, so that total = subtotal -
1938
- * discount_amount + tax_amount always holds.
1939
- */
1940
- subtotal: string;
1941
- /** Sum of the line discounts, taken off before tax. */
1942
- discount_amount: string;
1943
- tax_amount: string;
1944
- total: string;
1945
- amount_paid: string;
1946
- /** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
1947
- pre_payment_credit_notes_amount: Money;
1948
- /** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
1949
- post_payment_credit_notes_amount: Money;
1950
- /**
1951
- * What is still collectible after unpaid credit notes and successful payments; never below zero.
1952
- * @pattern ^\d+(\.\d{1,10})?$
1953
- */
1954
- amount_due: string;
1955
- amount_refunded: string;
1956
- due_at?: string;
1957
- }
1958
- /**
1959
- * The Billing order this purchase placed and its invoice as they stood at placement. Read the order and
1960
- * the invoice in Billing for current progress: the service starts delivery only after Billing accepts the
1961
- * order, and payment alone does not mean delivery has completed.
1910
+ * Identifies the purchase. Read the order for purchase progress and its invoice for amounts and payment status.
1962
1911
  */
1963
1912
  export interface PlacedOrder {
1964
- order_id: string;
1965
- /** The order's invoice, the same as invoice.id. */
1966
- invoice_id: string;
1967
1913
  /**
1968
- * What the purchase charges. A draft shows the base price in total and is paid through Billing, where a
1969
- * promotion code can still be applied; an open invoice is issued and awaits its amount_due; a paid one
1970
- * needs nothing further. A zero-total invoice is issued and paid at placement.
1914
+ * The invoice for this purchase, which may still be a draft awaiting checkout. Null when no invoice has been created. Its presence or absence does not establish whether delivery may begin.
1915
+ * @nullable
1971
1916
  */
1972
- invoice: InvoiceSummary;
1917
+ invoice_id: string | null;
1918
+ /** The order, including for purchases without an immediate charge. Payment alone does not imply that the service has completed delivery. */
1919
+ order_id: string;
1973
1920
  }
1974
1921
  export interface SetSnapshotQuotaResponseBody {
1975
1922
  snapshot_quota: SnapshotQuota;
@@ -2360,7 +2307,7 @@ export interface SetFloatingIPBandwidthQuoteRequestBody {
2360
2307
  * A line without an immediate charge has zero checkout amounts. unit_amount remains null when
2361
2308
  * no single unit price applies; an unrequested usage estimate remains null.
2362
2309
  */
2363
- export interface QuoteItemDc1fddb {
2310
+ export interface QuoteItem {
2364
2311
  plan_name: string;
2365
2312
  /**
2366
2313
  * Unit price before discounts, with tax included only where the price includes it. Null when
@@ -2401,7 +2348,7 @@ export interface QuoteItemDc1fddb {
2401
2348
  */
2402
2349
  export interface Quote {
2403
2350
  /** One line for each item the purchase would order, in the order it would order them. */
2404
- items: QuoteItemDc1fddb[];
2351
+ items: QuoteItem[];
2405
2352
  /**
2406
2353
  * Sum of line amounts before discounts, less tax already included in the discounted line
2407
2354
  * amounts, as on an invoice.
@@ -2531,3043 +2478,6 @@ export interface CursorPagination {
2531
2478
  /** @nullable */
2532
2479
  next_cursor?: string | null;
2533
2480
  }
2534
- export interface WithdrawalAllocation {
2535
- source_transaction_id: string;
2536
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2537
- amount: string;
2538
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2539
- fee_amount: string;
2540
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2541
- refund_amount: string;
2542
- }
2543
- export type WithdrawalItemStatus = (typeof WithdrawalItemStatus)[keyof typeof WithdrawalItemStatus];
2544
- export declare const WithdrawalItemStatus: {
2545
- readonly pending: "pending";
2546
- readonly succeeded: "succeeded";
2547
- readonly failed: "failed";
2548
- readonly reversed: "reversed";
2549
- };
2550
- /**
2551
- * 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.
2552
- */
2553
- export interface WithdrawalSource {
2554
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2555
- amount: string;
2556
- /**
2557
- * @minLength 3
2558
- * @maxLength 3
2559
- */
2560
- currency: string;
2561
- received_at: string;
2562
- payment_gateway: string;
2563
- method_type: string;
2564
- card_brand?: string;
2565
- /** @pattern ^[0-9]{4}$ */
2566
- card_last4?: string;
2567
- }
2568
- /**
2569
- * 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.
2570
- */
2571
- export interface WithdrawalItem {
2572
- source_transaction_id: string;
2573
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2574
- amount: string;
2575
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2576
- fee_amount: string;
2577
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2578
- refund_amount: string;
2579
- id: string;
2580
- withdrawal_id: string;
2581
- billing_account_id: number;
2582
- /**
2583
- * @minLength 3
2584
- * @maxLength 3
2585
- */
2586
- currency: string;
2587
- refund_id: string;
2588
- fee_transaction_id?: string;
2589
- status: WithdrawalItemStatus;
2590
- completed_at?: string;
2591
- payment_gateway: string;
2592
- method_type: string;
2593
- source: WithdrawalSource;
2594
- /** The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful. */
2595
- failure_code?: string;
2596
- }
2597
- export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
2598
- export declare const WithdrawalStatus: {
2599
- readonly pending: "pending";
2600
- readonly processing: "processing";
2601
- readonly succeeded: "succeeded";
2602
- readonly partially_completed: "partially_completed";
2603
- readonly failed: "failed";
2604
- readonly reversed: "reversed";
2605
- };
2606
- /**
2607
- * 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.
2608
- */
2609
- export interface Withdrawal {
2610
- id: string;
2611
- billing_account_id: number;
2612
- /**
2613
- * @minLength 3
2614
- * @maxLength 3
2615
- */
2616
- currency: string;
2617
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2618
- amount: string;
2619
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2620
- fee_amount: string;
2621
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2622
- refund_amount: string;
2623
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2624
- deducted_amount: string;
2625
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2626
- settled_amount: string;
2627
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2628
- charged_fee_amount: string;
2629
- status: WithdrawalStatus;
2630
- created_at: string;
2631
- completed_at?: string;
2632
- /** Identity that submitted this withdrawal. It can differ from the billing account owner. */
2633
- created_by?: string;
2634
- }
2635
- export interface WithdrawalPreviewItem {
2636
- source_transaction_id: string;
2637
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2638
- amount: string;
2639
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2640
- fee_amount: string;
2641
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2642
- refund_amount: string;
2643
- source: WithdrawalSource;
2644
- }
2645
- export interface WithdrawalPreview {
2646
- billing_account_id: number;
2647
- /**
2648
- * @minLength 3
2649
- * @maxLength 3
2650
- */
2651
- currency: string;
2652
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2653
- available_amount: string;
2654
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2655
- amount: string;
2656
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2657
- fee_amount: string;
2658
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2659
- refund_amount: string;
2660
- /** @maxItems 200 */
2661
- items: WithdrawalPreviewItem[];
2662
- }
2663
- export interface WithdrawalPreviewRequest {
2664
- billing_account_id: number;
2665
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2666
- amount?: string;
2667
- }
2668
- export interface WithdrawalCreate {
2669
- id: string;
2670
- billing_account_id: number;
2671
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2672
- amount: string;
2673
- /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
2674
- expected_refund_amount: string;
2675
- /**
2676
- * @minItems 1
2677
- * @maxItems 200
2678
- */
2679
- expected_items: WithdrawalAllocation[];
2680
- }
2681
- export interface WithdrawalList {
2682
- items: Withdrawal[];
2683
- pagination: OffsetPagination;
2684
- }
2685
- export interface WithdrawalItemList {
2686
- items: WithdrawalItem[];
2687
- pagination: OffsetPagination;
2688
- }
2689
- /**
2690
- * 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.
2691
- */
2692
- export type TerminationPolicyBfdab9f = (typeof TerminationPolicyBfdab9f)[keyof typeof TerminationPolicyBfdab9f];
2693
- export declare const TerminationPolicyBfdab9f: {
2694
- readonly immediate: "immediate";
2695
- readonly period_end: "period_end";
2696
- };
2697
- export type TerminationPolicyA200529 = TerminationPolicyBfdab9f;
2698
- /**
2699
- * none refunds nothing. prorated refunds the amount paid for the current period minus the value of
2700
- * the time used, never below zero and never more than what remains unrefunded. The time used runs
2701
- * from the period start to the effective cancellation time and is valued at the plan's
2702
- * shorter-period prices in the same currency, frozen at purchase as the order item's
2703
- * refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
2704
- * price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
2705
- * second. When the plan has no prepaid period shorter than the one bought, the time used is valued
2706
- * at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
2707
- * and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
2708
- * paid is refunded in the same proportion as the amount it was paid on.
2709
- */
2710
- export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
2711
- export declare const RefundPolicy: {
2712
- readonly none: "none";
2713
- readonly prorated: "prorated";
2714
- };
2715
- export interface OrderCancel {
2716
- /**
2717
- * Omit to select all still-pending items. Explicit selections name one or more items of this order; successful items cannot be reversed here.
2718
- * @minItems 1
2719
- * @maxItems 100
2720
- */
2721
- order_item_ids?: string[];
2722
- }
2723
- export type QuoteRenewalInterval = (typeof QuoteRenewalInterval)[keyof typeof QuoteRenewalInterval];
2724
- export declare const QuoteRenewalInterval: {
2725
- readonly day: "day";
2726
- readonly month: "month";
2727
- readonly year: "year";
2728
- };
2729
- /**
2730
- * Price renewing a prepaid subscription. Give `price_id`, or `interval` with
2731
- * `interval_count`, to renew for another term at the price currently sold for it. Naming
2732
- * the current term, or giving neither, renews at the agreed amount. A term sold at several
2733
- * prices that differ in termination policy is refused with 409
2734
- * `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `termination_policy` or `price_id` is given.
2735
- */
2736
- export interface QuoteRenewal {
2737
- subscription_id: string;
2738
- price_id?: string;
2739
- interval?: QuoteRenewalInterval;
2740
- /** @minimum 1 */
2741
- interval_count?: number;
2742
- /** With `interval` and `interval_count`, chooses among prices of that term that differ in termination policy. */
2743
- termination_policy?: TerminationPolicyBfdab9f;
2744
- /**
2745
- * How many consecutive periods to renew for.
2746
- * @minimum 1
2747
- * @maximum 100
2748
- */
2749
- periods?: number;
2750
- }
2751
- export type QuoteRenewalResultInterval = (typeof QuoteRenewalResultInterval)[keyof typeof QuoteRenewalResultInterval];
2752
- export declare const QuoteRenewalResultInterval: {
2753
- readonly day: "day";
2754
- readonly month: "month";
2755
- readonly year: "year";
2756
- };
2757
- /**
2758
- * What renewing would charge. Renewing the same subscription for the same term and number
2759
- * of periods charges exactly `total`, unless prices or the discounts the account holds
2760
- * change in between.
2761
- */
2762
- export interface QuoteRenewalResult {
2763
- /** Which renewal of the request this answers. */
2764
- index: number;
2765
- subscription_id: string;
2766
- /** The price the renewal is charged under. */
2767
- price_id: string;
2768
- interval: QuoteRenewalResultInterval;
2769
- interval_count: number;
2770
- periods: number;
2771
- /**
2772
- * The price of the periods before the discounts the account holds. A discount the
2773
- * subscription already carries is reflected here. Contains tax only where the price
2774
- * itself includes it.
2775
- */
2776
- amount: Money;
2777
- /** The reduction from a discount the account holds. */
2778
- discount_amount: Money;
2779
- /** Tax on the discounted amount. */
2780
- tax_amount: Money;
2781
- /** The part of `tax_amount` already contained in `amount`. */
2782
- tax_included_amount: Money;
2783
- /**
2784
- * What renewing would charge: `amount` less `discount_amount`, plus `tax_amount`, less
2785
- * `tax_included_amount`.
2786
- */
2787
- total: Money;
2788
- }
2789
- /**
2790
- * One fully calculated purchase, estimated postpaid usage or recorded order item. Amounts use the
2791
- * billing-account currency. An item with no immediate charge has zero checkout amounts.
2792
- */
2793
- export interface QuoteItem {
2794
- tax_amount: Money;
2795
- tax_included_amount: Money;
2796
- /**
2797
- * Zero-based request line index, or the recorded order item's position for an order quote.
2798
- * @minimum 0
2799
- */
2800
- index: number;
2801
- /** Present for an existing order quote; identifies the recorded item being priced. */
2802
- order_item_id?: string;
2803
- /** The selected price, including when the request identified it indirectly. */
2804
- price_id: string;
2805
- plan_name: string;
2806
- /** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
2807
- unit_amount: Money | null;
2808
- /** The quantity priced. When duration_seconds is supplied for metered usage, this is quantity multiplied by that duration. */
2809
- quantity: string;
2810
- /** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
2811
- amount: Money;
2812
- discount_amount: Money;
2813
- total: Money;
2814
- currency: string;
2815
- }
2816
- export type QuotedDiscountType = (typeof QuotedDiscountType)[keyof typeof QuotedDiscountType];
2817
- export declare const QuotedDiscountType: {
2818
- readonly promotion_code: "promotion_code";
2819
- readonly account_discount: "account_discount";
2820
- };
2821
- /**
2822
- * The discount selected for this calculation. Its presence in a quote does not apply it or
2823
- * reserve a redemption. Discount amounts are reported on the quote and its lines.
2824
- */
2825
- export interface QuotedDiscount {
2826
- type: QuotedDiscountType;
2827
- name: string;
2828
- /**
2829
- * Code text for a promotion_code discount; null for an account_discount.
2830
- * @minLength 1
2831
- * @maxLength 64
2832
- * @nullable
2833
- */
2834
- promotion_code: string | null;
2835
- }
2836
- /**
2837
- * Which object this is, together with what a person currently calls it.
2838
- *
2839
- * The name is for display. It is chosen by whoever owns the object, it changes, it is not unique
2840
- * between objects, and it may be empty when nobody has named it yet — so it must not be used to
2841
- * address, match or deduplicate anything. Addressing is by id.
2842
- *
2843
- * This differs from an identity carrying a lookup key: a lookup key is written once by an operator,
2844
- * is unique, and can be used to fetch the object. A name cannot.
2845
- */
2846
- export interface NamedIdentity {
2847
- id: string;
2848
- /** @maxLength 255 */
2849
- name: string;
2850
- }
2851
- export type CancellationRefundPreviewItemChargeType = (typeof CancellationRefundPreviewItemChargeType)[keyof typeof CancellationRefundPreviewItemChargeType];
2852
- export declare const CancellationRefundPreviewItemChargeType: {
2853
- readonly postpaid: "postpaid";
2854
- readonly prepaid: "prepaid";
2855
- readonly one_time: "one_time";
2856
- };
2857
- /**
2858
- * One subscription of the quoted cancellation. The amounts mean what they mean in the total.
2859
- */
2860
- export interface CancellationRefundPreviewItem {
2861
- subscription_id: string;
2862
- plan_id: string;
2863
- plan_name: string;
2864
- /**
2865
- * The project and its current name, for display. Absent for a purchase at account level, and when the
2866
- * project details cannot be read at the moment.
2867
- */
2868
- project?: NamedIdentity | null;
2869
- charge_type: CancellationRefundPreviewItemChargeType;
2870
- /**
2871
- * Whether automatic renewal is on now. Creating the cancellation turns it off. Withdrawing the
2872
- * cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
2873
- * until it is canceled and turns it back on.
2874
- */
2875
- auto_renew: boolean;
2876
- unused_amount: Money;
2877
- refundable_amount: Money;
2878
- refund_amount: Money;
2879
- credit_amount: Money;
2880
- tax_amount: Money;
2881
- forfeited_amount: Money;
2882
- }
2883
- /**
2884
- * What the cancellation would return, subscription by subscription and in total, as of now. Give
2885
- * `proration_date` and `refundable_amount` when creating the cancellation.
2886
- *
2887
- * - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
2888
- * time used, valued as refund policy `prorated` describes, whatever the refund terms say.
2889
- * - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
2890
- * `refund_amount` plus `credit_amount`.
2891
- * - `refund_amount`: the part returned to the balance or to the payment method.
2892
- * - `credit_amount`: the part restored to the credit grants that paid.
2893
- * - `tax_amount`: the tax included in `refundable_amount`.
2894
- * - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
2895
- *
2896
- * Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
2897
- */
2898
- export interface CancellationRefundPreview {
2899
- mode: TerminationPolicyBfdab9f;
2900
- /** For `period_end`, when release begins, the end of the paid terms. */
2901
- scheduled_at?: string;
2902
- /** For `immediate`, the second the refund is computed as of. Give it when creating the cancellation. */
2903
- proration_date?: string;
2904
- currency: string;
2905
- unused_amount: Money;
2906
- refundable_amount: Money;
2907
- refund_amount: Money;
2908
- credit_amount: Money;
2909
- tax_amount: Money;
2910
- forfeited_amount: Money;
2911
- items: CancellationRefundPreviewItem[];
2912
- }
2913
- /**
2914
- * An estimated refund to original payment sources. Before acceptance, cancellation returns the
2915
- * collected amount. For delivered service, only value funded by this order is included; renewals
2916
- * are evaluated under their own orders and the agreed termination terms apply. An unknown
2917
- * delivery outcome is not evidence that a refund is eligible. This calculation does not create
2918
- * a refund; the amount returned is determined when cancellation or termination is confirmed.
2919
- */
2920
- export interface OrderRefundQuote {
2921
- order_id: string;
2922
- refundable_amount: Money;
2923
- refund_amount: Money;
2924
- credit_amount: Money;
2925
- currency: string;
2926
- }
2927
- /**
2928
- * A complete calculation in one billing-account currency, without saving a quote or reserving funds or
2929
- * redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
2930
- * included in totals for reporting and are not collectible at checkout. Only an existing-order quote
2931
- * provides that order's checkout amount.
2932
- */
2933
- export interface Quote5f60d00 {
2934
- subtotal: Money;
2935
- discount_amount: Money;
2936
- tax_amount: Money;
2937
- /**
2938
- * The discount evaluated for a purchase or order, without applying it. Null when none is selected or
2939
- * when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
2940
- */
2941
- discount: QuotedDiscount | null;
2942
- items: QuoteItem[];
2943
- renewals: QuoteRenewalResult[];
2944
- /** What the cancellation requested would return. Present only when one was requested. */
2945
- cancellation?: CancellationRefundPreview;
2946
- total: Money;
2947
- currency: string;
2948
- /** Present only when an order refund was requested. Nothing is collectible for this target. */
2949
- refund?: OrderRefundQuote;
2950
- }
2951
- export type QuoteA200529 = Quote5f60d00;
2952
- /**
2953
- * A cancellation to quote: what ending these subscriptions together would return. One mode per
2954
- * request; to compare, quote `immediate` and `period_end` separately.
2955
- *
2956
- * Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
2957
- * canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
2958
- * paid change still waiting to switch (`meta.order_id`).
2959
- */
2960
- export interface QuoteCancellation {
2961
- /**
2962
- * The subscriptions to end together, all of one service. Every subscription released with a resource must be included.
2963
- * @minItems 1
2964
- * @maxItems 50
2965
- */
2966
- subscription_ids: string[];
2967
- mode: TerminationPolicyBfdab9f;
2968
- }
2969
- export interface CancellationCreate {
2970
- /**
2971
- * As in the quote.
2972
- * @minItems 1
2973
- * @maxItems 50
2974
- */
2975
- subscription_ids: string[];
2976
- mode: TerminationPolicyBfdab9f;
2977
- /**
2978
- * For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
2979
- * at most ten minutes old. The refund is computed as of it. Now when omitted.
2980
- */
2981
- proration_date?: string;
2982
- /** The `refundable_amount` of the quote. The cancellation is refused when the refund differs. */
2983
- expected_refundable_amount: Money & string;
2984
- /**
2985
- * A note from the account holder. It is kept with the cancellation and not shown elsewhere.
2986
- * @maxLength 1024
2987
- */
2988
- reason?: string;
2989
- }
2990
- export type CancellationStatus = (typeof CancellationStatus)[keyof typeof CancellationStatus];
2991
- export declare const CancellationStatus: {
2992
- readonly requested: "requested";
2993
- readonly scheduled: "scheduled";
2994
- readonly releasing: "releasing";
2995
- readonly completed: "completed";
2996
- readonly canceled: "canceled";
2997
- readonly failed: "failed";
2998
- };
2999
- /**
3000
- * Who asked for it. `project_deletion` means the project was deleted.
3001
- */
3002
- export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
3003
- export declare const CancellationOrigin: {
3004
- readonly customer: "customer";
3005
- readonly operator: "operator";
3006
- readonly project_deletion: "project_deletion";
3007
- };
3008
- /**
3009
- * How the subscription is charged. Creating the cancellation turned automatic renewal off;
3010
- * withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
3011
- * `prepaid` one.
3012
- */
3013
- export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
3014
- export declare const CancellationItemChargeType: {
3015
- readonly postpaid: "postpaid";
3016
- readonly prepaid: "prepaid";
3017
- readonly one_time: "one_time";
3018
- };
3019
- export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
3020
- export declare const CancellationItemStatus: {
3021
- readonly requested: "requested";
3022
- readonly scheduled: "scheduled";
3023
- readonly releasing: "releasing";
3024
- readonly completed: "completed";
3025
- readonly canceled: "canceled";
3026
- readonly failed: "failed";
3027
- };
3028
- /**
3029
- * One subscription of the cancellation.
3030
- */
3031
- export interface CancellationItem {
3032
- /** The cancellation item of this subscription, the same as `Subscription.cancellation.id`. */
3033
- id: string;
3034
- subscription_id: string;
3035
- plan_id: string;
3036
- plan_name: string;
3037
- /**
3038
- * How the subscription is charged. Creating the cancellation turned automatic renewal off;
3039
- * withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
3040
- * `prepaid` one.
3041
- */
3042
- charge_type: CancellationItemChargeType;
3043
- status: CancellationItemStatus;
3044
- /** Execution stopped or its result is unknown. Present while release still requires resolution; it does not establish refund eligibility. */
3045
- failure_code?: string;
3046
- release_started_at?: string;
3047
- /** When the service ended, as confirmed by the service that provides it. */
3048
- effective_at?: string;
3049
- /** Present with `completed`. The part of the refund returned to the account balance. */
3050
- balance_amount?: Money;
3051
- /** Present with `completed`. The part restored to the credit grants that paid. */
3052
- credit_amount?: Money;
3053
- /** Present with `completed`. The part returned to the payment method it was paid with. */
3054
- gateway_amount?: Money;
3055
- }
3056
- /**
3057
- * One cancellation of a set of subscriptions of one service, released together at one time.
3058
- *
3059
- * - `requested`: `immediate`, release has not begun.
3060
- * - `scheduled`: `period_end`, waiting for `scheduled_at`.
3061
- * - `releasing`: release has begun; it can no longer be withdrawn.
3062
- * - `completed`: every subscription has ended and its refund has been made.
3063
- * - `canceled`: withdrawn before release began; the subscriptions continue.
3064
- * - `failed`: the service could not carry it out, for the reason in `failure_code`; the
3065
- * subscriptions continue and can be canceled again.
3066
- */
3067
- export interface Cancellation {
3068
- id: string;
3069
- status: CancellationStatus;
3070
- mode: TerminationPolicyBfdab9f;
3071
- scheduled_at?: string;
3072
- /** For `immediate`, the second the refund is computed as of. */
3073
- proration_date?: string;
3074
- /** Who asked for it. `project_deletion` means the project was deleted. */
3075
- origin: CancellationOrigin;
3076
- /**
3077
- * The billing account that paid for these subscriptions when the cancellation was created: the
3078
- * account of an account-level purchase, or the account the project was linked to.
3079
- */
3080
- billing_account_id: number;
3081
- currency: string;
3082
- /** The refund confirmed when it was created. Absent when the platform created it. */
3083
- expected_refundable_amount?: Money;
3084
- /**
3085
- * Present with `failed`. A code of the service that provides the resources, such as a disk
3086
- * that can only be released with its server. Clients map it to their own wording.
3087
- */
3088
- failure_code?: string;
3089
- requested_at: string;
3090
- completed_at?: string;
3091
- canceled_at?: string;
3092
- items: CancellationItem[];
3093
- }
3094
- export interface CancellationList {
3095
- items: Cancellation[];
3096
- pagination: OffsetPagination;
3097
- }
3098
- export type SubscriptionCancellationStatus = (typeof SubscriptionCancellationStatus)[keyof typeof SubscriptionCancellationStatus];
3099
- export declare const SubscriptionCancellationStatus: {
3100
- readonly requested: "requested";
3101
- readonly scheduled: "scheduled";
3102
- readonly releasing: "releasing";
3103
- readonly failed: "failed";
3104
- readonly completed: "completed";
3105
- readonly canceled: "canceled";
3106
- };
3107
- export type SubscriptionCancellationMode = (typeof SubscriptionCancellationMode)[keyof typeof SubscriptionCancellationMode];
3108
- export declare const SubscriptionCancellationMode: {
3109
- readonly immediate: "immediate";
3110
- readonly period_end: "period_end";
3111
- };
3112
- /**
3113
- * The latest cancellation that includes the subscription, with this subscription's item. `id` is the
3114
- * item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
3115
- * confirmed end of service. A cancellation alone does not stop metering or issue a refund.
3116
- */
3117
- export interface SubscriptionCancellation {
3118
- reason?: string;
3119
- /** The cancellation this request belongs to, with the other subscriptions released together. */
3120
- cancellation_id?: string;
3121
- id: string;
3122
- subscription_id: string;
3123
- status: SubscriptionCancellationStatus;
3124
- mode: SubscriptionCancellationMode;
3125
- requested_at: string;
3126
- scheduled_at?: string;
3127
- effective_at?: string;
3128
- completed_at?: string;
3129
- release_started_at?: string;
3130
- canceled_at?: string;
3131
- forfeit_remaining_value: boolean;
3132
- failure_code?: string;
3133
- failure_reason?: string;
3134
- }
3135
- export type ErrorA200529 = Error;
3136
- /**
3137
- * Immutable platform service identifier, such as compute, canopy or assistant.
3138
- * @minLength 1
3139
- * @maxLength 64
3140
- * @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
3141
- */
3142
- export type ProductID = string;
3143
- export interface Product {
3144
- id: ProductID;
3145
- name: string;
3146
- description?: string;
3147
- }
3148
- export type BillingAccountStatus = (typeof BillingAccountStatus)[keyof typeof BillingAccountStatus];
3149
- export declare const BillingAccountStatus: {
3150
- readonly active: "active";
3151
- readonly suspended: "suspended";
3152
- readonly closed: "closed";
3153
- };
3154
- export interface BillingAccount {
3155
- /**
3156
- * The active contact used for invoicing. Must belong to this account; null clears the selection.
3157
- * @nullable
3158
- */
3159
- invoice_contact_id?: string | null;
3160
- id: number;
3161
- /** What you call this account. */
3162
- name?: string;
3163
- /** Fixed when the account was opened. */
3164
- currency: string;
3165
- status: BillingAccountStatus;
3166
- /**
3167
- * How far past the suspension threshold this account may go before its resources are
3168
- * suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
3169
- */
3170
- grace_amount?: string;
3171
- /**
3172
- * How long this account has to top up after crossing the suspension threshold.
3173
- * 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
3174
- */
3175
- grace_period_seconds?: number;
3176
- /**
3177
- * The actual time this account was closed, in UTC (RFC 3339).
3178
- * Null or absent if the account is not closed or its historical close time is unknown.
3179
- * @nullable
3180
- */
3181
- readonly closed_at?: string | null;
3182
- created_at: string;
3183
- }
3184
- /**
3185
- * A currency a billing account can be opened in.
3186
- */
3187
- export interface Currency {
3188
- /**
3189
- * ISO 4217 alpha-3, uppercase.
3190
- * @minLength 3
3191
- * @maxLength 3
3192
- */
3193
- code: string;
3194
- /**
3195
- * Decimal places of the currency, the ISO 4217 minor unit.
3196
- * @minimum 0
3197
- * @maximum 4
3198
- */
3199
- exponent: number;
3200
- /**
3201
- * @minLength 1
3202
- * @maxLength 64
3203
- */
3204
- name: string;
3205
- minimum_top_up: Money;
3206
- }
3207
- export interface CurrencyList {
3208
- items: Currency[];
3209
- pagination: OffsetPagination;
3210
- }
3211
- export interface BillingAccountCreate {
3212
- /**
3213
- * @minLength 3
3214
- * @maxLength 3
3215
- */
3216
- currency: string;
3217
- /** @maxLength 255 */
3218
- name?: string;
3219
- }
3220
- export interface BillingAccountUpdate {
3221
- /**
3222
- * The active contact used for invoicing. Must belong to this account; null clears the selection.
3223
- * @nullable
3224
- */
3225
- invoice_contact_id?: string | null;
3226
- /** @maxLength 255 */
3227
- name?: string;
3228
- }
3229
- export interface BillingAccountList {
3230
- items: BillingAccount[];
3231
- pagination: OffsetPagination;
3232
- }
3233
- /**
3234
- * A plan it refers to. active is false once the plan is archived; it still applies to subscriptions already on this plan.
3235
- */
3236
- export interface ApplicablePlan {
3237
- id: string;
3238
- name: string;
3239
- active: boolean;
3240
- }
3241
- /**
3242
- * A catalog object inlined for display.
3243
- */
3244
- export interface ObjectIdentity {
3245
- lookup_key?: string;
3246
- id: string;
3247
- name: string;
3248
- }
3249
- export type PriceOptionBillingScheme = (typeof PriceOptionBillingScheme)[keyof typeof PriceOptionBillingScheme];
3250
- export declare const PriceOptionBillingScheme: {
3251
- readonly per_unit: "per_unit";
3252
- readonly tiered: "tiered";
3253
- readonly rated: "rated";
3254
- };
3255
- export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
3256
- export declare const PriceOptionType: {
3257
- readonly postpaid: "postpaid";
3258
- readonly prepaid: "prepaid";
3259
- readonly one_time: "one_time";
3260
- };
3261
- export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
3262
- export declare const PriceOptionInterval: {
3263
- readonly none: "none";
3264
- readonly day: "day";
3265
- readonly month: "month";
3266
- readonly year: "year";
3267
- };
3268
- /**
3269
- * A price's display terms, including archived prices referenced by an applicability list.
3270
- */
3271
- export interface PriceOption {
3272
- product: Product;
3273
- plan: ObjectIdentity;
3274
- billing_scheme: PriceOptionBillingScheme;
3275
- unit_quantity: string;
3276
- id: string;
3277
- currency: string;
3278
- type: PriceOptionType;
3279
- interval: PriceOptionInterval;
3280
- /** How many periods one purchase covers. */
3281
- interval_count?: number;
3282
- unit_amount?: Money;
3283
- /** False once the price is archived. It still applies to purchases already made at this price. */
3284
- active: boolean;
3285
- }
3286
- /**
3287
- * Which purchase operation this applies to. `new` covers every new purchase, including
3288
- * zero-charge purchases. It does not mean the account's first purchase; use
3289
- * `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
3290
- * configuration or billing-term changes, including changes that increase or decrease
3291
- * the amount due and changes with no additional charge or refund.
3292
- */
3293
- export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
3294
- export declare const PurchaseOperation: {
3295
- readonly new: "new";
3296
- readonly renew: "renew";
3297
- readonly modify: "modify";
3298
- };
3299
- /**
3300
- * Anything not excluded that matches an inclusion, or anything not excluded when no inclusion is
3301
- * given, subject to the charge type, operation and term conditions. Entries always include their
3302
- * display fields; archived plans and prices stay listed with active set to false.
3303
- */
3304
- export interface Applicability {
3305
- products?: Product[];
3306
- plans?: ApplicablePlan[];
3307
- prices?: PriceOption[];
3308
- price_types?: string[];
3309
- operations?: PurchaseOperation[];
3310
- /**
3311
- * The shortest term a purchase may have, in months. A purchase with no term, such as
3312
- * metered usage, never qualifies while this is set.
3313
- */
3314
- min_term_months?: number;
3315
- /** The longest term a purchase may have, in months. */
3316
- max_term_months?: number;
3317
- excluded_products?: Product[];
3318
- excluded_plans?: ApplicablePlan[];
3319
- excluded_prices?: PriceOption[];
3320
- }
3321
- export interface CreditGroup {
3322
- /** What the credit in this group may pay for. No restrictions means anything on the account. */
3323
- applies_to: Applicability;
3324
- /** Restricted to your first purchase of anything it applies to. */
3325
- first_purchase_only?: boolean;
3326
- amount: Money;
3327
- }
3328
- /**
3329
- * Account balance, credits, and unpaid charges are reported separately.
3330
- */
3331
- export interface AccountBalance {
3332
- /** 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. */
3333
- available_credit: Money;
3334
- /** 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. */
3335
- estimated_credit_applied: Money;
3336
- /** Current estimate of rated usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
3337
- unbilled_amount: Money;
3338
- billing_account_id: number;
3339
- currency: string;
3340
- /**
3341
- * Prepaid funds in the account currency, excluding credits. May be negative after a payment
3342
- * dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
3343
- */
3344
- balance: Money;
3345
- /**
3346
- * The recorded remaining credit, including restricted grants. It is not withdrawable
3347
- * and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
3348
- * credits balance does not imply that due is zero.
3349
- */
3350
- credits: Money;
3351
- /** Currently valid credit whose use has applicable product, operation or eligibility conditions. Included in credits, separate from the balance. */
3352
- restricted_credits: Money;
3353
- /**
3354
- * Currently valid, unspent credit grouped by permitted use. Restrictions and
3355
- * validity dates determine which charges a group can cover, so these groups are not a general
3356
- * spendable balance and may differ from the recorded credits total.
3357
- */
3358
- credit_groups: CreditGroup[];
3359
- /** 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. */
3360
- due: Money;
3361
- pending_returns_amount: Money;
3362
- }
3363
- /**
3364
- * 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.
3365
- */
3366
- export interface ProjectAssignment {
3367
- project_id: string;
3368
- /**
3369
- * The project and its current name, for display. Absent when the project no longer exists or its
3370
- * details cannot be read at the moment; `project_id` still identifies it.
3371
- */
3372
- project?: NamedIdentity | null;
3373
- billing_account_id: number;
3374
- account_name?: string;
3375
- currency: string;
3376
- effective_from: string;
3377
- /** @nullable */
3378
- effective_to?: string | null;
3379
- }
3380
- export interface ProjectAssignmentList {
3381
- items: ProjectAssignment[];
3382
- pagination: OffsetPagination;
3383
- }
3384
- export interface SetProjectAssignmentRequest {
3385
- billing_account_id: number;
3386
- }
3387
- /**
3388
- * `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
3389
- *
3390
- * `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
3391
- * and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
3392
- * `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
3393
- * says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
3394
- * payment.
3395
- *
3396
- * `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
3397
- * attempt, the amount is credited as a separate `succeeded` top-up.
3398
- */
3399
- export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
3400
- export declare const TopUpStatus: {
3401
- readonly pending: "pending";
3402
- readonly succeeded: "succeeded";
3403
- readonly failed: "failed";
3404
- readonly canceled: "canceled";
3405
- };
3406
- export interface AccountIdentity {
3407
- id: number;
3408
- name: string;
3409
- currency: string;
3410
- }
3411
- /**
3412
- * Why a gateway payment was withdrawn. `abandoned` means the customer did not complete it within the time
3413
- * allowed for payment. `requested_by_customer` means the customer canceled it.
3414
- */
3415
- export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
3416
- export declare const PaymentCancellationReason: {
3417
- readonly abandoned: "abandoned";
3418
- readonly requested_by_customer: "requested_by_customer";
3419
- };
3420
- export type PaymentActionType = (typeof PaymentActionType)[keyof typeof PaymentActionType];
3421
- export declare const PaymentActionType: {
3422
- readonly redirect: "redirect";
3423
- readonly qr_code: "qr_code";
3424
- readonly sdk: "sdk";
3425
- };
3426
- /**
3427
- * The customer's next interaction. The gateway reports the actual payment outcome separately.
3428
- */
3429
- export interface PaymentAction {
3430
- type: PaymentActionType;
3431
- /** Identifies the browser adapter for an SDK action, for example stripe. */
3432
- provider?: string;
3433
- url?: string;
3434
- /** QR content to render and scan, not an image URL. */
3435
- qr_code?: string;
3436
- /** Short-lived client credential for this payment's browser confirmation. */
3437
- client_secret?: string;
3438
- public_key?: string;
3439
- }
3440
- /**
3441
- * 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.
3442
- */
3443
- export interface TopUp {
3444
- id: string;
3445
- billing_account_id: number;
3446
- account: AccountIdentity;
3447
- /** What is credited to the account, in the account's own currency. */
3448
- amount: Money;
3449
- currency: string;
3450
- /**
3451
- * The part of this top-up still held in the balance. Pending refunds can temporarily
3452
- * reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
3453
- */
3454
- remaining_amount?: Money;
3455
- /**
3456
- * `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
3457
- *
3458
- * `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
3459
- * and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
3460
- * `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
3461
- * says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
3462
- * payment.
3463
- *
3464
- * `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
3465
- * attempt, the amount is credited as a separate `succeeded` top-up.
3466
- */
3467
- status: TopUpStatus;
3468
- cancellation_reason?: PaymentCancellationReason;
3469
- /** Which payment gateway collected it. */
3470
- payment_gateway?: string;
3471
- /** The selected payment method, such as card, wechat_pay or alipay. */
3472
- method_type?: string;
3473
- /**
3474
- * The currency the customer was actually charged in, when the checkout page collected a
3475
- * local one. Absent when it was the same as the account's.
3476
- */
3477
- presentment_currency?: string;
3478
- /**
3479
- * What was charged, in `presentment_currency`. It will not equal `amount`, and it is
3480
- * the figure that appears on the customer's card or wallet statement.
3481
- */
3482
- presentment_amount?: Money;
3483
- /**
3484
- * Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
3485
- * passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
3486
- * such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
3487
- * such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
3488
- * to their own wording and treat an unknown value as a generic decline.
3489
- */
3490
- failure_reason?: string;
3491
- action?: PaymentAction;
3492
- created_at: string;
3493
- /**
3494
- * When the funds arrived. Later than `created_at` — by days for a bank transfer — so
3495
- * reconciling against a statement uses this rather than the moment it was started.
3496
- * Absent until the payment completes.
3497
- * @nullable
3498
- */
3499
- settled_at?: string | null;
3500
- }
3501
- export interface TopUpCreate {
3502
- /**
3503
- * The gateway explicitly selected from the available payment options.
3504
- * @minLength 1
3505
- * @maxLength 32
3506
- */
3507
- payment_gateway: string;
3508
- /**
3509
- * The selected method, such as card, wechat_pay or alipay.
3510
- * @minLength 1
3511
- * @maxLength 64
3512
- */
3513
- method_type: string;
3514
- /** The ID of this top-up attempt. Keep it before submitting and query it after an uncertain response. */
3515
- id: string;
3516
- billing_account_id: number;
3517
- /**
3518
- * In the account's currency, and no finer than that currency's smallest unit:
3519
- * two decimals for most, none for the yen. A finer amount is refused here rather
3520
- * than at the checkout page, where the customer would see the gateway's own wording
3521
- * instead of an explanation.
3522
- *
3523
- * There is a minimum, which differs by currency. Below it the gateway's fee
3524
- * exceeds the top-up itself, so such a payment costs more to accept than it brings.
3525
- * The minimum in force is returned with the rejection.
3526
- */
3527
- amount: Money & string;
3528
- /** Charge a saved method instead of opening a checkout page. */
3529
- payment_method_id?: string;
3530
- /** Where to send the customer after checkout. */
3531
- return_url?: string;
3532
- }
3533
- export interface TopUpList {
3534
- items: TopUp[];
3535
- pagination: OffsetPagination;
3536
- }
3537
- export interface PaymentOptionMethod {
3538
- /** The value to send as `method_type`, such as card, wechat_pay or alipay. */
3539
- method_type: string;
3540
- /**
3541
- * Whether a method of this type can be saved with create-payment-method-setup and charged later
3542
- * without the customer present. Methods that are not reusable are paid anew each time.
3543
- */
3544
- reusable: boolean;
3545
- }
3546
- /**
3547
- * A payment gateway that accepts payment in the account's currency, with the methods it accepts.
3548
- */
3549
- export interface PaymentOption {
3550
- /** The value to send as `payment_gateway`. */
3551
- payment_gateway: string;
3552
- methods: PaymentOptionMethod[];
3553
- }
3554
- export interface PaymentOptionList {
3555
- items: PaymentOption[];
3556
- pagination: OffsetPagination;
3557
- }
3558
- export type PaymentMethodStatus = (typeof PaymentMethodStatus)[keyof typeof PaymentMethodStatus];
3559
- export declare const PaymentMethodStatus: {
3560
- readonly active: "active";
3561
- readonly expired: "expired";
3562
- readonly removed: "removed";
3563
- };
3564
- export interface PaymentMethod {
3565
- id: string;
3566
- billing_account_id: number;
3567
- payment_gateway: string;
3568
- brand?: string;
3569
- last4?: string;
3570
- /** @nullable */
3571
- exp_month?: number | null;
3572
- /** @nullable */
3573
- exp_year?: number | null;
3574
- is_default: boolean;
3575
- status: PaymentMethodStatus;
3576
- }
3577
- export interface PaymentMethodList {
3578
- items: PaymentMethod[];
3579
- pagination: OffsetPagination;
3580
- }
3581
- export interface PaymentMethodSetup {
3582
- /**
3583
- * The selected gateway supporting saved payment methods.
3584
- * @minLength 1
3585
- * @maxLength 32
3586
- */
3587
- payment_gateway: string;
3588
- billing_account_id: number;
3589
- }
3590
- /**
3591
- * What the payment gateway's browser library needs in order to collect a card. There is
3592
- * no address to redirect to: the form is rendered in the page, and the card goes straight
3593
- * from the browser to the gateway.
3594
- */
3595
- export interface PaymentMethodSetupResult {
3596
- /**
3597
- * The gateway's identifier for this attempt. Use it to tell a reloaded page apart
3598
- * from a second attempt.
3599
- */
3600
- setup_id: string;
3601
- payment_gateway: string;
3602
- action: PaymentAction;
3603
- }
3604
- /**
3605
- * Applies eligible credit grants and the available balance as requested, then collects only the remainder
3606
- * through the selected gateway. Grants restricted to other purchases are not counted as available funds.
3607
- * An unresolved channel payment is reused; retries do not apply the grant or balance portions twice.
3608
- * Without a gateway selection, insufficient account funds fail without starting an online payment.
3609
- *
3610
- * `payment_gateway` and `method_type` are given together, and `payment_method_id` only with both;
3611
- * otherwise the request is refused with `BILLING_PURCHASE_INVALID`.
3612
- */
3613
- export interface PayInvoiceRequest {
3614
- /**
3615
- * Required to collect an online remainder. An existing attempt keeps its original gateway.
3616
- * @minLength 1
3617
- * @maxLength 32
3618
- */
3619
- payment_gateway?: string;
3620
- /**
3621
- * Required with payment_gateway; for example card, wechat_pay or alipay.
3622
- * @minLength 1
3623
- * @maxLength 64
3624
- */
3625
- method_type?: string;
3626
- /** Optional saved card owned by this billing account and belonging to the selected gateway. Omit to complete payment interactively. */
3627
- payment_method_id?: string;
3628
- /** Whether to apply the available balance. Credit grants are controlled separately by use_credits. */
3629
- use_balance?: boolean;
3630
- /** Apply eligible, unexpired credit grants before using the balance. This never withdraws grants or converts them into balance. */
3631
- use_credits?: boolean;
3632
- return_url?: string;
3633
- /**
3634
- * The code to apply while the order's terms are not yet fixed. Omit to apply the best applicable
3635
- * account discount, or to keep the discount already recorded.
3636
- * @minLength 1
3637
- * @maxLength 64
3638
- */
3639
- promotion_code?: string;
3640
- /**
3641
- * The invoice total to expect, after discounts and tax and before credit grants or balance, as the
3642
- * payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
3643
- * and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
3644
- */
3645
- expected_amount?: Money & string;
3646
- }
3647
- /**
3648
- * Name at least one invoice or order. They must all belong to the same account and share
3649
- * its currency; anything else is refused rather than partly paid.
3650
- */
3651
- export interface PayTogetherRequest {
3652
- /** @maxItems 100 */
3653
- invoice_ids?: string[];
3654
- /** @maxItems 100 */
3655
- order_ids?: string[];
3656
- /**
3657
- * The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
3658
- * gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
3659
- * the comparison.
3660
- */
3661
- expected_amount?: Money & string;
3662
- }
3663
- /**
3664
- * The current payment outcome.
3665
- *
3666
- * succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
3667
- * order rather than submitting another payment. requires_action means the customer must complete the
3668
- * supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
3669
- * declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
3670
- * same or another method.
3671
- */
3672
- export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
3673
- export declare const PaymentStatus: {
3674
- readonly succeeded: "succeeded";
3675
- readonly processing: "processing";
3676
- readonly requires_action: "requires_action";
3677
- readonly failed: "failed";
3678
- };
3679
- /**
3680
- * A credit grant and what it would pay.
3681
- */
3682
- export interface AppliedCredit {
3683
- credit_grant_id: string;
3684
- name: string;
3685
- amount: Money;
3686
- }
3687
- export interface PaymentPreviewInvoice {
3688
- invoice_id: string;
3689
- /** @nullable */
3690
- order_id?: string | null;
3691
- amount_due: Money;
3692
- credit_applied: Money;
3693
- balance_applied: Money;
3694
- }
3695
- /**
3696
- * What paying would take, computed as paying computes it. Nothing is charged or reserved.
3697
- */
3698
- export interface PaymentPreview {
3699
- currency: string;
3700
- /** What is outstanding before paying. */
3701
- amount_due: Money;
3702
- /** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
3703
- credit_applied: Money;
3704
- /** The credit grants that would pay, in the order they would be used. */
3705
- credit_grants: AppliedCredit[];
3706
- /** What the balance would pay. */
3707
- balance_applied: Money;
3708
- /** What would remain to be paid online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
3709
- gateway_amount: Money;
3710
- /** The available balance after paying. */
3711
- balance_after: Money;
3712
- /** Paying together only. Each invoice, in the order it would be paid. */
3713
- invoices?: PaymentPreviewInvoice[];
3714
- }
3715
- /**
3716
- * Present on refunds. Where this part of the refund goes.
3717
- *
3718
- * - `balance`: back to the account balance.
3719
- * - `credit`: back to the credit grant that paid, which keeps its original expiry.
3720
- * - `gateway`: back to the payment method it was paid with.
3721
- */
3722
- export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
3723
- export declare const TransactionRefundDestination: {
3724
- readonly balance: "balance";
3725
- readonly credit: "credit";
3726
- readonly gateway: "gateway";
3727
- };
3728
- /**
3729
- * `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
3730
- * it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
3731
- * an invoice the payment was meant to pay remains open for another payment.
3732
- */
3733
- export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
3734
- export declare const TransactionStatus: {
3735
- readonly pending: "pending";
3736
- readonly succeeded: "succeeded";
3737
- readonly failed: "failed";
3738
- readonly canceled: "canceled";
3739
- };
3740
- /**
3741
- * topup adds to the balance; payment settles an invoice; refund returns original funds; adjustment changes the balance with an audit reason.
3742
- */
3743
- export type TransactionType = (typeof TransactionType)[keyof typeof TransactionType];
3744
- export declare const TransactionType: {
3745
- readonly topup: "topup";
3746
- readonly payment: "payment";
3747
- readonly refund: "refund";
3748
- readonly adjustment: "adjustment";
3749
- readonly fee: "fee";
3750
- };
3751
- /**
3752
- * 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.
3753
- */
3754
- export interface Transaction {
3755
- invoice_id?: string;
3756
- transaction_id?: string;
3757
- /** The credit grant that paid, or for a refund, the credit grant restored. */
3758
- credit_grant_id?: string;
3759
- credit_grant?: ObjectIdentity;
3760
- refund_id?: string;
3761
- /**
3762
- * Present on refunds. Where this part of the refund goes.
3763
- *
3764
- * - `balance`: back to the account balance.
3765
- * - `credit`: back to the credit grant that paid, which keeps its original expiry.
3766
- * - `gateway`: back to the payment method it was paid with.
3767
- */
3768
- refund_destination?: TransactionRefundDestination;
3769
- /**
3770
- * `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
3771
- * it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
3772
- * an invoice the payment was meant to pay remains open for another payment.
3773
- */
3774
- status?: TransactionStatus;
3775
- cancellation_reason?: PaymentCancellationReason;
3776
- payment_gateway?: string;
3777
- method_type?: string;
3778
- /**
3779
- * Why it failed. Present with `failed`. For a declined gateway payment the value is the
3780
- * gateway's own code, passed on unchanged: the card issuer's decline code when there is one
3781
- * (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
3782
- * error code (Stripe's code, such as card_declined, expired_card or
3783
- * payment_intent_authentication_failure). Clients map it to their own wording and treat an
3784
- * unknown value as a generic decline.
3785
- */
3786
- failure_reason?: string;
3787
- settled_at?: string;
3788
- id: string;
3789
- billing_account_id?: number;
3790
- type: TransactionType;
3791
- /**
3792
- * Signed by type: positive for `topup` and `payment`, negative for `refund`.
3793
- * An `adjustment` is positive when it adds to the balance and negative when it takes from
3794
- * it. For the other types the sign does not tell the effect on the balance: a payment from
3795
- * the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
3796
- */
3797
- amount: Money;
3798
- /**
3799
- * How much of this transaction is still available in the balance. Only top-ups, positive
3800
- * adjustments and gateway payments later returned to the balance can be non-zero.
3801
- */
3802
- remaining_amount: Money;
3803
- currency: string;
3804
- reason?: string;
3805
- created_at: string;
3806
- }
3807
- export interface PaymentResult {
3808
- transactions: Transaction[];
3809
- /** The gateway transaction, when one is involved. Balance and credit-grant payments are separate transactions. */
3810
- transaction_id?: string;
3811
- status: PaymentStatus;
3812
- amount_paid: Money;
3813
- /**
3814
- * What is still outstanding. Zero once the payment succeeds. Unchanged while
3815
- * `processing`: nothing is collected until the gateway confirms it.
3816
- */
3817
- amount_due: Money;
3818
- currency: string;
3819
- credit_applied?: Money;
3820
- gateway_amount?: Money;
3821
- payment_gateway?: string;
3822
- method_type?: string;
3823
- /**
3824
- * The amount already paid from the account's balance toward this invoice. Retrying an online remainder
3825
- * does not debit it again. A canceled purchase returns funds through its refund process.
3826
- */
3827
- balance_applied?: Money;
3828
- action?: PaymentAction;
3829
- /**
3830
- * Whether paying again is worth attempting. False for a refusal that will keep
3831
- * happening — a closed account, an amount over a limit — so that a client does not
3832
- * retry in a loop.
3833
- */
3834
- retriable?: boolean;
3835
- /** @nullable */
3836
- invoice_id?: string | null;
3837
- /** @nullable */
3838
- order_id?: string | null;
3839
- /**
3840
- * Why the payment did not go through. Present with `failed`. For a declined gateway payment the
3841
- * value is the gateway's own code, passed on unchanged: the card issuer's decline code when
3842
- * there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
3843
- * gateway's error code (Stripe's code, such as card_declined, expired_card or
3844
- * payment_intent_authentication_failure). Clients map it to their own wording and treat an
3845
- * unknown value as a generic decline.
3846
- */
3847
- failure_reason?: string;
3848
- }
3849
- /**
3850
- * How tax applied to the customer when the invoice was issued. `reverse` means no tax was
3851
- * charged because the customer accounts for it under the reverse-charge mechanism.
3852
- */
3853
- export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
3854
- export declare const InvoiceCustomerTaxExempt: {
3855
- readonly none: "none";
3856
- readonly exempt: "exempt";
3857
- readonly reverse: "reverse";
3858
- };
3859
- /**
3860
- * Tax name, rate and amounts frozen on the invoice.
3861
- */
3862
- export interface TaxItem {
3863
- id: string;
3864
- invoice_id: string;
3865
- name: string;
3866
- percentage: string;
3867
- country: string;
3868
- state?: string;
3869
- taxable_amount: string;
3870
- tax_amount: string;
3871
- currency: string;
3872
- }
3873
- export interface Invoice {
3874
- /** Collection has been stopped; any accepted return obligations are completed before final voiding. */
3875
- void_requested_at?: string;
3876
- due_at?: string;
3877
- amount_refunded?: string;
3878
- tax_items: TaxItem[];
3879
- id: string;
3880
- billing_account_id: number;
3881
- /** Numbered per account and per month. */
3882
- number: string;
3883
- currency: string;
3884
- status: InvoiceStatus;
3885
- /**
3886
- * Sum of the line amounts before discounts. Where prices include tax, the tax contained in
3887
- * each line's discounted amount is taken out here, so that total = subtotal -
3888
- * discount_amount + tax_amount always holds.
3889
- */
3890
- subtotal?: Money;
3891
- /** Sum of the line discounts, taken off before tax. */
3892
- discount_amount?: Money;
3893
- tax_amount?: Money;
3894
- /** Successful credit-grant payments included in amount_paid. Does not reduce the receivable or tax base. */
3895
- credit_applied?: Money;
3896
- /** Subtotal less discount plus tax. Balance and credit grants are payment sources, not reductions of the receivable. */
3897
- total: Money;
3898
- amount_paid?: Money;
3899
- /** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
3900
- pre_payment_credit_notes_amount: Money;
3901
- /** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
3902
- post_payment_credit_notes_amount: Money;
3903
- /** 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. */
3904
- amount_due: Money;
3905
- /** @nullable */
3906
- period_start?: string | null;
3907
- /**
3908
- * Exclusive.
3909
- * @nullable
3910
- */
3911
- period_end?: string | null;
3912
- /**
3913
- * Who this was billed to, as recorded when the invoice was issued. Later changes to
3914
- * the account do not alter it.
3915
- */
3916
- customer_name?: string;
3917
- customer_email?: string;
3918
- customer_tax_id?: string;
3919
- /**
3920
- * How tax applied to the customer when the invoice was issued. `reverse` means no tax was
3921
- * charged because the customer accounts for it under the reverse-charge mechanism.
3922
- */
3923
- customer_tax_exempt?: InvoiceCustomerTaxExempt;
3924
- customer_address_line1?: string;
3925
- customer_address_line2?: string;
3926
- customer_address_city?: string;
3927
- customer_address_state?: string;
3928
- customer_address_postal_code?: string;
3929
- customer_address_country?: string;
3930
- /** @nullable */
3931
- paid_at?: string | null;
3932
- }
3933
- export interface InvoiceList {
3934
- items: Invoice[];
3935
- pagination: OffsetPagination;
3936
- }
3937
- export type InvoiceItemType = (typeof InvoiceItemType)[keyof typeof InvoiceItemType];
3938
- export declare const InvoiceItemType: {
3939
- readonly usage: "usage";
3940
- readonly subscription: "subscription";
3941
- readonly one_time: "one_time";
3942
- readonly setup: "setup";
3943
- readonly adjustment: "adjustment";
3944
- };
3945
- export interface InvoiceItem {
3946
- taxable?: boolean;
3947
- /** Discount applied to this line before tax. */
3948
- discount_amount?: string;
3949
- /**
3950
- * The account discount applied to this line.
3951
- * @nullable
3952
- */
3953
- discount_id?: string | null;
3954
- /**
3955
- * The coupon applied to this line.
3956
- * @nullable
3957
- */
3958
- coupon_id?: string | null;
3959
- /** Tax on the discounted line, including tax already included in the price. */
3960
- tax_amount?: string;
3961
- /** The part of tax_amount already included in amount. */
3962
- tax_included_amount?: string;
3963
- id: string;
3964
- type?: InvoiceItemType;
3965
- /** @nullable */
3966
- project_id?: string | null;
3967
- /**
3968
- * The project the charge was for and its current name, for display. Absent when the line is
3969
- * not for a project, and when the project no longer exists or its details cannot be read at
3970
- * the moment; `project_id` still identifies it then.
3971
- */
3972
- project?: NamedIdentity | null;
3973
- resource_id?: string;
3974
- /**
3975
- * The wording as recorded when the invoice was issued. It is not re-translated
3976
- * afterwards, so that an invoice continues to read as it did when it was sent.
3977
- */
3978
- description: string;
3979
- unit?: string;
3980
- quantity?: string;
3981
- /** The part covered by an included allowance, and therefore not charged. */
3982
- deducted_quantity?: string;
3983
- unit_amount?: Money;
3984
- amount: Money;
3985
- currency: string;
3986
- /** @nullable */
3987
- period_start?: string | null;
3988
- /** @nullable */
3989
- period_end?: string | null;
3990
- }
3991
- export interface InvoiceItemList {
3992
- items: InvoiceItem[];
3993
- pagination: OffsetPagination;
3994
- }
3995
- export interface TransactionList {
3996
- items: Transaction[];
3997
- pagination: OffsetPagination;
3998
- }
3999
- export type CreditGrantStatus = (typeof CreditGrantStatus)[keyof typeof CreditGrantStatus];
4000
- export declare const CreditGrantStatus: {
4001
- readonly active: "active";
4002
- readonly depleted: "depleted";
4003
- readonly expired: "expired";
4004
- readonly voided: "voided";
4005
- };
4006
- export interface CreditGrant {
4007
- min_amount?: string;
4008
- id: string;
4009
- billing_account_id?: number;
4010
- name: string;
4011
- amount: Money;
4012
- remaining_amount: Money;
4013
- currency: string;
4014
- /** What this credit may pay for. No restrictions means anything on the account. */
4015
- applies_to: Applicability;
4016
- /** Restricted to your first purchase of anything it applies to. */
4017
- first_purchase_only?: boolean;
4018
- status: CreditGrantStatus;
4019
- valid_from: string;
4020
- /** @nullable */
4021
- valid_until?: string | null;
4022
- }
4023
- export interface CreditGrantList {
4024
- items: CreditGrant[];
4025
- pagination: OffsetPagination;
4026
- }
4027
- export type CreditNoteStatus = (typeof CreditNoteStatus)[keyof typeof CreditNoteStatus];
4028
- export declare const CreditNoteStatus: {
4029
- readonly issued: "issued";
4030
- readonly void: "void";
4031
- };
4032
- /**
4033
- * Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
4034
- * `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
4035
- * issued by Leaflow on request.
4036
- */
4037
- export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
4038
- export declare const CreditNoteReason: {
4039
- readonly provisioning_failed: "provisioning_failed";
4040
- readonly order_expired: "order_expired";
4041
- readonly order_canceled: "order_canceled";
4042
- readonly change_canceled: "change_canceled";
4043
- readonly change_expired: "change_expired";
4044
- readonly subscription_canceled: "subscription_canceled";
4045
- readonly usage_true_up: "usage_true_up";
4046
- readonly operator: "operator";
4047
- };
4048
- /**
4049
- * 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.
4050
- */
4051
- export interface CreditNote {
4052
- id: string;
4053
- invoice_id: string;
4054
- currency: string;
4055
- issued_at: string;
4056
- status: CreditNoteStatus;
4057
- /**
4058
- * When this note was voided; null while issued.
4059
- * @nullable
4060
- */
4061
- voided_at: string | null;
4062
- /** The reduction of unpaid receivables. A void note no longer reduces what is due. */
4063
- pre_payment_amount: Money;
4064
- /** The credited part of payments already received. This is not proof that its refund has completed. */
4065
- post_payment_amount: Money;
4066
- /**
4067
- * The refund to the original payment sources, or null when no paid amount was credited.
4068
- * @nullable
4069
- */
4070
- refund_id: string | null;
4071
- /**
4072
- * Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
4073
- * `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
4074
- * issued by Leaflow on request.
4075
- */
4076
- reason: CreditNoteReason;
4077
- }
4078
- export interface CreditNoteItem {
4079
- id: string;
4080
- credit_note_id: string;
4081
- invoice_item_id: string;
4082
- pre_payment_amount: Money;
4083
- post_payment_amount: Money;
4084
- }
4085
- export interface CreditNoteList {
4086
- items: CreditNote[];
4087
- pagination: OffsetPagination;
4088
- }
4089
- export interface CreditNoteItemList {
4090
- items: CreditNoteItem[];
4091
- pagination: OffsetPagination;
4092
- }
4093
- /**
4094
- * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
4095
- * @deprecated
4096
- */
4097
- export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
4098
- export declare const RefundDestination: {
4099
- readonly balance: "balance";
4100
- readonly gateway: "gateway";
4101
- };
4102
- /**
4103
- * Summary of the parts in `transactions`.
4104
- *
4105
- * - `pending`: nothing has been returned yet, and at least one part is in progress.
4106
- * - `processing`: some parts have been returned, and at least one is still in progress.
4107
- * - `succeeded`: every part has been returned.
4108
- * - `failed`: no part is in progress and at least one has failed. What was returned is in
4109
- * settled_amount.
4110
- *
4111
- * Returns to the balance and to credit grants complete shortly after the refund is made; a
4112
- * return to a payment method completes when the gateway confirms it.
4113
- */
4114
- export type RefundStatus = (typeof RefundStatus)[keyof typeof RefundStatus];
4115
- export declare const RefundStatus: {
4116
- readonly pending: "pending";
4117
- readonly processing: "processing";
4118
- readonly succeeded: "succeeded";
4119
- readonly failed: "failed";
4120
- };
4121
- /**
4122
- * Why the refund was made. Clients map the code to their own wording. More codes may be added;
4123
- * treat an unknown code as a refund without a stated reason.
4124
- *
4125
- * - `provisioning_failed`: the purchase could not be delivered.
4126
- * - `order_expired`: the order expired after part of it had been paid.
4127
- * - `order_canceled`: the account holder canceled the order after part of it had been paid.
4128
- * - `change_canceled`: a scheduled change was withdrawn after part of it had been paid.
4129
- * - `change_expired`: a scheduled change could not take effect before its time passed.
4130
- * - `subscription_canceled`: the subscription was canceled and its unused value returned under
4131
- * its refund terms.
4132
- * - `future_period_canceled`: a renewal that had not started yet was withdrawn.
4133
- * - `downgrade_difference`: after a downgrade, the remaining value of what was paid, valued as refund
4134
- * policy `prorated` describes, minus the new configuration's cost for the remaining time at the
4135
- * change item's `refund_monthly_amount` and `refund_hourly_amount`. Nothing is refunded when that is
4136
- * zero or less.
4137
- * - `usage_true_up`: usage priced again over the whole month cost less than was charged.
4138
- * - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
4139
- * - `operator`: made by the platform operator.
4140
- */
4141
- export type RefundReason = (typeof RefundReason)[keyof typeof RefundReason];
4142
- export declare const RefundReason: {
4143
- readonly provisioning_failed: "provisioning_failed";
4144
- readonly order_expired: "order_expired";
4145
- readonly order_canceled: "order_canceled";
4146
- readonly change_canceled: "change_canceled";
4147
- readonly change_expired: "change_expired";
4148
- readonly subscription_canceled: "subscription_canceled";
4149
- readonly future_period_canceled: "future_period_canceled";
4150
- readonly downgrade_difference: "downgrade_difference";
4151
- readonly usage_true_up: "usage_true_up";
4152
- readonly payment_not_applied: "payment_not_applied";
4153
- readonly operator: "operator";
4154
- };
4155
- export interface Refund {
4156
- transaction_id?: string;
4157
- cancellation_item_id?: string;
4158
- /** Original funds-return split and each result. Unknown gateway results remain pending. */
4159
- transactions: Transaction[];
4160
- id: string;
4161
- billing_account_id?: number;
4162
- /** @nullable */
4163
- invoice_id?: string | null;
4164
- /**
4165
- * The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
4166
- * the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
4167
- * @nullable
4168
- */
4169
- order_id?: string | null;
4170
- /** The whole refund. Equals balance_amount plus credit_amount plus gateway_amount. */
4171
- amount: Money;
4172
- /** The part returned to the account balance. */
4173
- balance_amount: Money;
4174
- /** The part restored to the credit grants that paid for it. */
4175
- credit_amount: Money;
4176
- /** The part returned to the payment method it was paid with. */
4177
- gateway_amount: Money;
4178
- /** What has actually been returned. */
4179
- settled_amount?: Money;
4180
- currency: string;
4181
- /**
4182
- * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
4183
- * @deprecated
4184
- */
4185
- destination?: RefundDestination;
4186
- /**
4187
- * Summary of the parts in `transactions`.
4188
- *
4189
- * - `pending`: nothing has been returned yet, and at least one part is in progress.
4190
- * - `processing`: some parts have been returned, and at least one is still in progress.
4191
- * - `succeeded`: every part has been returned.
4192
- * - `failed`: no part is in progress and at least one has failed. What was returned is in
4193
- * settled_amount.
4194
- *
4195
- * Returns to the balance and to credit grants complete shortly after the refund is made; a
4196
- * return to a payment method completes when the gateway confirms it.
4197
- */
4198
- status: RefundStatus;
4199
- /** When the last part was returned. Present with `succeeded`. */
4200
- settled_at?: string;
4201
- reason: RefundReason;
4202
- created_at: string;
4203
- }
4204
- export interface RefundList {
4205
- items: Refund[];
4206
- pagination: OffsetPagination;
4207
- }
4208
- /**
4209
- * The attributes the rate was chosen by, such as region and machine type.
4210
- */
4211
- export type UsageChargeDimensions = {
4212
- [key: string]: string;
4213
- };
4214
- export interface UsageCharge {
4215
- subscription_id: string;
4216
- id: string;
4217
- project_id?: string;
4218
- /**
4219
- * The project and its current name, for display. Absent when the project no longer exists or its
4220
- * details cannot be read at the moment; `project_id` still identifies it.
4221
- */
4222
- project?: NamedIdentity | null;
4223
- product: Product;
4224
- /** Which resource this was charged for. Empty for charges not tied to one. */
4225
- resource_id?: string;
4226
- meter: ObjectIdentity;
4227
- unit?: string;
4228
- /** The attributes the rate was chosen by, such as region and machine type. */
4229
- dimensions?: UsageChargeDimensions;
4230
- window_start: string;
4231
- /** Exclusive. */
4232
- window_end: string;
4233
- /** How much was used, before any included allowance. */
4234
- gross_quantity?: string;
4235
- /** How much of that was covered by an allowance. */
4236
- deducted_quantity?: string;
4237
- /** What was charged for — the gross quantity less the part covered. */
4238
- quantity: string;
4239
- unit_amount?: Money;
4240
- amount: Money;
4241
- currency: string;
4242
- /**
4243
- * Present after the statement is closed and its invoice is issued.
4244
- * @nullable
4245
- */
4246
- invoice_id?: string | null;
4247
- /**
4248
- * Present after the statement is closed and its invoice is issued.
4249
- * @nullable
4250
- */
4251
- invoice_item_id?: string | null;
4252
- /** The statement this charge was collected into. */
4253
- statement_id?: string;
4254
- }
4255
- export interface UsageChargeList {
4256
- items: UsageCharge[];
4257
- pagination: OffsetPagination;
4258
- }
4259
- export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
4260
- export declare const SubscriptionChargeType: {
4261
- readonly postpaid: "postpaid";
4262
- readonly prepaid: "prepaid";
4263
- readonly one_time: "one_time";
4264
- };
4265
- export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
4266
- export declare const SubscriptionInterval: {
4267
- readonly none: "none";
4268
- readonly day: "day";
4269
- readonly month: "month";
4270
- readonly year: "year";
4271
- };
4272
- /**
4273
- * Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
4274
- * whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
4275
- * being set up. `completed` means every item was set up. `partially_completed` means some items were set up
4276
- * and the others failed or were canceled and were refunded to their original payment sources. `failed` means
4277
- * no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
4278
- * `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
4279
- * payment sources. No status establishes service delivery by itself.
4280
- */
4281
- export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
4282
- export declare const OrderStatus: {
4283
- readonly pending: "pending";
4284
- readonly accepted: "accepted";
4285
- readonly completed: "completed";
4286
- readonly partially_completed: "partially_completed";
4287
- readonly failed: "failed";
4288
- readonly canceled: "canceled";
4289
- };
4290
- export type ScheduledChangeInterval = (typeof ScheduledChangeInterval)[keyof typeof ScheduledChangeInterval];
4291
- export declare const ScheduledChangeInterval: {
4292
- readonly day: "day";
4293
- readonly month: "month";
4294
- readonly year: "year";
4295
- };
4296
- /**
4297
- * The next accepted period-end change for a subscription. It describes the target terms and does not change the current subscription until effective_at.
4298
- */
4299
- export interface ScheduledChange {
4300
- order_id: string;
4301
- status: OrderStatus;
4302
- /** When the target terms take effect, normally the end of the current paid period. */
4303
- effective_at: string;
4304
- plan_id: string;
4305
- plan_name: string;
4306
- price_id: string;
4307
- quantity: string;
4308
- /** The target prepaid renewal amount before tax. */
4309
- recurring_amount: string;
4310
- currency: string;
4311
- interval: ScheduledChangeInterval;
4312
- /** @minimum 1 */
4313
- interval_count: number;
4314
- }
4315
- /**
4316
- * pending means the purchase relationship exists but its order has not been accepted.
4317
- * provisioning means the service accepted the order and is delivering. For a service-owned
4318
- * purchase, only confirmed delivery moves it to active; paying alone does not.
4319
- * canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
4320
- * terminated means an administrator or the owning service immediately ended the commercial relationship.
4321
- */
4322
- export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
4323
- export declare const SubscriptionStatus: {
4324
- readonly pending: "pending";
4325
- readonly provisioning: "provisioning";
4326
- readonly active: "active";
4327
- readonly suspended: "suspended";
4328
- readonly canceled: "canceled";
4329
- readonly terminated: "terminated";
4330
- };
4331
- /**
4332
- * An independently billed purchase relationship, separate from the owning service's resource.
4333
- * Placing a new prepaid or postpaid service order creates a pending subscription for each line
4334
- * in the same purchase transaction. Its ID is returned on the order item and remains stable
4335
- * through checkout and delivery. One order may create several subscriptions, such as an instance,
4336
- * its system disk and its address; it has no single subscription ID.
4337
- *
4338
- * Pending and provisioning do not grant service or accrue usage. A service-owned subscription
4339
- * becomes provisioning when the owning service accepts the order, and active when the service
4340
- * confirms delivery, with started_at set to the confirmed effective time; payment changes neither. Prepaid service periods start
4341
- * then; postpaid usage starts only when the service reports actual delivery and metering.
4342
- *
4343
- * One-time delivery may omit a subscription. Renewals reference and extend existing subscriptions
4344
- * rather than creating another; a change keeps the subscription ID and switches its terms when it
4345
- * takes effect. Canceling or failing an unfulfilled purchase sets its pending or provisioning
4346
- * subscriptions to canceled without starting a service period.
4347
- * Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their
4348
- * original value. Technical state belongs to the owning service.
4349
- *
4350
- * A purchased shared capacity limit, such as a regional snapshot count quota, can have its own
4351
- * subscription. Activating that capacity confirms delivery of the quota, not individual snapshots.
4352
- * Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
4353
- * the owning service enforces current holdings against the purchased count.
4354
- */
4355
- export interface Subscription {
4356
- currency: string;
4357
- charge_type: SubscriptionChargeType;
4358
- interval: SubscriptionInterval;
4359
- /** @minimum 1 */
4360
- interval_count?: number;
4361
- /**
4362
- * Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
4363
- * Pending subscriptions show base terms until paying the order fixes any new continuing discount.
4364
- * Absent for other charge types.
4365
- */
4366
- recurring_amount?: string;
4367
- termination_policy?: TerminationPolicyBfdab9f;
4368
- refund_policy?: RefundPolicy;
4369
- order_item_id?: string;
4370
- /** Present only on subscriptions created by an earlier change that replaced the subscription. A change now keeps the subscription ID. */
4371
- replaces_subscription_id?: string;
4372
- coupon_id?: string;
4373
- coupon?: ObjectIdentity;
4374
- /** @minimum 0 */
4375
- discounted_renewals_remaining?: number;
4376
- suspend_reason?: string;
4377
- billing_cycle_anchor?: string;
4378
- cancellation?: SubscriptionCancellation;
4379
- /** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
4380
- scheduled_change?: ScheduledChange | null;
4381
- /**
4382
- * The saved payment method automatic renewal charges after the account's balance and credits,
4383
- * before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
4384
- * saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
4385
- * account that pays the renewal.
4386
- * @nullable
4387
- */
4388
- default_payment_method_id?: string | null;
4389
- created_at?: string;
4390
- id: string;
4391
- /** The billing account that made the purchase. Renewals of a project subscription are charged to the project's current billing account. */
4392
- billing_account_id: number;
4393
- account: AccountIdentity;
4394
- product_id: ProductID;
4395
- /**
4396
- * Which project this is for. Absent when it was bought at account level, such as a
4397
- * membership, which belongs to no single project.
4398
- * @nullable
4399
- */
4400
- project_id?: string | null;
4401
- /**
4402
- * The project and its current name, for display. Absent for a purchase at account level,
4403
- * and when the project no longer exists or its details cannot be read at the moment;
4404
- * `project_id` still identifies it then.
4405
- */
4406
- project?: NamedIdentity | null;
4407
- product: Product;
4408
- plan_id: string;
4409
- plan_name: string;
4410
- price_id: string;
4411
- quantity: string;
4412
- /**
4413
- * When a prepaid subscription renews or expires, the end of the last service period bought.
4414
- * Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
4415
- * its purchase has been paid, and for postpaid subscriptions.
4416
- * @nullable
4417
- */
4418
- current_term_end?: string | null;
4419
- /**
4420
- * Start of the service period in effect now. Null when none is, including for postpaid subscriptions.
4421
- * @nullable
4422
- */
4423
- current_period_start?: string | null;
4424
- /**
4425
- * End of the service period in effect now. Renewing in advance moves `current_term_end`, not
4426
- * this. Null when no period is in effect, including for postpaid subscriptions.
4427
- * @nullable
4428
- */
4429
- current_period_end?: string | null;
4430
- /** 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. */
4431
- auto_renew: boolean;
4432
- /**
4433
- * pending means the purchase relationship exists but its order has not been accepted.
4434
- * provisioning means the service accepted the order and is delivering. For a service-owned
4435
- * purchase, only confirmed delivery moves it to active; paying alone does not.
4436
- * canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
4437
- * terminated means an administrator or the owning service immediately ended the commercial relationship.
4438
- */
4439
- status: SubscriptionStatus;
4440
- /**
4441
- * Confirmed start of service. Null until a new subscription becomes active, including after payment.
4442
- * @nullable
4443
- */
4444
- started_at?: string | null;
4445
- /** @nullable */
4446
- ended_at?: string | null;
4447
- }
4448
- export interface SubscriptionList {
4449
- items: Subscription[];
4450
- pagination: OffsetPagination;
4451
- }
4452
- export type RenewalPriceInterval = (typeof RenewalPriceInterval)[keyof typeof RenewalPriceInterval];
4453
- export declare const RenewalPriceInterval: {
4454
- readonly day: "day";
4455
- readonly month: "month";
4456
- readonly year: "year";
4457
- };
4458
- export interface RenewalPrice {
4459
- termination_policy?: TerminationPolicyBfdab9f;
4460
- refund_policy?: RefundPolicy;
4461
- price_id: string;
4462
- /** How many periods one renewal covers. */
4463
- interval_count: number;
4464
- interval: RenewalPriceInterval;
4465
- /** What renewing for this term costs, for the quantity held. */
4466
- amount?: Money;
4467
- currency?: string;
4468
- /**
4469
- * The term this item already bills at. Renewing for it uses the price bought
4470
- * originally, so a later price change does not affect it.
4471
- */
4472
- current: boolean;
4473
- }
4474
- export interface RenewalPriceList {
4475
- items: RenewalPrice[];
4476
- pagination: OffsetPagination;
4477
- }
4478
- /**
4479
- * The unit interval_count counts in.
4480
- */
4481
- export type RenewRequestInterval = (typeof RenewRequestInterval)[keyof typeof RenewRequestInterval];
4482
- export declare const RenewRequestInterval: {
4483
- readonly day: "day";
4484
- readonly month: "month";
4485
- readonly year: "year";
4486
- };
4487
- export interface RenewRequest {
4488
- /** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
4489
- order_id: string;
4490
- /**
4491
- * How many further periods to buy, each at the price this item already bills at.
4492
- *
4493
- * Buying twelve monthly periods is not the same as buying one yearly term: a longer
4494
- * term is usually sold at a lower price, and that price is only reached by naming the
4495
- * interval. Use `interval_count` and `interval` for that.
4496
- * @minimum 1
4497
- */
4498
- periods?: number;
4499
- /**
4500
- * Renew for a term of this length instead, at the price currently sold for it. Give
4501
- * `interval` with it.
4502
- *
4503
- * Leaving both out renews at the price this item already bills at, which a later price
4504
- * change does not affect. Naming a term that differs from the current one is a fresh
4505
- * choice, so it is bought at today's price. Naming the current term changes nothing. A
4506
- * term sold at several prices that differ in termination policy is refused with 409
4507
- * `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `termination_policy` is given.
4508
- *
4509
- * List the terms on offer with the renewal prices operation.
4510
- * @minimum 1
4511
- */
4512
- interval_count?: number;
4513
- /** The unit interval_count counts in. */
4514
- interval?: RenewRequestInterval;
4515
- /** With `interval` and `interval_count`, chooses among prices of that term that differ in termination policy. */
4516
- termination_policy?: TerminationPolicyBfdab9f;
4517
- payment_method_id?: string;
4518
- /** Whether to pay from the balance, with or without `payment_method_id`. */
4519
- use_balance?: boolean;
4520
- /** Whether to pay from eligible credit grants before the balance. */
4521
- use_credits?: boolean;
4522
- return_url?: string;
4523
- }
4524
- /**
4525
- * As in renewing.
4526
- */
4527
- export type RenewalOrderRequestInterval = (typeof RenewalOrderRequestInterval)[keyof typeof RenewalOrderRequestInterval];
4528
- export declare const RenewalOrderRequestInterval: {
4529
- readonly day: "day";
4530
- readonly month: "month";
4531
- readonly year: "year";
4532
- };
4533
- /**
4534
- * The periods and price of the renewal, chosen as in renewing.
4535
- */
4536
- export interface RenewalOrderRequest {
4537
- /** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
4538
- order_id: string;
4539
- /**
4540
- * As in renewing.
4541
- * @minimum 1
4542
- */
4543
- periods?: number;
4544
- /**
4545
- * As in renewing.
4546
- * @minimum 1
4547
- */
4548
- interval_count?: number;
4549
- /** As in renewing. */
4550
- interval?: RenewalOrderRequestInterval;
4551
- /** As in renewing. */
4552
- termination_policy?: TerminationPolicyBfdab9f;
4553
- }
4554
- export interface AutoRenewSet {
4555
- auto_renew: boolean;
4556
- }
4557
- /**
4558
- * `pending` is waiting to be set up. `completed` was confirmed by the service.
4559
- * `failed` was not set up and its amount was refunded to the original payment sources.
4560
- * `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
4561
- * its subscription.
4562
- */
4563
- export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
4564
- export declare const OrderItemStatus: {
4565
- readonly pending: "pending";
4566
- readonly completed: "completed";
4567
- readonly failed: "failed";
4568
- readonly canceled: "canceled";
4569
- };
4570
- /**
4571
- * `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms.
4572
- */
4573
- export type OrderType = (typeof OrderType)[keyof typeof OrderType];
4574
- export declare const OrderType: {
4575
- readonly new: "new";
4576
- readonly renew: "renew";
4577
- readonly modify: "modify";
4578
- };
4579
- /**
4580
- * When a plan change takes effect. `none` on anything that is not a change.
4581
- *
4582
- * `period_end` orders stay pending until the first period at the new price is paid. That period
4583
- * is invoiced shortly before the current paid period ends and starts when it ends; if the
4584
- * invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
4585
- * usual. Renewing in the meantime moves all of this along with it.
4586
- */
4587
- export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
4588
- export declare const OrderChangeEffective: {
4589
- readonly none: "none";
4590
- readonly immediate: "immediate";
4591
- readonly period_end: "period_end";
4592
- };
4593
- /**
4594
- * How it was paid. Removing the payment method afterwards does not change it; `payment_method_id`
4595
- * then names a removed payment method.
4596
- */
4597
- export interface PaidWith {
4598
- /**
4599
- * `balance` when the account's balance and credits covered it in full. Otherwise the method used
4600
- * with the gateway, such as `card`.
4601
- */
4602
- method_type: string;
4603
- /** The gateway that collected it. Absent when `method_type` is `balance`. */
4604
- payment_gateway?: string;
4605
- /** The saved payment method that was charged, when one was. */
4606
- payment_method_id?: string;
4607
- brand?: string;
4608
- last4?: string;
4609
- }
4610
- export type OrderItemInterval = (typeof OrderItemInterval)[keyof typeof OrderItemInterval];
4611
- export declare const OrderItemInterval: {
4612
- readonly none: "none";
4613
- readonly day: "day";
4614
- readonly month: "month";
4615
- readonly year: "year";
4616
- };
4617
- /**
4618
- * The payment timing of the selected price.
4619
- */
4620
- export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
4621
- export declare const OrderItemChargeType: {
4622
- readonly postpaid: "postpaid";
4623
- readonly prepaid: "prepaid";
4624
- readonly one_time: "one_time";
4625
- };
4626
- export type OrderItemConfiguration = {
4627
- [key: string]: unknown;
4628
- };
4629
- /**
4630
- * Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero
4631
- * for a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service
4632
- * purchase creates its pending subscription when this item is recorded, not when payment succeeds.
4633
- */
4634
- export interface OrderItem {
4635
- /** Financial lines produced by this purchase item, including setup charges. */
4636
- invoice_item_ids?: string[];
4637
- /** @minimum 0 */
4638
- position?: number;
4639
- configuration?: OrderItemConfiguration;
4640
- /**
4641
- * Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
4642
- * pending subscription here; renewals and changes reference the existing subscription, which
4643
- * keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
4644
- */
4645
- subscription_id?: string;
4646
- interval: OrderItemInterval;
4647
- /** @minimum 1 */
4648
- interval_count?: number;
4649
- termination_policy?: TerminationPolicyBfdab9f;
4650
- refund_policy?: RefundPolicy;
4651
- /**
4652
- * Prepaid items only: the plan's one-month prepaid price for this item's quantity before tax, frozen
4653
- * at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
4654
- * no prepaid period shorter than the one bought.
4655
- * @nullable
4656
- */
4657
- refund_monthly_amount?: string | null;
4658
- /**
4659
- * Prepaid items only: the plan's postpaid hourly price for this item's quantity before tax, frozen at
4660
- * purchase, used for time used short of a full month. Null when the plan has no postpaid price.
4661
- * @nullable
4662
- */
4663
- refund_hourly_amount?: string | null;
4664
- recurring_amount?: string;
4665
- setup_amount?: string;
4666
- /** The payment timing of the selected price. */
4667
- charge_type: OrderItemChargeType;
4668
- /** Total tax after discounts, including any tax already included in the price. */
4669
- tax_amount?: string;
4670
- /** The part of tax_amount already included in gross_amount; it is not charged again. */
4671
- tax_included_amount?: string;
4672
- id: string;
4673
- order_id?: string;
4674
- price_id: string;
4675
- product_id?: ProductID;
4676
- product?: Product;
4677
- /** Which plan was bought. */
4678
- plan_id: string;
4679
- /**
4680
- * What it was called when bought. It does not follow later catalogue renames and is
4681
- * not translated.
4682
- */
4683
- plan_name: string;
4684
- quantity: string;
4685
- /**
4686
- * The unit amount of the price this line is charged under. Absent for a tiered price, which has no
4687
- * single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
4688
- * describes.
4689
- */
4690
- unit_amount?: Money;
4691
- /**
4692
- * Before discounts: the price applied to the quantity, which for a per-unit price is `unit_amount`
4693
- * times `quantity`; a minimum charge can make it higher. For an upgrade that takes effect at once it is
4694
- * the new price minus the old price for the time left in the paid period, both at the subscription's
4695
- * own period price, and the period end does not move; a downgrade charges nothing and may refund the
4696
- * difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
4697
- *
4698
- * Under an inclusive tax rate it includes tax, as the price does, and the included part is
4699
- * `tax_included_amount`. A renewal at the agreed terms is the exception: the agreed amount excludes
4700
- * tax, and tax is added to it.
4701
- */
4702
- gross_amount?: Money;
4703
- /**
4704
- * The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
4705
- * from the discount the subscription carries.
4706
- *
4707
- * A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
4708
- * `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
4709
- * the carried discount is already reflected in it: the renewal order also uses a coupon the account
4710
- * holds, or the account's tax rate is inclusive.
4711
- */
4712
- discount_amount?: Money;
4713
- /** `gross_amount` less `discount_amount`. */
4714
- amount?: Money;
4715
- currency: string;
4716
- /**
4717
- * 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.
4718
- * @nullable
4719
- */
4720
- period_start?: string | null;
4721
- /**
4722
- * The end of that service period, exclusive.
4723
- * @nullable
4724
- */
4725
- period_end?: string | null;
4726
- status: OrderItemStatus;
4727
- }
4728
- /**
4729
- * A recorded purchase with its invoice from placement; a zero-total invoice, such as for postpaid
4730
- * admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
4731
- * invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
4732
- * order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
4733
- * before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
4734
- */
4735
- export interface Order {
4736
- coupon_id?: string;
4737
- coupon?: ObjectIdentity;
4738
- promotion_code_id?: string;
4739
- /** Code text frozen when the coupon was applied. Absent for an account discount. */
4740
- promotion_code?: string;
4741
- /** The order's invoice, the same as invoice.id. */
4742
- invoice_id: string;
4743
- invoice: InvoiceSummary;
4744
- /** How the order was paid. Absent until it is paid. */
4745
- paid_with?: PaidWith;
4746
- account?: AccountIdentity;
4747
- change_effective_at?: string;
4748
- id: string;
4749
- /**
4750
- * Which project it was bought for. Absent for a purchase made at account level, such
4751
- * as a membership.
4752
- * @nullable
4753
- */
4754
- project_id?: string | null;
4755
- /**
4756
- * The project and its current name, for display. Absent for a purchase at account level,
4757
- * and when the project no longer exists or its details cannot be read at the moment;
4758
- * `project_id` still identifies it then.
4759
- */
4760
- project?: NamedIdentity | null;
4761
- /**
4762
- * The billing account the order was placed with. It does not change when the project is later
4763
- * linked to another billing account. While this account is suspended or closed the order cannot
4764
- * be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
4765
- * when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
4766
- */
4767
- billing_account_id?: number;
4768
- currency: string;
4769
- /** `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms. */
4770
- type: OrderType;
4771
- status: OrderStatus;
4772
- /**
4773
- * When a plan change takes effect. `none` on anything that is not a change.
4774
- *
4775
- * `period_end` orders stay pending until the first period at the new price is paid. That period
4776
- * is invoiced shortly before the current paid period ends and starts when it ends; if the
4777
- * invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
4778
- * usual. Renewing in the meantime moves all of this along with it.
4779
- */
4780
- change_effective?: OrderChangeEffective;
4781
- /**
4782
- * Acceptance deadline. Pending orders can expire automatically.
4783
- * @nullable
4784
- */
4785
- expires_at?: string | null;
4786
- /**
4787
- * When the discount and amount were fixed: at placement for automatic checkout and for a
4788
- * zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
4789
- * @nullable
4790
- */
4791
- checkout_confirmed_at?: string | null;
4792
- created_at: string;
4793
- /**
4794
- * What was bought. Present on a single order and on every order in a list, so a list
4795
- * can be rendered without a further request per row.
4796
- */
4797
- items: OrderItem[];
4798
- }
4799
- export interface OrderList {
4800
- items: Order[];
4801
- pagination: OffsetPagination;
4802
- }
4803
- /**
4804
- * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
4805
- * `voided` once Leaflow withdrew it.
4806
- */
4807
- export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
4808
- export declare const DiscountStatus: {
4809
- readonly scheduled: "scheduled";
4810
- readonly active: "active";
4811
- readonly expired: "expired";
4812
- readonly voided: "voided";
4813
- };
4814
- export type DiscountType = (typeof DiscountType)[keyof typeof DiscountType];
4815
- export declare const DiscountType: {
4816
- readonly percentage: "percentage";
4817
- readonly fixed_amount: "fixed_amount";
4818
- readonly price_override: "price_override";
4819
- readonly free_setup: "free_setup";
4820
- };
4821
- /**
4822
- * Whether the discount continues on renewals of the purchased item. `once` applies only to the
4823
- * purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
4824
- * periods including the first, and `forever` continues on every renewal.
4825
- */
4826
- export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
4827
- export declare const DiscountFrequency: {
4828
- readonly once: "once";
4829
- readonly recurring: "recurring";
4830
- readonly forever: "forever";
4831
- };
4832
- /**
4833
- * A coupon held on this account for a period. Within the period it applies without a code to purchases and
4834
- * to metered usage that the coupon covers.
4835
- */
4836
- export interface Discount {
4837
- min_amount?: string;
4838
- billing_account_id?: number;
4839
- coupon_id: string;
4840
- promotion_code_id?: string;
4841
- /**
4842
- * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
4843
- * `voided` once Leaflow withdrew it.
4844
- */
4845
- status: DiscountStatus;
4846
- voided_at?: string;
4847
- type: DiscountType;
4848
- /**
4849
- * Whether the discount continues on renewals of the purchased item. `once` applies only to the
4850
- * purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
4851
- * periods including the first, and `forever` continues on every renewal.
4852
- */
4853
- frequency?: DiscountFrequency;
4854
- /** @minimum 1 */
4855
- frequency_duration?: number;
4856
- id: string;
4857
- name?: string;
4858
- /** For a percentage discount, out of one hundred. */
4859
- percent_off?: string;
4860
- amount?: Money;
4861
- /** Caps a percentage discount. */
4862
- max_discount?: Money;
4863
- currency?: string;
4864
- /**
4865
- * What it may be used for. Absent means it applies to anything on the account,
4866
- * including setup fees and traffic.
4867
- */
4868
- applies_to: Applicability;
4869
- /** Restricted to your first purchase of anything it applies to. */
4870
- first_purchase_only?: boolean;
4871
- valid_from?: string;
4872
- /**
4873
- * Absent follows the coupon's own validity.
4874
- * @nullable
4875
- */
4876
- valid_until?: string | null;
4877
- }
4878
- export interface DiscountList {
4879
- items: Discount[];
4880
- pagination: OffsetPagination;
4881
- }
4882
- export interface OrderItemList {
4883
- items: OrderItem[];
4884
- pagination: OffsetPagination;
4885
- }
4886
- /**
4887
- * Whether the quantity was paid for or granted free of charge. Both are consumed the same way.
4888
- */
4889
- export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
4890
- export declare const AllowanceCategory: {
4891
- readonly paid: "paid";
4892
- readonly promotional: "promotional";
4893
- };
4894
- /**
4895
- * Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
4896
- * omitted dimensions are not restricted.
4897
- */
4898
- export type AllowanceDimensions = {
4899
- [key: string]: string;
4900
- };
4901
- export type AllowanceStatus = (typeof AllowanceStatus)[keyof typeof AllowanceStatus];
4902
- export declare const AllowanceStatus: {
4903
- readonly active: "active";
4904
- readonly depleted: "depleted";
4905
- readonly expired: "expired";
4906
- readonly voided: "voided";
4907
- };
4908
- export interface Allowance {
4909
- /** Optional issuance key, unique within this billing account. */
4910
- idempotency_key?: string;
4911
- subscription_id?: string;
4912
- id: string;
4913
- billing_account_id?: number;
4914
- product: Product;
4915
- meter: ObjectIdentity;
4916
- /** The unit it is counted in, such as `MiB`. */
4917
- unit?: string;
4918
- /** Whether the quantity was paid for or granted free of charge. Both are consumed the same way. */
4919
- category: AllowanceCategory;
4920
- /**
4921
- * Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
4922
- * omitted dimensions are not restricted.
4923
- */
4924
- dimensions: AllowanceDimensions;
4925
- name: string;
4926
- /** How much was granted. */
4927
- quantity: string;
4928
- /** How much is left. */
4929
- remaining_quantity: string;
4930
- /**
4931
- * Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
4932
- * precedence.
4933
- */
4934
- priority?: number;
4935
- status: AllowanceStatus;
4936
- valid_from: string;
4937
- /**
4938
- * When it lapses. Anything unused at that point is lost; it is not refunded and does
4939
- * not carry over. Absent when it does not expire on its own.
4940
- * @nullable
4941
- */
4942
- valid_until?: string | null;
4943
- }
4944
- export interface AllowanceList {
4945
- items: Allowance[];
4946
- pagination: OffsetPagination;
4947
- }
4948
- /**
4949
- * Derived from the validity period. scheduled means valid_from has not yet arrived.
4950
- */
4951
- export type FeatureGrantStatus = (typeof FeatureGrantStatus)[keyof typeof FeatureGrantStatus];
4952
- export declare const FeatureGrantStatus: {
4953
- readonly scheduled: "scheduled";
4954
- readonly active: "active";
4955
- readonly expired: "expired";
4956
- readonly voided: "voided";
4957
- };
4958
- export interface FeatureGrant {
4959
- id: string;
4960
- billing_account_id: number;
4961
- product: Product;
4962
- feature: ObjectIdentity;
4963
- name: string;
4964
- valid_from: string;
4965
- /**
4966
- * Null means the grant does not expire.
4967
- * @nullable
4968
- */
4969
- valid_until: string | null;
4970
- status: FeatureGrantStatus;
4971
- }
4972
- export interface FeatureGrantList {
4973
- items: FeatureGrant[];
4974
- pagination: OffsetPagination;
4975
- }
4976
- export interface Entitlement {
4977
- product: Product;
4978
- feature: ObjectIdentity;
4979
- name?: string;
4980
- enabled: boolean;
4981
- /**
4982
- * When the subscription providing it ends. Absent for a metered subscription, which
4983
- * has no end date.
4984
- * @nullable
4985
- */
4986
- expires_at?: string | null;
4987
- }
4988
- export interface EntitlementList {
4989
- items: Entitlement[];
4990
- pagination: OffsetPagination;
4991
- }
4992
- export interface ProductList {
4993
- items: Product[];
4994
- pagination: OffsetPagination;
4995
- }
4996
- export interface PlanFeature {
4997
- feature: ObjectIdentity;
4998
- name: string;
4999
- }
5000
- export interface Plan {
5001
- /** False once archived. An archived plan cannot be bought until it is active again. */
5002
- active: boolean;
5003
- lookup_key?: string;
5004
- product: Product;
5005
- features: PlanFeature[];
5006
- id: string;
5007
- product_id: ProductID;
5008
- name: string;
5009
- description?: string;
5010
- }
5011
- export interface PlanList {
5012
- items: Plan[];
5013
- pagination: OffsetPagination;
5014
- }
5015
- /**
5016
- * `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
5017
- * charges once.
5018
- */
5019
- export type PriceType = (typeof PriceType)[keyof typeof PriceType];
5020
- export declare const PriceType: {
5021
- readonly postpaid: "postpaid";
5022
- readonly prepaid: "prepaid";
5023
- readonly one_time: "one_time";
5024
- };
5025
- /**
5026
- * How the amount is arrived at. `rated` means the rate depends on attributes such as
5027
- * region or machine type, and is looked up on a price list.
5028
- */
5029
- export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
5030
- export declare const PriceBillingScheme: {
5031
- readonly per_unit: "per_unit";
5032
- readonly tiered: "tiered";
5033
- readonly rated: "rated";
5034
- };
5035
- /**
5036
- * `none` for a price that is not tiered, which is most of them.
5037
- *
5038
- * Otherwise `graduated` charges each band at its own rate, and `volume` charges
5039
- * everything at the rate of the band the total falls in.
5040
- */
5041
- export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
5042
- export declare const PriceTiersMode: {
5043
- readonly none: "none";
5044
- readonly graduated: "graduated";
5045
- readonly volume: "volume";
5046
- };
5047
- export type PriceInterval = (typeof PriceInterval)[keyof typeof PriceInterval];
5048
- export declare const PriceInterval: {
5049
- readonly none: "none";
5050
- readonly day: "day";
5051
- readonly month: "month";
5052
- readonly year: "year";
5053
- };
5054
- export interface Tier {
5055
- /**
5056
- * The upper bound of this band. Null on the last band, which has no bound.
5057
- * @nullable
5058
- */
5059
- up_to?: string | null;
5060
- unit_amount: Money;
5061
- /** Charged once when this band is reached, in addition to the per-unit amount. */
5062
- flat_amount?: Money;
5063
- }
5064
- export interface Price {
5065
- rate_card?: ObjectIdentity;
5066
- lookup_key?: string;
5067
- product: Product;
5068
- plan: ObjectIdentity;
5069
- meter_id?: string;
5070
- meter?: ObjectIdentity;
5071
- unit_quantity: string;
5072
- /** False once archived. An archived price cannot be bought until it is active again. */
5073
- active: boolean;
5074
- termination_policy?: TerminationPolicyBfdab9f;
5075
- refund_policy?: RefundPolicy;
5076
- product_id?: ProductID;
5077
- id: string;
5078
- plan_id: string;
5079
- currency: string;
5080
- /**
5081
- * `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
5082
- * charges once.
5083
- */
5084
- type: PriceType;
5085
- /**
5086
- * How the amount is arrived at. `rated` means the rate depends on attributes such as
5087
- * region or machine type, and is looked up on a price list.
5088
- */
5089
- billing_scheme: PriceBillingScheme;
5090
- /** Present for `per_unit`. */
5091
- unit_amount?: Money;
5092
- /**
5093
- * `none` for a price that is not tiered, which is most of them.
5094
- *
5095
- * Otherwise `graduated` charges each band at its own rate, and `volume` charges
5096
- * everything at the rate of the band the total falls in.
5097
- */
5098
- tiers_mode?: PriceTiersMode;
5099
- /** Present for `tiered`, in ascending order. */
5100
- tiers?: Tier[];
5101
- /** For `rated` prices, the price list the rates are read from. */
5102
- rate_card_id?: string;
5103
- /** The smallest quantity that can be bought. Absent means no lower bound. */
5104
- min_quantity?: string;
5105
- /**
5106
- * The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
5107
- * rejected with BILLING_PRICE_INVALID and field=max_quantity.
5108
- */
5109
- max_quantity?: string;
5110
- /** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
5111
- quantity_step?: string;
5112
- /** For prepaid prices, how many periods one purchase covers. */
5113
- interval_count?: number;
5114
- interval: PriceInterval;
5115
- setup_fee?: Money;
5116
- }
5117
- export interface PriceList {
5118
- items: Price[];
5119
- pagination: OffsetPagination;
5120
- }
5121
- /**
5122
- * The attributes this rate applies to, such as region and machine type.
5123
- */
5124
- export type RateDimensions = {
5125
- [key: string]: string;
5126
- };
5127
- /**
5128
- * `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says.
5129
- */
5130
- export type RateBillingScheme = (typeof RateBillingScheme)[keyof typeof RateBillingScheme];
5131
- export declare const RateBillingScheme: {
5132
- readonly per_unit: "per_unit";
5133
- readonly tiered: "tiered";
5134
- };
5135
- /**
5136
- * `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.
5137
- */
5138
- export type RateTiersMode = (typeof RateTiersMode)[keyof typeof RateTiersMode];
5139
- export declare const RateTiersMode: {
5140
- readonly none: "none";
5141
- readonly graduated: "graduated";
5142
- readonly volume: "volume";
5143
- };
5144
- export interface Rate {
5145
- meter: ObjectIdentity;
5146
- /** The unit readings arrive in, such as `core-second`. */
5147
- unit?: string;
5148
- /** The attributes this rate applies to, such as region and machine type. */
5149
- dimensions: RateDimensions;
5150
- /** `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says. */
5151
- billing_scheme: RateBillingScheme;
5152
- /** `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. */
5153
- tiers_mode: RateTiersMode;
5154
- /** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
5155
- unit_amount?: Money;
5156
- /** Present for a tiered rate, in ascending order. */
5157
- tiers?: Tier[];
5158
- /**
5159
- * How many measured units one amount covers. An hourly rate on a per-second meter is
5160
- * `"3600"`.
5161
- */
5162
- unit_quantity?: string;
5163
- currency: string;
5164
- effective_from: string;
5165
- /** @nullable */
5166
- effective_to?: string | null;
5167
- }
5168
- export interface RateList {
5169
- items: Rate[];
5170
- pagination: OffsetPagination;
5171
- }
5172
- /**
5173
- * Narrows the selection when a plan offers more than one charge type.
5174
- */
5175
- export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
5176
- export declare const QuoteItemInputPriceType: {
5177
- readonly postpaid: "postpaid";
5178
- readonly prepaid: "prepaid";
5179
- readonly one_time: "one_time";
5180
- };
5181
- export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
5182
- export declare const QuoteItemInputInterval: {
5183
- readonly none: "none";
5184
- readonly day: "day";
5185
- readonly month: "month";
5186
- readonly year: "year";
5187
- };
5188
- /**
5189
- * The attributes the price depends on — region, instance type, token class.
5190
- *
5191
- * Required when the price draws its rates from a price list, which is how anything
5192
- * sold by region or by machine type is priced. A price that carries a single unit
5193
- * amount, or a ladder, has no attributes to give and takes none.
5194
- *
5195
- * Every attribute the meter declares must be present. A combination with no rate
5196
- * covering it is refused rather than priced at zero.
5197
- */
5198
- export type QuoteItemInputDimensions = {
5199
- [key: string]: string;
5200
- };
5201
- /**
5202
- * Identify a price directly, or select a price for a plan. For each resource give its ID or lookup
5203
- * key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
5204
- * postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
5205
- * checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
5206
- */
5207
- export interface QuoteItemInput {
5208
- /**
5209
- * @minLength 1
5210
- * @maxLength 128
5211
- */
5212
- price_lookup_key?: string;
5213
- /**
5214
- * @minLength 1
5215
- * @maxLength 128
5216
- */
5217
- plan_lookup_key?: string;
5218
- price_id?: string;
5219
- product_id?: ProductID;
5220
- plan_id?: string;
5221
- /** Narrows the selection when a plan offers more than one charge type. */
5222
- price_type?: QuoteItemInputPriceType;
5223
- interval?: QuoteItemInputInterval;
5224
- /** @minimum 1 */
5225
- interval_count?: number;
5226
- /** Selects among prepaid prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
5227
- termination_policy?: TerminationPolicyBfdab9f;
5228
- /** @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]))))))))))$ */
5229
- quantity: string;
5230
- meter_id?: string;
5231
- /**
5232
- * @minLength 1
5233
- * @maxLength 128
5234
- */
5235
- meter_lookup_key?: string;
5236
- /**
5237
- * The attributes the price depends on — region, instance type, token class.
5238
- *
5239
- * Required when the price draws its rates from a price list, which is how anything
5240
- * sold by region or by machine type is priced. A price that carries a single unit
5241
- * amount, or a ladder, has no attributes to give and takes none.
5242
- *
5243
- * Every attribute the meter declares must be present. A combination with no rate
5244
- * covering it is refused rather than priced at zero.
5245
- */
5246
- dimensions?: QuoteItemInputDimensions;
5247
- /**
5248
- * For metered items, how long to price for. This allows an estimate such as "about
5249
- * this much per month" to be shown before anything exists. The priced quantity is
5250
- * `quantity` multiplied by this duration.
5251
- */
5252
- duration_seconds?: number;
5253
- }
5254
- export interface SpendRow {
5255
- product?: Product;
5256
- plan_id?: string;
5257
- plan_name?: string;
5258
- /** Present only when grouped by resource. */
5259
- resource_id?: string;
5260
- amount: Money;
5261
- currency: string;
5262
- }
5263
- export interface SpendRowList {
5264
- items: SpendRow[];
5265
- /** The sum over the whole period, not only the page returned. */
5266
- total: Money;
5267
- currency: string;
5268
- pagination: OffsetPagination;
5269
- }
5270
- export type ActiveResourceDimensions = {
5271
- [key: string]: string;
5272
- };
5273
- export type ActiveResourceStatus = (typeof ActiveResourceStatus)[keyof typeof ActiveResourceStatus];
5274
- export declare const ActiveResourceStatus: {
5275
- readonly active: "active";
5276
- readonly suspended: "suspended";
5277
- readonly closing: "closing";
5278
- readonly closed: "closed";
5279
- };
5280
- /**
5281
- * A resource currently accruing charges by the second.
5282
- */
5283
- export interface ActiveResource {
5284
- id: string;
5285
- ended_at?: string;
5286
- suspended_at?: string;
5287
- state_changed_at?: string;
5288
- /** The postpaid subscription charged for this metering record, including shared services. */
5289
- subscription_id: string;
5290
- resource_id: string;
5291
- product: Product;
5292
- /** What it is, as its own service names it. */
5293
- resource_type?: string;
5294
- meter: ObjectIdentity;
5295
- unit?: string;
5296
- /** How much is held — cores, MiB, cards. Not how much has been used. */
5297
- quantity: string;
5298
- dimensions?: ActiveResourceDimensions;
5299
- status: ActiveResourceStatus;
5300
- started_at: string;
5301
- project_id?: string;
5302
- /** Usage has been generated up to this boundary; it does not imply invoicing or payment. */
5303
- usage_generated_until: string;
5304
- }
5305
- export interface ActiveResourceList {
5306
- items: ActiveResource[];
5307
- pagination: OffsetPagination;
5308
- }
5309
- /**
5310
- * An estimate of the refundable value of one order or selected items. This does not cancel the order, stop service or create a refund.
5311
- */
5312
- export interface OrderRefundQuoteInput {
5313
- order_id: string;
5314
- /**
5315
- * Estimate only these items. Omit to estimate the whole order. Every item must belong to the order.
5316
- * @minItems 1
5317
- * @maxItems 100
5318
- */
5319
- order_item_ids?: string[];
5320
- }
5321
- /**
5322
- * "Quote exactly one target: proposed items, an existing order, renewals, a cancellation or an order
5323
- * refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
5324
- * canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
5325
- * combination returns BILLING_PURCHASE_INVALID with the offending field."
5326
- */
5327
- export interface QuoteRequest {
5328
- /**
5329
- * The billing account to price for. It must belong to you. Existing orders must have been purchased
5330
- * with this account; renewals and cancellations must currently be paid for by it.
5331
- * @minimum 1
5332
- */
5333
- billing_account_id: number;
5334
- /**
5335
- * A proposed purchase priced in the account currency. Metered items may estimate specified usage
5336
- * quantities; those estimates are not amounts collectible at checkout.
5337
- * @minItems 1
5338
- * @maxItems 100
5339
- */
5340
- items?: QuoteItemInput[];
5341
- /**
5342
- * Preview paying this existing order. Its recorded purchase terms supply every line, and an order
5343
- * whose terms are fixed returns its recorded amounts. A preview does not change the order.
5344
- */
5345
- order_id?: string;
5346
- /**
5347
- * Preview renewing these subscriptions, each at most once. Each entry represents a separate
5348
- * renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
5349
- * @minItems 1
5350
- * @maxItems 100
5351
- */
5352
- renewals?: QuoteRenewal[];
5353
- cancellation?: QuoteCancellation;
5354
- /**
5355
- * @minLength 1
5356
- * @maxLength 64
5357
- */
5358
- promotion_code?: string;
5359
- refund?: OrderRefundQuoteInput;
5360
- }
5361
- /**
5362
- * How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
5363
- * `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
5364
- * invoices state this. Only operators change it.
5365
- */
5366
- export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
5367
- export declare const ContactTaxExempt: {
5368
- readonly none: "none";
5369
- readonly exempt: "exempt";
5370
- readonly reverse: "reverse";
5371
- };
5372
- /**
5373
- * A billing-account contact profile with one address. An account can hold multiple contacts; this is not a login identity.
5374
- */
5375
- export interface Contact {
5376
- id: string;
5377
- billing_account_id: number;
5378
- /**
5379
- * @minLength 1
5380
- * @maxLength 255
5381
- */
5382
- name: string;
5383
- /** @maxLength 255 */
5384
- legal_name?: string;
5385
- /** @maxLength 255 */
5386
- email?: string;
5387
- /** @maxLength 64 */
5388
- tax_id?: string;
5389
- /** @maxLength 255 */
5390
- address_line1?: string;
5391
- /** @maxLength 255 */
5392
- address_line2?: string;
5393
- /** @maxLength 128 */
5394
- address_city?: string;
5395
- /** @maxLength 128 */
5396
- address_state?: string;
5397
- /** @maxLength 32 */
5398
- address_postal_code?: string;
5399
- /** @pattern ^([A-Z]{2})?$ */
5400
- address_country?: string;
5401
- /**
5402
- * How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
5403
- * `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
5404
- * invoices state this. Only operators change it.
5405
- */
5406
- tax_exempt: ContactTaxExempt;
5407
- active: boolean;
5408
- created_at: string;
5409
- }
5410
- export interface ContactCreate {
5411
- /**
5412
- * @minLength 1
5413
- * @maxLength 255
5414
- */
5415
- name: string;
5416
- /** @maxLength 255 */
5417
- legal_name?: string;
5418
- /** @maxLength 255 */
5419
- email?: string;
5420
- /** @maxLength 64 */
5421
- tax_id?: string;
5422
- /** @maxLength 255 */
5423
- address_line1?: string;
5424
- /** @maxLength 255 */
5425
- address_line2?: string;
5426
- /** @maxLength 128 */
5427
- address_city?: string;
5428
- /** @maxLength 128 */
5429
- address_state?: string;
5430
- /** @maxLength 32 */
5431
- address_postal_code?: string;
5432
- /** @pattern ^([A-Z]{2})?$ */
5433
- address_country?: string;
5434
- }
5435
- export interface ContactUpdate {
5436
- /**
5437
- * @minLength 1
5438
- * @maxLength 255
5439
- */
5440
- name?: string;
5441
- /** @maxLength 255 */
5442
- legal_name?: string;
5443
- /** @maxLength 255 */
5444
- email?: string;
5445
- /** @maxLength 64 */
5446
- tax_id?: string;
5447
- /** @maxLength 255 */
5448
- address_line1?: string;
5449
- /** @maxLength 255 */
5450
- address_line2?: string;
5451
- /** @maxLength 128 */
5452
- address_city?: string;
5453
- /** @maxLength 128 */
5454
- address_state?: string;
5455
- /** @maxLength 32 */
5456
- address_postal_code?: string;
5457
- /** @pattern ^([A-Z]{2})?$ */
5458
- address_country?: string;
5459
- active?: boolean;
5460
- }
5461
- export interface ContactList {
5462
- items: Contact[];
5463
- pagination: OffsetPagination;
5464
- }
5465
- export interface CancelSubscriptionRequest {
5466
- mode: TerminationPolicyBfdab9f;
5467
- /** For immediate cancellation, the quoted whole-second refund basis. Now when omitted. */
5468
- proration_date?: string;
5469
- /** The cancellation quote's refundable amount, including an explicit zero. */
5470
- expected_refundable_amount: Money & string;
5471
- /** @maxLength 1024 */
5472
- reason?: string;
5473
- }
5474
- export interface StatementAmounts {
5475
- subtotal: Money;
5476
- discount_amount: Money;
5477
- tax_amount: Money;
5478
- total: Money;
5479
- }
5480
- /**
5481
- * 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.
5482
- */
5483
- export interface MonthlyStatement {
5484
- billing_account_id: number;
5485
- currency: string;
5486
- period_start: string;
5487
- period_end: string;
5488
- /** 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. */
5489
- finalized: boolean;
5490
- finalized_at?: string;
5491
- /** Statements of the period, including the open one. */
5492
- statement_count: number;
5493
- billed: StatementAmounts;
5494
- credited_amount: Money;
5495
- unbilled?: StatementAmounts;
5496
- credit_applied: Money;
5497
- amount_paid: Money;
5498
- amount_due: Money;
5499
- amount_refunded: Money;
5500
- }
5501
- export interface MonthlyStatementList {
5502
- items: MonthlyStatement[];
5503
- pagination: OffsetPagination;
5504
- }
5505
- export type StatementStatus = (typeof StatementStatus)[keyof typeof StatementStatus];
5506
- export declare const StatementStatus: {
5507
- readonly open: "open";
5508
- readonly closed: "closed";
5509
- };
5510
- /**
5511
- * 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.
5512
- */
5513
- export type StatementType = (typeof StatementType)[keyof typeof StatementType];
5514
- export declare const StatementType: {
5515
- readonly interim: "interim";
5516
- readonly final: "final";
5517
- readonly supplement: "supplement";
5518
- };
5519
- /**
5520
- * 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.
5521
- */
5522
- export interface Statement {
5523
- id: string;
5524
- billing_account_id: number;
5525
- currency: string;
5526
- period_start: string;
5527
- period_end: string;
5528
- /** Increases with each closing of the period. */
5529
- sequence: number;
5530
- status: StatementStatus;
5531
- type: StatementType;
5532
- /** 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. */
5533
- estimated: boolean;
5534
- amounts: StatementAmounts;
5535
- closed_at?: string;
5536
- /** The invoice issued at this closing, when it produced one. */
5537
- invoice_id?: string;
5538
- created_at: string;
5539
- calculated_at?: string;
5540
- credited_amount: Money;
5541
- }
5542
- export interface StatementList {
5543
- items: Statement[];
5544
- pagination: OffsetPagination;
5545
- }
5546
- export interface StatementItem {
5547
- project_id?: string;
5548
- product_id?: string;
5549
- meter_id?: string;
5550
- unit?: string;
5551
- /** Net usage quantity. Included only when grouping by meter. */
5552
- quantity?: string;
5553
- deducted_quantity?: string;
5554
- amount: Money;
5555
- }
5556
- export type StatementSummaryGroupBy = (typeof StatementSummaryGroupBy)[keyof typeof StatementSummaryGroupBy];
5557
- export declare const StatementSummaryGroupBy: {
5558
- readonly project: "project";
5559
- readonly product: "product";
5560
- readonly meter: "meter";
5561
- };
5562
- export interface StatementSummary {
5563
- statement_id: string;
5564
- currency: string;
5565
- estimated: boolean;
5566
- calculated_at?: string;
5567
- group_by: StatementSummaryGroupBy;
5568
- items: StatementItem[];
5569
- pagination: OffsetPagination;
5570
- }
5571
2481
  /**
5572
2482
  * The request conflicts with the current state of a resource or offering it involves. `COMPUTE_RESOURCE_BUSY`
5573
2483
  * means a resource has an operation in progress: `meta.resource_type`, such as `instance` or `floating_ip`, and