@paid-ai/paid-node 1.7.0 → 1.8.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 (1646) hide show
  1. package/dist/cjs/Client.d.ts +33 -0
  2. package/dist/cjs/Client.js +83 -28
  3. package/dist/cjs/api/errors/BadRequestError.d.ts +1 -2
  4. package/dist/cjs/api/errors/ConflictError.d.ts +1 -2
  5. package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -2
  6. package/dist/cjs/api/errors/InternalServerError.d.ts +1 -2
  7. package/dist/cjs/api/errors/NotFoundError.d.ts +1 -2
  8. package/dist/cjs/api/errors/RequestTimeoutError.d.ts +6 -0
  9. package/dist/cjs/api/errors/RequestTimeoutError.js +50 -0
  10. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +6 -0
  11. package/dist/cjs/api/errors/TooManyRequestsError.js +50 -0
  12. package/dist/cjs/api/errors/index.d.ts +2 -0
  13. package/dist/cjs/api/errors/index.js +2 -0
  14. package/dist/cjs/api/resources/amendments/client/Client.d.ts +83 -0
  15. package/dist/cjs/api/resources/amendments/client/Client.js +313 -0
  16. package/dist/cjs/api/resources/amendments/client/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/amendments/client/index.js +17 -0
  18. package/dist/cjs/api/resources/amendments/client/requests/GetOrderAmendmentOptionsRequest.d.ts +10 -0
  19. package/dist/cjs/api/resources/amendments/client/requests/UnifiedAmendmentExecuteRequest.d.ts +35 -0
  20. package/dist/cjs/api/resources/amendments/client/requests/UnifiedAmendmentExecuteRequest.js +14 -0
  21. package/dist/cjs/api/resources/amendments/client/requests/UnifiedAmendmentPreviewRequest.d.ts +33 -0
  22. package/dist/cjs/api/resources/amendments/client/requests/UnifiedAmendmentPreviewRequest.js +14 -0
  23. package/dist/cjs/api/resources/amendments/client/requests/index.d.ts +3 -0
  24. package/dist/cjs/api/resources/amendments/client/requests/index.js +2 -0
  25. package/dist/cjs/api/resources/amendments/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/amendments/index.js +17 -0
  27. package/dist/cjs/api/resources/analytics/client/Client.d.ts +63 -0
  28. package/dist/cjs/api/resources/analytics/client/Client.js +273 -0
  29. package/dist/cjs/api/resources/analytics/client/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/analytics/client/index.js +17 -0
  31. package/dist/cjs/api/resources/analytics/client/requests/GetSignalsMetadataRequest.d.ts +12 -0
  32. package/dist/cjs/api/resources/analytics/client/requests/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/analytics/client/requests/index.js +2 -0
  34. package/dist/cjs/api/resources/analytics/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/analytics/index.js +17 -0
  36. package/dist/cjs/api/resources/analyticsExperimental/client/Client.d.ts +69 -0
  37. package/dist/cjs/api/resources/analyticsExperimental/client/Client.js +279 -0
  38. package/dist/cjs/api/resources/analyticsExperimental/client/index.d.ts +1 -0
  39. package/dist/cjs/api/resources/analyticsExperimental/client/index.js +17 -0
  40. package/dist/cjs/api/resources/analyticsExperimental/client/requests/GetExperimentalSignalsMetadataRequest.d.ts +12 -0
  41. package/dist/cjs/api/resources/analyticsExperimental/client/requests/GetExperimentalSignalsMetadataRequest.js +3 -0
  42. package/dist/cjs/api/resources/analyticsExperimental/client/requests/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/analyticsExperimental/client/requests/index.js +2 -0
  44. package/dist/cjs/api/resources/analyticsExperimental/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/analyticsExperimental/index.js +17 -0
  46. package/dist/cjs/api/resources/checkouts/client/requests/CreateCheckoutRequest.d.ts +3 -1
  47. package/dist/cjs/api/resources/credits/client/Client.d.ts +57 -2
  48. package/dist/cjs/api/resources/credits/client/Client.js +267 -5
  49. package/dist/cjs/api/resources/credits/client/index.d.ts +1 -1
  50. package/dist/cjs/api/resources/credits/client/index.js +15 -0
  51. package/dist/cjs/api/resources/credits/client/requests/CreateCreditCurrencyRequest.d.ts +16 -0
  52. package/dist/cjs/api/resources/credits/client/requests/CreateCreditCurrencyRequest.js +3 -0
  53. package/dist/cjs/api/resources/credits/client/requests/ListCreditCurrenciesRequest.d.ts +9 -0
  54. package/dist/cjs/api/resources/credits/client/requests/ListCreditCurrenciesRequest.js +3 -0
  55. package/dist/cjs/api/resources/credits/client/requests/ListCreditTransactionsRequest.d.ts +25 -0
  56. package/dist/cjs/api/resources/credits/client/requests/ListCreditTransactionsRequest.js +3 -0
  57. package/dist/cjs/api/resources/credits/client/requests/UpdateCreditCurrencyRequest.d.ts +24 -0
  58. package/dist/cjs/api/resources/credits/client/requests/UpdateCreditCurrencyRequest.js +12 -0
  59. package/dist/cjs/api/resources/credits/client/requests/index.d.ts +4 -0
  60. package/dist/cjs/api/resources/credits/client/requests/index.js +2 -0
  61. package/dist/cjs/api/resources/credits/index.d.ts +1 -0
  62. package/dist/cjs/api/resources/credits/index.js +1 -0
  63. package/dist/cjs/api/resources/credits/types/ListCreditCurrenciesRequestStatus.d.ts +6 -0
  64. package/dist/cjs/api/resources/credits/types/ListCreditCurrenciesRequestStatus.js +9 -0
  65. package/dist/cjs/api/resources/credits/types/ListCreditTransactionsRequestType.d.ts +6 -0
  66. package/dist/cjs/api/resources/credits/types/ListCreditTransactionsRequestType.js +9 -0
  67. package/dist/cjs/api/resources/credits/types/index.d.ts +2 -0
  68. package/dist/cjs/api/resources/credits/types/index.js +18 -0
  69. package/dist/cjs/api/resources/customViewsExperimental/client/Client.d.ts +177 -0
  70. package/dist/cjs/api/resources/customViewsExperimental/client/Client.js +688 -0
  71. package/dist/cjs/api/resources/customViewsExperimental/client/index.d.ts +1 -0
  72. package/dist/cjs/api/resources/customViewsExperimental/client/index.js +17 -0
  73. package/dist/cjs/api/resources/customViewsExperimental/client/requests/CreateCustomViewRequest.d.ts +66 -0
  74. package/dist/cjs/api/resources/customViewsExperimental/client/requests/CreateCustomViewRequest.js +26 -0
  75. package/dist/cjs/api/resources/customViewsExperimental/client/requests/GetCustomViewDataRequest.d.ts +22 -0
  76. package/dist/cjs/api/resources/customViewsExperimental/client/requests/GetCustomViewDataRequest.js +3 -0
  77. package/dist/cjs/api/resources/customViewsExperimental/client/requests/GetCustomViewEmbedTokenRequest.d.ts +14 -0
  78. package/dist/cjs/api/resources/customViewsExperimental/client/requests/GetCustomViewEmbedTokenRequest.js +3 -0
  79. package/dist/cjs/api/resources/customViewsExperimental/client/requests/GetCustomViewRequest.d.ts +9 -0
  80. package/dist/cjs/api/resources/customViewsExperimental/client/requests/GetCustomViewRequest.js +3 -0
  81. package/dist/cjs/api/resources/customViewsExperimental/client/requests/PublishCustomViewRequest.d.ts +9 -0
  82. package/dist/cjs/api/resources/customViewsExperimental/client/requests/PublishCustomViewRequest.js +3 -0
  83. package/dist/cjs/api/resources/customViewsExperimental/client/requests/UpdateCustomViewPeriodRequest.d.ts +46 -0
  84. package/dist/cjs/api/resources/customViewsExperimental/client/requests/UpdateCustomViewPeriodRequest.js +21 -0
  85. package/dist/cjs/api/resources/customViewsExperimental/client/requests/UpdateCustomViewRequest.d.ts +26 -0
  86. package/dist/cjs/api/resources/customViewsExperimental/client/requests/UpdateCustomViewRequest.js +3 -0
  87. package/dist/cjs/api/resources/customViewsExperimental/client/requests/index.d.ts +7 -0
  88. package/dist/cjs/api/resources/customViewsExperimental/client/requests/index.js +2 -0
  89. package/dist/cjs/api/resources/customViewsExperimental/index.d.ts +2 -0
  90. package/dist/cjs/api/resources/customViewsExperimental/index.js +18 -0
  91. package/dist/cjs/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodKind.d.ts +5 -0
  92. package/dist/cjs/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodKind.js +8 -0
  93. package/dist/cjs/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodUnit.d.ts +6 -0
  94. package/dist/cjs/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodUnit.js +9 -0
  95. package/dist/cjs/api/resources/customViewsExperimental/types/index.d.ts +2 -0
  96. package/dist/cjs/api/resources/customViewsExperimental/types/index.js +18 -0
  97. package/dist/cjs/api/resources/customerGroups/client/Client.d.ts +153 -0
  98. package/dist/cjs/api/resources/customerGroups/client/Client.js +636 -0
  99. package/dist/cjs/api/resources/customerGroups/client/index.d.ts +1 -0
  100. package/dist/cjs/api/resources/customerGroups/client/index.js +17 -0
  101. package/dist/cjs/api/resources/customerGroups/client/requests/CreateCustomerGroupMembersRequest.d.ts +14 -0
  102. package/dist/cjs/api/resources/customerGroups/client/requests/CreateCustomerGroupMembersRequest.js +3 -0
  103. package/dist/cjs/api/resources/customerGroups/client/requests/CreateCustomerGroupRequest.d.ts +10 -0
  104. package/dist/cjs/api/resources/customerGroups/client/requests/CreateCustomerGroupRequest.js +3 -0
  105. package/dist/cjs/api/resources/customerGroups/client/requests/DeleteCustomerGroupMembersRequest.d.ts +14 -0
  106. package/dist/cjs/api/resources/customerGroups/client/requests/DeleteCustomerGroupMembersRequest.js +3 -0
  107. package/dist/cjs/api/resources/customerGroups/client/requests/DeleteCustomerGroupRequest.d.ts +9 -0
  108. package/dist/cjs/api/resources/customerGroups/client/requests/DeleteCustomerGroupRequest.js +3 -0
  109. package/dist/cjs/api/resources/customerGroups/client/requests/GetCustomerGroupRequest.d.ts +9 -0
  110. package/dist/cjs/api/resources/customerGroups/client/requests/GetCustomerGroupRequest.js +3 -0
  111. package/dist/cjs/api/resources/customerGroups/client/requests/ListCustomerGroupsRequest.d.ts +8 -0
  112. package/dist/cjs/api/resources/customerGroups/client/requests/ListCustomerGroupsRequest.js +3 -0
  113. package/dist/cjs/api/resources/customerGroups/client/requests/UpdateCustomerGroupMembersRequest.d.ts +14 -0
  114. package/dist/cjs/api/resources/customerGroups/client/requests/UpdateCustomerGroupMembersRequest.js +3 -0
  115. package/dist/cjs/api/resources/customerGroups/client/requests/UpdateCustomerGroupRequest.d.ts +11 -0
  116. package/dist/cjs/api/resources/customerGroups/client/requests/UpdateCustomerGroupRequest.js +3 -0
  117. package/dist/cjs/api/resources/customerGroups/client/requests/index.d.ts +8 -0
  118. package/dist/cjs/api/resources/customerGroups/client/requests/index.js +2 -0
  119. package/dist/cjs/api/resources/customerGroups/index.d.ts +1 -0
  120. package/dist/cjs/api/resources/customerGroups/index.js +17 -0
  121. package/dist/cjs/api/resources/customers/client/Client.d.ts +576 -12
  122. package/dist/cjs/api/resources/customers/client/Client.js +2292 -98
  123. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerAliasByExternalIdRequest.d.ts +15 -0
  124. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerAliasByExternalIdRequest.js +3 -0
  125. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerAliasRequest.d.ts +15 -0
  126. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerAliasRequest.js +3 -0
  127. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +1 -1
  128. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerUnitByExternalIdRequest.d.ts +15 -0
  129. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerUnitByExternalIdRequest.js +3 -0
  130. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerUnitRequest.d.ts +15 -0
  131. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerUnitRequest.js +3 -0
  132. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerAliasByExternalIdRequest.d.ts +13 -0
  133. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerAliasByExternalIdRequest.js +3 -0
  134. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerAliasRequest.d.ts +13 -0
  135. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerAliasRequest.js +3 -0
  136. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerByExternalIdRequest.d.ts +2 -1
  137. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerByIdRequest.d.ts +2 -1
  138. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerUnitByExternalIdRequest.d.ts +13 -0
  139. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerUnitByExternalIdRequest.js +3 -0
  140. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerUnitRequest.d.ts +13 -0
  141. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerUnitRequest.js +3 -0
  142. package/dist/cjs/api/resources/customers/client/requests/EndCustomerUnitCapByExternalIdRequest.d.ts +16 -0
  143. package/dist/cjs/api/resources/customers/client/requests/EndCustomerUnitCapByExternalIdRequest.js +3 -0
  144. package/dist/cjs/api/resources/customers/client/requests/EndCustomerUnitCapRequest.d.ts +16 -0
  145. package/dist/cjs/api/resources/customers/client/requests/EndCustomerUnitCapRequest.js +3 -0
  146. package/dist/cjs/api/resources/customers/client/requests/GetCustomerByExternalIdRequest.d.ts +2 -1
  147. package/dist/cjs/api/resources/customers/client/requests/GetCustomerByIdRequest.d.ts +2 -1
  148. package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.d.ts +2 -1
  149. package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.d.ts +2 -1
  150. package/dist/cjs/api/resources/customers/client/requests/GetCustomerStateByExternalIdRequest.d.ts +10 -0
  151. package/dist/cjs/api/resources/customers/client/requests/GetCustomerStateByExternalIdRequest.js +3 -0
  152. package/dist/cjs/api/resources/customers/client/requests/GetCustomerStateByIdRequest.d.ts +10 -0
  153. package/dist/cjs/api/resources/customers/client/requests/GetCustomerStateByIdRequest.js +3 -0
  154. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitByExternalIdRequest.d.ts +13 -0
  155. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitByExternalIdRequest.js +3 -0
  156. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitCapByExternalIdRequest.d.ts +16 -0
  157. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitCapByExternalIdRequest.js +3 -0
  158. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitCapRequest.d.ts +16 -0
  159. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitCapRequest.js +3 -0
  160. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitRequest.d.ts +13 -0
  161. package/dist/cjs/api/resources/customers/client/requests/GetCustomerUnitRequest.js +3 -0
  162. package/dist/cjs/api/resources/customers/client/requests/GrantCustomerCreditsByExternalIdRequest.d.ts +18 -0
  163. package/dist/cjs/api/resources/customers/client/requests/GrantCustomerCreditsByExternalIdRequest.js +3 -0
  164. package/dist/cjs/api/resources/customers/client/requests/GrantCustomerCreditsRequest.d.ts +18 -0
  165. package/dist/cjs/api/resources/customers/client/requests/GrantCustomerCreditsRequest.js +3 -0
  166. package/dist/cjs/api/resources/customers/client/requests/ListCustomerAliasesByExternalIdRequest.d.ts +12 -0
  167. package/dist/cjs/api/resources/customers/client/requests/ListCustomerAliasesByExternalIdRequest.js +3 -0
  168. package/dist/cjs/api/resources/customers/client/requests/ListCustomerAliasesRequest.d.ts +12 -0
  169. package/dist/cjs/api/resources/customers/client/requests/ListCustomerAliasesRequest.js +3 -0
  170. package/dist/cjs/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionByExternalIdRequest.d.ts +12 -0
  171. package/dist/cjs/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionByExternalIdRequest.js +3 -0
  172. package/dist/cjs/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionRequest.d.ts +12 -0
  173. package/dist/cjs/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionRequest.js +3 -0
  174. package/dist/cjs/api/resources/customers/client/requests/ListCustomerUnitsByExternalIdRequest.d.ts +20 -0
  175. package/dist/cjs/api/resources/customers/client/requests/ListCustomerUnitsByExternalIdRequest.js +3 -0
  176. package/dist/cjs/api/resources/customers/client/requests/ListCustomerUnitsRequest.d.ts +20 -0
  177. package/dist/cjs/api/resources/customers/client/requests/ListCustomerUnitsRequest.js +3 -0
  178. package/dist/cjs/api/resources/customers/client/requests/ListCustomersRequest.d.ts +13 -0
  179. package/dist/cjs/api/resources/customers/client/requests/SetCustomerUnitCapByExternalIdRequest.d.ts +18 -0
  180. package/dist/cjs/api/resources/customers/client/requests/SetCustomerUnitCapByExternalIdRequest.js +3 -0
  181. package/dist/cjs/api/resources/customers/client/requests/SetCustomerUnitCapRequest.d.ts +18 -0
  182. package/dist/cjs/api/resources/customers/client/requests/SetCustomerUnitCapRequest.js +3 -0
  183. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerByExternalIdRequest.d.ts +2 -1
  184. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerByIdRequest.d.ts +2 -1
  185. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerUnitByExternalIdRequest.d.ts +16 -0
  186. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerUnitByExternalIdRequest.js +3 -0
  187. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerUnitRequest.d.ts +16 -0
  188. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerUnitRequest.js +3 -0
  189. package/dist/cjs/api/resources/customers/client/requests/index.d.ts +28 -0
  190. package/dist/cjs/api/resources/customers/index.d.ts +1 -0
  191. package/dist/cjs/api/resources/customers/index.js +1 -0
  192. package/dist/cjs/api/resources/customers/types/ListCustomerUnitsByExternalIdRequestStatus.d.ts +5 -0
  193. package/dist/cjs/api/resources/customers/types/ListCustomerUnitsByExternalIdRequestStatus.js +8 -0
  194. package/dist/cjs/api/resources/customers/types/ListCustomerUnitsRequestStatus.d.ts +5 -0
  195. package/dist/cjs/api/resources/customers/types/ListCustomerUnitsRequestStatus.js +8 -0
  196. package/dist/cjs/api/resources/customers/types/ListCustomersRequestCreationState.d.ts +5 -0
  197. package/dist/cjs/api/resources/customers/types/ListCustomersRequestCreationState.js +8 -0
  198. package/dist/cjs/api/resources/customers/types/ListCustomersRequestStatus.d.ts +5 -0
  199. package/dist/cjs/api/resources/customers/types/ListCustomersRequestStatus.js +8 -0
  200. package/dist/cjs/api/resources/customers/types/index.d.ts +4 -0
  201. package/dist/cjs/api/resources/customers/types/index.js +20 -0
  202. package/dist/cjs/api/resources/index.d.ts +28 -0
  203. package/dist/cjs/api/resources/index.js +29 -1
  204. package/dist/cjs/api/resources/invoices/client/Client.js +37 -1
  205. package/dist/cjs/api/resources/invoices/client/requests/ListInvoicesRequest.d.ts +25 -0
  206. package/dist/cjs/api/resources/invoices/index.d.ts +1 -0
  207. package/dist/cjs/api/resources/invoices/index.js +1 -0
  208. package/dist/cjs/api/resources/invoices/types/ListInvoicesRequestPaymentStatus.d.ts +8 -0
  209. package/dist/cjs/api/resources/invoices/types/ListInvoicesRequestPaymentStatus.js +11 -0
  210. package/dist/cjs/api/resources/invoices/types/ListInvoicesRequestStatus.d.ts +10 -0
  211. package/dist/cjs/api/resources/invoices/types/ListInvoicesRequestStatus.js +13 -0
  212. package/dist/cjs/api/resources/invoices/types/index.d.ts +2 -0
  213. package/dist/cjs/api/resources/invoices/types/index.js +18 -0
  214. package/dist/cjs/api/resources/orders/client/Client.d.ts +18 -0
  215. package/dist/cjs/api/resources/orders/client/Client.js +99 -1
  216. package/dist/cjs/api/resources/orders/client/requests/ActivateOrderByIdRequest.d.ts +9 -0
  217. package/dist/cjs/api/resources/orders/client/requests/ActivateOrderByIdRequest.js +3 -0
  218. package/dist/cjs/api/resources/orders/client/requests/CreateOrderRequest.d.ts +2 -0
  219. package/dist/cjs/api/resources/orders/client/requests/ListOrdersRequest.d.ts +19 -0
  220. package/dist/cjs/api/resources/orders/client/requests/UpdateOrderRequest.d.ts +2 -0
  221. package/dist/cjs/api/resources/orders/client/requests/index.d.ts +1 -0
  222. package/dist/cjs/api/resources/orders/types/ListOrdersRequestCreationState.d.ts +5 -0
  223. package/dist/cjs/api/resources/orders/types/ListOrdersRequestCreationState.js +8 -0
  224. package/dist/cjs/api/resources/orders/types/OrderStatusFilter.d.ts +7 -0
  225. package/dist/cjs/api/resources/orders/types/OrderStatusFilter.js +10 -0
  226. package/dist/cjs/api/resources/orders/types/index.d.ts +2 -0
  227. package/dist/cjs/api/resources/orders/types/index.js +2 -0
  228. package/dist/cjs/api/resources/paymentAllocations/client/Client.d.ts +55 -0
  229. package/dist/cjs/api/resources/paymentAllocations/client/Client.js +224 -0
  230. package/dist/cjs/api/resources/paymentAllocations/client/index.d.ts +1 -0
  231. package/dist/cjs/api/resources/paymentAllocations/client/index.js +17 -0
  232. package/dist/cjs/api/resources/paymentAllocations/client/requests/CreatePaymentAllocationRequest.d.ts +17 -0
  233. package/dist/cjs/api/resources/paymentAllocations/client/requests/CreatePaymentAllocationRequest.js +3 -0
  234. package/dist/cjs/api/resources/paymentAllocations/client/requests/ListPaymentAllocationsRequest.d.ts +15 -0
  235. package/dist/cjs/api/resources/paymentAllocations/client/requests/ListPaymentAllocationsRequest.js +3 -0
  236. package/dist/cjs/api/resources/paymentAllocations/client/requests/index.d.ts +2 -0
  237. package/dist/cjs/api/resources/paymentAllocations/client/requests/index.js +2 -0
  238. package/dist/cjs/api/resources/paymentAllocations/index.d.ts +1 -0
  239. package/dist/cjs/api/resources/paymentAllocations/index.js +17 -0
  240. package/dist/cjs/api/resources/paymentMethods/client/Client.d.ts +104 -0
  241. package/dist/cjs/api/resources/paymentMethods/client/Client.js +446 -0
  242. package/dist/cjs/api/resources/paymentMethods/client/index.d.ts +1 -0
  243. package/dist/cjs/api/resources/paymentMethods/client/index.js +17 -0
  244. package/dist/cjs/api/resources/paymentMethods/client/requests/CreatePaymentMethodRequest.d.ts +18 -0
  245. package/dist/cjs/api/resources/paymentMethods/client/requests/CreatePaymentMethodRequest.js +3 -0
  246. package/dist/cjs/api/resources/paymentMethods/client/requests/DeletePaymentMethodRequest.d.ts +9 -0
  247. package/dist/cjs/api/resources/paymentMethods/client/requests/DeletePaymentMethodRequest.js +3 -0
  248. package/dist/cjs/api/resources/paymentMethods/client/requests/GetPaymentMethodRequest.d.ts +9 -0
  249. package/dist/cjs/api/resources/paymentMethods/client/requests/GetPaymentMethodRequest.js +3 -0
  250. package/dist/cjs/api/resources/paymentMethods/client/requests/ListPaymentMethodsRequest.d.ts +14 -0
  251. package/dist/cjs/api/resources/paymentMethods/client/requests/ListPaymentMethodsRequest.js +3 -0
  252. package/dist/cjs/api/resources/paymentMethods/client/requests/UpdateDefaultPaymentMethodRequest.d.ts +9 -0
  253. package/dist/cjs/api/resources/paymentMethods/client/requests/UpdateDefaultPaymentMethodRequest.js +3 -0
  254. package/dist/cjs/api/resources/paymentMethods/client/requests/index.d.ts +5 -0
  255. package/dist/cjs/api/resources/paymentMethods/client/requests/index.js +2 -0
  256. package/dist/cjs/api/resources/paymentMethods/index.d.ts +1 -0
  257. package/dist/cjs/api/resources/paymentMethods/index.js +17 -0
  258. package/dist/cjs/api/resources/payments/client/Client.d.ts +68 -0
  259. package/dist/cjs/api/resources/payments/client/Client.js +293 -0
  260. package/dist/cjs/api/resources/payments/client/index.d.ts +1 -0
  261. package/dist/cjs/api/resources/payments/client/index.js +17 -0
  262. package/dist/cjs/api/resources/payments/client/requests/CreatePaymentRequest.d.ts +25 -0
  263. package/dist/cjs/api/resources/payments/client/requests/CreatePaymentRequest.js +3 -0
  264. package/dist/cjs/api/resources/payments/client/requests/GetPaymentRequest.d.ts +9 -0
  265. package/dist/cjs/api/resources/payments/client/requests/GetPaymentRequest.js +3 -0
  266. package/dist/cjs/api/resources/payments/client/requests/ListPaymentsRequest.d.ts +15 -0
  267. package/dist/cjs/api/resources/payments/client/requests/ListPaymentsRequest.js +3 -0
  268. package/dist/cjs/api/resources/payments/client/requests/index.d.ts +3 -0
  269. package/dist/cjs/api/resources/payments/client/requests/index.js +2 -0
  270. package/dist/cjs/api/resources/payments/index.d.ts +2 -0
  271. package/dist/cjs/api/resources/payments/index.js +18 -0
  272. package/dist/cjs/api/resources/payments/types/ListPaymentsRequestStatus.d.ts +9 -0
  273. package/dist/cjs/api/resources/payments/types/ListPaymentsRequestStatus.js +12 -0
  274. package/dist/cjs/api/resources/payments/types/index.d.ts +1 -0
  275. package/dist/cjs/api/resources/payments/types/index.js +17 -0
  276. package/dist/cjs/api/resources/plans/client/Client.d.ts +152 -0
  277. package/dist/cjs/api/resources/plans/client/Client.js +593 -0
  278. package/dist/cjs/api/resources/plans/client/index.d.ts +1 -0
  279. package/dist/cjs/api/resources/plans/client/index.js +17 -0
  280. package/dist/cjs/api/resources/plans/client/requests/CreatePlanRequest.d.ts +28 -0
  281. package/dist/cjs/api/resources/plans/client/requests/CreatePlanRequest.js +3 -0
  282. package/dist/cjs/api/resources/plans/client/requests/GetPlanByExternalIdRequest.d.ts +9 -0
  283. package/dist/cjs/api/resources/plans/client/requests/GetPlanByExternalIdRequest.js +3 -0
  284. package/dist/cjs/api/resources/plans/client/requests/GetPlanByIdRequest.d.ts +9 -0
  285. package/dist/cjs/api/resources/plans/client/requests/GetPlanByIdRequest.js +3 -0
  286. package/dist/cjs/api/resources/plans/client/requests/ListPlansRequest.d.ts +12 -0
  287. package/dist/cjs/api/resources/plans/client/requests/ListPlansRequest.js +3 -0
  288. package/dist/cjs/api/resources/plans/client/requests/UpdatePlanByExternalIdRequest.d.ts +12 -0
  289. package/dist/cjs/api/resources/plans/client/requests/UpdatePlanByExternalIdRequest.js +3 -0
  290. package/dist/cjs/api/resources/plans/client/requests/UpdatePlanByIdRequest.d.ts +12 -0
  291. package/dist/cjs/api/resources/plans/client/requests/UpdatePlanByIdRequest.js +3 -0
  292. package/dist/cjs/api/resources/plans/client/requests/UpdatePlanUpgradePathRequest.d.ts +15 -0
  293. package/dist/cjs/api/resources/plans/client/requests/UpdatePlanUpgradePathRequest.js +3 -0
  294. package/dist/cjs/api/resources/plans/client/requests/index.d.ts +7 -0
  295. package/dist/cjs/api/resources/plans/client/requests/index.js +2 -0
  296. package/dist/cjs/api/resources/plans/index.d.ts +1 -0
  297. package/dist/cjs/api/resources/plans/index.js +17 -0
  298. package/dist/cjs/api/resources/pricing/client/Client.d.ts +2 -2
  299. package/dist/cjs/api/resources/pricing/client/Client.js +2 -2
  300. package/dist/cjs/api/resources/pricing/client/requests/UpdatePricingRequest.d.ts +1 -1
  301. package/dist/cjs/api/resources/products/client/Client.d.ts +9 -9
  302. package/dist/cjs/api/resources/products/client/Client.js +15 -6
  303. package/dist/cjs/api/resources/products/client/requests/ListProductsRequest.d.ts +6 -0
  304. package/dist/cjs/api/resources/signals/client/Client.d.ts +38 -0
  305. package/dist/cjs/api/resources/signals/client/Client.js +180 -0
  306. package/dist/cjs/api/resources/signals/client/requests/GetSignalByIdRequest.d.ts +10 -0
  307. package/dist/cjs/api/resources/signals/client/requests/GetSignalByIdRequest.js +3 -0
  308. package/dist/cjs/api/resources/signals/client/requests/ListSignalsRequest.d.ts +22 -0
  309. package/dist/cjs/api/resources/signals/client/requests/ListSignalsRequest.js +3 -0
  310. package/dist/cjs/api/resources/signals/client/requests/index.d.ts +2 -0
  311. package/dist/cjs/api/resources/valueMetrics/client/Client.d.ts +111 -0
  312. package/dist/cjs/api/resources/valueMetrics/client/Client.js +446 -0
  313. package/dist/cjs/api/resources/valueMetrics/client/index.d.ts +1 -0
  314. package/dist/cjs/api/resources/valueMetrics/client/index.js +17 -0
  315. package/dist/cjs/api/resources/valueMetrics/client/requests/ArchiveValueMetricRequest.d.ts +10 -0
  316. package/dist/cjs/api/resources/valueMetrics/client/requests/ArchiveValueMetricRequest.js +3 -0
  317. package/dist/cjs/api/resources/valueMetrics/client/requests/CreateValueMetricRequest.d.ts +57 -0
  318. package/dist/cjs/api/resources/valueMetrics/client/requests/CreateValueMetricRequest.js +15 -0
  319. package/dist/cjs/api/resources/valueMetrics/client/requests/GetValueMetricRequest.d.ts +9 -0
  320. package/dist/cjs/api/resources/valueMetrics/client/requests/GetValueMetricRequest.js +3 -0
  321. package/dist/cjs/api/resources/valueMetrics/client/requests/ListValueMetricsRequest.d.ts +10 -0
  322. package/dist/cjs/api/resources/valueMetrics/client/requests/ListValueMetricsRequest.js +3 -0
  323. package/dist/cjs/api/resources/valueMetrics/client/requests/UpdateValueMetricRequest.d.ts +43 -0
  324. package/dist/cjs/api/resources/valueMetrics/client/requests/UpdateValueMetricRequest.js +15 -0
  325. package/dist/cjs/api/resources/valueMetrics/client/requests/index.d.ts +5 -0
  326. package/dist/cjs/api/resources/valueMetrics/client/requests/index.js +2 -0
  327. package/dist/cjs/api/resources/valueMetrics/index.d.ts +1 -0
  328. package/dist/cjs/api/resources/valueMetrics/index.js +17 -0
  329. package/dist/cjs/api/resources/valueModels/client/Client.d.ts +118 -0
  330. package/dist/cjs/api/resources/valueModels/client/Client.js +419 -0
  331. package/dist/cjs/api/resources/valueModels/client/index.d.ts +1 -0
  332. package/dist/cjs/api/resources/valueModels/client/index.js +17 -0
  333. package/dist/cjs/api/resources/valueModels/client/requests/GetValueModelVersionRequest.d.ts +9 -0
  334. package/dist/cjs/api/resources/valueModels/client/requests/GetValueModelVersionRequest.js +3 -0
  335. package/dist/cjs/api/resources/valueModels/client/requests/ListValueModelVersionsRequest.d.ts +8 -0
  336. package/dist/cjs/api/resources/valueModels/client/requests/ListValueModelVersionsRequest.js +3 -0
  337. package/dist/cjs/api/resources/valueModels/client/requests/RefreshValueModelBackfillRequest.d.ts +5 -0
  338. package/dist/cjs/api/resources/valueModels/client/requests/RefreshValueModelBackfillRequest.js +3 -0
  339. package/dist/cjs/api/resources/valueModels/client/requests/ValueModelUploadRequest.d.ts +44 -0
  340. package/dist/cjs/api/resources/valueModels/client/requests/ValueModelUploadRequest.js +3 -0
  341. package/dist/cjs/api/resources/valueModels/client/requests/index.d.ts +4 -0
  342. package/dist/cjs/api/resources/valueModels/client/requests/index.js +2 -0
  343. package/dist/cjs/api/resources/valueModels/index.d.ts +1 -0
  344. package/dist/cjs/api/resources/valueModels/index.js +17 -0
  345. package/dist/cjs/api/resources/valueReceipts/client/Client.d.ts +42 -11
  346. package/dist/cjs/api/resources/valueReceipts/client/Client.js +153 -43
  347. package/dist/cjs/api/resources/valueReceipts/client/requests/index.d.ts +0 -1
  348. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +17 -2
  349. package/dist/cjs/api/resources/webhooks/client/Client.js +69 -1
  350. package/dist/cjs/api/resources/webhooks/client/requests/RotateWebhookSecretRequest.d.ts +5 -0
  351. package/dist/cjs/api/resources/webhooks/client/requests/RotateWebhookSecretRequest.js +3 -0
  352. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -0
  353. package/dist/cjs/api/resources/webhooks/types/TestWebhookRequestWebhookName.d.ts +2 -0
  354. package/dist/cjs/api/resources/webhooks/types/TestWebhookRequestWebhookName.js +2 -0
  355. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.d.ts +2 -0
  356. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.js +2 -0
  357. package/dist/cjs/api/types/AddAttributeIntent.d.ts +45 -0
  358. package/dist/cjs/api/types/AddAttributeIntent.js +24 -0
  359. package/dist/cjs/api/types/AddFromCatalogIntent.d.ts +22 -0
  360. package/dist/cjs/api/types/AddFromCatalogIntent.js +13 -0
  361. package/dist/cjs/api/types/AddMembersResponse.d.ts +5 -0
  362. package/dist/cjs/api/types/AddMembersResponse.js +3 -0
  363. package/dist/cjs/api/types/AmendmentAddAttributeOptions.d.ts +9 -0
  364. package/dist/cjs/api/types/AmendmentAddAttributeOptions.js +3 -0
  365. package/dist/cjs/api/types/AmendmentAddAxisOptions.d.ts +10 -0
  366. package/dist/cjs/api/types/AmendmentAddAxisOptions.js +3 -0
  367. package/dist/cjs/api/types/AmendmentAttributeOptions.d.ts +14 -0
  368. package/dist/cjs/api/types/AmendmentAttributeOptions.js +3 -0
  369. package/dist/cjs/api/types/AmendmentAttributeState.d.ts +24 -0
  370. package/dist/cjs/api/types/AmendmentAttributeState.js +3 -0
  371. package/dist/cjs/api/types/AmendmentAxisChoiceValue.d.ts +10 -0
  372. package/dist/cjs/api/types/AmendmentAxisChoiceValue.js +13 -0
  373. package/dist/cjs/api/types/AmendmentAxisId.d.ts +8 -0
  374. package/dist/cjs/api/types/AmendmentAxisId.js +11 -0
  375. package/dist/cjs/api/types/AmendmentAxisOptions.d.ts +16 -0
  376. package/dist/cjs/api/types/AmendmentAxisOptions.js +3 -0
  377. package/dist/cjs/api/types/AmendmentAxisRelevance.d.ts +6 -0
  378. package/dist/cjs/api/types/AmendmentAxisRelevance.js +9 -0
  379. package/dist/cjs/api/types/AmendmentBillingType.d.ts +6 -0
  380. package/dist/cjs/api/types/AmendmentBillingType.js +9 -0
  381. package/dist/cjs/api/types/AmendmentChargeType.d.ts +8 -0
  382. package/dist/cjs/api/types/AmendmentChargeType.js +11 -0
  383. package/dist/cjs/api/types/AmendmentCreditEffectKind.d.ts +6 -0
  384. package/dist/cjs/api/types/AmendmentCreditEffectKind.js +9 -0
  385. package/dist/cjs/api/types/AmendmentErrorResponse.d.ts +7 -0
  386. package/dist/cjs/api/types/AmendmentErrorResponse.js +3 -0
  387. package/dist/cjs/api/types/AmendmentIntentKind.d.ts +10 -0
  388. package/dist/cjs/api/types/AmendmentIntentKind.js +13 -0
  389. package/dist/cjs/api/types/AmendmentIntentOptions.d.ts +7 -0
  390. package/dist/cjs/api/types/AmendmentIntentOptions.js +3 -0
  391. package/dist/cjs/api/types/AmendmentLineOptions.d.ts +12 -0
  392. package/dist/cjs/api/types/AmendmentLineOptions.js +3 -0
  393. package/dist/cjs/api/types/AmendmentMoneyBilling.d.ts +6 -0
  394. package/dist/cjs/api/types/AmendmentMoneyBilling.js +9 -0
  395. package/dist/cjs/api/types/AmendmentOptions.d.ts +26 -0
  396. package/dist/cjs/api/types/AmendmentOptions.js +3 -0
  397. package/dist/cjs/api/types/AmendmentPlan.d.ts +24 -0
  398. package/dist/cjs/api/types/AmendmentPlan.js +3 -0
  399. package/dist/cjs/api/types/AmendmentPlanAttributeDiff.d.ts +18 -0
  400. package/dist/cjs/api/types/AmendmentPlanAttributeDiff.js +3 -0
  401. package/dist/cjs/api/types/AmendmentPlanChange.d.ts +9 -0
  402. package/dist/cjs/api/types/AmendmentPlanChange.js +12 -0
  403. package/dist/cjs/api/types/AmendmentPlanCreditEffect.d.ts +15 -0
  404. package/dist/cjs/api/types/AmendmentPlanCreditEffect.js +3 -0
  405. package/dist/cjs/api/types/AmendmentPlanLineType.d.ts +8 -0
  406. package/dist/cjs/api/types/AmendmentPlanLineType.js +11 -0
  407. package/dist/cjs/api/types/AmendmentPlanMoneyEffect.d.ts +31 -0
  408. package/dist/cjs/api/types/AmendmentPlanMoneyEffect.js +13 -0
  409. package/dist/cjs/api/types/AmendmentPlanTreatmentResolution.d.ts +12 -0
  410. package/dist/cjs/api/types/AmendmentPlanTreatmentResolution.js +3 -0
  411. package/dist/cjs/api/types/AmendmentPlanUsageEffect.d.ts +17 -0
  412. package/dist/cjs/api/types/AmendmentPlanUsageEffect.js +12 -0
  413. package/dist/cjs/api/types/AmendmentPricingClause.d.ts +14 -0
  414. package/dist/cjs/api/types/AmendmentPricingClause.js +3 -0
  415. package/dist/cjs/api/types/AmendmentPricingModel.d.ts +11 -0
  416. package/dist/cjs/api/types/AmendmentPricingModel.js +14 -0
  417. package/dist/cjs/api/types/AmendmentTreatmentSource.d.ts +7 -0
  418. package/dist/cjs/api/types/AmendmentTreatmentSource.js +10 -0
  419. package/dist/cjs/api/types/AnalyticsColumn.d.ts +5 -0
  420. package/dist/cjs/api/types/AnalyticsColumn.js +3 -0
  421. package/dist/cjs/api/types/AnalyticsQueryRequest.d.ts +4 -0
  422. package/dist/cjs/api/types/AnalyticsQueryRequest.js +3 -0
  423. package/dist/cjs/api/types/AnalyticsQueryResponse.d.ts +15 -0
  424. package/dist/cjs/api/types/AnalyticsQueryResponse.js +3 -0
  425. package/dist/cjs/api/types/AnalyticsSchemaColumn.d.ts +6 -0
  426. package/dist/cjs/api/types/AnalyticsSchemaColumn.js +3 -0
  427. package/dist/cjs/api/types/AnalyticsSchemaResponse.d.ts +4 -0
  428. package/dist/cjs/api/types/AnalyticsSchemaResponse.js +3 -0
  429. package/dist/cjs/api/types/AnalyticsSchemaView.d.ts +6 -0
  430. package/dist/cjs/api/types/AnalyticsSchemaView.js +3 -0
  431. package/dist/cjs/api/types/BackfillResponse.d.ts +4 -0
  432. package/dist/cjs/api/types/BackfillResponse.js +3 -0
  433. package/dist/cjs/api/types/ChargeStubAddAxisOptions.d.ts +34 -0
  434. package/dist/cjs/api/types/ChargeStubAddAxisOptions.js +19 -0
  435. package/dist/cjs/api/types/ChargeStubAxisOptions.d.ts +33 -0
  436. package/dist/cjs/api/types/ChargeStubAxisOptions.js +19 -0
  437. package/dist/cjs/api/types/Checkout.d.ts +2 -0
  438. package/dist/cjs/api/types/CheckoutCustomCard.d.ts +10 -0
  439. package/dist/cjs/api/types/CheckoutCustomCard.js +3 -0
  440. package/dist/cjs/api/types/CheckoutCustomCardInput.d.ts +10 -0
  441. package/dist/cjs/api/types/CheckoutCustomCardInput.js +3 -0
  442. package/dist/cjs/api/types/CheckoutDetails.d.ts +3 -0
  443. package/dist/cjs/api/types/CheckoutPlan.d.ts +4 -0
  444. package/dist/cjs/api/types/CheckoutPlan.js +3 -0
  445. package/dist/cjs/api/types/CheckoutPlanInput.d.ts +6 -0
  446. package/dist/cjs/api/types/CheckoutPlanInput.js +3 -0
  447. package/dist/cjs/api/types/CheckoutProduct.d.ts +3 -0
  448. package/dist/cjs/api/types/CheckoutProductInput.d.ts +3 -0
  449. package/dist/cjs/api/types/CheckoutSelectedProduct.d.ts +8 -0
  450. package/dist/cjs/api/types/CheckoutSelectedProduct.js +3 -0
  451. package/dist/cjs/api/types/CreateOrderLineAttributeRequest.d.ts +38 -5
  452. package/dist/cjs/api/types/CreateOrderLineAttributeRequest.js +8 -0
  453. package/dist/cjs/api/types/CreateOrderLineRequest.d.ts +4 -0
  454. package/dist/cjs/api/types/CreditBalance.d.ts +3 -1
  455. package/dist/cjs/api/types/CreditBenefitInput.d.ts +7 -5
  456. package/dist/cjs/api/types/CreditBenefitOutput.d.ts +6 -6
  457. package/dist/cjs/api/types/CreditCurrency.d.ts +17 -0
  458. package/dist/cjs/api/types/CreditCurrency.js +9 -0
  459. package/dist/cjs/api/types/CreditGrant.d.ts +3 -0
  460. package/dist/cjs/api/types/CreditGrantAddAxisOptions.d.ts +24 -0
  461. package/dist/cjs/api/types/CreditGrantAddAxisOptions.js +3 -0
  462. package/dist/cjs/api/types/CreditGrantAxisOptions.d.ts +23 -0
  463. package/dist/cjs/api/types/CreditGrantAxisOptions.js +3 -0
  464. package/dist/cjs/api/types/CreditGrantCreateRequest.d.ts +10 -0
  465. package/dist/cjs/api/types/CreditGrantCreateRequest.js +3 -0
  466. package/dist/cjs/api/types/CreditGrantCurrency.d.ts +6 -0
  467. package/dist/cjs/api/types/CreditGrantCurrency.js +3 -0
  468. package/dist/cjs/api/types/CreditGrantCustomer.d.ts +6 -0
  469. package/dist/cjs/api/types/CreditGrantCustomer.js +3 -0
  470. package/dist/cjs/api/types/CreditGrantResult.d.ts +19 -0
  471. package/dist/cjs/api/types/CreditGrantResult.js +11 -0
  472. package/dist/cjs/api/types/CreditGrantValue.d.ts +7 -0
  473. package/dist/cjs/api/types/CreditGrantValue.js +10 -0
  474. package/dist/cjs/api/types/CreditTransaction.d.ts +31 -0
  475. package/dist/cjs/api/types/CreditTransaction.js +13 -0
  476. package/dist/cjs/api/types/CreditTransactionCurrency.d.ts +6 -0
  477. package/dist/cjs/api/types/CreditTransactionCurrency.js +3 -0
  478. package/dist/cjs/api/types/CreditTransactionCustomer.d.ts +6 -0
  479. package/dist/cjs/api/types/CreditTransactionCustomer.js +3 -0
  480. package/dist/cjs/api/types/CreditTransactionListResponse.d.ts +6 -0
  481. package/dist/cjs/api/types/CreditTransactionListResponse.js +3 -0
  482. package/dist/cjs/api/types/CreditTransactionProduct.d.ts +11 -0
  483. package/dist/cjs/api/types/CreditTransactionProduct.js +3 -0
  484. package/dist/cjs/api/types/CurrencyCode.d.ts +4 -0
  485. package/dist/cjs/api/types/CurrencyCode.js +3 -0
  486. package/dist/cjs/api/types/CustomView.d.ts +25 -0
  487. package/dist/cjs/api/types/CustomView.js +17 -0
  488. package/dist/cjs/api/types/CustomViewAuthoringDetail.d.ts +69 -0
  489. package/dist/cjs/api/types/CustomViewAuthoringDetail.js +30 -0
  490. package/dist/cjs/api/types/CustomViewAuthoringGuide.d.ts +6 -0
  491. package/dist/cjs/api/types/CustomViewAuthoringGuide.js +3 -0
  492. package/dist/cjs/api/types/CustomViewDetail.d.ts +60 -0
  493. package/dist/cjs/api/types/CustomViewDetail.js +30 -0
  494. package/dist/cjs/api/types/CustomViewEmbedTokenResponse.d.ts +6 -0
  495. package/dist/cjs/api/types/CustomViewEmbedTokenResponse.js +3 -0
  496. package/dist/cjs/api/types/CustomViewFilter.d.ts +6 -0
  497. package/dist/cjs/api/types/CustomViewFilter.js +3 -0
  498. package/dist/cjs/api/types/CustomViewListResponse.d.ts +4 -0
  499. package/dist/cjs/api/types/CustomViewListResponse.js +3 -0
  500. package/dist/cjs/api/types/CustomViewPreviewHarness.d.ts +4 -0
  501. package/dist/cjs/api/types/CustomViewPreviewHarness.js +3 -0
  502. package/dist/cjs/api/types/CustomViewPreviewHarnessColumn.d.ts +16 -0
  503. package/dist/cjs/api/types/CustomViewPreviewHarnessColumn.js +14 -0
  504. package/dist/cjs/api/types/CustomViewPreviewHarnessRequest.d.ts +11 -0
  505. package/dist/cjs/api/types/CustomViewPreviewHarnessRequest.js +3 -0
  506. package/dist/cjs/api/types/CustomViewQuery.d.ts +6 -0
  507. package/dist/cjs/api/types/CustomViewQuery.js +3 -0
  508. package/dist/cjs/api/types/CustomViewSummary.d.ts +57 -0
  509. package/dist/cjs/api/types/CustomViewSummary.js +30 -0
  510. package/dist/cjs/api/types/CustomViewValidationFinding.d.ts +8 -0
  511. package/dist/cjs/api/types/CustomViewValidationFinding.js +3 -0
  512. package/dist/cjs/api/types/Customer.d.ts +14 -2
  513. package/dist/cjs/api/types/Customer.js +9 -0
  514. package/dist/cjs/api/types/CustomerAlias.d.ts +10 -0
  515. package/dist/cjs/api/types/CustomerAlias.js +3 -0
  516. package/dist/cjs/api/types/CustomerAliasCreateRequest.d.ts +8 -0
  517. package/dist/cjs/api/types/CustomerAliasCreateRequest.js +3 -0
  518. package/dist/cjs/api/types/CustomerAliasListResponse.d.ts +5 -0
  519. package/dist/cjs/api/types/CustomerAliasListResponse.js +3 -0
  520. package/dist/{esm/api/types/CustomerBillingAddress.d.mts → cjs/api/types/CustomerBillingAddressInput.d.ts} +1 -1
  521. package/dist/cjs/api/types/CustomerBillingAddressInput.js +3 -0
  522. package/dist/cjs/api/types/CustomerBillingAddressResponse.d.ts +11 -0
  523. package/dist/cjs/api/types/CustomerBillingAddressResponse.js +3 -0
  524. package/dist/cjs/api/types/CustomerConnections.d.ts +7 -0
  525. package/dist/cjs/api/types/CustomerConnections.js +3 -0
  526. package/dist/cjs/api/types/CustomerGroupDeleteResponse.d.ts +4 -0
  527. package/dist/cjs/api/types/CustomerGroupDeleteResponse.js +3 -0
  528. package/dist/cjs/api/types/CustomerGroupDetail.d.ts +10 -0
  529. package/dist/cjs/api/types/CustomerGroupDetail.js +3 -0
  530. package/dist/cjs/api/types/CustomerGroupListResponse.d.ts +5 -0
  531. package/dist/cjs/api/types/CustomerGroupListResponse.js +3 -0
  532. package/dist/cjs/api/types/CustomerGroupMember.d.ts +5 -0
  533. package/dist/cjs/api/types/CustomerGroupMember.js +3 -0
  534. package/dist/cjs/api/types/CustomerGroupSummary.d.ts +8 -0
  535. package/dist/cjs/api/types/CustomerGroupSummary.js +3 -0
  536. package/dist/cjs/api/types/CustomerState.d.ts +10 -0
  537. package/dist/cjs/api/types/CustomerState.js +3 -0
  538. package/dist/cjs/api/types/CustomerStateCheckoutLink.d.ts +18 -0
  539. package/dist/cjs/api/types/CustomerStateCheckoutLink.js +13 -0
  540. package/dist/cjs/api/types/CustomerStateCreditBalance.d.ts +6 -0
  541. package/dist/cjs/api/types/CustomerStateCreditBalance.js +3 -0
  542. package/dist/cjs/api/types/CustomerStateCreditSummary.d.ts +4 -0
  543. package/dist/cjs/api/types/CustomerStateCreditSummary.js +3 -0
  544. package/dist/cjs/api/types/CustomerStateCustomer.d.ts +8 -0
  545. package/dist/cjs/api/types/CustomerStateCustomer.js +3 -0
  546. package/dist/cjs/api/types/CustomerStateOrder.d.ts +21 -0
  547. package/dist/cjs/api/types/CustomerStateOrder.js +13 -0
  548. package/dist/cjs/api/types/CustomerStateProductRef.d.ts +5 -0
  549. package/dist/cjs/api/types/CustomerStateProductRef.js +3 -0
  550. package/dist/cjs/api/types/CustomerStateSeat.d.ts +17 -0
  551. package/dist/cjs/api/types/CustomerStateSeat.js +11 -0
  552. package/dist/cjs/api/types/CustomerStateSeatAssignee.d.ts +6 -0
  553. package/dist/cjs/api/types/CustomerStateSeatAssignee.js +3 -0
  554. package/dist/cjs/api/types/CustomerStateSeats.d.ts +7 -0
  555. package/dist/cjs/api/types/CustomerStateSeats.js +3 -0
  556. package/dist/cjs/api/types/CustomerUnit.d.ts +25 -0
  557. package/dist/cjs/api/types/CustomerUnit.js +12 -0
  558. package/dist/cjs/api/types/CustomerUnitAttribution.d.ts +7 -0
  559. package/dist/cjs/api/types/CustomerUnitAttribution.js +3 -0
  560. package/dist/cjs/api/types/CustomerUnitCapCurrentPeriod.d.ts +11 -0
  561. package/dist/cjs/api/types/CustomerUnitCapCurrentPeriod.js +3 -0
  562. package/dist/cjs/api/types/CustomerUnitCapEndResponse.d.ts +12 -0
  563. package/dist/cjs/api/types/CustomerUnitCapEndResponse.js +3 -0
  564. package/dist/cjs/api/types/CustomerUnitCapEndedPolicy.d.ts +24 -0
  565. package/dist/cjs/api/types/CustomerUnitCapEndedPolicy.js +11 -0
  566. package/dist/cjs/api/types/CustomerUnitCapOpenPolicy.d.ts +29 -0
  567. package/dist/cjs/api/types/CustomerUnitCapOpenPolicy.js +15 -0
  568. package/dist/cjs/api/types/CustomerUnitCapPeriod.d.ts +6 -0
  569. package/dist/cjs/api/types/CustomerUnitCapPeriod.js +3 -0
  570. package/dist/cjs/api/types/CustomerUnitCapPolicy.d.ts +24 -0
  571. package/dist/cjs/api/types/CustomerUnitCapPolicy.js +11 -0
  572. package/dist/cjs/api/types/CustomerUnitCapResponse.d.ts +11 -0
  573. package/dist/cjs/api/types/CustomerUnitCapResponse.js +3 -0
  574. package/dist/cjs/api/types/CustomerUnitCapSet.d.ts +17 -0
  575. package/dist/cjs/api/types/CustomerUnitCapSet.js +11 -0
  576. package/dist/cjs/api/types/CustomerUnitCapSetResponse.d.ts +11 -0
  577. package/dist/cjs/api/types/CustomerUnitCapSetResponse.js +3 -0
  578. package/dist/cjs/api/types/CustomerUnitCreate.d.ts +12 -0
  579. package/dist/cjs/api/types/CustomerUnitCreate.js +3 -0
  580. package/dist/cjs/api/types/CustomerUnitListResponse.d.ts +6 -0
  581. package/dist/cjs/api/types/CustomerUnitListResponse.js +3 -0
  582. package/dist/cjs/api/types/CustomerUnitUpdate.d.ts +10 -0
  583. package/dist/cjs/api/types/CustomerUnitUpdate.js +3 -0
  584. package/dist/cjs/api/types/EndAttributeIntent.d.ts +16 -0
  585. package/dist/cjs/api/types/EndAttributeIntent.js +14 -0
  586. package/dist/cjs/api/types/GrantCustomerCreditsResponse.d.ts +9 -0
  587. package/dist/cjs/api/types/GrantCustomerCreditsResponse.js +3 -0
  588. package/dist/cjs/api/types/Invoice.d.ts +3 -0
  589. package/dist/cjs/api/types/MemberRequest.d.ts +4 -0
  590. package/dist/cjs/api/types/MemberRequest.js +3 -0
  591. package/dist/cjs/api/types/MoneyAxisOptions.d.ts +23 -0
  592. package/dist/cjs/api/types/MoneyAxisOptions.js +3 -0
  593. package/dist/cjs/api/types/MoneyAxisValue.d.ts +6 -0
  594. package/dist/cjs/api/types/MoneyAxisValue.js +9 -0
  595. package/dist/cjs/api/types/Order.d.ts +1 -0
  596. package/dist/cjs/api/types/OrderLine.d.ts +2 -0
  597. package/dist/cjs/api/types/OrderLineType.d.ts +7 -0
  598. package/dist/cjs/api/types/OrderLineType.js +10 -0
  599. package/dist/cjs/api/types/Payment.d.ts +30 -0
  600. package/dist/cjs/api/types/Payment.js +3 -0
  601. package/dist/cjs/api/types/PaymentAllocation.d.ts +21 -0
  602. package/dist/cjs/api/types/PaymentAllocation.js +3 -0
  603. package/dist/cjs/api/types/PaymentAllocationCreateResponse.d.ts +4 -0
  604. package/dist/cjs/api/types/PaymentAllocationCreateResponse.js +3 -0
  605. package/dist/cjs/api/types/PaymentAllocationInput.d.ts +8 -0
  606. package/dist/cjs/api/types/PaymentAllocationInput.js +3 -0
  607. package/dist/cjs/api/types/PaymentAllocationListResponse.d.ts +5 -0
  608. package/dist/cjs/api/types/PaymentAllocationListResponse.js +3 -0
  609. package/dist/cjs/api/types/PaymentCreateStatus.d.ts +6 -0
  610. package/dist/cjs/api/types/PaymentCreateStatus.js +9 -0
  611. package/dist/cjs/api/types/PaymentListResponse.d.ts +5 -0
  612. package/dist/cjs/api/types/PaymentListResponse.js +3 -0
  613. package/dist/cjs/api/types/PaymentMethod.d.ts +15 -0
  614. package/dist/cjs/api/types/PaymentMethod.js +3 -0
  615. package/dist/cjs/api/types/PaymentMethodCard.d.ts +13 -0
  616. package/dist/cjs/api/types/PaymentMethodCard.js +3 -0
  617. package/dist/cjs/api/types/PaymentMethodListResponse.d.ts +5 -0
  618. package/dist/cjs/api/types/PaymentMethodListResponse.js +3 -0
  619. package/dist/cjs/api/types/PaymentMethodSetup.d.ts +21 -0
  620. package/dist/cjs/api/types/PaymentMethodSetup.js +3 -0
  621. package/dist/cjs/api/types/PaymentType.d.ts +9 -0
  622. package/dist/cjs/api/types/PaymentType.js +12 -0
  623. package/dist/cjs/api/types/PendingCreditConsumption.d.ts +16 -0
  624. package/dist/cjs/api/types/PendingCreditConsumption.js +3 -0
  625. package/dist/cjs/api/types/PendingCreditConsumptionCurrency.d.ts +9 -0
  626. package/dist/cjs/api/types/PendingCreditConsumptionCurrency.js +3 -0
  627. package/dist/cjs/api/types/PendingCreditConsumptionListResponse.d.ts +6 -0
  628. package/dist/cjs/api/types/PendingCreditConsumptionListResponse.js +3 -0
  629. package/dist/cjs/api/types/Plan.d.ts +22 -0
  630. package/dist/cjs/api/types/Plan.js +11 -0
  631. package/dist/cjs/api/types/PlanAttribute.d.ts +8 -0
  632. package/dist/cjs/api/types/PlanAttribute.js +3 -0
  633. package/dist/cjs/api/types/PlanAttributeInput.d.ts +7 -0
  634. package/dist/cjs/api/types/PlanAttributeInput.js +3 -0
  635. package/dist/cjs/api/types/PlanCreditBenefit.d.ts +37 -0
  636. package/dist/cjs/api/types/PlanCreditBenefit.js +24 -0
  637. package/dist/cjs/api/types/PlanListResponse.d.ts +5 -0
  638. package/dist/cjs/api/types/PlanListResponse.js +3 -0
  639. package/dist/cjs/api/types/PlanPricing.d.ts +31 -0
  640. package/dist/cjs/api/types/PlanPricing.js +24 -0
  641. package/dist/cjs/api/types/PlanRef.d.ts +5 -0
  642. package/dist/cjs/api/types/PlanRef.js +3 -0
  643. package/dist/cjs/api/types/PlanUpgradePathGroup.d.ts +4 -0
  644. package/dist/cjs/api/types/PlanUpgradePathGroup.js +3 -0
  645. package/dist/cjs/api/types/PlanUpgradePathResponse.d.ts +4 -0
  646. package/dist/cjs/api/types/PlanUpgradePathResponse.js +3 -0
  647. package/dist/cjs/api/types/PlannedAdd.d.ts +28 -0
  648. package/dist/cjs/api/types/PlannedAdd.js +13 -0
  649. package/dist/cjs/api/types/PlannedCopy.d.ts +10 -0
  650. package/dist/cjs/api/types/PlannedCopy.js +3 -0
  651. package/dist/cjs/api/types/PlannedEnd.d.ts +10 -0
  652. package/dist/cjs/api/types/PlannedEnd.js +3 -0
  653. package/dist/cjs/api/types/PlannedOperations.d.ts +13 -0
  654. package/dist/cjs/api/types/PlannedOperations.js +3 -0
  655. package/dist/cjs/api/types/PlannedOrderTerm.d.ts +10 -0
  656. package/dist/cjs/api/types/PlannedOrderTerm.js +3 -0
  657. package/dist/cjs/api/types/PlannedReplace.d.ts +15 -0
  658. package/dist/cjs/api/types/PlannedReplace.js +3 -0
  659. package/dist/cjs/api/types/PricingInput.d.ts +4 -1
  660. package/dist/cjs/api/types/PricingOutput.d.ts +7 -0
  661. package/dist/cjs/api/types/PricingOutput.js +5 -0
  662. package/dist/cjs/api/types/PricingPricePointOutput.d.ts +2 -22
  663. package/dist/cjs/api/types/PricingPricePointOutput.js +0 -14
  664. package/dist/cjs/api/types/PricingTierOutput.d.ts +16 -0
  665. package/dist/cjs/api/types/PricingTierOutput.js +11 -0
  666. package/dist/cjs/api/types/ProductAttributeOutput.d.ts +8 -0
  667. package/dist/cjs/api/types/ProductAttributeOutput.js +3 -0
  668. package/dist/cjs/api/types/ProductAttributeUpsert.d.ts +9 -0
  669. package/dist/cjs/api/types/ProductAttributeUpsert.js +3 -0
  670. package/dist/cjs/api/types/ProductCreditBenefitInput.d.ts +32 -0
  671. package/dist/cjs/api/types/ProductCreditBenefitInput.js +20 -0
  672. package/dist/cjs/api/types/ProductCreditBenefitOutput.d.ts +13 -0
  673. package/dist/cjs/api/types/ProductCreditBenefitOutput.js +3 -0
  674. package/dist/cjs/api/types/ProductDetail.d.ts +14 -0
  675. package/dist/cjs/api/types/ProductDetail.js +3 -0
  676. package/dist/cjs/api/types/ProductOneTimePerUnitInput.d.ts +21 -0
  677. package/dist/cjs/api/types/ProductOneTimePerUnitInput.js +18 -0
  678. package/dist/cjs/api/types/ProductPricePointOutput.d.ts +9 -0
  679. package/dist/cjs/api/types/ProductPricePointOutput.js +3 -0
  680. package/dist/cjs/api/types/ProductPricingInput.d.ts +49 -0
  681. package/dist/cjs/api/types/ProductPricingInput.js +3 -0
  682. package/dist/cjs/api/types/ProductPricingOutput.d.ts +43 -0
  683. package/dist/cjs/api/types/ProductPricingOutput.js +28 -0
  684. package/dist/cjs/api/types/ProductPricingTierOutput.d.ts +16 -0
  685. package/dist/cjs/api/types/ProductPricingTierOutput.js +11 -0
  686. package/dist/cjs/api/types/ProductRecurringGraduatedInput.d.ts +22 -0
  687. package/dist/cjs/api/types/ProductRecurringGraduatedInput.js +18 -0
  688. package/dist/cjs/api/types/ProductRecurringPerUnitInput.d.ts +22 -0
  689. package/dist/cjs/api/types/ProductRecurringPerUnitInput.js +18 -0
  690. package/dist/cjs/api/types/ProductRecurringPercentOfTotalInput.d.ts +23 -0
  691. package/dist/cjs/api/types/ProductRecurringPercentOfTotalInput.js +18 -0
  692. package/dist/cjs/api/types/ProductRecurringVolumeInput.d.ts +22 -0
  693. package/dist/cjs/api/types/ProductRecurringVolumeInput.js +18 -0
  694. package/dist/cjs/api/types/ProductSeatBasedGraduatedInput.d.ts +22 -0
  695. package/dist/cjs/api/types/ProductSeatBasedGraduatedInput.js +18 -0
  696. package/dist/cjs/api/types/ProductSeatBasedPerUnitInput.d.ts +22 -0
  697. package/dist/cjs/api/types/ProductSeatBasedPerUnitInput.js +18 -0
  698. package/dist/cjs/api/types/ProductSeatBasedPrepaidCreditsInput.d.ts +26 -0
  699. package/dist/cjs/api/types/ProductSeatBasedPrepaidCreditsInput.js +18 -0
  700. package/dist/cjs/api/types/ProductSeatBasedVolumeInput.d.ts +22 -0
  701. package/dist/cjs/api/types/ProductSeatBasedVolumeInput.js +18 -0
  702. package/dist/cjs/api/types/ProductSimplePricePoint.d.ts +29 -0
  703. package/dist/cjs/api/types/ProductSimplePricePoint.js +17 -0
  704. package/dist/cjs/api/types/ProductTieredPricePoint.d.ts +29 -0
  705. package/dist/cjs/api/types/ProductTieredPricePoint.js +17 -0
  706. package/dist/cjs/api/types/ProductUsageBracketedPrepaidCreditsInput.d.ts +57 -0
  707. package/dist/cjs/api/types/ProductUsageBracketedPrepaidCreditsInput.js +28 -0
  708. package/dist/cjs/api/types/ProductUsageCostPlusInput.d.ts +29 -0
  709. package/dist/cjs/api/types/ProductUsageCostPlusInput.js +22 -0
  710. package/dist/cjs/api/types/ProductUsageGraduatedInput.d.ts +29 -0
  711. package/dist/cjs/api/types/ProductUsageGraduatedInput.js +22 -0
  712. package/dist/cjs/api/types/ProductUsagePerUnitInput.d.ts +29 -0
  713. package/dist/cjs/api/types/ProductUsagePerUnitInput.js +22 -0
  714. package/dist/cjs/api/types/ProductUsagePrepaidCreditsInput.d.ts +45 -0
  715. package/dist/cjs/api/types/ProductUsagePrepaidCreditsInput.js +28 -0
  716. package/dist/cjs/api/types/ProductUsageVolumeInput.d.ts +29 -0
  717. package/dist/cjs/api/types/ProductUsageVolumeInput.js +22 -0
  718. package/dist/cjs/api/types/RemoveMembersResponse.d.ts +5 -0
  719. package/dist/cjs/api/types/RemoveMembersResponse.js +3 -0
  720. package/dist/cjs/api/types/RenderBundleEdit.d.ts +8 -0
  721. package/dist/cjs/api/types/RenderBundleEdit.js +3 -0
  722. package/dist/cjs/api/types/RotateWebhookSecretResponse.d.ts +4 -0
  723. package/dist/cjs/api/types/RotateWebhookSecretResponse.js +3 -0
  724. package/dist/cjs/api/types/SeatBasedPrepaidCreditsInput.d.ts +1 -0
  725. package/dist/cjs/api/types/SetMembersResponse.d.ts +6 -0
  726. package/dist/cjs/api/types/SetMembersResponse.js +3 -0
  727. package/dist/cjs/api/types/Signal.d.ts +1 -0
  728. package/dist/cjs/api/types/SignalListItem.d.ts +20 -0
  729. package/dist/cjs/api/types/SignalListItem.js +3 -0
  730. package/dist/cjs/api/types/SignalListResponse.d.ts +5 -0
  731. package/dist/cjs/api/types/SignalListResponse.js +3 -0
  732. package/dist/cjs/api/types/SignalsMetadataResponse.d.ts +28 -0
  733. package/dist/cjs/api/types/SignalsMetadataResponse.js +3 -0
  734. package/dist/cjs/api/types/StripeConnection.d.ts +7 -0
  735. package/dist/cjs/api/types/StripeConnection.js +3 -0
  736. package/dist/cjs/api/{resources/valueReceipts/client/requests → types}/SyncValueReceiptRequest.d.ts +0 -7
  737. package/dist/cjs/api/types/SyncValueReceiptRequest.js +3 -0
  738. package/dist/cjs/api/types/UnifiedAmendmentIntent.d.ts +25 -0
  739. package/dist/cjs/api/types/UnifiedAmendmentIntent.js +3 -0
  740. package/dist/cjs/api/types/UnifiedAmendmentResponse.d.ts +19 -0
  741. package/dist/cjs/api/types/UnifiedAmendmentResponse.js +3 -0
  742. package/dist/cjs/api/types/UpdateCustomerRequest.d.ts +1 -1
  743. package/dist/cjs/api/types/UpdateLineTermIntent.d.ts +18 -0
  744. package/dist/cjs/api/types/UpdateLineTermIntent.js +14 -0
  745. package/dist/cjs/api/types/UpdateOrderTermIntent.d.ts +18 -0
  746. package/dist/cjs/api/types/UpdateOrderTermIntent.js +14 -0
  747. package/dist/cjs/api/types/UpdatePlanRequest.d.ts +18 -0
  748. package/dist/cjs/api/types/UpdatePlanRequest.js +12 -0
  749. package/dist/cjs/api/types/UpdatePricingIntent.d.ts +22 -0
  750. package/dist/cjs/api/types/UpdatePricingIntent.js +14 -0
  751. package/dist/cjs/api/types/UpdateProductRequest.d.ts +2 -0
  752. package/dist/cjs/api/types/UpdateQuantityIntent.d.ts +18 -0
  753. package/dist/cjs/api/types/UpdateQuantityIntent.js +14 -0
  754. package/dist/cjs/api/types/UsageAttributionAxisOptions.d.ts +23 -0
  755. package/dist/cjs/api/types/UsageAttributionAxisOptions.js +3 -0
  756. package/dist/cjs/api/types/UsageAttributionAxisValue.d.ts +6 -0
  757. package/dist/cjs/api/types/UsageAttributionAxisValue.js +9 -0
  758. package/dist/cjs/api/types/UsageBracketedPrepaidCreditsInput.d.ts +57 -0
  759. package/dist/cjs/api/types/UsageBracketedPrepaidCreditsInput.js +28 -0
  760. package/dist/cjs/api/types/UsageCostPlusInput.d.ts +6 -0
  761. package/dist/cjs/api/types/UsageCostPlusInput.js +4 -0
  762. package/dist/cjs/api/types/UsageGraduatedInput.d.ts +6 -0
  763. package/dist/cjs/api/types/UsageGraduatedInput.js +4 -0
  764. package/dist/cjs/api/types/UsagePerUnitInput.d.ts +6 -0
  765. package/dist/cjs/api/types/UsagePerUnitInput.js +4 -0
  766. package/dist/cjs/api/types/UsagePrepaidCreditsInput.d.ts +19 -0
  767. package/dist/cjs/api/types/UsagePrepaidCreditsInput.js +10 -0
  768. package/dist/cjs/api/types/UsageVolumeInput.d.ts +6 -0
  769. package/dist/cjs/api/types/UsageVolumeInput.js +4 -0
  770. package/dist/cjs/api/types/ValidateCustomViewRequest.d.ts +51 -0
  771. package/dist/cjs/api/types/ValidateCustomViewRequest.js +26 -0
  772. package/dist/cjs/api/types/ValidateCustomViewResponse.d.ts +7 -0
  773. package/dist/cjs/api/types/ValidateCustomViewResponse.js +3 -0
  774. package/dist/cjs/api/types/ValueMetricDetail.d.ts +47 -0
  775. package/dist/cjs/api/types/ValueMetricDetail.js +3 -0
  776. package/dist/cjs/api/types/ValueMetricFormula.d.ts +9 -0
  777. package/dist/cjs/api/types/ValueMetricFormula.js +3 -0
  778. package/dist/cjs/api/types/ValueMetricFormulaVariable.d.ts +31 -0
  779. package/dist/cjs/api/types/ValueMetricFormulaVariable.js +24 -0
  780. package/dist/cjs/api/types/ValueMetricListResponse.d.ts +5 -0
  781. package/dist/cjs/api/types/ValueMetricListResponse.js +3 -0
  782. package/dist/cjs/api/types/ValueMetricMonetaryConversion.d.ts +6 -0
  783. package/dist/cjs/api/types/ValueMetricMonetaryConversion.js +3 -0
  784. package/dist/cjs/api/types/ValueMetricSignalBinding.d.ts +14 -0
  785. package/dist/cjs/api/types/ValueMetricSignalBinding.js +3 -0
  786. package/dist/cjs/api/types/ValueMetricSummary.d.ts +30 -0
  787. package/dist/cjs/api/types/ValueMetricSummary.js +3 -0
  788. package/dist/cjs/api/types/ValueMetricUnit.d.ts +27 -0
  789. package/dist/cjs/api/types/ValueMetricUnit.js +20 -0
  790. package/dist/cjs/api/types/ValueMetricValidationResponse.d.ts +13 -0
  791. package/dist/cjs/api/types/ValueMetricValidationResponse.js +3 -0
  792. package/dist/cjs/api/types/ValueMetricVariableEdit.d.ts +26 -0
  793. package/dist/cjs/api/types/ValueMetricVariableEdit.js +19 -0
  794. package/dist/cjs/api/types/ValueMetricWriteAck.d.ts +6 -0
  795. package/dist/cjs/api/types/ValueMetricWriteAck.js +3 -0
  796. package/dist/cjs/api/types/ValueModelAuthoringGuide.d.ts +22 -0
  797. package/dist/cjs/api/types/ValueModelAuthoringGuide.js +3 -0
  798. package/dist/cjs/api/types/ValueModelContent.d.ts +357 -0
  799. package/dist/cjs/api/types/ValueModelContent.js +141 -0
  800. package/dist/cjs/api/types/ValueModelDetail.d.ts +12 -0
  801. package/dist/cjs/api/types/ValueModelDetail.js +3 -0
  802. package/dist/cjs/api/types/ValueModelSummary.d.ts +18 -0
  803. package/dist/cjs/api/types/ValueModelSummary.js +12 -0
  804. package/dist/cjs/api/types/ValueModelVersionListResponse.d.ts +5 -0
  805. package/dist/cjs/api/types/ValueModelVersionListResponse.js +3 -0
  806. package/dist/cjs/api/types/ValueReceiptSyncResponse.d.ts +1 -0
  807. package/dist/cjs/api/types/ViewDataResponse.d.ts +4 -0
  808. package/dist/cjs/api/types/ViewDataResponse.js +3 -0
  809. package/dist/cjs/api/types/Webhook.d.ts +2 -0
  810. package/dist/cjs/api/types/Webhook.js +2 -0
  811. package/dist/cjs/api/types/WebhookListResponse.d.ts +2 -0
  812. package/dist/cjs/api/types/WebhookUpdateResponse.d.ts +28 -0
  813. package/dist/cjs/api/types/WebhookUpdateResponse.js +20 -0
  814. package/dist/cjs/api/types/WritableOrderLineType.d.ts +6 -0
  815. package/dist/cjs/api/types/WritableOrderLineType.js +9 -0
  816. package/dist/cjs/api/types/index.d.ts +209 -1
  817. package/dist/cjs/api/types/index.js +209 -1
  818. package/dist/cjs/tracing/aiSdkSpanProcessor.js +17 -0
  819. package/dist/cjs/version.d.ts +1 -1
  820. package/dist/cjs/version.js +1 -1
  821. package/dist/esm/Client.d.mts +33 -0
  822. package/dist/esm/Client.mjs +57 -2
  823. package/dist/esm/api/errors/BadRequestError.d.mts +1 -2
  824. package/dist/esm/api/errors/ConflictError.d.mts +1 -2
  825. package/dist/esm/api/errors/ForbiddenError.d.mts +1 -2
  826. package/dist/esm/api/errors/InternalServerError.d.mts +1 -2
  827. package/dist/esm/api/errors/NotFoundError.d.mts +1 -2
  828. package/dist/esm/api/errors/RequestTimeoutError.d.mts +6 -0
  829. package/dist/esm/api/errors/RequestTimeoutError.mjs +13 -0
  830. package/dist/esm/api/errors/TooManyRequestsError.d.mts +6 -0
  831. package/dist/esm/api/errors/TooManyRequestsError.mjs +13 -0
  832. package/dist/esm/api/errors/index.d.mts +2 -0
  833. package/dist/esm/api/errors/index.mjs +2 -0
  834. package/dist/esm/api/resources/amendments/client/Client.d.mts +83 -0
  835. package/dist/esm/api/resources/amendments/client/Client.mjs +276 -0
  836. package/dist/esm/api/resources/amendments/client/index.d.mts +1 -0
  837. package/dist/esm/api/resources/amendments/client/index.mjs +1 -0
  838. package/dist/esm/api/resources/amendments/client/requests/GetOrderAmendmentOptionsRequest.d.mts +10 -0
  839. package/dist/esm/api/resources/amendments/client/requests/UnifiedAmendmentExecuteRequest.d.mts +35 -0
  840. package/dist/esm/api/resources/amendments/client/requests/UnifiedAmendmentExecuteRequest.mjs +11 -0
  841. package/dist/esm/api/resources/amendments/client/requests/UnifiedAmendmentPreviewRequest.d.mts +33 -0
  842. package/dist/esm/api/resources/amendments/client/requests/UnifiedAmendmentPreviewRequest.mjs +11 -0
  843. package/dist/esm/api/resources/amendments/client/requests/index.d.mts +3 -0
  844. package/dist/esm/api/resources/amendments/client/requests/index.mjs +1 -0
  845. package/dist/esm/api/resources/amendments/index.d.mts +1 -0
  846. package/dist/esm/api/resources/amendments/index.mjs +1 -0
  847. package/dist/esm/api/resources/analytics/client/Client.d.mts +63 -0
  848. package/dist/esm/api/resources/analytics/client/Client.mjs +236 -0
  849. package/dist/esm/api/resources/analytics/client/index.d.mts +1 -0
  850. package/dist/esm/api/resources/analytics/client/index.mjs +1 -0
  851. package/dist/esm/api/resources/analytics/client/requests/GetSignalsMetadataRequest.d.mts +12 -0
  852. package/dist/esm/api/resources/analytics/client/requests/index.d.mts +1 -0
  853. package/dist/esm/api/resources/analytics/client/requests/index.mjs +1 -0
  854. package/dist/esm/api/resources/analytics/index.d.mts +1 -0
  855. package/dist/esm/api/resources/analytics/index.mjs +1 -0
  856. package/dist/esm/api/resources/analyticsExperimental/client/Client.d.mts +69 -0
  857. package/dist/esm/api/resources/analyticsExperimental/client/Client.mjs +242 -0
  858. package/dist/esm/api/resources/analyticsExperimental/client/index.d.mts +1 -0
  859. package/dist/esm/api/resources/analyticsExperimental/client/index.mjs +1 -0
  860. package/dist/esm/api/resources/analyticsExperimental/client/requests/GetExperimentalSignalsMetadataRequest.d.mts +12 -0
  861. package/dist/esm/api/resources/analyticsExperimental/client/requests/GetExperimentalSignalsMetadataRequest.mjs +2 -0
  862. package/dist/esm/api/resources/analyticsExperimental/client/requests/index.d.mts +1 -0
  863. package/dist/esm/api/resources/analyticsExperimental/client/requests/index.mjs +1 -0
  864. package/dist/esm/api/resources/analyticsExperimental/index.d.mts +1 -0
  865. package/dist/esm/api/resources/analyticsExperimental/index.mjs +1 -0
  866. package/dist/esm/api/resources/checkouts/client/requests/CreateCheckoutRequest.d.mts +3 -1
  867. package/dist/esm/api/resources/credits/client/Client.d.mts +57 -2
  868. package/dist/esm/api/resources/credits/client/Client.mjs +267 -5
  869. package/dist/esm/api/resources/credits/client/index.d.mts +1 -1
  870. package/dist/esm/api/resources/credits/client/index.mjs +1 -1
  871. package/dist/esm/api/resources/credits/client/requests/CreateCreditCurrencyRequest.d.mts +16 -0
  872. package/dist/esm/api/resources/credits/client/requests/CreateCreditCurrencyRequest.mjs +2 -0
  873. package/dist/esm/api/resources/credits/client/requests/ListCreditCurrenciesRequest.d.mts +9 -0
  874. package/dist/esm/api/resources/credits/client/requests/ListCreditCurrenciesRequest.mjs +2 -0
  875. package/dist/esm/api/resources/credits/client/requests/ListCreditTransactionsRequest.d.mts +25 -0
  876. package/dist/esm/api/resources/credits/client/requests/ListCreditTransactionsRequest.mjs +2 -0
  877. package/dist/esm/api/resources/credits/client/requests/UpdateCreditCurrencyRequest.d.mts +24 -0
  878. package/dist/esm/api/resources/credits/client/requests/UpdateCreditCurrencyRequest.mjs +9 -0
  879. package/dist/esm/api/resources/credits/client/requests/index.d.mts +4 -0
  880. package/dist/esm/api/resources/credits/client/requests/index.mjs +1 -0
  881. package/dist/esm/api/resources/credits/index.d.mts +1 -0
  882. package/dist/esm/api/resources/credits/index.mjs +1 -0
  883. package/dist/esm/api/resources/credits/types/ListCreditCurrenciesRequestStatus.d.mts +6 -0
  884. package/dist/esm/api/resources/credits/types/ListCreditCurrenciesRequestStatus.mjs +6 -0
  885. package/dist/esm/api/resources/credits/types/ListCreditTransactionsRequestType.d.mts +6 -0
  886. package/dist/esm/api/resources/credits/types/ListCreditTransactionsRequestType.mjs +6 -0
  887. package/dist/esm/api/resources/credits/types/index.d.mts +2 -0
  888. package/dist/esm/api/resources/credits/types/index.mjs +2 -0
  889. package/dist/esm/api/resources/customViewsExperimental/client/Client.d.mts +177 -0
  890. package/dist/esm/api/resources/customViewsExperimental/client/Client.mjs +651 -0
  891. package/dist/esm/api/resources/customViewsExperimental/client/index.d.mts +1 -0
  892. package/dist/esm/api/resources/customViewsExperimental/client/index.mjs +1 -0
  893. package/dist/esm/api/resources/customViewsExperimental/client/requests/CreateCustomViewRequest.d.mts +66 -0
  894. package/dist/esm/api/resources/customViewsExperimental/client/requests/CreateCustomViewRequest.mjs +23 -0
  895. package/dist/esm/api/resources/customViewsExperimental/client/requests/GetCustomViewDataRequest.d.mts +22 -0
  896. package/dist/esm/api/resources/customViewsExperimental/client/requests/GetCustomViewDataRequest.mjs +2 -0
  897. package/dist/esm/api/resources/customViewsExperimental/client/requests/GetCustomViewEmbedTokenRequest.d.mts +14 -0
  898. package/dist/esm/api/resources/customViewsExperimental/client/requests/GetCustomViewEmbedTokenRequest.mjs +2 -0
  899. package/dist/esm/api/resources/customViewsExperimental/client/requests/GetCustomViewRequest.d.mts +9 -0
  900. package/dist/esm/api/resources/customViewsExperimental/client/requests/GetCustomViewRequest.mjs +2 -0
  901. package/dist/esm/api/resources/customViewsExperimental/client/requests/PublishCustomViewRequest.d.mts +9 -0
  902. package/dist/esm/api/resources/customViewsExperimental/client/requests/PublishCustomViewRequest.mjs +2 -0
  903. package/dist/esm/api/resources/customViewsExperimental/client/requests/UpdateCustomViewPeriodRequest.d.mts +46 -0
  904. package/dist/esm/api/resources/customViewsExperimental/client/requests/UpdateCustomViewPeriodRequest.mjs +18 -0
  905. package/dist/esm/api/resources/customViewsExperimental/client/requests/UpdateCustomViewRequest.d.mts +26 -0
  906. package/dist/esm/api/resources/customViewsExperimental/client/requests/UpdateCustomViewRequest.mjs +2 -0
  907. package/dist/esm/api/resources/customViewsExperimental/client/requests/index.d.mts +7 -0
  908. package/dist/esm/api/resources/customViewsExperimental/client/requests/index.mjs +1 -0
  909. package/dist/esm/api/resources/customViewsExperimental/index.d.mts +2 -0
  910. package/dist/esm/api/resources/customViewsExperimental/index.mjs +2 -0
  911. package/dist/esm/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodKind.d.mts +5 -0
  912. package/dist/esm/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodKind.mjs +5 -0
  913. package/dist/esm/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodUnit.d.mts +6 -0
  914. package/dist/esm/api/resources/customViewsExperimental/types/GetCustomViewDataRequestPeriodUnit.mjs +6 -0
  915. package/dist/esm/api/resources/customViewsExperimental/types/index.d.mts +2 -0
  916. package/dist/esm/api/resources/customViewsExperimental/types/index.mjs +2 -0
  917. package/dist/esm/api/resources/customerGroups/client/Client.d.mts +153 -0
  918. package/dist/esm/api/resources/customerGroups/client/Client.mjs +599 -0
  919. package/dist/esm/api/resources/customerGroups/client/index.d.mts +1 -0
  920. package/dist/esm/api/resources/customerGroups/client/index.mjs +1 -0
  921. package/dist/esm/api/resources/customerGroups/client/requests/CreateCustomerGroupMembersRequest.d.mts +14 -0
  922. package/dist/esm/api/resources/customerGroups/client/requests/CreateCustomerGroupMembersRequest.mjs +2 -0
  923. package/dist/esm/api/resources/customerGroups/client/requests/CreateCustomerGroupRequest.d.mts +10 -0
  924. package/dist/esm/api/resources/customerGroups/client/requests/CreateCustomerGroupRequest.mjs +2 -0
  925. package/dist/esm/api/resources/customerGroups/client/requests/DeleteCustomerGroupMembersRequest.d.mts +14 -0
  926. package/dist/esm/api/resources/customerGroups/client/requests/DeleteCustomerGroupMembersRequest.mjs +2 -0
  927. package/dist/esm/api/resources/customerGroups/client/requests/DeleteCustomerGroupRequest.d.mts +9 -0
  928. package/dist/esm/api/resources/customerGroups/client/requests/DeleteCustomerGroupRequest.mjs +2 -0
  929. package/dist/esm/api/resources/customerGroups/client/requests/GetCustomerGroupRequest.d.mts +9 -0
  930. package/dist/esm/api/resources/customerGroups/client/requests/GetCustomerGroupRequest.mjs +2 -0
  931. package/dist/esm/api/resources/customerGroups/client/requests/ListCustomerGroupsRequest.d.mts +8 -0
  932. package/dist/esm/api/resources/customerGroups/client/requests/ListCustomerGroupsRequest.mjs +2 -0
  933. package/dist/esm/api/resources/customerGroups/client/requests/UpdateCustomerGroupMembersRequest.d.mts +14 -0
  934. package/dist/esm/api/resources/customerGroups/client/requests/UpdateCustomerGroupMembersRequest.mjs +2 -0
  935. package/dist/esm/api/resources/customerGroups/client/requests/UpdateCustomerGroupRequest.d.mts +11 -0
  936. package/dist/esm/api/resources/customerGroups/client/requests/UpdateCustomerGroupRequest.mjs +2 -0
  937. package/dist/esm/api/resources/customerGroups/client/requests/index.d.mts +8 -0
  938. package/dist/esm/api/resources/customerGroups/client/requests/index.mjs +1 -0
  939. package/dist/esm/api/resources/customerGroups/index.d.mts +1 -0
  940. package/dist/esm/api/resources/customerGroups/index.mjs +1 -0
  941. package/dist/esm/api/resources/customers/client/Client.d.mts +576 -12
  942. package/dist/esm/api/resources/customers/client/Client.mjs +2292 -98
  943. package/dist/esm/api/resources/customers/client/requests/CreateCustomerAliasByExternalIdRequest.d.mts +15 -0
  944. package/dist/esm/api/resources/customers/client/requests/CreateCustomerAliasByExternalIdRequest.mjs +2 -0
  945. package/dist/esm/api/resources/customers/client/requests/CreateCustomerAliasRequest.d.mts +15 -0
  946. package/dist/esm/api/resources/customers/client/requests/CreateCustomerAliasRequest.mjs +2 -0
  947. package/dist/esm/api/resources/customers/client/requests/CreateCustomerRequest.d.mts +1 -1
  948. package/dist/esm/api/resources/customers/client/requests/CreateCustomerUnitByExternalIdRequest.d.mts +15 -0
  949. package/dist/esm/api/resources/customers/client/requests/CreateCustomerUnitByExternalIdRequest.mjs +2 -0
  950. package/dist/esm/api/resources/customers/client/requests/CreateCustomerUnitRequest.d.mts +15 -0
  951. package/dist/esm/api/resources/customers/client/requests/CreateCustomerUnitRequest.mjs +2 -0
  952. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerAliasByExternalIdRequest.d.mts +13 -0
  953. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerAliasByExternalIdRequest.mjs +2 -0
  954. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerAliasRequest.d.mts +13 -0
  955. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerAliasRequest.mjs +2 -0
  956. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerByExternalIdRequest.d.mts +2 -1
  957. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerByIdRequest.d.mts +2 -1
  958. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerUnitByExternalIdRequest.d.mts +13 -0
  959. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerUnitByExternalIdRequest.mjs +2 -0
  960. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerUnitRequest.d.mts +13 -0
  961. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerUnitRequest.mjs +2 -0
  962. package/dist/esm/api/resources/customers/client/requests/EndCustomerUnitCapByExternalIdRequest.d.mts +16 -0
  963. package/dist/esm/api/resources/customers/client/requests/EndCustomerUnitCapByExternalIdRequest.mjs +2 -0
  964. package/dist/esm/api/resources/customers/client/requests/EndCustomerUnitCapRequest.d.mts +16 -0
  965. package/dist/esm/api/resources/customers/client/requests/EndCustomerUnitCapRequest.mjs +2 -0
  966. package/dist/esm/api/resources/customers/client/requests/GetCustomerByExternalIdRequest.d.mts +2 -1
  967. package/dist/esm/api/resources/customers/client/requests/GetCustomerByIdRequest.d.mts +2 -1
  968. package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.d.mts +2 -1
  969. package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.d.mts +2 -1
  970. package/dist/esm/api/resources/customers/client/requests/GetCustomerStateByExternalIdRequest.d.mts +10 -0
  971. package/dist/esm/api/resources/customers/client/requests/GetCustomerStateByExternalIdRequest.mjs +2 -0
  972. package/dist/esm/api/resources/customers/client/requests/GetCustomerStateByIdRequest.d.mts +10 -0
  973. package/dist/esm/api/resources/customers/client/requests/GetCustomerStateByIdRequest.mjs +2 -0
  974. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitByExternalIdRequest.d.mts +13 -0
  975. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitByExternalIdRequest.mjs +2 -0
  976. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitCapByExternalIdRequest.d.mts +16 -0
  977. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitCapByExternalIdRequest.mjs +2 -0
  978. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitCapRequest.d.mts +16 -0
  979. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitCapRequest.mjs +2 -0
  980. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitRequest.d.mts +13 -0
  981. package/dist/esm/api/resources/customers/client/requests/GetCustomerUnitRequest.mjs +2 -0
  982. package/dist/esm/api/resources/customers/client/requests/GrantCustomerCreditsByExternalIdRequest.d.mts +18 -0
  983. package/dist/esm/api/resources/customers/client/requests/GrantCustomerCreditsByExternalIdRequest.mjs +2 -0
  984. package/dist/esm/api/resources/customers/client/requests/GrantCustomerCreditsRequest.d.mts +18 -0
  985. package/dist/esm/api/resources/customers/client/requests/GrantCustomerCreditsRequest.mjs +2 -0
  986. package/dist/esm/api/resources/customers/client/requests/ListCustomerAliasesByExternalIdRequest.d.mts +12 -0
  987. package/dist/esm/api/resources/customers/client/requests/ListCustomerAliasesByExternalIdRequest.mjs +2 -0
  988. package/dist/esm/api/resources/customers/client/requests/ListCustomerAliasesRequest.d.mts +12 -0
  989. package/dist/esm/api/resources/customers/client/requests/ListCustomerAliasesRequest.mjs +2 -0
  990. package/dist/esm/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionByExternalIdRequest.d.mts +12 -0
  991. package/dist/esm/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionByExternalIdRequest.mjs +2 -0
  992. package/dist/esm/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionRequest.d.mts +12 -0
  993. package/dist/esm/api/resources/customers/client/requests/ListCustomerPendingCreditConsumptionRequest.mjs +2 -0
  994. package/dist/esm/api/resources/customers/client/requests/ListCustomerUnitsByExternalIdRequest.d.mts +20 -0
  995. package/dist/esm/api/resources/customers/client/requests/ListCustomerUnitsByExternalIdRequest.mjs +2 -0
  996. package/dist/esm/api/resources/customers/client/requests/ListCustomerUnitsRequest.d.mts +20 -0
  997. package/dist/esm/api/resources/customers/client/requests/ListCustomerUnitsRequest.mjs +2 -0
  998. package/dist/esm/api/resources/customers/client/requests/ListCustomersRequest.d.mts +13 -0
  999. package/dist/esm/api/resources/customers/client/requests/SetCustomerUnitCapByExternalIdRequest.d.mts +18 -0
  1000. package/dist/esm/api/resources/customers/client/requests/SetCustomerUnitCapByExternalIdRequest.mjs +2 -0
  1001. package/dist/esm/api/resources/customers/client/requests/SetCustomerUnitCapRequest.d.mts +18 -0
  1002. package/dist/esm/api/resources/customers/client/requests/SetCustomerUnitCapRequest.mjs +2 -0
  1003. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerByExternalIdRequest.d.mts +2 -1
  1004. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerByIdRequest.d.mts +2 -1
  1005. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerUnitByExternalIdRequest.d.mts +16 -0
  1006. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerUnitByExternalIdRequest.mjs +2 -0
  1007. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerUnitRequest.d.mts +16 -0
  1008. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerUnitRequest.mjs +2 -0
  1009. package/dist/esm/api/resources/customers/client/requests/index.d.mts +28 -0
  1010. package/dist/esm/api/resources/customers/index.d.mts +1 -0
  1011. package/dist/esm/api/resources/customers/index.mjs +1 -0
  1012. package/dist/esm/api/resources/customers/types/ListCustomerUnitsByExternalIdRequestStatus.d.mts +5 -0
  1013. package/dist/esm/api/resources/customers/types/ListCustomerUnitsByExternalIdRequestStatus.mjs +5 -0
  1014. package/dist/esm/api/resources/customers/types/ListCustomerUnitsRequestStatus.d.mts +5 -0
  1015. package/dist/esm/api/resources/customers/types/ListCustomerUnitsRequestStatus.mjs +5 -0
  1016. package/dist/esm/api/resources/customers/types/ListCustomersRequestCreationState.d.mts +5 -0
  1017. package/dist/esm/api/resources/customers/types/ListCustomersRequestCreationState.mjs +5 -0
  1018. package/dist/esm/api/resources/customers/types/ListCustomersRequestStatus.d.mts +5 -0
  1019. package/dist/esm/api/resources/customers/types/ListCustomersRequestStatus.mjs +5 -0
  1020. package/dist/esm/api/resources/customers/types/index.d.mts +4 -0
  1021. package/dist/esm/api/resources/customers/types/index.mjs +4 -0
  1022. package/dist/esm/api/resources/index.d.mts +28 -0
  1023. package/dist/esm/api/resources/index.mjs +28 -0
  1024. package/dist/esm/api/resources/invoices/client/Client.mjs +37 -1
  1025. package/dist/esm/api/resources/invoices/client/requests/ListInvoicesRequest.d.mts +25 -0
  1026. package/dist/esm/api/resources/invoices/index.d.mts +1 -0
  1027. package/dist/esm/api/resources/invoices/index.mjs +1 -0
  1028. package/dist/esm/api/resources/invoices/types/ListInvoicesRequestPaymentStatus.d.mts +8 -0
  1029. package/dist/esm/api/resources/invoices/types/ListInvoicesRequestPaymentStatus.mjs +8 -0
  1030. package/dist/esm/api/resources/invoices/types/ListInvoicesRequestStatus.d.mts +10 -0
  1031. package/dist/esm/api/resources/invoices/types/ListInvoicesRequestStatus.mjs +10 -0
  1032. package/dist/esm/api/resources/invoices/types/index.d.mts +2 -0
  1033. package/dist/esm/api/resources/invoices/types/index.mjs +2 -0
  1034. package/dist/esm/api/resources/orders/client/Client.d.mts +18 -0
  1035. package/dist/esm/api/resources/orders/client/Client.mjs +99 -1
  1036. package/dist/esm/api/resources/orders/client/requests/ActivateOrderByIdRequest.d.mts +9 -0
  1037. package/dist/esm/api/resources/orders/client/requests/ActivateOrderByIdRequest.mjs +2 -0
  1038. package/dist/esm/api/resources/orders/client/requests/CreateOrderRequest.d.mts +2 -0
  1039. package/dist/esm/api/resources/orders/client/requests/ListOrdersRequest.d.mts +19 -0
  1040. package/dist/esm/api/resources/orders/client/requests/UpdateOrderRequest.d.mts +2 -0
  1041. package/dist/esm/api/resources/orders/client/requests/index.d.mts +1 -0
  1042. package/dist/esm/api/resources/orders/types/ListOrdersRequestCreationState.d.mts +5 -0
  1043. package/dist/esm/api/resources/orders/types/ListOrdersRequestCreationState.mjs +5 -0
  1044. package/dist/esm/api/resources/orders/types/OrderStatusFilter.d.mts +7 -0
  1045. package/dist/esm/api/resources/orders/types/OrderStatusFilter.mjs +7 -0
  1046. package/dist/esm/api/resources/orders/types/index.d.mts +2 -0
  1047. package/dist/esm/api/resources/orders/types/index.mjs +2 -0
  1048. package/dist/esm/api/resources/paymentAllocations/client/Client.d.mts +55 -0
  1049. package/dist/esm/api/resources/paymentAllocations/client/Client.mjs +187 -0
  1050. package/dist/esm/api/resources/paymentAllocations/client/index.d.mts +1 -0
  1051. package/dist/esm/api/resources/paymentAllocations/client/index.mjs +1 -0
  1052. package/dist/esm/api/resources/paymentAllocations/client/requests/CreatePaymentAllocationRequest.d.mts +17 -0
  1053. package/dist/esm/api/resources/paymentAllocations/client/requests/CreatePaymentAllocationRequest.mjs +2 -0
  1054. package/dist/esm/api/resources/paymentAllocations/client/requests/ListPaymentAllocationsRequest.d.mts +15 -0
  1055. package/dist/esm/api/resources/paymentAllocations/client/requests/ListPaymentAllocationsRequest.mjs +2 -0
  1056. package/dist/esm/api/resources/paymentAllocations/client/requests/index.d.mts +2 -0
  1057. package/dist/esm/api/resources/paymentAllocations/client/requests/index.mjs +1 -0
  1058. package/dist/esm/api/resources/paymentAllocations/index.d.mts +1 -0
  1059. package/dist/esm/api/resources/paymentAllocations/index.mjs +1 -0
  1060. package/dist/esm/api/resources/paymentMethods/client/Client.d.mts +104 -0
  1061. package/dist/esm/api/resources/paymentMethods/client/Client.mjs +409 -0
  1062. package/dist/esm/api/resources/paymentMethods/client/index.d.mts +1 -0
  1063. package/dist/esm/api/resources/paymentMethods/client/index.mjs +1 -0
  1064. package/dist/esm/api/resources/paymentMethods/client/requests/CreatePaymentMethodRequest.d.mts +18 -0
  1065. package/dist/esm/api/resources/paymentMethods/client/requests/CreatePaymentMethodRequest.mjs +2 -0
  1066. package/dist/esm/api/resources/paymentMethods/client/requests/DeletePaymentMethodRequest.d.mts +9 -0
  1067. package/dist/esm/api/resources/paymentMethods/client/requests/DeletePaymentMethodRequest.mjs +2 -0
  1068. package/dist/esm/api/resources/paymentMethods/client/requests/GetPaymentMethodRequest.d.mts +9 -0
  1069. package/dist/esm/api/resources/paymentMethods/client/requests/GetPaymentMethodRequest.mjs +2 -0
  1070. package/dist/esm/api/resources/paymentMethods/client/requests/ListPaymentMethodsRequest.d.mts +14 -0
  1071. package/dist/esm/api/resources/paymentMethods/client/requests/ListPaymentMethodsRequest.mjs +2 -0
  1072. package/dist/esm/api/resources/paymentMethods/client/requests/UpdateDefaultPaymentMethodRequest.d.mts +9 -0
  1073. package/dist/esm/api/resources/paymentMethods/client/requests/UpdateDefaultPaymentMethodRequest.mjs +2 -0
  1074. package/dist/esm/api/resources/paymentMethods/client/requests/index.d.mts +5 -0
  1075. package/dist/esm/api/resources/paymentMethods/client/requests/index.mjs +1 -0
  1076. package/dist/esm/api/resources/paymentMethods/index.d.mts +1 -0
  1077. package/dist/esm/api/resources/paymentMethods/index.mjs +1 -0
  1078. package/dist/esm/api/resources/payments/client/Client.d.mts +68 -0
  1079. package/dist/esm/api/resources/payments/client/Client.mjs +256 -0
  1080. package/dist/esm/api/resources/payments/client/index.d.mts +1 -0
  1081. package/dist/esm/api/resources/payments/client/index.mjs +1 -0
  1082. package/dist/esm/api/resources/payments/client/requests/CreatePaymentRequest.d.mts +25 -0
  1083. package/dist/esm/api/resources/payments/client/requests/CreatePaymentRequest.mjs +2 -0
  1084. package/dist/esm/api/resources/payments/client/requests/GetPaymentRequest.d.mts +9 -0
  1085. package/dist/esm/api/resources/payments/client/requests/GetPaymentRequest.mjs +2 -0
  1086. package/dist/esm/api/resources/payments/client/requests/ListPaymentsRequest.d.mts +15 -0
  1087. package/dist/esm/api/resources/payments/client/requests/ListPaymentsRequest.mjs +2 -0
  1088. package/dist/esm/api/resources/payments/client/requests/index.d.mts +3 -0
  1089. package/dist/esm/api/resources/payments/client/requests/index.mjs +1 -0
  1090. package/dist/esm/api/resources/payments/index.d.mts +2 -0
  1091. package/dist/esm/api/resources/payments/index.mjs +2 -0
  1092. package/dist/esm/api/resources/payments/types/ListPaymentsRequestStatus.d.mts +9 -0
  1093. package/dist/esm/api/resources/payments/types/ListPaymentsRequestStatus.mjs +9 -0
  1094. package/dist/esm/api/resources/payments/types/index.d.mts +1 -0
  1095. package/dist/esm/api/resources/payments/types/index.mjs +1 -0
  1096. package/dist/esm/api/resources/plans/client/Client.d.mts +152 -0
  1097. package/dist/esm/api/resources/plans/client/Client.mjs +556 -0
  1098. package/dist/esm/api/resources/plans/client/index.d.mts +1 -0
  1099. package/dist/esm/api/resources/plans/client/index.mjs +1 -0
  1100. package/dist/esm/api/resources/plans/client/requests/CreatePlanRequest.d.mts +28 -0
  1101. package/dist/esm/api/resources/plans/client/requests/CreatePlanRequest.mjs +2 -0
  1102. package/dist/esm/api/resources/plans/client/requests/GetPlanByExternalIdRequest.d.mts +9 -0
  1103. package/dist/esm/api/resources/plans/client/requests/GetPlanByExternalIdRequest.mjs +2 -0
  1104. package/dist/esm/api/resources/plans/client/requests/GetPlanByIdRequest.d.mts +9 -0
  1105. package/dist/esm/api/resources/plans/client/requests/GetPlanByIdRequest.mjs +2 -0
  1106. package/dist/esm/api/resources/plans/client/requests/ListPlansRequest.d.mts +12 -0
  1107. package/dist/esm/api/resources/plans/client/requests/ListPlansRequest.mjs +2 -0
  1108. package/dist/esm/api/resources/plans/client/requests/UpdatePlanByExternalIdRequest.d.mts +12 -0
  1109. package/dist/esm/api/resources/plans/client/requests/UpdatePlanByExternalIdRequest.mjs +2 -0
  1110. package/dist/esm/api/resources/plans/client/requests/UpdatePlanByIdRequest.d.mts +12 -0
  1111. package/dist/esm/api/resources/plans/client/requests/UpdatePlanByIdRequest.mjs +2 -0
  1112. package/dist/esm/api/resources/plans/client/requests/UpdatePlanUpgradePathRequest.d.mts +15 -0
  1113. package/dist/esm/api/resources/plans/client/requests/UpdatePlanUpgradePathRequest.mjs +2 -0
  1114. package/dist/esm/api/resources/plans/client/requests/index.d.mts +7 -0
  1115. package/dist/esm/api/resources/plans/client/requests/index.mjs +1 -0
  1116. package/dist/esm/api/resources/plans/index.d.mts +1 -0
  1117. package/dist/esm/api/resources/plans/index.mjs +1 -0
  1118. package/dist/esm/api/resources/pricing/client/Client.d.mts +2 -2
  1119. package/dist/esm/api/resources/pricing/client/Client.mjs +2 -2
  1120. package/dist/esm/api/resources/pricing/client/requests/UpdatePricingRequest.d.mts +1 -1
  1121. package/dist/esm/api/resources/products/client/Client.d.mts +9 -9
  1122. package/dist/esm/api/resources/products/client/Client.mjs +15 -6
  1123. package/dist/esm/api/resources/products/client/requests/ListProductsRequest.d.mts +6 -0
  1124. package/dist/esm/api/resources/signals/client/Client.d.mts +38 -0
  1125. package/dist/esm/api/resources/signals/client/Client.mjs +180 -0
  1126. package/dist/esm/api/resources/signals/client/requests/GetSignalByIdRequest.d.mts +10 -0
  1127. package/dist/esm/api/resources/signals/client/requests/GetSignalByIdRequest.mjs +2 -0
  1128. package/dist/esm/api/resources/signals/client/requests/ListSignalsRequest.d.mts +22 -0
  1129. package/dist/esm/api/resources/signals/client/requests/ListSignalsRequest.mjs +2 -0
  1130. package/dist/esm/api/resources/signals/client/requests/index.d.mts +2 -0
  1131. package/dist/esm/api/resources/valueMetrics/client/Client.d.mts +111 -0
  1132. package/dist/esm/api/resources/valueMetrics/client/Client.mjs +409 -0
  1133. package/dist/esm/api/resources/valueMetrics/client/index.d.mts +1 -0
  1134. package/dist/esm/api/resources/valueMetrics/client/index.mjs +1 -0
  1135. package/dist/esm/api/resources/valueMetrics/client/requests/ArchiveValueMetricRequest.d.mts +10 -0
  1136. package/dist/esm/api/resources/valueMetrics/client/requests/ArchiveValueMetricRequest.mjs +2 -0
  1137. package/dist/esm/api/resources/valueMetrics/client/requests/CreateValueMetricRequest.d.mts +57 -0
  1138. package/dist/esm/api/resources/valueMetrics/client/requests/CreateValueMetricRequest.mjs +12 -0
  1139. package/dist/esm/api/resources/valueMetrics/client/requests/GetValueMetricRequest.d.mts +9 -0
  1140. package/dist/esm/api/resources/valueMetrics/client/requests/GetValueMetricRequest.mjs +2 -0
  1141. package/dist/esm/api/resources/valueMetrics/client/requests/ListValueMetricsRequest.d.mts +10 -0
  1142. package/dist/esm/api/resources/valueMetrics/client/requests/ListValueMetricsRequest.mjs +2 -0
  1143. package/dist/esm/api/resources/valueMetrics/client/requests/UpdateValueMetricRequest.d.mts +43 -0
  1144. package/dist/esm/api/resources/valueMetrics/client/requests/UpdateValueMetricRequest.mjs +12 -0
  1145. package/dist/esm/api/resources/valueMetrics/client/requests/index.d.mts +5 -0
  1146. package/dist/esm/api/resources/valueMetrics/client/requests/index.mjs +1 -0
  1147. package/dist/esm/api/resources/valueMetrics/index.d.mts +1 -0
  1148. package/dist/esm/api/resources/valueMetrics/index.mjs +1 -0
  1149. package/dist/esm/api/resources/valueModels/client/Client.d.mts +118 -0
  1150. package/dist/esm/api/resources/valueModels/client/Client.mjs +382 -0
  1151. package/dist/esm/api/resources/valueModels/client/index.d.mts +1 -0
  1152. package/dist/esm/api/resources/valueModels/client/index.mjs +1 -0
  1153. package/dist/esm/api/resources/valueModels/client/requests/GetValueModelVersionRequest.d.mts +9 -0
  1154. package/dist/esm/api/resources/valueModels/client/requests/GetValueModelVersionRequest.mjs +2 -0
  1155. package/dist/esm/api/resources/valueModels/client/requests/ListValueModelVersionsRequest.d.mts +8 -0
  1156. package/dist/esm/api/resources/valueModels/client/requests/ListValueModelVersionsRequest.mjs +2 -0
  1157. package/dist/esm/api/resources/valueModels/client/requests/RefreshValueModelBackfillRequest.d.mts +5 -0
  1158. package/dist/esm/api/resources/valueModels/client/requests/RefreshValueModelBackfillRequest.mjs +2 -0
  1159. package/dist/esm/api/resources/valueModels/client/requests/ValueModelUploadRequest.d.mts +44 -0
  1160. package/dist/esm/api/resources/valueModels/client/requests/ValueModelUploadRequest.mjs +2 -0
  1161. package/dist/esm/api/resources/valueModels/client/requests/index.d.mts +4 -0
  1162. package/dist/esm/api/resources/valueModels/client/requests/index.mjs +1 -0
  1163. package/dist/esm/api/resources/valueModels/index.d.mts +1 -0
  1164. package/dist/esm/api/resources/valueModels/index.mjs +1 -0
  1165. package/dist/esm/api/resources/valueReceipts/client/Client.d.mts +42 -11
  1166. package/dist/esm/api/resources/valueReceipts/client/Client.mjs +153 -43
  1167. package/dist/esm/api/resources/valueReceipts/client/requests/index.d.mts +0 -1
  1168. package/dist/esm/api/resources/webhooks/client/Client.d.mts +17 -2
  1169. package/dist/esm/api/resources/webhooks/client/Client.mjs +69 -1
  1170. package/dist/esm/api/resources/webhooks/client/requests/RotateWebhookSecretRequest.d.mts +5 -0
  1171. package/dist/esm/api/resources/webhooks/client/requests/RotateWebhookSecretRequest.mjs +2 -0
  1172. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -0
  1173. package/dist/esm/api/resources/webhooks/types/TestWebhookRequestWebhookName.d.mts +2 -0
  1174. package/dist/esm/api/resources/webhooks/types/TestWebhookRequestWebhookName.mjs +2 -0
  1175. package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.d.mts +2 -0
  1176. package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.mjs +2 -0
  1177. package/dist/esm/api/types/AddAttributeIntent.d.mts +45 -0
  1178. package/dist/esm/api/types/AddAttributeIntent.mjs +21 -0
  1179. package/dist/esm/api/types/AddFromCatalogIntent.d.mts +22 -0
  1180. package/dist/esm/api/types/AddFromCatalogIntent.mjs +10 -0
  1181. package/dist/esm/api/types/AddMembersResponse.d.mts +5 -0
  1182. package/dist/esm/api/types/AddMembersResponse.mjs +2 -0
  1183. package/dist/esm/api/types/AmendmentAddAttributeOptions.d.mts +9 -0
  1184. package/dist/esm/api/types/AmendmentAddAttributeOptions.mjs +2 -0
  1185. package/dist/esm/api/types/AmendmentAddAxisOptions.d.mts +10 -0
  1186. package/dist/esm/api/types/AmendmentAddAxisOptions.mjs +2 -0
  1187. package/dist/esm/api/types/AmendmentAttributeOptions.d.mts +14 -0
  1188. package/dist/esm/api/types/AmendmentAttributeOptions.mjs +2 -0
  1189. package/dist/esm/api/types/AmendmentAttributeState.d.mts +24 -0
  1190. package/dist/esm/api/types/AmendmentAttributeState.mjs +2 -0
  1191. package/dist/esm/api/types/AmendmentAxisChoiceValue.d.mts +10 -0
  1192. package/dist/esm/api/types/AmendmentAxisChoiceValue.mjs +10 -0
  1193. package/dist/esm/api/types/AmendmentAxisId.d.mts +8 -0
  1194. package/dist/esm/api/types/AmendmentAxisId.mjs +8 -0
  1195. package/dist/esm/api/types/AmendmentAxisOptions.d.mts +16 -0
  1196. package/dist/esm/api/types/AmendmentAxisOptions.mjs +2 -0
  1197. package/dist/esm/api/types/AmendmentAxisRelevance.d.mts +6 -0
  1198. package/dist/esm/api/types/AmendmentAxisRelevance.mjs +6 -0
  1199. package/dist/esm/api/types/AmendmentBillingType.d.mts +6 -0
  1200. package/dist/esm/api/types/AmendmentBillingType.mjs +6 -0
  1201. package/dist/esm/api/types/AmendmentChargeType.d.mts +8 -0
  1202. package/dist/esm/api/types/AmendmentChargeType.mjs +8 -0
  1203. package/dist/esm/api/types/AmendmentCreditEffectKind.d.mts +6 -0
  1204. package/dist/esm/api/types/AmendmentCreditEffectKind.mjs +6 -0
  1205. package/dist/esm/api/types/AmendmentErrorResponse.d.mts +7 -0
  1206. package/dist/esm/api/types/AmendmentErrorResponse.mjs +2 -0
  1207. package/dist/esm/api/types/AmendmentIntentKind.d.mts +10 -0
  1208. package/dist/esm/api/types/AmendmentIntentKind.mjs +10 -0
  1209. package/dist/esm/api/types/AmendmentIntentOptions.d.mts +7 -0
  1210. package/dist/esm/api/types/AmendmentIntentOptions.mjs +2 -0
  1211. package/dist/esm/api/types/AmendmentLineOptions.d.mts +12 -0
  1212. package/dist/esm/api/types/AmendmentLineOptions.mjs +2 -0
  1213. package/dist/esm/api/types/AmendmentMoneyBilling.d.mts +6 -0
  1214. package/dist/esm/api/types/AmendmentMoneyBilling.mjs +6 -0
  1215. package/dist/esm/api/types/AmendmentOptions.d.mts +26 -0
  1216. package/dist/esm/api/types/AmendmentOptions.mjs +2 -0
  1217. package/dist/esm/api/types/AmendmentPlan.d.mts +24 -0
  1218. package/dist/esm/api/types/AmendmentPlan.mjs +2 -0
  1219. package/dist/esm/api/types/AmendmentPlanAttributeDiff.d.mts +18 -0
  1220. package/dist/esm/api/types/AmendmentPlanAttributeDiff.mjs +2 -0
  1221. package/dist/esm/api/types/AmendmentPlanChange.d.mts +9 -0
  1222. package/dist/esm/api/types/AmendmentPlanChange.mjs +9 -0
  1223. package/dist/esm/api/types/AmendmentPlanCreditEffect.d.mts +15 -0
  1224. package/dist/esm/api/types/AmendmentPlanCreditEffect.mjs +2 -0
  1225. package/dist/esm/api/types/AmendmentPlanLineType.d.mts +8 -0
  1226. package/dist/esm/api/types/AmendmentPlanLineType.mjs +8 -0
  1227. package/dist/esm/api/types/AmendmentPlanMoneyEffect.d.mts +31 -0
  1228. package/dist/esm/api/types/AmendmentPlanMoneyEffect.mjs +10 -0
  1229. package/dist/esm/api/types/AmendmentPlanTreatmentResolution.d.mts +12 -0
  1230. package/dist/esm/api/types/AmendmentPlanTreatmentResolution.mjs +2 -0
  1231. package/dist/esm/api/types/AmendmentPlanUsageEffect.d.mts +17 -0
  1232. package/dist/esm/api/types/AmendmentPlanUsageEffect.mjs +9 -0
  1233. package/dist/esm/api/types/AmendmentPricingClause.d.mts +14 -0
  1234. package/dist/esm/api/types/AmendmentPricingClause.mjs +2 -0
  1235. package/dist/esm/api/types/AmendmentPricingModel.d.mts +11 -0
  1236. package/dist/esm/api/types/AmendmentPricingModel.mjs +11 -0
  1237. package/dist/esm/api/types/AmendmentTreatmentSource.d.mts +7 -0
  1238. package/dist/esm/api/types/AmendmentTreatmentSource.mjs +7 -0
  1239. package/dist/esm/api/types/AnalyticsColumn.d.mts +5 -0
  1240. package/dist/esm/api/types/AnalyticsColumn.mjs +2 -0
  1241. package/dist/esm/api/types/AnalyticsQueryRequest.d.mts +4 -0
  1242. package/dist/esm/api/types/AnalyticsQueryRequest.mjs +2 -0
  1243. package/dist/esm/api/types/AnalyticsQueryResponse.d.mts +15 -0
  1244. package/dist/esm/api/types/AnalyticsQueryResponse.mjs +2 -0
  1245. package/dist/esm/api/types/AnalyticsSchemaColumn.d.mts +6 -0
  1246. package/dist/esm/api/types/AnalyticsSchemaColumn.mjs +2 -0
  1247. package/dist/esm/api/types/AnalyticsSchemaResponse.d.mts +4 -0
  1248. package/dist/esm/api/types/AnalyticsSchemaResponse.mjs +2 -0
  1249. package/dist/esm/api/types/AnalyticsSchemaView.d.mts +6 -0
  1250. package/dist/esm/api/types/AnalyticsSchemaView.mjs +2 -0
  1251. package/dist/esm/api/types/BackfillResponse.d.mts +4 -0
  1252. package/dist/esm/api/types/BackfillResponse.mjs +2 -0
  1253. package/dist/esm/api/types/ChargeStubAddAxisOptions.d.mts +34 -0
  1254. package/dist/esm/api/types/ChargeStubAddAxisOptions.mjs +16 -0
  1255. package/dist/esm/api/types/ChargeStubAxisOptions.d.mts +33 -0
  1256. package/dist/esm/api/types/ChargeStubAxisOptions.mjs +16 -0
  1257. package/dist/esm/api/types/Checkout.d.mts +2 -0
  1258. package/dist/esm/api/types/CheckoutCustomCard.d.mts +10 -0
  1259. package/dist/esm/api/types/CheckoutCustomCard.mjs +2 -0
  1260. package/dist/esm/api/types/CheckoutCustomCardInput.d.mts +10 -0
  1261. package/dist/esm/api/types/CheckoutCustomCardInput.mjs +2 -0
  1262. package/dist/esm/api/types/CheckoutDetails.d.mts +3 -0
  1263. package/dist/esm/api/types/CheckoutPlan.d.mts +4 -0
  1264. package/dist/esm/api/types/CheckoutPlan.mjs +2 -0
  1265. package/dist/esm/api/types/CheckoutPlanInput.d.mts +6 -0
  1266. package/dist/esm/api/types/CheckoutPlanInput.mjs +2 -0
  1267. package/dist/esm/api/types/CheckoutProduct.d.mts +3 -0
  1268. package/dist/esm/api/types/CheckoutProductInput.d.mts +3 -0
  1269. package/dist/esm/api/types/CheckoutSelectedProduct.d.mts +8 -0
  1270. package/dist/esm/api/types/CheckoutSelectedProduct.mjs +2 -0
  1271. package/dist/esm/api/types/CreateOrderLineAttributeRequest.d.mts +38 -5
  1272. package/dist/esm/api/types/CreateOrderLineAttributeRequest.mjs +8 -0
  1273. package/dist/esm/api/types/CreateOrderLineRequest.d.mts +4 -0
  1274. package/dist/esm/api/types/CreditBalance.d.mts +3 -1
  1275. package/dist/esm/api/types/CreditBenefitInput.d.mts +7 -5
  1276. package/dist/esm/api/types/CreditBenefitOutput.d.mts +6 -6
  1277. package/dist/esm/api/types/CreditCurrency.d.mts +17 -0
  1278. package/dist/esm/api/types/CreditCurrency.mjs +8 -1
  1279. package/dist/esm/api/types/CreditGrant.d.mts +3 -0
  1280. package/dist/esm/api/types/CreditGrantAddAxisOptions.d.mts +24 -0
  1281. package/dist/esm/api/types/CreditGrantAddAxisOptions.mjs +2 -0
  1282. package/dist/esm/api/types/CreditGrantAxisOptions.d.mts +23 -0
  1283. package/dist/esm/api/types/CreditGrantAxisOptions.mjs +2 -0
  1284. package/dist/esm/api/types/CreditGrantCreateRequest.d.mts +10 -0
  1285. package/dist/esm/api/types/CreditGrantCreateRequest.mjs +2 -0
  1286. package/dist/esm/api/types/CreditGrantCurrency.d.mts +6 -0
  1287. package/dist/esm/api/types/CreditGrantCurrency.mjs +2 -0
  1288. package/dist/esm/api/types/CreditGrantCustomer.d.mts +6 -0
  1289. package/dist/esm/api/types/CreditGrantCustomer.mjs +2 -0
  1290. package/dist/esm/api/types/CreditGrantResult.d.mts +19 -0
  1291. package/dist/esm/api/types/CreditGrantResult.mjs +8 -0
  1292. package/dist/esm/api/types/CreditGrantValue.d.mts +7 -0
  1293. package/dist/esm/api/types/CreditGrantValue.mjs +7 -0
  1294. package/dist/esm/api/types/CreditTransaction.d.mts +31 -0
  1295. package/dist/esm/api/types/CreditTransaction.mjs +10 -0
  1296. package/dist/esm/api/types/CreditTransactionCurrency.d.mts +6 -0
  1297. package/dist/esm/api/types/CreditTransactionCurrency.mjs +2 -0
  1298. package/dist/esm/api/types/CreditTransactionCustomer.d.mts +6 -0
  1299. package/dist/esm/api/types/CreditTransactionCustomer.mjs +2 -0
  1300. package/dist/esm/api/types/CreditTransactionListResponse.d.mts +6 -0
  1301. package/dist/esm/api/types/CreditTransactionListResponse.mjs +2 -0
  1302. package/dist/esm/api/types/CreditTransactionProduct.d.mts +11 -0
  1303. package/dist/esm/api/types/CreditTransactionProduct.mjs +2 -0
  1304. package/dist/esm/api/types/CurrencyCode.d.mts +4 -0
  1305. package/dist/esm/api/types/CurrencyCode.mjs +2 -0
  1306. package/dist/esm/api/types/CustomView.d.mts +25 -0
  1307. package/dist/esm/api/types/CustomView.mjs +14 -0
  1308. package/dist/esm/api/types/CustomViewAuthoringDetail.d.mts +69 -0
  1309. package/dist/esm/api/types/CustomViewAuthoringDetail.mjs +27 -0
  1310. package/dist/esm/api/types/CustomViewAuthoringGuide.d.mts +6 -0
  1311. package/dist/esm/api/types/CustomViewAuthoringGuide.mjs +2 -0
  1312. package/dist/esm/api/types/CustomViewDetail.d.mts +60 -0
  1313. package/dist/esm/api/types/CustomViewDetail.mjs +27 -0
  1314. package/dist/esm/api/types/CustomViewEmbedTokenResponse.d.mts +6 -0
  1315. package/dist/esm/api/types/CustomViewEmbedTokenResponse.mjs +2 -0
  1316. package/dist/esm/api/types/CustomViewFilter.d.mts +6 -0
  1317. package/dist/esm/api/types/CustomViewFilter.mjs +2 -0
  1318. package/dist/esm/api/types/CustomViewListResponse.d.mts +4 -0
  1319. package/dist/esm/api/types/CustomViewListResponse.mjs +2 -0
  1320. package/dist/esm/api/types/CustomViewPreviewHarness.d.mts +4 -0
  1321. package/dist/esm/api/types/CustomViewPreviewHarness.mjs +2 -0
  1322. package/dist/esm/api/types/CustomViewPreviewHarnessColumn.d.mts +16 -0
  1323. package/dist/esm/api/types/CustomViewPreviewHarnessColumn.mjs +11 -0
  1324. package/dist/esm/api/types/CustomViewPreviewHarnessRequest.d.mts +11 -0
  1325. package/dist/esm/api/types/CustomViewPreviewHarnessRequest.mjs +2 -0
  1326. package/dist/esm/api/types/CustomViewQuery.d.mts +6 -0
  1327. package/dist/esm/api/types/CustomViewQuery.mjs +2 -0
  1328. package/dist/esm/api/types/CustomViewSummary.d.mts +57 -0
  1329. package/dist/esm/api/types/CustomViewSummary.mjs +27 -0
  1330. package/dist/esm/api/types/CustomViewValidationFinding.d.mts +8 -0
  1331. package/dist/esm/api/types/CustomViewValidationFinding.mjs +2 -0
  1332. package/dist/esm/api/types/Customer.d.mts +14 -2
  1333. package/dist/esm/api/types/Customer.mjs +8 -1
  1334. package/dist/esm/api/types/CustomerAlias.d.mts +10 -0
  1335. package/dist/esm/api/types/CustomerAlias.mjs +2 -0
  1336. package/dist/esm/api/types/CustomerAliasCreateRequest.d.mts +8 -0
  1337. package/dist/esm/api/types/CustomerAliasCreateRequest.mjs +2 -0
  1338. package/dist/esm/api/types/CustomerAliasListResponse.d.mts +5 -0
  1339. package/dist/esm/api/types/CustomerAliasListResponse.mjs +2 -0
  1340. package/dist/{cjs/api/types/CustomerBillingAddress.d.ts → esm/api/types/CustomerBillingAddressInput.d.mts} +1 -1
  1341. package/dist/esm/api/types/CustomerBillingAddressInput.mjs +2 -0
  1342. package/dist/esm/api/types/CustomerBillingAddressResponse.d.mts +11 -0
  1343. package/dist/esm/api/types/CustomerBillingAddressResponse.mjs +2 -0
  1344. package/dist/esm/api/types/CustomerConnections.d.mts +7 -0
  1345. package/dist/esm/api/types/CustomerConnections.mjs +2 -0
  1346. package/dist/esm/api/types/CustomerGroupDeleteResponse.d.mts +4 -0
  1347. package/dist/esm/api/types/CustomerGroupDeleteResponse.mjs +2 -0
  1348. package/dist/esm/api/types/CustomerGroupDetail.d.mts +10 -0
  1349. package/dist/esm/api/types/CustomerGroupDetail.mjs +2 -0
  1350. package/dist/esm/api/types/CustomerGroupListResponse.d.mts +5 -0
  1351. package/dist/esm/api/types/CustomerGroupListResponse.mjs +2 -0
  1352. package/dist/esm/api/types/CustomerGroupMember.d.mts +5 -0
  1353. package/dist/esm/api/types/CustomerGroupMember.mjs +2 -0
  1354. package/dist/esm/api/types/CustomerGroupSummary.d.mts +8 -0
  1355. package/dist/esm/api/types/CustomerGroupSummary.mjs +2 -0
  1356. package/dist/esm/api/types/CustomerState.d.mts +10 -0
  1357. package/dist/esm/api/types/CustomerState.mjs +2 -0
  1358. package/dist/esm/api/types/CustomerStateCheckoutLink.d.mts +18 -0
  1359. package/dist/esm/api/types/CustomerStateCheckoutLink.mjs +10 -0
  1360. package/dist/esm/api/types/CustomerStateCreditBalance.d.mts +6 -0
  1361. package/dist/esm/api/types/CustomerStateCreditBalance.mjs +2 -0
  1362. package/dist/esm/api/types/CustomerStateCreditSummary.d.mts +4 -0
  1363. package/dist/esm/api/types/CustomerStateCreditSummary.mjs +2 -0
  1364. package/dist/esm/api/types/CustomerStateCustomer.d.mts +8 -0
  1365. package/dist/esm/api/types/CustomerStateCustomer.mjs +2 -0
  1366. package/dist/esm/api/types/CustomerStateOrder.d.mts +21 -0
  1367. package/dist/esm/api/types/CustomerStateOrder.mjs +10 -0
  1368. package/dist/esm/api/types/CustomerStateProductRef.d.mts +5 -0
  1369. package/dist/esm/api/types/CustomerStateProductRef.mjs +2 -0
  1370. package/dist/esm/api/types/CustomerStateSeat.d.mts +17 -0
  1371. package/dist/esm/api/types/CustomerStateSeat.mjs +8 -0
  1372. package/dist/esm/api/types/CustomerStateSeatAssignee.d.mts +6 -0
  1373. package/dist/esm/api/types/CustomerStateSeatAssignee.mjs +2 -0
  1374. package/dist/esm/api/types/CustomerStateSeats.d.mts +7 -0
  1375. package/dist/esm/api/types/CustomerStateSeats.mjs +2 -0
  1376. package/dist/esm/api/types/CustomerUnit.d.mts +25 -0
  1377. package/dist/esm/api/types/CustomerUnit.mjs +9 -0
  1378. package/dist/esm/api/types/CustomerUnitAttribution.d.mts +7 -0
  1379. package/dist/esm/api/types/CustomerUnitAttribution.mjs +2 -0
  1380. package/dist/esm/api/types/CustomerUnitCapCurrentPeriod.d.mts +11 -0
  1381. package/dist/esm/api/types/CustomerUnitCapCurrentPeriod.mjs +2 -0
  1382. package/dist/esm/api/types/CustomerUnitCapEndResponse.d.mts +12 -0
  1383. package/dist/esm/api/types/CustomerUnitCapEndResponse.mjs +2 -0
  1384. package/dist/esm/api/types/CustomerUnitCapEndedPolicy.d.mts +24 -0
  1385. package/dist/esm/api/types/CustomerUnitCapEndedPolicy.mjs +8 -0
  1386. package/dist/esm/api/types/CustomerUnitCapOpenPolicy.d.mts +29 -0
  1387. package/dist/esm/api/types/CustomerUnitCapOpenPolicy.mjs +12 -0
  1388. package/dist/esm/api/types/CustomerUnitCapPeriod.d.mts +6 -0
  1389. package/dist/esm/api/types/CustomerUnitCapPeriod.mjs +2 -0
  1390. package/dist/esm/api/types/CustomerUnitCapPolicy.d.mts +24 -0
  1391. package/dist/esm/api/types/CustomerUnitCapPolicy.mjs +8 -0
  1392. package/dist/esm/api/types/CustomerUnitCapResponse.d.mts +11 -0
  1393. package/dist/esm/api/types/CustomerUnitCapResponse.mjs +2 -0
  1394. package/dist/esm/api/types/CustomerUnitCapSet.d.mts +17 -0
  1395. package/dist/esm/api/types/CustomerUnitCapSet.mjs +8 -0
  1396. package/dist/esm/api/types/CustomerUnitCapSetResponse.d.mts +11 -0
  1397. package/dist/esm/api/types/CustomerUnitCapSetResponse.mjs +2 -0
  1398. package/dist/esm/api/types/CustomerUnitCreate.d.mts +12 -0
  1399. package/dist/esm/api/types/CustomerUnitCreate.mjs +2 -0
  1400. package/dist/esm/api/types/CustomerUnitListResponse.d.mts +6 -0
  1401. package/dist/esm/api/types/CustomerUnitListResponse.mjs +2 -0
  1402. package/dist/esm/api/types/CustomerUnitUpdate.d.mts +10 -0
  1403. package/dist/esm/api/types/CustomerUnitUpdate.mjs +2 -0
  1404. package/dist/esm/api/types/EndAttributeIntent.d.mts +16 -0
  1405. package/dist/esm/api/types/EndAttributeIntent.mjs +11 -0
  1406. package/dist/esm/api/types/GrantCustomerCreditsResponse.d.mts +9 -0
  1407. package/dist/esm/api/types/GrantCustomerCreditsResponse.mjs +2 -0
  1408. package/dist/esm/api/types/Invoice.d.mts +3 -0
  1409. package/dist/esm/api/types/MemberRequest.d.mts +4 -0
  1410. package/dist/esm/api/types/MemberRequest.mjs +2 -0
  1411. package/dist/esm/api/types/MoneyAxisOptions.d.mts +23 -0
  1412. package/dist/esm/api/types/MoneyAxisOptions.mjs +2 -0
  1413. package/dist/esm/api/types/MoneyAxisValue.d.mts +6 -0
  1414. package/dist/esm/api/types/MoneyAxisValue.mjs +6 -0
  1415. package/dist/esm/api/types/Order.d.mts +1 -0
  1416. package/dist/esm/api/types/OrderLine.d.mts +2 -0
  1417. package/dist/esm/api/types/OrderLineType.d.mts +7 -0
  1418. package/dist/esm/api/types/OrderLineType.mjs +7 -0
  1419. package/dist/esm/api/types/Payment.d.mts +30 -0
  1420. package/dist/esm/api/types/Payment.mjs +2 -0
  1421. package/dist/esm/api/types/PaymentAllocation.d.mts +21 -0
  1422. package/dist/esm/api/types/PaymentAllocation.mjs +2 -0
  1423. package/dist/esm/api/types/PaymentAllocationCreateResponse.d.mts +4 -0
  1424. package/dist/esm/api/types/PaymentAllocationCreateResponse.mjs +2 -0
  1425. package/dist/esm/api/types/PaymentAllocationInput.d.mts +8 -0
  1426. package/dist/esm/api/types/PaymentAllocationInput.mjs +2 -0
  1427. package/dist/esm/api/types/PaymentAllocationListResponse.d.mts +5 -0
  1428. package/dist/esm/api/types/PaymentAllocationListResponse.mjs +2 -0
  1429. package/dist/esm/api/types/PaymentCreateStatus.d.mts +6 -0
  1430. package/dist/esm/api/types/PaymentCreateStatus.mjs +6 -0
  1431. package/dist/esm/api/types/PaymentListResponse.d.mts +5 -0
  1432. package/dist/esm/api/types/PaymentListResponse.mjs +2 -0
  1433. package/dist/esm/api/types/PaymentMethod.d.mts +15 -0
  1434. package/dist/esm/api/types/PaymentMethod.mjs +2 -0
  1435. package/dist/esm/api/types/PaymentMethodCard.d.mts +13 -0
  1436. package/dist/esm/api/types/PaymentMethodCard.mjs +2 -0
  1437. package/dist/esm/api/types/PaymentMethodListResponse.d.mts +5 -0
  1438. package/dist/esm/api/types/PaymentMethodListResponse.mjs +2 -0
  1439. package/dist/esm/api/types/PaymentMethodSetup.d.mts +21 -0
  1440. package/dist/esm/api/types/PaymentMethodSetup.mjs +2 -0
  1441. package/dist/esm/api/types/PaymentType.d.mts +9 -0
  1442. package/dist/esm/api/types/PaymentType.mjs +9 -0
  1443. package/dist/esm/api/types/PendingCreditConsumption.d.mts +16 -0
  1444. package/dist/esm/api/types/PendingCreditConsumption.mjs +2 -0
  1445. package/dist/esm/api/types/PendingCreditConsumptionCurrency.d.mts +9 -0
  1446. package/dist/esm/api/types/PendingCreditConsumptionCurrency.mjs +2 -0
  1447. package/dist/esm/api/types/PendingCreditConsumptionListResponse.d.mts +6 -0
  1448. package/dist/esm/api/types/PendingCreditConsumptionListResponse.mjs +2 -0
  1449. package/dist/esm/api/types/Plan.d.mts +22 -0
  1450. package/dist/esm/api/types/Plan.mjs +8 -0
  1451. package/dist/esm/api/types/PlanAttribute.d.mts +8 -0
  1452. package/dist/esm/api/types/PlanAttribute.mjs +2 -0
  1453. package/dist/esm/api/types/PlanAttributeInput.d.mts +7 -0
  1454. package/dist/esm/api/types/PlanAttributeInput.mjs +2 -0
  1455. package/dist/esm/api/types/PlanCreditBenefit.d.mts +37 -0
  1456. package/dist/esm/api/types/PlanCreditBenefit.mjs +21 -0
  1457. package/dist/esm/api/types/PlanListResponse.d.mts +5 -0
  1458. package/dist/esm/api/types/PlanListResponse.mjs +2 -0
  1459. package/dist/esm/api/types/PlanPricing.d.mts +31 -0
  1460. package/dist/esm/api/types/PlanPricing.mjs +21 -0
  1461. package/dist/esm/api/types/PlanRef.d.mts +5 -0
  1462. package/dist/esm/api/types/PlanRef.mjs +2 -0
  1463. package/dist/esm/api/types/PlanUpgradePathGroup.d.mts +4 -0
  1464. package/dist/esm/api/types/PlanUpgradePathGroup.mjs +2 -0
  1465. package/dist/esm/api/types/PlanUpgradePathResponse.d.mts +4 -0
  1466. package/dist/esm/api/types/PlanUpgradePathResponse.mjs +2 -0
  1467. package/dist/esm/api/types/PlannedAdd.d.mts +28 -0
  1468. package/dist/esm/api/types/PlannedAdd.mjs +10 -0
  1469. package/dist/esm/api/types/PlannedCopy.d.mts +10 -0
  1470. package/dist/esm/api/types/PlannedCopy.mjs +2 -0
  1471. package/dist/esm/api/types/PlannedEnd.d.mts +10 -0
  1472. package/dist/esm/api/types/PlannedEnd.mjs +2 -0
  1473. package/dist/esm/api/types/PlannedOperations.d.mts +13 -0
  1474. package/dist/esm/api/types/PlannedOperations.mjs +2 -0
  1475. package/dist/esm/api/types/PlannedOrderTerm.d.mts +10 -0
  1476. package/dist/esm/api/types/PlannedOrderTerm.mjs +2 -0
  1477. package/dist/esm/api/types/PlannedReplace.d.mts +15 -0
  1478. package/dist/esm/api/types/PlannedReplace.mjs +2 -0
  1479. package/dist/esm/api/types/PricingInput.d.mts +4 -1
  1480. package/dist/esm/api/types/PricingOutput.d.mts +7 -0
  1481. package/dist/esm/api/types/PricingOutput.mjs +5 -0
  1482. package/dist/esm/api/types/PricingPricePointOutput.d.mts +2 -22
  1483. package/dist/esm/api/types/PricingPricePointOutput.mjs +1 -13
  1484. package/dist/esm/api/types/PricingTierOutput.d.mts +16 -0
  1485. package/dist/esm/api/types/PricingTierOutput.mjs +8 -0
  1486. package/dist/esm/api/types/ProductAttributeOutput.d.mts +8 -0
  1487. package/dist/esm/api/types/ProductAttributeOutput.mjs +2 -0
  1488. package/dist/esm/api/types/ProductAttributeUpsert.d.mts +9 -0
  1489. package/dist/esm/api/types/ProductAttributeUpsert.mjs +2 -0
  1490. package/dist/esm/api/types/ProductCreditBenefitInput.d.mts +32 -0
  1491. package/dist/esm/api/types/ProductCreditBenefitInput.mjs +17 -0
  1492. package/dist/esm/api/types/ProductCreditBenefitOutput.d.mts +13 -0
  1493. package/dist/esm/api/types/ProductCreditBenefitOutput.mjs +2 -0
  1494. package/dist/esm/api/types/ProductDetail.d.mts +14 -0
  1495. package/dist/esm/api/types/ProductDetail.mjs +2 -0
  1496. package/dist/esm/api/types/ProductOneTimePerUnitInput.d.mts +21 -0
  1497. package/dist/esm/api/types/ProductOneTimePerUnitInput.mjs +15 -0
  1498. package/dist/esm/api/types/ProductPricePointOutput.d.mts +9 -0
  1499. package/dist/esm/api/types/ProductPricePointOutput.mjs +2 -0
  1500. package/dist/esm/api/types/ProductPricingInput.d.mts +49 -0
  1501. package/dist/esm/api/types/ProductPricingInput.mjs +2 -0
  1502. package/dist/esm/api/types/ProductPricingOutput.d.mts +43 -0
  1503. package/dist/esm/api/types/ProductPricingOutput.mjs +25 -0
  1504. package/dist/esm/api/types/ProductPricingTierOutput.d.mts +16 -0
  1505. package/dist/esm/api/types/ProductPricingTierOutput.mjs +8 -0
  1506. package/dist/esm/api/types/ProductRecurringGraduatedInput.d.mts +22 -0
  1507. package/dist/esm/api/types/ProductRecurringGraduatedInput.mjs +15 -0
  1508. package/dist/esm/api/types/ProductRecurringPerUnitInput.d.mts +22 -0
  1509. package/dist/esm/api/types/ProductRecurringPerUnitInput.mjs +15 -0
  1510. package/dist/esm/api/types/ProductRecurringPercentOfTotalInput.d.mts +23 -0
  1511. package/dist/esm/api/types/ProductRecurringPercentOfTotalInput.mjs +15 -0
  1512. package/dist/esm/api/types/ProductRecurringVolumeInput.d.mts +22 -0
  1513. package/dist/esm/api/types/ProductRecurringVolumeInput.mjs +15 -0
  1514. package/dist/esm/api/types/ProductSeatBasedGraduatedInput.d.mts +22 -0
  1515. package/dist/esm/api/types/ProductSeatBasedGraduatedInput.mjs +15 -0
  1516. package/dist/esm/api/types/ProductSeatBasedPerUnitInput.d.mts +22 -0
  1517. package/dist/esm/api/types/ProductSeatBasedPerUnitInput.mjs +15 -0
  1518. package/dist/esm/api/types/ProductSeatBasedPrepaidCreditsInput.d.mts +26 -0
  1519. package/dist/esm/api/types/ProductSeatBasedPrepaidCreditsInput.mjs +15 -0
  1520. package/dist/esm/api/types/ProductSeatBasedVolumeInput.d.mts +22 -0
  1521. package/dist/esm/api/types/ProductSeatBasedVolumeInput.mjs +15 -0
  1522. package/dist/esm/api/types/ProductSimplePricePoint.d.mts +29 -0
  1523. package/dist/esm/api/types/ProductSimplePricePoint.mjs +14 -0
  1524. package/dist/esm/api/types/ProductTieredPricePoint.d.mts +29 -0
  1525. package/dist/esm/api/types/ProductTieredPricePoint.mjs +14 -0
  1526. package/dist/esm/api/types/ProductUsageBracketedPrepaidCreditsInput.d.mts +57 -0
  1527. package/dist/esm/api/types/ProductUsageBracketedPrepaidCreditsInput.mjs +25 -0
  1528. package/dist/esm/api/types/ProductUsageCostPlusInput.d.mts +29 -0
  1529. package/dist/esm/api/types/ProductUsageCostPlusInput.mjs +19 -0
  1530. package/dist/esm/api/types/ProductUsageGraduatedInput.d.mts +29 -0
  1531. package/dist/esm/api/types/ProductUsageGraduatedInput.mjs +19 -0
  1532. package/dist/esm/api/types/ProductUsagePerUnitInput.d.mts +29 -0
  1533. package/dist/esm/api/types/ProductUsagePerUnitInput.mjs +19 -0
  1534. package/dist/esm/api/types/ProductUsagePrepaidCreditsInput.d.mts +45 -0
  1535. package/dist/esm/api/types/ProductUsagePrepaidCreditsInput.mjs +25 -0
  1536. package/dist/esm/api/types/ProductUsageVolumeInput.d.mts +29 -0
  1537. package/dist/esm/api/types/ProductUsageVolumeInput.mjs +19 -0
  1538. package/dist/esm/api/types/RemoveMembersResponse.d.mts +5 -0
  1539. package/dist/esm/api/types/RemoveMembersResponse.mjs +2 -0
  1540. package/dist/esm/api/types/RenderBundleEdit.d.mts +8 -0
  1541. package/dist/esm/api/types/RenderBundleEdit.mjs +2 -0
  1542. package/dist/esm/api/types/RotateWebhookSecretResponse.d.mts +4 -0
  1543. package/dist/esm/api/types/RotateWebhookSecretResponse.mjs +2 -0
  1544. package/dist/esm/api/types/SeatBasedPrepaidCreditsInput.d.mts +1 -0
  1545. package/dist/esm/api/types/SetMembersResponse.d.mts +6 -0
  1546. package/dist/esm/api/types/SetMembersResponse.mjs +2 -0
  1547. package/dist/esm/api/types/Signal.d.mts +1 -0
  1548. package/dist/esm/api/types/SignalListItem.d.mts +20 -0
  1549. package/dist/esm/api/types/SignalListItem.mjs +2 -0
  1550. package/dist/esm/api/types/SignalListResponse.d.mts +5 -0
  1551. package/dist/esm/api/types/SignalListResponse.mjs +2 -0
  1552. package/dist/esm/api/types/SignalsMetadataResponse.d.mts +28 -0
  1553. package/dist/esm/api/types/SignalsMetadataResponse.mjs +2 -0
  1554. package/dist/esm/api/types/StripeConnection.d.mts +7 -0
  1555. package/dist/esm/api/types/StripeConnection.mjs +2 -0
  1556. package/dist/esm/api/{resources/valueReceipts/client/requests → types}/SyncValueReceiptRequest.d.mts +0 -7
  1557. package/dist/esm/api/types/SyncValueReceiptRequest.mjs +2 -0
  1558. package/dist/esm/api/types/UnifiedAmendmentIntent.d.mts +25 -0
  1559. package/dist/esm/api/types/UnifiedAmendmentIntent.mjs +2 -0
  1560. package/dist/esm/api/types/UnifiedAmendmentResponse.d.mts +19 -0
  1561. package/dist/esm/api/types/UnifiedAmendmentResponse.mjs +2 -0
  1562. package/dist/esm/api/types/UpdateCustomerRequest.d.mts +1 -1
  1563. package/dist/esm/api/types/UpdateLineTermIntent.d.mts +18 -0
  1564. package/dist/esm/api/types/UpdateLineTermIntent.mjs +11 -0
  1565. package/dist/esm/api/types/UpdateOrderTermIntent.d.mts +18 -0
  1566. package/dist/esm/api/types/UpdateOrderTermIntent.mjs +11 -0
  1567. package/dist/esm/api/types/UpdatePlanRequest.d.mts +18 -0
  1568. package/dist/esm/api/types/UpdatePlanRequest.mjs +9 -0
  1569. package/dist/esm/api/types/UpdatePricingIntent.d.mts +22 -0
  1570. package/dist/esm/api/types/UpdatePricingIntent.mjs +11 -0
  1571. package/dist/esm/api/types/UpdateProductRequest.d.mts +2 -0
  1572. package/dist/esm/api/types/UpdateQuantityIntent.d.mts +18 -0
  1573. package/dist/esm/api/types/UpdateQuantityIntent.mjs +11 -0
  1574. package/dist/esm/api/types/UsageAttributionAxisOptions.d.mts +23 -0
  1575. package/dist/esm/api/types/UsageAttributionAxisOptions.mjs +2 -0
  1576. package/dist/esm/api/types/UsageAttributionAxisValue.d.mts +6 -0
  1577. package/dist/esm/api/types/UsageAttributionAxisValue.mjs +6 -0
  1578. package/dist/esm/api/types/UsageBracketedPrepaidCreditsInput.d.mts +57 -0
  1579. package/dist/esm/api/types/UsageBracketedPrepaidCreditsInput.mjs +25 -0
  1580. package/dist/esm/api/types/UsageCostPlusInput.d.mts +6 -0
  1581. package/dist/esm/api/types/UsageCostPlusInput.mjs +4 -0
  1582. package/dist/esm/api/types/UsageGraduatedInput.d.mts +6 -0
  1583. package/dist/esm/api/types/UsageGraduatedInput.mjs +4 -0
  1584. package/dist/esm/api/types/UsagePerUnitInput.d.mts +6 -0
  1585. package/dist/esm/api/types/UsagePerUnitInput.mjs +4 -0
  1586. package/dist/esm/api/types/UsagePrepaidCreditsInput.d.mts +19 -0
  1587. package/dist/esm/api/types/UsagePrepaidCreditsInput.mjs +10 -0
  1588. package/dist/esm/api/types/UsageVolumeInput.d.mts +6 -0
  1589. package/dist/esm/api/types/UsageVolumeInput.mjs +4 -0
  1590. package/dist/esm/api/types/ValidateCustomViewRequest.d.mts +51 -0
  1591. package/dist/esm/api/types/ValidateCustomViewRequest.mjs +23 -0
  1592. package/dist/esm/api/types/ValidateCustomViewResponse.d.mts +7 -0
  1593. package/dist/esm/api/types/ValidateCustomViewResponse.mjs +2 -0
  1594. package/dist/esm/api/types/ValueMetricDetail.d.mts +47 -0
  1595. package/dist/esm/api/types/ValueMetricDetail.mjs +2 -0
  1596. package/dist/esm/api/types/ValueMetricFormula.d.mts +9 -0
  1597. package/dist/esm/api/types/ValueMetricFormula.mjs +2 -0
  1598. package/dist/esm/api/types/ValueMetricFormulaVariable.d.mts +31 -0
  1599. package/dist/esm/api/types/ValueMetricFormulaVariable.mjs +21 -0
  1600. package/dist/esm/api/types/ValueMetricListResponse.d.mts +5 -0
  1601. package/dist/esm/api/types/ValueMetricListResponse.mjs +2 -0
  1602. package/dist/esm/api/types/ValueMetricMonetaryConversion.d.mts +6 -0
  1603. package/dist/esm/api/types/ValueMetricMonetaryConversion.mjs +2 -0
  1604. package/dist/esm/api/types/ValueMetricSignalBinding.d.mts +14 -0
  1605. package/dist/esm/api/types/ValueMetricSignalBinding.mjs +2 -0
  1606. package/dist/esm/api/types/ValueMetricSummary.d.mts +30 -0
  1607. package/dist/esm/api/types/ValueMetricSummary.mjs +2 -0
  1608. package/dist/esm/api/types/ValueMetricUnit.d.mts +27 -0
  1609. package/dist/esm/api/types/ValueMetricUnit.mjs +17 -0
  1610. package/dist/esm/api/types/ValueMetricValidationResponse.d.mts +13 -0
  1611. package/dist/esm/api/types/ValueMetricValidationResponse.mjs +2 -0
  1612. package/dist/esm/api/types/ValueMetricVariableEdit.d.mts +26 -0
  1613. package/dist/esm/api/types/ValueMetricVariableEdit.mjs +16 -0
  1614. package/dist/esm/api/types/ValueMetricWriteAck.d.mts +6 -0
  1615. package/dist/esm/api/types/ValueMetricWriteAck.mjs +2 -0
  1616. package/dist/esm/api/types/ValueModelAuthoringGuide.d.mts +22 -0
  1617. package/dist/esm/api/types/ValueModelAuthoringGuide.mjs +2 -0
  1618. package/dist/esm/api/types/ValueModelContent.d.mts +357 -0
  1619. package/dist/esm/api/types/ValueModelContent.mjs +138 -0
  1620. package/dist/esm/api/types/ValueModelDetail.d.mts +12 -0
  1621. package/dist/esm/api/types/ValueModelDetail.mjs +2 -0
  1622. package/dist/esm/api/types/ValueModelSummary.d.mts +18 -0
  1623. package/dist/esm/api/types/ValueModelSummary.mjs +9 -0
  1624. package/dist/esm/api/types/ValueModelVersionListResponse.d.mts +5 -0
  1625. package/dist/esm/api/types/ValueModelVersionListResponse.mjs +2 -0
  1626. package/dist/esm/api/types/ValueReceiptSyncResponse.d.mts +1 -0
  1627. package/dist/esm/api/types/ViewDataResponse.d.mts +4 -0
  1628. package/dist/esm/api/types/ViewDataResponse.mjs +2 -0
  1629. package/dist/esm/api/types/Webhook.d.mts +2 -0
  1630. package/dist/esm/api/types/Webhook.mjs +2 -0
  1631. package/dist/esm/api/types/WebhookListResponse.d.mts +2 -0
  1632. package/dist/esm/api/types/WebhookUpdateResponse.d.mts +28 -0
  1633. package/dist/esm/api/types/WebhookUpdateResponse.mjs +17 -0
  1634. package/dist/esm/api/types/WritableOrderLineType.d.mts +6 -0
  1635. package/dist/esm/api/types/WritableOrderLineType.mjs +6 -0
  1636. package/dist/esm/api/types/index.d.mts +209 -1
  1637. package/dist/esm/api/types/index.mjs +209 -1
  1638. package/dist/esm/tracing/aiSdkSpanProcessor.mjs +17 -0
  1639. package/dist/esm/version.d.mts +1 -1
  1640. package/dist/esm/version.mjs +1 -1
  1641. package/package.json +1 -1
  1642. package/reference.md +6237 -375
  1643. /package/dist/cjs/api/resources/{valueReceipts/client/requests/SyncValueReceiptRequest.js → amendments/client/requests/GetOrderAmendmentOptionsRequest.js} +0 -0
  1644. /package/dist/cjs/api/{types/CustomerBillingAddress.js → resources/analytics/client/requests/GetSignalsMetadataRequest.js} +0 -0
  1645. /package/dist/esm/api/resources/{valueReceipts/client/requests/SyncValueReceiptRequest.mjs → amendments/client/requests/GetOrderAmendmentOptionsRequest.mjs} +0 -0
  1646. /package/dist/esm/api/{types/CustomerBillingAddress.mjs → resources/analytics/client/requests/GetSignalsMetadataRequest.mjs} +0 -0
@@ -47,7 +47,7 @@ export class Customers {
47
47
  __listCustomers() {
48
48
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
49
49
  var _a, _b, _c, _d, _e, _f, _g, _h;
50
- const { limit, offset } = request;
50
+ const { limit, offset, name, status, creationState, createdAtFrom, createdAtTo, externalId } = request;
51
51
  const _queryParams = {};
52
52
  if (limit != null) {
53
53
  _queryParams.limit = limit.toString();
@@ -55,6 +55,24 @@ export class Customers {
55
55
  if (offset != null) {
56
56
  _queryParams.offset = offset.toString();
57
57
  }
58
+ if (name != null) {
59
+ _queryParams.name = name;
60
+ }
61
+ if (status != null) {
62
+ _queryParams.status = status;
63
+ }
64
+ if (creationState != null) {
65
+ _queryParams.creationState = creationState;
66
+ }
67
+ if (createdAtFrom != null) {
68
+ _queryParams.createdAtFrom = createdAtFrom;
69
+ }
70
+ if (createdAtTo != null) {
71
+ _queryParams.createdAtTo = createdAtTo;
72
+ }
73
+ if (externalId != null) {
74
+ _queryParams.externalId = externalId;
75
+ }
58
76
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
59
77
  const _response = yield core.fetcher({
60
78
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, "customers/"),
@@ -172,33 +190,41 @@ export class Customers {
172
190
  });
173
191
  }
174
192
  /**
175
- * Get a customer by ID
193
+ * List alternate external identifiers that resolve to a customer by Paid display ID.
176
194
  *
177
- * @param {Paid.GetCustomerByIdRequest} request
195
+ * @param {Paid.ListCustomerAliasesRequest} request
178
196
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
179
197
  *
198
+ * @throws {@link Paid.BadRequestError}
180
199
  * @throws {@link Paid.ForbiddenError}
181
200
  * @throws {@link Paid.NotFoundError}
182
201
  * @throws {@link Paid.InternalServerError}
183
202
  *
184
203
  * @example
185
- * await client.customers.getCustomerById({
186
- * id: "id"
204
+ * await client.customers.listCustomerAliases({
205
+ * id: "cus_abc123"
187
206
  * })
188
207
  */
189
- getCustomerById(request, requestOptions) {
190
- return core.HttpResponsePromise.fromPromise(this.__getCustomerById(request, requestOptions));
208
+ listCustomerAliases(request, requestOptions) {
209
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerAliases(request, requestOptions));
191
210
  }
192
- __getCustomerById(request, requestOptions) {
211
+ __listCustomerAliases(request, requestOptions) {
193
212
  return __awaiter(this, void 0, void 0, function* () {
194
213
  var _a, _b, _c, _d, _e, _f, _g, _h;
195
- const { id } = request;
214
+ const { id, limit, offset } = request;
215
+ const _queryParams = {};
216
+ if (limit != null) {
217
+ _queryParams.limit = limit.toString();
218
+ }
219
+ if (offset != null) {
220
+ _queryParams.offset = offset.toString();
221
+ }
196
222
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
197
223
  const _response = yield core.fetcher({
198
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}`),
224
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/aliases`),
199
225
  method: "GET",
200
226
  headers: _headers,
201
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
227
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
202
228
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
203
229
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
204
230
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -208,6 +234,8 @@ export class Customers {
208
234
  }
209
235
  if (_response.error.reason === "status-code") {
210
236
  switch (_response.error.statusCode) {
237
+ case 400:
238
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
211
239
  case 403:
212
240
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
213
241
  case 404:
@@ -230,7 +258,7 @@ export class Customers {
230
258
  rawResponse: _response.rawResponse,
231
259
  });
232
260
  case "timeout":
233
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}.");
261
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/aliases.");
234
262
  case "unknown":
235
263
  throw new errors.PaidError({
236
264
  message: _response.error.errorMessage,
@@ -240,33 +268,36 @@ export class Customers {
240
268
  });
241
269
  }
242
270
  /**
243
- * Update a customer by ID
271
+ * Create an alternate external identifier for a customer by Paid display ID.
244
272
  *
245
- * @param {Paid.UpdateCustomerByIdRequest} request
273
+ * @param {Paid.CreateCustomerAliasRequest} request
246
274
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
247
275
  *
248
276
  * @throws {@link Paid.BadRequestError}
249
277
  * @throws {@link Paid.ForbiddenError}
250
278
  * @throws {@link Paid.NotFoundError}
279
+ * @throws {@link Paid.ConflictError}
251
280
  * @throws {@link Paid.InternalServerError}
252
281
  *
253
282
  * @example
254
- * await client.customers.updateCustomerById({
255
- * id: "id",
256
- * body: {}
283
+ * await client.customers.createCustomerAlias({
284
+ * id: "cus_abc123",
285
+ * body: {
286
+ * alias: "child-customer-1"
287
+ * }
257
288
  * })
258
289
  */
259
- updateCustomerById(request, requestOptions) {
260
- return core.HttpResponsePromise.fromPromise(this.__updateCustomerById(request, requestOptions));
290
+ createCustomerAlias(request, requestOptions) {
291
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerAlias(request, requestOptions));
261
292
  }
262
- __updateCustomerById(request, requestOptions) {
293
+ __createCustomerAlias(request, requestOptions) {
263
294
  return __awaiter(this, void 0, void 0, function* () {
264
295
  var _a, _b, _c, _d, _e, _f, _g, _h;
265
296
  const { id, body: _body } = request;
266
297
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
267
298
  const _response = yield core.fetcher({
268
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}`),
269
- method: "PUT",
299
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/aliases`),
300
+ method: "POST",
270
301
  headers: _headers,
271
302
  contentType: "application/json",
272
303
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -287,6 +318,8 @@ export class Customers {
287
318
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
288
319
  case 404:
289
320
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
321
+ case 409:
322
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
290
323
  case 500:
291
324
  throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
292
325
  default:
@@ -305,7 +338,7 @@ export class Customers {
305
338
  rawResponse: _response.rawResponse,
306
339
  });
307
340
  case "timeout":
308
- throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{id}.");
341
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/{id}/aliases.");
309
342
  case "unknown":
310
343
  throw new errors.PaidError({
311
344
  message: _response.error.errorMessage,
@@ -315,31 +348,31 @@ export class Customers {
315
348
  });
316
349
  }
317
350
  /**
318
- * Delete a customer by ID
351
+ * Remove an alternate external identifier from a customer by Paid display ID.
319
352
  *
320
- * @param {Paid.DeleteCustomerByIdRequest} request
353
+ * @param {Paid.DeleteCustomerAliasRequest} request
321
354
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
322
355
  *
323
- * @throws {@link Paid.BadRequestError}
324
356
  * @throws {@link Paid.ForbiddenError}
325
357
  * @throws {@link Paid.NotFoundError}
326
358
  * @throws {@link Paid.InternalServerError}
327
359
  *
328
360
  * @example
329
- * await client.customers.deleteCustomerById({
330
- * id: "id"
361
+ * await client.customers.deleteCustomerAlias({
362
+ * id: "cus_abc123",
363
+ * alias: "child-customer-1"
331
364
  * })
332
365
  */
333
- deleteCustomerById(request, requestOptions) {
334
- return core.HttpResponsePromise.fromPromise(this.__deleteCustomerById(request, requestOptions));
366
+ deleteCustomerAlias(request, requestOptions) {
367
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerAlias(request, requestOptions));
335
368
  }
336
- __deleteCustomerById(request, requestOptions) {
369
+ __deleteCustomerAlias(request, requestOptions) {
337
370
  return __awaiter(this, void 0, void 0, function* () {
338
371
  var _a, _b, _c, _d, _e, _f, _g, _h;
339
- const { id } = request;
372
+ const { id, alias } = request;
340
373
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
341
374
  const _response = yield core.fetcher({
342
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}`),
375
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/aliases/${core.url.encodePathParam(alias)}`),
343
376
  method: "DELETE",
344
377
  headers: _headers,
345
378
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -352,8 +385,6 @@ export class Customers {
352
385
  }
353
386
  if (_response.error.reason === "status-code") {
354
387
  switch (_response.error.statusCode) {
355
- case 400:
356
- throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
357
388
  case 403:
358
389
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
359
390
  case 404:
@@ -376,7 +407,7 @@ export class Customers {
376
407
  rawResponse: _response.rawResponse,
377
408
  });
378
409
  case "timeout":
379
- throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}.");
410
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}/aliases/{alias}.");
380
411
  case "unknown":
381
412
  throw new errors.PaidError({
382
413
  message: _response.error.errorMessage,
@@ -386,9 +417,9 @@ export class Customers {
386
417
  });
387
418
  }
388
419
  /**
389
- * Get a customer by external ID
420
+ * Get a customer by Paid display ID. Use the value returned as `customer.id`, for example `cus_abc123`. If you have your own customer ID, use `GET /api/v2/customers/external/{externalId}`.
390
421
  *
391
- * @param {Paid.GetCustomerByExternalIdRequest} request
422
+ * @param {Paid.GetCustomerByIdRequest} request
392
423
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
393
424
  *
394
425
  * @throws {@link Paid.ForbiddenError}
@@ -396,20 +427,20 @@ export class Customers {
396
427
  * @throws {@link Paid.InternalServerError}
397
428
  *
398
429
  * @example
399
- * await client.customers.getCustomerByExternalId({
400
- * externalId: "externalId"
430
+ * await client.customers.getCustomerById({
431
+ * id: "cus_abc123"
401
432
  * })
402
433
  */
403
- getCustomerByExternalId(request, requestOptions) {
404
- return core.HttpResponsePromise.fromPromise(this.__getCustomerByExternalId(request, requestOptions));
434
+ getCustomerById(request, requestOptions) {
435
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerById(request, requestOptions));
405
436
  }
406
- __getCustomerByExternalId(request, requestOptions) {
437
+ __getCustomerById(request, requestOptions) {
407
438
  return __awaiter(this, void 0, void 0, function* () {
408
439
  var _a, _b, _c, _d, _e, _f, _g, _h;
409
- const { externalId } = request;
440
+ const { id } = request;
410
441
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
411
442
  const _response = yield core.fetcher({
412
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}`),
443
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}`),
413
444
  method: "GET",
414
445
  headers: _headers,
415
446
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -444,7 +475,7 @@ export class Customers {
444
475
  rawResponse: _response.rawResponse,
445
476
  });
446
477
  case "timeout":
447
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}.");
478
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}.");
448
479
  case "unknown":
449
480
  throw new errors.PaidError({
450
481
  message: _response.error.errorMessage,
@@ -454,9 +485,9 @@ export class Customers {
454
485
  });
455
486
  }
456
487
  /**
457
- * Update a customer by external ID
488
+ * Update a customer by Paid display ID. Use the value returned as `customer.id`, for example `cus_abc123`. If you have your own customer ID, use `PUT /api/v2/customers/external/{externalId}`.
458
489
  *
459
- * @param {Paid.UpdateCustomerByExternalIdRequest} request
490
+ * @param {Paid.UpdateCustomerByIdRequest} request
460
491
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
461
492
  *
462
493
  * @throws {@link Paid.BadRequestError}
@@ -465,21 +496,21 @@ export class Customers {
465
496
  * @throws {@link Paid.InternalServerError}
466
497
  *
467
498
  * @example
468
- * await client.customers.updateCustomerByExternalId({
469
- * externalId: "externalId",
499
+ * await client.customers.updateCustomerById({
500
+ * id: "cus_abc123",
470
501
  * body: {}
471
502
  * })
472
503
  */
473
- updateCustomerByExternalId(request, requestOptions) {
474
- return core.HttpResponsePromise.fromPromise(this.__updateCustomerByExternalId(request, requestOptions));
504
+ updateCustomerById(request, requestOptions) {
505
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerById(request, requestOptions));
475
506
  }
476
- __updateCustomerByExternalId(request, requestOptions) {
507
+ __updateCustomerById(request, requestOptions) {
477
508
  return __awaiter(this, void 0, void 0, function* () {
478
509
  var _a, _b, _c, _d, _e, _f, _g, _h;
479
- const { externalId, body: _body } = request;
510
+ const { id, body: _body } = request;
480
511
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
481
512
  const _response = yield core.fetcher({
482
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}`),
513
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}`),
483
514
  method: "PUT",
484
515
  headers: _headers,
485
516
  contentType: "application/json",
@@ -519,7 +550,7 @@ export class Customers {
519
550
  rawResponse: _response.rawResponse,
520
551
  });
521
552
  case "timeout":
522
- throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/external/{externalId}.");
553
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{id}.");
523
554
  case "unknown":
524
555
  throw new errors.PaidError({
525
556
  message: _response.error.errorMessage,
@@ -529,9 +560,9 @@ export class Customers {
529
560
  });
530
561
  }
531
562
  /**
532
- * Delete a customer by external ID
563
+ * Delete a customer by Paid display ID. Use the value returned as `customer.id`, for example `cus_abc123`. If you have your own customer ID, use `DELETE /api/v2/customers/external/{externalId}`.
533
564
  *
534
- * @param {Paid.DeleteCustomerByExternalIdRequest} request
565
+ * @param {Paid.DeleteCustomerByIdRequest} request
535
566
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
536
567
  *
537
568
  * @throws {@link Paid.BadRequestError}
@@ -540,20 +571,20 @@ export class Customers {
540
571
  * @throws {@link Paid.InternalServerError}
541
572
  *
542
573
  * @example
543
- * await client.customers.deleteCustomerByExternalId({
544
- * externalId: "externalId"
574
+ * await client.customers.deleteCustomerById({
575
+ * id: "cus_abc123"
545
576
  * })
546
577
  */
547
- deleteCustomerByExternalId(request, requestOptions) {
548
- return core.HttpResponsePromise.fromPromise(this.__deleteCustomerByExternalId(request, requestOptions));
578
+ deleteCustomerById(request, requestOptions) {
579
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerById(request, requestOptions));
549
580
  }
550
- __deleteCustomerByExternalId(request, requestOptions) {
581
+ __deleteCustomerById(request, requestOptions) {
551
582
  return __awaiter(this, void 0, void 0, function* () {
552
583
  var _a, _b, _c, _d, _e, _f, _g, _h;
553
- const { externalId } = request;
584
+ const { id } = request;
554
585
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
555
586
  const _response = yield core.fetcher({
556
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}`),
587
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}`),
557
588
  method: "DELETE",
558
589
  headers: _headers,
559
590
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -590,7 +621,7 @@ export class Customers {
590
621
  rawResponse: _response.rawResponse,
591
622
  });
592
623
  case "timeout":
593
- throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}.");
624
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}.");
594
625
  case "unknown":
595
626
  throw new errors.PaidError({
596
627
  message: _response.error.errorMessage,
@@ -600,9 +631,9 @@ export class Customers {
600
631
  });
601
632
  }
602
633
  /**
603
- * Get current customer credit balances grouped by currency
634
+ * Get the current customer state by Paid display ID
604
635
  *
605
- * @param {Paid.GetCustomerCreditBalancesRequest} request
636
+ * @param {Paid.GetCustomerStateByIdRequest} request
606
637
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
607
638
  *
608
639
  * @throws {@link Paid.ForbiddenError}
@@ -610,20 +641,20 @@ export class Customers {
610
641
  * @throws {@link Paid.InternalServerError}
611
642
  *
612
643
  * @example
613
- * await client.customers.getCustomerCreditBalances({
614
- * id: "id"
644
+ * await client.customers.getCustomerStateById({
645
+ * id: "cus_abc123"
615
646
  * })
616
647
  */
617
- getCustomerCreditBalances(request, requestOptions) {
618
- return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalances(request, requestOptions));
648
+ getCustomerStateById(request, requestOptions) {
649
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerStateById(request, requestOptions));
619
650
  }
620
- __getCustomerCreditBalances(request, requestOptions) {
651
+ __getCustomerStateById(request, requestOptions) {
621
652
  return __awaiter(this, void 0, void 0, function* () {
622
653
  var _a, _b, _c, _d, _e, _f, _g, _h;
623
654
  const { id } = request;
624
655
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
625
656
  const _response = yield core.fetcher({
626
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/credits/balances`),
657
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/state`),
627
658
  method: "GET",
628
659
  headers: _headers,
629
660
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -658,7 +689,7 @@ export class Customers {
658
689
  rawResponse: _response.rawResponse,
659
690
  });
660
691
  case "timeout":
661
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/credits/balances.");
692
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/state.");
662
693
  case "unknown":
663
694
  throw new errors.PaidError({
664
695
  message: _response.error.errorMessage,
@@ -668,33 +699,41 @@ export class Customers {
668
699
  });
669
700
  }
670
701
  /**
671
- * Get current customer credit balances grouped by currency, looked up by external ID
702
+ * List alternate external identifiers that resolve to a customer by external ID.
672
703
  *
673
- * @param {Paid.GetCustomerCreditBalancesByExternalIdRequest} request
704
+ * @param {Paid.ListCustomerAliasesByExternalIdRequest} request
674
705
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
675
706
  *
707
+ * @throws {@link Paid.BadRequestError}
676
708
  * @throws {@link Paid.ForbiddenError}
677
709
  * @throws {@link Paid.NotFoundError}
678
710
  * @throws {@link Paid.InternalServerError}
679
711
  *
680
712
  * @example
681
- * await client.customers.getCustomerCreditBalancesByExternalId({
682
- * externalId: "externalId"
713
+ * await client.customers.listCustomerAliasesByExternalId({
714
+ * externalId: "customer_123"
683
715
  * })
684
716
  */
685
- getCustomerCreditBalancesByExternalId(request, requestOptions) {
686
- return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalancesByExternalId(request, requestOptions));
717
+ listCustomerAliasesByExternalId(request, requestOptions) {
718
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerAliasesByExternalId(request, requestOptions));
687
719
  }
688
- __getCustomerCreditBalancesByExternalId(request, requestOptions) {
720
+ __listCustomerAliasesByExternalId(request, requestOptions) {
689
721
  return __awaiter(this, void 0, void 0, function* () {
690
722
  var _a, _b, _c, _d, _e, _f, _g, _h;
691
- const { externalId } = request;
723
+ const { externalId, limit, offset } = request;
724
+ const _queryParams = {};
725
+ if (limit != null) {
726
+ _queryParams.limit = limit.toString();
727
+ }
728
+ if (offset != null) {
729
+ _queryParams.offset = offset.toString();
730
+ }
692
731
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
693
732
  const _response = yield core.fetcher({
694
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/credits/balances`),
733
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/aliases`),
695
734
  method: "GET",
696
735
  headers: _headers,
697
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
736
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
698
737
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
699
738
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
700
739
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -704,6 +743,8 @@ export class Customers {
704
743
  }
705
744
  if (_response.error.reason === "status-code") {
706
745
  switch (_response.error.statusCode) {
746
+ case 400:
747
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
707
748
  case 403:
708
749
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
709
750
  case 404:
@@ -726,7 +767,7 @@ export class Customers {
726
767
  rawResponse: _response.rawResponse,
727
768
  });
728
769
  case "timeout":
729
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/credits/balances.");
770
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/aliases.");
730
771
  case "unknown":
731
772
  throw new errors.PaidError({
732
773
  message: _response.error.errorMessage,
@@ -736,33 +777,36 @@ export class Customers {
736
777
  });
737
778
  }
738
779
  /**
739
- * Create or update a customer user using customer and user external IDs
780
+ * Create an alternate external identifier for a customer by external ID.
740
781
  *
741
- * @param {Paid.UpsertCustomerUserRequest} request
782
+ * @param {Paid.CreateCustomerAliasByExternalIdRequest} request
742
783
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
743
784
  *
744
785
  * @throws {@link Paid.BadRequestError}
745
786
  * @throws {@link Paid.ForbiddenError}
746
787
  * @throws {@link Paid.NotFoundError}
788
+ * @throws {@link Paid.ConflictError}
747
789
  * @throws {@link Paid.InternalServerError}
748
790
  *
749
791
  * @example
750
- * await client.customers.upsertCustomerUserByExternalId({
751
- * customerExternalId: "customerExternalId",
752
- * userExternalId: "userExternalId"
792
+ * await client.customers.createCustomerAliasByExternalId({
793
+ * externalId: "customer_123",
794
+ * body: {
795
+ * alias: "child-customer-1"
796
+ * }
753
797
  * })
754
798
  */
755
- upsertCustomerUserByExternalId(request, requestOptions) {
756
- return core.HttpResponsePromise.fromPromise(this.__upsertCustomerUserByExternalId(request, requestOptions));
799
+ createCustomerAliasByExternalId(request, requestOptions) {
800
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerAliasByExternalId(request, requestOptions));
757
801
  }
758
- __upsertCustomerUserByExternalId(request, requestOptions) {
802
+ __createCustomerAliasByExternalId(request, requestOptions) {
759
803
  return __awaiter(this, void 0, void 0, function* () {
760
804
  var _a, _b, _c, _d, _e, _f, _g, _h;
761
- const { customerExternalId, userExternalId } = request, _body = __rest(request, ["customerExternalId", "userExternalId"]);
805
+ const { externalId, body: _body } = request;
762
806
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
763
807
  const _response = yield core.fetcher({
764
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(customerExternalId)}/users/${core.url.encodePathParam(userExternalId)}`),
765
- method: "PUT",
808
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/aliases`),
809
+ method: "POST",
766
810
  headers: _headers,
767
811
  contentType: "application/json",
768
812
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -783,6 +827,8 @@ export class Customers {
783
827
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
784
828
  case 404:
785
829
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
830
+ case 409:
831
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
786
832
  case 500:
787
833
  throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
788
834
  default:
@@ -801,7 +847,2155 @@ export class Customers {
801
847
  rawResponse: _response.rawResponse,
802
848
  });
803
849
  case "timeout":
804
- throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{customerExternalId}/users/{userExternalId}.");
850
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/external/{externalId}/aliases.");
851
+ case "unknown":
852
+ throw new errors.PaidError({
853
+ message: _response.error.errorMessage,
854
+ rawResponse: _response.rawResponse,
855
+ });
856
+ }
857
+ });
858
+ }
859
+ /**
860
+ * Remove an alternate external identifier from a customer by external ID.
861
+ *
862
+ * @param {Paid.DeleteCustomerAliasByExternalIdRequest} request
863
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
864
+ *
865
+ * @throws {@link Paid.ForbiddenError}
866
+ * @throws {@link Paid.NotFoundError}
867
+ * @throws {@link Paid.InternalServerError}
868
+ *
869
+ * @example
870
+ * await client.customers.deleteCustomerAliasByExternalId({
871
+ * externalId: "customer_123",
872
+ * alias: "child-customer-1"
873
+ * })
874
+ */
875
+ deleteCustomerAliasByExternalId(request, requestOptions) {
876
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerAliasByExternalId(request, requestOptions));
877
+ }
878
+ __deleteCustomerAliasByExternalId(request, requestOptions) {
879
+ return __awaiter(this, void 0, void 0, function* () {
880
+ var _a, _b, _c, _d, _e, _f, _g, _h;
881
+ const { externalId, alias } = request;
882
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
883
+ const _response = yield core.fetcher({
884
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/aliases/${core.url.encodePathParam(alias)}`),
885
+ method: "DELETE",
886
+ headers: _headers,
887
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
888
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
889
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
890
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
891
+ });
892
+ if (_response.ok) {
893
+ return { data: _response.body, rawResponse: _response.rawResponse };
894
+ }
895
+ if (_response.error.reason === "status-code") {
896
+ switch (_response.error.statusCode) {
897
+ case 403:
898
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
899
+ case 404:
900
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
901
+ case 500:
902
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
903
+ default:
904
+ throw new errors.PaidError({
905
+ statusCode: _response.error.statusCode,
906
+ body: _response.error.body,
907
+ rawResponse: _response.rawResponse,
908
+ });
909
+ }
910
+ }
911
+ switch (_response.error.reason) {
912
+ case "non-json":
913
+ throw new errors.PaidError({
914
+ statusCode: _response.error.statusCode,
915
+ body: _response.error.rawBody,
916
+ rawResponse: _response.rawResponse,
917
+ });
918
+ case "timeout":
919
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}/aliases/{alias}.");
920
+ case "unknown":
921
+ throw new errors.PaidError({
922
+ message: _response.error.errorMessage,
923
+ rawResponse: _response.rawResponse,
924
+ });
925
+ }
926
+ });
927
+ }
928
+ /**
929
+ * Get a customer by external ID
930
+ *
931
+ * @param {Paid.GetCustomerByExternalIdRequest} request
932
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
933
+ *
934
+ * @throws {@link Paid.ForbiddenError}
935
+ * @throws {@link Paid.NotFoundError}
936
+ * @throws {@link Paid.InternalServerError}
937
+ *
938
+ * @example
939
+ * await client.customers.getCustomerByExternalId({
940
+ * externalId: "customer_123"
941
+ * })
942
+ */
943
+ getCustomerByExternalId(request, requestOptions) {
944
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerByExternalId(request, requestOptions));
945
+ }
946
+ __getCustomerByExternalId(request, requestOptions) {
947
+ return __awaiter(this, void 0, void 0, function* () {
948
+ var _a, _b, _c, _d, _e, _f, _g, _h;
949
+ const { externalId } = request;
950
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
951
+ const _response = yield core.fetcher({
952
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}`),
953
+ method: "GET",
954
+ headers: _headers,
955
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
956
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
957
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
958
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
959
+ });
960
+ if (_response.ok) {
961
+ return { data: _response.body, rawResponse: _response.rawResponse };
962
+ }
963
+ if (_response.error.reason === "status-code") {
964
+ switch (_response.error.statusCode) {
965
+ case 403:
966
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
967
+ case 404:
968
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
969
+ case 500:
970
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
971
+ default:
972
+ throw new errors.PaidError({
973
+ statusCode: _response.error.statusCode,
974
+ body: _response.error.body,
975
+ rawResponse: _response.rawResponse,
976
+ });
977
+ }
978
+ }
979
+ switch (_response.error.reason) {
980
+ case "non-json":
981
+ throw new errors.PaidError({
982
+ statusCode: _response.error.statusCode,
983
+ body: _response.error.rawBody,
984
+ rawResponse: _response.rawResponse,
985
+ });
986
+ case "timeout":
987
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}.");
988
+ case "unknown":
989
+ throw new errors.PaidError({
990
+ message: _response.error.errorMessage,
991
+ rawResponse: _response.rawResponse,
992
+ });
993
+ }
994
+ });
995
+ }
996
+ /**
997
+ * Update a customer by external ID
998
+ *
999
+ * @param {Paid.UpdateCustomerByExternalIdRequest} request
1000
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1001
+ *
1002
+ * @throws {@link Paid.BadRequestError}
1003
+ * @throws {@link Paid.ForbiddenError}
1004
+ * @throws {@link Paid.NotFoundError}
1005
+ * @throws {@link Paid.InternalServerError}
1006
+ *
1007
+ * @example
1008
+ * await client.customers.updateCustomerByExternalId({
1009
+ * externalId: "customer_123",
1010
+ * body: {}
1011
+ * })
1012
+ */
1013
+ updateCustomerByExternalId(request, requestOptions) {
1014
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerByExternalId(request, requestOptions));
1015
+ }
1016
+ __updateCustomerByExternalId(request, requestOptions) {
1017
+ return __awaiter(this, void 0, void 0, function* () {
1018
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1019
+ const { externalId, body: _body } = request;
1020
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1021
+ const _response = yield core.fetcher({
1022
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}`),
1023
+ method: "PUT",
1024
+ headers: _headers,
1025
+ contentType: "application/json",
1026
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1027
+ requestType: "json",
1028
+ body: _body,
1029
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1030
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1031
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1032
+ });
1033
+ if (_response.ok) {
1034
+ return { data: _response.body, rawResponse: _response.rawResponse };
1035
+ }
1036
+ if (_response.error.reason === "status-code") {
1037
+ switch (_response.error.statusCode) {
1038
+ case 400:
1039
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1040
+ case 403:
1041
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1042
+ case 404:
1043
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1044
+ case 500:
1045
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1046
+ default:
1047
+ throw new errors.PaidError({
1048
+ statusCode: _response.error.statusCode,
1049
+ body: _response.error.body,
1050
+ rawResponse: _response.rawResponse,
1051
+ });
1052
+ }
1053
+ }
1054
+ switch (_response.error.reason) {
1055
+ case "non-json":
1056
+ throw new errors.PaidError({
1057
+ statusCode: _response.error.statusCode,
1058
+ body: _response.error.rawBody,
1059
+ rawResponse: _response.rawResponse,
1060
+ });
1061
+ case "timeout":
1062
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/external/{externalId}.");
1063
+ case "unknown":
1064
+ throw new errors.PaidError({
1065
+ message: _response.error.errorMessage,
1066
+ rawResponse: _response.rawResponse,
1067
+ });
1068
+ }
1069
+ });
1070
+ }
1071
+ /**
1072
+ * Delete a customer by external ID
1073
+ *
1074
+ * @param {Paid.DeleteCustomerByExternalIdRequest} request
1075
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1076
+ *
1077
+ * @throws {@link Paid.BadRequestError}
1078
+ * @throws {@link Paid.ForbiddenError}
1079
+ * @throws {@link Paid.NotFoundError}
1080
+ * @throws {@link Paid.InternalServerError}
1081
+ *
1082
+ * @example
1083
+ * await client.customers.deleteCustomerByExternalId({
1084
+ * externalId: "customer_123"
1085
+ * })
1086
+ */
1087
+ deleteCustomerByExternalId(request, requestOptions) {
1088
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerByExternalId(request, requestOptions));
1089
+ }
1090
+ __deleteCustomerByExternalId(request, requestOptions) {
1091
+ return __awaiter(this, void 0, void 0, function* () {
1092
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1093
+ const { externalId } = request;
1094
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1095
+ const _response = yield core.fetcher({
1096
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}`),
1097
+ method: "DELETE",
1098
+ headers: _headers,
1099
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1100
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1101
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1102
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1103
+ });
1104
+ if (_response.ok) {
1105
+ return { data: _response.body, rawResponse: _response.rawResponse };
1106
+ }
1107
+ if (_response.error.reason === "status-code") {
1108
+ switch (_response.error.statusCode) {
1109
+ case 400:
1110
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1111
+ case 403:
1112
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1113
+ case 404:
1114
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1115
+ case 500:
1116
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1117
+ default:
1118
+ throw new errors.PaidError({
1119
+ statusCode: _response.error.statusCode,
1120
+ body: _response.error.body,
1121
+ rawResponse: _response.rawResponse,
1122
+ });
1123
+ }
1124
+ }
1125
+ switch (_response.error.reason) {
1126
+ case "non-json":
1127
+ throw new errors.PaidError({
1128
+ statusCode: _response.error.statusCode,
1129
+ body: _response.error.rawBody,
1130
+ rawResponse: _response.rawResponse,
1131
+ });
1132
+ case "timeout":
1133
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}.");
1134
+ case "unknown":
1135
+ throw new errors.PaidError({
1136
+ message: _response.error.errorMessage,
1137
+ rawResponse: _response.rawResponse,
1138
+ });
1139
+ }
1140
+ });
1141
+ }
1142
+ /**
1143
+ * Primary integration endpoint for agents and programmatic clients using their own customer IDs. Use the value you stored on `customer.externalId`, for example `customer_123`.
1144
+ *
1145
+ * @param {Paid.GetCustomerStateByExternalIdRequest} request
1146
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1147
+ *
1148
+ * @throws {@link Paid.ForbiddenError}
1149
+ * @throws {@link Paid.NotFoundError}
1150
+ * @throws {@link Paid.InternalServerError}
1151
+ *
1152
+ * @example
1153
+ * await client.customers.getCustomerStateByExternalId({
1154
+ * externalId: "customer_123"
1155
+ * })
1156
+ */
1157
+ getCustomerStateByExternalId(request, requestOptions) {
1158
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerStateByExternalId(request, requestOptions));
1159
+ }
1160
+ __getCustomerStateByExternalId(request, requestOptions) {
1161
+ return __awaiter(this, void 0, void 0, function* () {
1162
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1163
+ const { externalId } = request;
1164
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1165
+ const _response = yield core.fetcher({
1166
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/state`),
1167
+ method: "GET",
1168
+ headers: _headers,
1169
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1170
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1171
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1172
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1173
+ });
1174
+ if (_response.ok) {
1175
+ return { data: _response.body, rawResponse: _response.rawResponse };
1176
+ }
1177
+ if (_response.error.reason === "status-code") {
1178
+ switch (_response.error.statusCode) {
1179
+ case 403:
1180
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1181
+ case 404:
1182
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1183
+ case 500:
1184
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1185
+ default:
1186
+ throw new errors.PaidError({
1187
+ statusCode: _response.error.statusCode,
1188
+ body: _response.error.body,
1189
+ rawResponse: _response.rawResponse,
1190
+ });
1191
+ }
1192
+ }
1193
+ switch (_response.error.reason) {
1194
+ case "non-json":
1195
+ throw new errors.PaidError({
1196
+ statusCode: _response.error.statusCode,
1197
+ body: _response.error.rawBody,
1198
+ rawResponse: _response.rawResponse,
1199
+ });
1200
+ case "timeout":
1201
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/state.");
1202
+ case "unknown":
1203
+ throw new errors.PaidError({
1204
+ message: _response.error.errorMessage,
1205
+ rawResponse: _response.rawResponse,
1206
+ });
1207
+ }
1208
+ });
1209
+ }
1210
+ /**
1211
+ * Get current customer credit balances grouped by currency for a Paid customer display ID. Use the value returned as `customer.id`, for example `cus_abc123`. If you have your own customer ID, use `/api/v2/customers/external/{externalId}/credits/balances`.
1212
+ *
1213
+ * @param {Paid.GetCustomerCreditBalancesRequest} request
1214
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1215
+ *
1216
+ * @throws {@link Paid.ForbiddenError}
1217
+ * @throws {@link Paid.NotFoundError}
1218
+ * @throws {@link Paid.InternalServerError}
1219
+ *
1220
+ * @example
1221
+ * await client.customers.getCustomerCreditBalances({
1222
+ * id: "cus_abc123"
1223
+ * })
1224
+ */
1225
+ getCustomerCreditBalances(request, requestOptions) {
1226
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalances(request, requestOptions));
1227
+ }
1228
+ __getCustomerCreditBalances(request, requestOptions) {
1229
+ return __awaiter(this, void 0, void 0, function* () {
1230
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1231
+ const { id } = request;
1232
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1233
+ const _response = yield core.fetcher({
1234
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/credits/balances`),
1235
+ method: "GET",
1236
+ headers: _headers,
1237
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1238
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1239
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1240
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1241
+ });
1242
+ if (_response.ok) {
1243
+ return { data: _response.body, rawResponse: _response.rawResponse };
1244
+ }
1245
+ if (_response.error.reason === "status-code") {
1246
+ switch (_response.error.statusCode) {
1247
+ case 403:
1248
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1249
+ case 404:
1250
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1251
+ case 500:
1252
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1253
+ default:
1254
+ throw new errors.PaidError({
1255
+ statusCode: _response.error.statusCode,
1256
+ body: _response.error.body,
1257
+ rawResponse: _response.rawResponse,
1258
+ });
1259
+ }
1260
+ }
1261
+ switch (_response.error.reason) {
1262
+ case "non-json":
1263
+ throw new errors.PaidError({
1264
+ statusCode: _response.error.statusCode,
1265
+ body: _response.error.rawBody,
1266
+ rawResponse: _response.rawResponse,
1267
+ });
1268
+ case "timeout":
1269
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/credits/balances.");
1270
+ case "unknown":
1271
+ throw new errors.PaidError({
1272
+ message: _response.error.errorMessage,
1273
+ rawResponse: _response.rawResponse,
1274
+ });
1275
+ }
1276
+ });
1277
+ }
1278
+ /**
1279
+ * Immediately grant credits to a customer using an active credit currency key.
1280
+ *
1281
+ * @param {Paid.GrantCustomerCreditsRequest} request
1282
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1283
+ *
1284
+ * @throws {@link Paid.BadRequestError}
1285
+ * @throws {@link Paid.ForbiddenError}
1286
+ * @throws {@link Paid.NotFoundError}
1287
+ * @throws {@link Paid.InternalServerError}
1288
+ *
1289
+ * @example
1290
+ * await client.customers.grantCustomerCredits({
1291
+ * id: "cus_abc123",
1292
+ * body: {
1293
+ * creditCurrencyKey: "api_credits",
1294
+ * amount: 10000,
1295
+ * startsAt: "2026-06-05T12:00:00Z",
1296
+ * expiresAt: "2026-12-31T23:59:59Z"
1297
+ * }
1298
+ * })
1299
+ */
1300
+ grantCustomerCredits(request, requestOptions) {
1301
+ return core.HttpResponsePromise.fromPromise(this.__grantCustomerCredits(request, requestOptions));
1302
+ }
1303
+ __grantCustomerCredits(request, requestOptions) {
1304
+ return __awaiter(this, void 0, void 0, function* () {
1305
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1306
+ const { id, body: _body } = request;
1307
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1308
+ const _response = yield core.fetcher({
1309
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/credits/grants`),
1310
+ method: "POST",
1311
+ headers: _headers,
1312
+ contentType: "application/json",
1313
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1314
+ requestType: "json",
1315
+ body: _body,
1316
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1317
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1318
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1319
+ });
1320
+ if (_response.ok) {
1321
+ return { data: _response.body, rawResponse: _response.rawResponse };
1322
+ }
1323
+ if (_response.error.reason === "status-code") {
1324
+ switch (_response.error.statusCode) {
1325
+ case 400:
1326
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1327
+ case 403:
1328
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1329
+ case 404:
1330
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1331
+ case 500:
1332
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1333
+ default:
1334
+ throw new errors.PaidError({
1335
+ statusCode: _response.error.statusCode,
1336
+ body: _response.error.body,
1337
+ rawResponse: _response.rawResponse,
1338
+ });
1339
+ }
1340
+ }
1341
+ switch (_response.error.reason) {
1342
+ case "non-json":
1343
+ throw new errors.PaidError({
1344
+ statusCode: _response.error.statusCode,
1345
+ body: _response.error.rawBody,
1346
+ rawResponse: _response.rawResponse,
1347
+ });
1348
+ case "timeout":
1349
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/{id}/credits/grants.");
1350
+ case "unknown":
1351
+ throw new errors.PaidError({
1352
+ message: _response.error.errorMessage,
1353
+ rawResponse: _response.rawResponse,
1354
+ });
1355
+ }
1356
+ });
1357
+ }
1358
+ /**
1359
+ * Get current customer credit balances grouped by currency, looked up by external ID
1360
+ *
1361
+ * @param {Paid.GetCustomerCreditBalancesByExternalIdRequest} request
1362
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1363
+ *
1364
+ * @throws {@link Paid.ForbiddenError}
1365
+ * @throws {@link Paid.NotFoundError}
1366
+ * @throws {@link Paid.InternalServerError}
1367
+ *
1368
+ * @example
1369
+ * await client.customers.getCustomerCreditBalancesByExternalId({
1370
+ * externalId: "customer_123"
1371
+ * })
1372
+ */
1373
+ getCustomerCreditBalancesByExternalId(request, requestOptions) {
1374
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalancesByExternalId(request, requestOptions));
1375
+ }
1376
+ __getCustomerCreditBalancesByExternalId(request, requestOptions) {
1377
+ return __awaiter(this, void 0, void 0, function* () {
1378
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1379
+ const { externalId } = request;
1380
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1381
+ const _response = yield core.fetcher({
1382
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/credits/balances`),
1383
+ method: "GET",
1384
+ headers: _headers,
1385
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1386
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1387
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1388
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1389
+ });
1390
+ if (_response.ok) {
1391
+ return { data: _response.body, rawResponse: _response.rawResponse };
1392
+ }
1393
+ if (_response.error.reason === "status-code") {
1394
+ switch (_response.error.statusCode) {
1395
+ case 403:
1396
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1397
+ case 404:
1398
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1399
+ case 500:
1400
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1401
+ default:
1402
+ throw new errors.PaidError({
1403
+ statusCode: _response.error.statusCode,
1404
+ body: _response.error.body,
1405
+ rawResponse: _response.rawResponse,
1406
+ });
1407
+ }
1408
+ }
1409
+ switch (_response.error.reason) {
1410
+ case "non-json":
1411
+ throw new errors.PaidError({
1412
+ statusCode: _response.error.statusCode,
1413
+ body: _response.error.rawBody,
1414
+ rawResponse: _response.rawResponse,
1415
+ });
1416
+ case "timeout":
1417
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/credits/balances.");
1418
+ case "unknown":
1419
+ throw new errors.PaidError({
1420
+ message: _response.error.errorMessage,
1421
+ rawResponse: _response.rawResponse,
1422
+ });
1423
+ }
1424
+ });
1425
+ }
1426
+ /**
1427
+ * List credit consumption that was recorded before a matching credit pool existed — for example usage that arrived before an invoice was paid or before a new period's credits were granted. Entries leave this list once they are applied to a pool or settled. Use the value returned as `customer.id`, for example `cus_abc123`. If you have your own customer ID, use `/api/v2/customers/external/{externalId}/credits/pending-consumption`.
1428
+ *
1429
+ * @param {Paid.ListCustomerPendingCreditConsumptionRequest} request
1430
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1431
+ *
1432
+ * @throws {@link Paid.BadRequestError}
1433
+ * @throws {@link Paid.ForbiddenError}
1434
+ * @throws {@link Paid.NotFoundError}
1435
+ * @throws {@link Paid.InternalServerError}
1436
+ *
1437
+ * @example
1438
+ * await client.customers.listCustomerPendingCreditConsumption({
1439
+ * id: "cus_abc123"
1440
+ * })
1441
+ */
1442
+ listCustomerPendingCreditConsumption(request, requestOptions) {
1443
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerPendingCreditConsumption(request, requestOptions));
1444
+ }
1445
+ __listCustomerPendingCreditConsumption(request, requestOptions) {
1446
+ return __awaiter(this, void 0, void 0, function* () {
1447
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1448
+ const { id, limit, offset } = request;
1449
+ const _queryParams = {};
1450
+ if (limit != null) {
1451
+ _queryParams.limit = limit.toString();
1452
+ }
1453
+ if (offset != null) {
1454
+ _queryParams.offset = offset.toString();
1455
+ }
1456
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1457
+ const _response = yield core.fetcher({
1458
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/credits/pending-consumption`),
1459
+ method: "GET",
1460
+ headers: _headers,
1461
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1462
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1463
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1464
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1465
+ });
1466
+ if (_response.ok) {
1467
+ return {
1468
+ data: _response.body,
1469
+ rawResponse: _response.rawResponse,
1470
+ };
1471
+ }
1472
+ if (_response.error.reason === "status-code") {
1473
+ switch (_response.error.statusCode) {
1474
+ case 400:
1475
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1476
+ case 403:
1477
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1478
+ case 404:
1479
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1480
+ case 500:
1481
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1482
+ default:
1483
+ throw new errors.PaidError({
1484
+ statusCode: _response.error.statusCode,
1485
+ body: _response.error.body,
1486
+ rawResponse: _response.rawResponse,
1487
+ });
1488
+ }
1489
+ }
1490
+ switch (_response.error.reason) {
1491
+ case "non-json":
1492
+ throw new errors.PaidError({
1493
+ statusCode: _response.error.statusCode,
1494
+ body: _response.error.rawBody,
1495
+ rawResponse: _response.rawResponse,
1496
+ });
1497
+ case "timeout":
1498
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/credits/pending-consumption.");
1499
+ case "unknown":
1500
+ throw new errors.PaidError({
1501
+ message: _response.error.errorMessage,
1502
+ rawResponse: _response.rawResponse,
1503
+ });
1504
+ }
1505
+ });
1506
+ }
1507
+ /**
1508
+ * List credit consumption recorded before a matching credit pool existed, for a customer looked up by external ID.
1509
+ *
1510
+ * @param {Paid.ListCustomerPendingCreditConsumptionByExternalIdRequest} request
1511
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1512
+ *
1513
+ * @throws {@link Paid.BadRequestError}
1514
+ * @throws {@link Paid.ForbiddenError}
1515
+ * @throws {@link Paid.NotFoundError}
1516
+ * @throws {@link Paid.InternalServerError}
1517
+ *
1518
+ * @example
1519
+ * await client.customers.listCustomerPendingCreditConsumptionByExternalId({
1520
+ * externalId: "customer_123"
1521
+ * })
1522
+ */
1523
+ listCustomerPendingCreditConsumptionByExternalId(request, requestOptions) {
1524
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerPendingCreditConsumptionByExternalId(request, requestOptions));
1525
+ }
1526
+ __listCustomerPendingCreditConsumptionByExternalId(request, requestOptions) {
1527
+ return __awaiter(this, void 0, void 0, function* () {
1528
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1529
+ const { externalId, limit, offset } = request;
1530
+ const _queryParams = {};
1531
+ if (limit != null) {
1532
+ _queryParams.limit = limit.toString();
1533
+ }
1534
+ if (offset != null) {
1535
+ _queryParams.offset = offset.toString();
1536
+ }
1537
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1538
+ const _response = yield core.fetcher({
1539
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/credits/pending-consumption`),
1540
+ method: "GET",
1541
+ headers: _headers,
1542
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1543
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1544
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1545
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1546
+ });
1547
+ if (_response.ok) {
1548
+ return {
1549
+ data: _response.body,
1550
+ rawResponse: _response.rawResponse,
1551
+ };
1552
+ }
1553
+ if (_response.error.reason === "status-code") {
1554
+ switch (_response.error.statusCode) {
1555
+ case 400:
1556
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1557
+ case 403:
1558
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1559
+ case 404:
1560
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1561
+ case 500:
1562
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1563
+ default:
1564
+ throw new errors.PaidError({
1565
+ statusCode: _response.error.statusCode,
1566
+ body: _response.error.body,
1567
+ rawResponse: _response.rawResponse,
1568
+ });
1569
+ }
1570
+ }
1571
+ switch (_response.error.reason) {
1572
+ case "non-json":
1573
+ throw new errors.PaidError({
1574
+ statusCode: _response.error.statusCode,
1575
+ body: _response.error.rawBody,
1576
+ rawResponse: _response.rawResponse,
1577
+ });
1578
+ case "timeout":
1579
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/credits/pending-consumption.");
1580
+ case "unknown":
1581
+ throw new errors.PaidError({
1582
+ message: _response.error.errorMessage,
1583
+ rawResponse: _response.rawResponse,
1584
+ });
1585
+ }
1586
+ });
1587
+ }
1588
+ /**
1589
+ * Immediately grant credits to a customer looked up by external ID using an active credit currency key.
1590
+ *
1591
+ * @param {Paid.GrantCustomerCreditsByExternalIdRequest} request
1592
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1593
+ *
1594
+ * @throws {@link Paid.BadRequestError}
1595
+ * @throws {@link Paid.ForbiddenError}
1596
+ * @throws {@link Paid.NotFoundError}
1597
+ * @throws {@link Paid.InternalServerError}
1598
+ *
1599
+ * @example
1600
+ * await client.customers.grantCustomerCreditsByExternalId({
1601
+ * externalId: "customer_123",
1602
+ * body: {
1603
+ * creditCurrencyKey: "api_credits",
1604
+ * amount: 10000,
1605
+ * startsAt: "2026-06-05T12:00:00Z",
1606
+ * expiresAt: "2026-12-31T23:59:59Z"
1607
+ * }
1608
+ * })
1609
+ */
1610
+ grantCustomerCreditsByExternalId(request, requestOptions) {
1611
+ return core.HttpResponsePromise.fromPromise(this.__grantCustomerCreditsByExternalId(request, requestOptions));
1612
+ }
1613
+ __grantCustomerCreditsByExternalId(request, requestOptions) {
1614
+ return __awaiter(this, void 0, void 0, function* () {
1615
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1616
+ const { externalId, body: _body } = request;
1617
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1618
+ const _response = yield core.fetcher({
1619
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/credits/grants`),
1620
+ method: "POST",
1621
+ headers: _headers,
1622
+ contentType: "application/json",
1623
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1624
+ requestType: "json",
1625
+ body: _body,
1626
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1627
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1628
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1629
+ });
1630
+ if (_response.ok) {
1631
+ return { data: _response.body, rawResponse: _response.rawResponse };
1632
+ }
1633
+ if (_response.error.reason === "status-code") {
1634
+ switch (_response.error.statusCode) {
1635
+ case 400:
1636
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1637
+ case 403:
1638
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1639
+ case 404:
1640
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1641
+ case 500:
1642
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1643
+ default:
1644
+ throw new errors.PaidError({
1645
+ statusCode: _response.error.statusCode,
1646
+ body: _response.error.body,
1647
+ rawResponse: _response.rawResponse,
1648
+ });
1649
+ }
1650
+ }
1651
+ switch (_response.error.reason) {
1652
+ case "non-json":
1653
+ throw new errors.PaidError({
1654
+ statusCode: _response.error.statusCode,
1655
+ body: _response.error.rawBody,
1656
+ rawResponse: _response.rawResponse,
1657
+ });
1658
+ case "timeout":
1659
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/external/{externalId}/credits/grants.");
1660
+ case "unknown":
1661
+ throw new errors.PaidError({
1662
+ message: _response.error.errorMessage,
1663
+ rawResponse: _response.rawResponse,
1664
+ });
1665
+ }
1666
+ });
1667
+ }
1668
+ /**
1669
+ * Create or update a customer user using customer and user external IDs
1670
+ *
1671
+ * @param {Paid.UpsertCustomerUserRequest} request
1672
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1673
+ *
1674
+ * @throws {@link Paid.BadRequestError}
1675
+ * @throws {@link Paid.ForbiddenError}
1676
+ * @throws {@link Paid.NotFoundError}
1677
+ * @throws {@link Paid.InternalServerError}
1678
+ *
1679
+ * @example
1680
+ * await client.customers.upsertCustomerUserByExternalId({
1681
+ * customerExternalId: "customerExternalId",
1682
+ * userExternalId: "userExternalId"
1683
+ * })
1684
+ */
1685
+ upsertCustomerUserByExternalId(request, requestOptions) {
1686
+ return core.HttpResponsePromise.fromPromise(this.__upsertCustomerUserByExternalId(request, requestOptions));
1687
+ }
1688
+ __upsertCustomerUserByExternalId(request, requestOptions) {
1689
+ return __awaiter(this, void 0, void 0, function* () {
1690
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1691
+ const { customerExternalId, userExternalId } = request, _body = __rest(request, ["customerExternalId", "userExternalId"]);
1692
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1693
+ const _response = yield core.fetcher({
1694
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(customerExternalId)}/users/${core.url.encodePathParam(userExternalId)}`),
1695
+ method: "PUT",
1696
+ headers: _headers,
1697
+ contentType: "application/json",
1698
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1699
+ requestType: "json",
1700
+ body: _body,
1701
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1702
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1703
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1704
+ });
1705
+ if (_response.ok) {
1706
+ return { data: _response.body, rawResponse: _response.rawResponse };
1707
+ }
1708
+ if (_response.error.reason === "status-code") {
1709
+ switch (_response.error.statusCode) {
1710
+ case 400:
1711
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1712
+ case 403:
1713
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1714
+ case 404:
1715
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1716
+ case 500:
1717
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1718
+ default:
1719
+ throw new errors.PaidError({
1720
+ statusCode: _response.error.statusCode,
1721
+ body: _response.error.body,
1722
+ rawResponse: _response.rawResponse,
1723
+ });
1724
+ }
1725
+ }
1726
+ switch (_response.error.reason) {
1727
+ case "non-json":
1728
+ throw new errors.PaidError({
1729
+ statusCode: _response.error.statusCode,
1730
+ body: _response.error.rawBody,
1731
+ rawResponse: _response.rawResponse,
1732
+ });
1733
+ case "timeout":
1734
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{customerExternalId}/users/{userExternalId}.");
1735
+ case "unknown":
1736
+ throw new errors.PaidError({
1737
+ message: _response.error.errorMessage,
1738
+ rawResponse: _response.rawResponse,
1739
+ });
1740
+ }
1741
+ });
1742
+ }
1743
+ /**
1744
+ * Lists the customer's units as a flat list, newest last; assemble the tree from `parentExternalId` (`null` on the root unit, `isRoot: true`). Deleted units are hidden unless `status=DELETED` is given. Filter by `externalType`, or by `parentExternalId` for one level of the tree. Addresses the customer by your external customer id.
1745
+ *
1746
+ * @param {Paid.ListCustomerUnitsByExternalIdRequest} request
1747
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1748
+ *
1749
+ * @throws {@link Paid.BadRequestError}
1750
+ * @throws {@link Paid.ForbiddenError}
1751
+ * @throws {@link Paid.NotFoundError}
1752
+ * @throws {@link Paid.InternalServerError}
1753
+ *
1754
+ * @example
1755
+ * await client.customers.listCustomerUnitsByExternalId({
1756
+ * externalId: "customer_123",
1757
+ * parentExternalId: "dept-rnd"
1758
+ * })
1759
+ */
1760
+ listCustomerUnitsByExternalId(request, requestOptions) {
1761
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerUnitsByExternalId(request, requestOptions));
1762
+ }
1763
+ __listCustomerUnitsByExternalId(request, requestOptions) {
1764
+ return __awaiter(this, void 0, void 0, function* () {
1765
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1766
+ const { externalId, limit, offset, status, externalType, parentExternalId } = request;
1767
+ const _queryParams = {};
1768
+ if (limit != null) {
1769
+ _queryParams.limit = limit.toString();
1770
+ }
1771
+ if (offset != null) {
1772
+ _queryParams.offset = offset.toString();
1773
+ }
1774
+ if (status != null) {
1775
+ _queryParams.status = status;
1776
+ }
1777
+ if (externalType != null) {
1778
+ _queryParams.externalType = externalType;
1779
+ }
1780
+ if (parentExternalId != null) {
1781
+ _queryParams.parentExternalId = parentExternalId;
1782
+ }
1783
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1784
+ const _response = yield core.fetcher({
1785
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units`),
1786
+ method: "GET",
1787
+ headers: _headers,
1788
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1789
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1790
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1791
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1792
+ });
1793
+ if (_response.ok) {
1794
+ return { data: _response.body, rawResponse: _response.rawResponse };
1795
+ }
1796
+ if (_response.error.reason === "status-code") {
1797
+ switch (_response.error.statusCode) {
1798
+ case 400:
1799
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1800
+ case 403:
1801
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1802
+ case 404:
1803
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1804
+ case 500:
1805
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1806
+ default:
1807
+ throw new errors.PaidError({
1808
+ statusCode: _response.error.statusCode,
1809
+ body: _response.error.body,
1810
+ rawResponse: _response.rawResponse,
1811
+ });
1812
+ }
1813
+ }
1814
+ switch (_response.error.reason) {
1815
+ case "non-json":
1816
+ throw new errors.PaidError({
1817
+ statusCode: _response.error.statusCode,
1818
+ body: _response.error.rawBody,
1819
+ rawResponse: _response.rawResponse,
1820
+ });
1821
+ case "timeout":
1822
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/customer-units.");
1823
+ case "unknown":
1824
+ throw new errors.PaidError({
1825
+ message: _response.error.errorMessage,
1826
+ rawResponse: _response.rawResponse,
1827
+ });
1828
+ }
1829
+ });
1830
+ }
1831
+ /**
1832
+ * Creates a unit for this customer. `externalId` is your own key for it: required, unique within the customer and immutable; every unit route addresses the unit by it, and `name` defaults to it. Omit `parentExternalId` to create the customer's root unit (its first unit; `409 ROOT_EXISTS` if it already has one — a customer created with an external id usable as a unit key already has its root, keyed by that external id, so name it as the parent instead); otherwise the parent must exist (`409 PARENT_NOT_FOUND`) and be ACTIVE. Units are never created implicitly: a signal that names a unit before it exists is accepted and its spend attaches to the unit once you create it with that key. `409` also when the externalId is taken (`CUSTOMER_UNIT_EXISTS`), the tree would get too deep, or the customer is on seat-based billing. Addresses the customer by your external customer id.
1833
+ *
1834
+ * @param {Paid.CreateCustomerUnitByExternalIdRequest} request
1835
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1836
+ *
1837
+ * @throws {@link Paid.BadRequestError}
1838
+ * @throws {@link Paid.ForbiddenError}
1839
+ * @throws {@link Paid.NotFoundError}
1840
+ * @throws {@link Paid.ConflictError}
1841
+ * @throws {@link Paid.InternalServerError}
1842
+ *
1843
+ * @example
1844
+ * await client.customers.createCustomerUnitByExternalId({
1845
+ * externalId: "customer_123",
1846
+ * body: {
1847
+ * externalId: "team-research"
1848
+ * }
1849
+ * })
1850
+ */
1851
+ createCustomerUnitByExternalId(request, requestOptions) {
1852
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerUnitByExternalId(request, requestOptions));
1853
+ }
1854
+ __createCustomerUnitByExternalId(request, requestOptions) {
1855
+ return __awaiter(this, void 0, void 0, function* () {
1856
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1857
+ const { externalId, body: _body } = request;
1858
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1859
+ const _response = yield core.fetcher({
1860
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units`),
1861
+ method: "POST",
1862
+ headers: _headers,
1863
+ contentType: "application/json",
1864
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1865
+ requestType: "json",
1866
+ body: _body,
1867
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1868
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1869
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1870
+ });
1871
+ if (_response.ok) {
1872
+ return { data: _response.body, rawResponse: _response.rawResponse };
1873
+ }
1874
+ if (_response.error.reason === "status-code") {
1875
+ switch (_response.error.statusCode) {
1876
+ case 400:
1877
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1878
+ case 403:
1879
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1880
+ case 404:
1881
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1882
+ case 409:
1883
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
1884
+ case 500:
1885
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1886
+ default:
1887
+ throw new errors.PaidError({
1888
+ statusCode: _response.error.statusCode,
1889
+ body: _response.error.body,
1890
+ rawResponse: _response.rawResponse,
1891
+ });
1892
+ }
1893
+ }
1894
+ switch (_response.error.reason) {
1895
+ case "non-json":
1896
+ throw new errors.PaidError({
1897
+ statusCode: _response.error.statusCode,
1898
+ body: _response.error.rawBody,
1899
+ rawResponse: _response.rawResponse,
1900
+ });
1901
+ case "timeout":
1902
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/external/{externalId}/customer-units.");
1903
+ case "unknown":
1904
+ throw new errors.PaidError({
1905
+ message: _response.error.errorMessage,
1906
+ rawResponse: _response.rawResponse,
1907
+ });
1908
+ }
1909
+ });
1910
+ }
1911
+ /**
1912
+ * Returns one unit of this customer by its `externalId`, including a deleted one. `404` when the unit does not exist or belongs to another customer. Addresses the customer by your external customer id.
1913
+ *
1914
+ * @param {Paid.GetCustomerUnitByExternalIdRequest} request
1915
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1916
+ *
1917
+ * @throws {@link Paid.BadRequestError}
1918
+ * @throws {@link Paid.ForbiddenError}
1919
+ * @throws {@link Paid.NotFoundError}
1920
+ * @throws {@link Paid.InternalServerError}
1921
+ *
1922
+ * @example
1923
+ * await client.customers.getCustomerUnitByExternalId({
1924
+ * externalId: "customer_123",
1925
+ * externalCustomerUnitId: "team-research"
1926
+ * })
1927
+ */
1928
+ getCustomerUnitByExternalId(request, requestOptions) {
1929
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnitByExternalId(request, requestOptions));
1930
+ }
1931
+ __getCustomerUnitByExternalId(request, requestOptions) {
1932
+ return __awaiter(this, void 0, void 0, function* () {
1933
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1934
+ const { externalId, externalCustomerUnitId } = request;
1935
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1936
+ const _response = yield core.fetcher({
1937
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}`),
1938
+ method: "GET",
1939
+ headers: _headers,
1940
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1941
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1942
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1943
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1944
+ });
1945
+ if (_response.ok) {
1946
+ return { data: _response.body, rawResponse: _response.rawResponse };
1947
+ }
1948
+ if (_response.error.reason === "status-code") {
1949
+ switch (_response.error.statusCode) {
1950
+ case 400:
1951
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1952
+ case 403:
1953
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1954
+ case 404:
1955
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1956
+ case 500:
1957
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1958
+ default:
1959
+ throw new errors.PaidError({
1960
+ statusCode: _response.error.statusCode,
1961
+ body: _response.error.body,
1962
+ rawResponse: _response.rawResponse,
1963
+ });
1964
+ }
1965
+ }
1966
+ switch (_response.error.reason) {
1967
+ case "non-json":
1968
+ throw new errors.PaidError({
1969
+ statusCode: _response.error.statusCode,
1970
+ body: _response.error.rawBody,
1971
+ rawResponse: _response.rawResponse,
1972
+ });
1973
+ case "timeout":
1974
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/customer-units/{externalCustomerUnitId}.");
1975
+ case "unknown":
1976
+ throw new errors.PaidError({
1977
+ message: _response.error.errorMessage,
1978
+ rawResponse: _response.rawResponse,
1979
+ });
1980
+ }
1981
+ });
1982
+ }
1983
+ /**
1984
+ * Soft-deletes a unit: it stays readable with `status: DELETED` and cannot be reactivated. Spend history that references it is kept, and signals that keep naming it are still attributed to it. `409` while the unit has ACTIVE children or a cap in force or scheduled; the root follows the same rules, and once it is deleted a new root can be created. Addresses the customer by your external customer id.
1985
+ *
1986
+ * @param {Paid.DeleteCustomerUnitByExternalIdRequest} request
1987
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1988
+ *
1989
+ * @throws {@link Paid.BadRequestError}
1990
+ * @throws {@link Paid.ForbiddenError}
1991
+ * @throws {@link Paid.NotFoundError}
1992
+ * @throws {@link Paid.ConflictError}
1993
+ * @throws {@link Paid.InternalServerError}
1994
+ *
1995
+ * @example
1996
+ * await client.customers.deleteCustomerUnitByExternalId({
1997
+ * externalId: "customer_123",
1998
+ * externalCustomerUnitId: "team-research"
1999
+ * })
2000
+ */
2001
+ deleteCustomerUnitByExternalId(request, requestOptions) {
2002
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerUnitByExternalId(request, requestOptions));
2003
+ }
2004
+ __deleteCustomerUnitByExternalId(request, requestOptions) {
2005
+ return __awaiter(this, void 0, void 0, function* () {
2006
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2007
+ const { externalId, externalCustomerUnitId } = request;
2008
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2009
+ const _response = yield core.fetcher({
2010
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}`),
2011
+ method: "DELETE",
2012
+ headers: _headers,
2013
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2014
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2015
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2016
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2017
+ });
2018
+ if (_response.ok) {
2019
+ return { data: _response.body, rawResponse: _response.rawResponse };
2020
+ }
2021
+ if (_response.error.reason === "status-code") {
2022
+ switch (_response.error.statusCode) {
2023
+ case 400:
2024
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2025
+ case 403:
2026
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2027
+ case 404:
2028
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2029
+ case 409:
2030
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2031
+ case 500:
2032
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2033
+ default:
2034
+ throw new errors.PaidError({
2035
+ statusCode: _response.error.statusCode,
2036
+ body: _response.error.body,
2037
+ rawResponse: _response.rawResponse,
2038
+ });
2039
+ }
2040
+ }
2041
+ switch (_response.error.reason) {
2042
+ case "non-json":
2043
+ throw new errors.PaidError({
2044
+ statusCode: _response.error.statusCode,
2045
+ body: _response.error.rawBody,
2046
+ rawResponse: _response.rawResponse,
2047
+ });
2048
+ case "timeout":
2049
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}/customer-units/{externalCustomerUnitId}.");
2050
+ case "unknown":
2051
+ throw new errors.PaidError({
2052
+ message: _response.error.errorMessage,
2053
+ rawResponse: _response.rawResponse,
2054
+ });
2055
+ }
2056
+ });
2057
+ }
2058
+ /**
2059
+ * Renames, re-types, re-parents or annotates a unit, the root included. `externalId` cannot change. Re-parenting (`parentExternalId`) moves the unit with everything under it. Spend already recorded keeps naming the unit it landed on; caps are evaluated on the current tree, so from the move on the unit's spend in the running cap period counts toward its new ancestors' caps and no longer toward the old ones. `409` for a deleted unit, a parent that does not exist or is not ACTIVE, a move of the root (`ROOT_UNIT_IMMOVABLE`), a move under the unit's own subtree, or a tree that would get too deep. Addresses the customer by your external customer id.
2060
+ *
2061
+ * @param {Paid.UpdateCustomerUnitByExternalIdRequest} request
2062
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2063
+ *
2064
+ * @throws {@link Paid.BadRequestError}
2065
+ * @throws {@link Paid.ForbiddenError}
2066
+ * @throws {@link Paid.NotFoundError}
2067
+ * @throws {@link Paid.ConflictError}
2068
+ * @throws {@link Paid.InternalServerError}
2069
+ *
2070
+ * @example
2071
+ * await client.customers.updateCustomerUnitByExternalId({
2072
+ * externalId: "customer_123",
2073
+ * externalCustomerUnitId: "team-research",
2074
+ * body: {}
2075
+ * })
2076
+ */
2077
+ updateCustomerUnitByExternalId(request, requestOptions) {
2078
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerUnitByExternalId(request, requestOptions));
2079
+ }
2080
+ __updateCustomerUnitByExternalId(request, requestOptions) {
2081
+ return __awaiter(this, void 0, void 0, function* () {
2082
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2083
+ const { externalId, externalCustomerUnitId, body: _body } = request;
2084
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2085
+ const _response = yield core.fetcher({
2086
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}`),
2087
+ method: "PATCH",
2088
+ headers: _headers,
2089
+ contentType: "application/json",
2090
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2091
+ requestType: "json",
2092
+ body: _body,
2093
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2094
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2095
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2096
+ });
2097
+ if (_response.ok) {
2098
+ return { data: _response.body, rawResponse: _response.rawResponse };
2099
+ }
2100
+ if (_response.error.reason === "status-code") {
2101
+ switch (_response.error.statusCode) {
2102
+ case 400:
2103
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2104
+ case 403:
2105
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2106
+ case 404:
2107
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2108
+ case 409:
2109
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2110
+ case 500:
2111
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2112
+ default:
2113
+ throw new errors.PaidError({
2114
+ statusCode: _response.error.statusCode,
2115
+ body: _response.error.body,
2116
+ rawResponse: _response.rawResponse,
2117
+ });
2118
+ }
2119
+ }
2120
+ switch (_response.error.reason) {
2121
+ case "non-json":
2122
+ throw new errors.PaidError({
2123
+ statusCode: _response.error.statusCode,
2124
+ body: _response.error.rawBody,
2125
+ rawResponse: _response.rawResponse,
2126
+ });
2127
+ case "timeout":
2128
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PATCH /customers/external/{externalId}/customer-units/{externalCustomerUnitId}.");
2129
+ case "unknown":
2130
+ throw new errors.PaidError({
2131
+ message: _response.error.errorMessage,
2132
+ rawResponse: _response.rawResponse,
2133
+ });
2134
+ }
2135
+ });
2136
+ }
2137
+ /**
2138
+ * Lists the customer's units as a flat list, newest last; assemble the tree from `parentExternalId` (`null` on the root unit, `isRoot: true`). Deleted units are hidden unless `status=DELETED` is given. Filter by `externalType`, or by `parentExternalId` for one level of the tree. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2139
+ *
2140
+ * @param {Paid.ListCustomerUnitsRequest} request
2141
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2142
+ *
2143
+ * @throws {@link Paid.BadRequestError}
2144
+ * @throws {@link Paid.ForbiddenError}
2145
+ * @throws {@link Paid.NotFoundError}
2146
+ * @throws {@link Paid.InternalServerError}
2147
+ *
2148
+ * @example
2149
+ * await client.customers.listCustomerUnits({
2150
+ * id: "cus_abc123",
2151
+ * parentExternalId: "dept-rnd"
2152
+ * })
2153
+ */
2154
+ listCustomerUnits(request, requestOptions) {
2155
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerUnits(request, requestOptions));
2156
+ }
2157
+ __listCustomerUnits(request, requestOptions) {
2158
+ return __awaiter(this, void 0, void 0, function* () {
2159
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2160
+ const { id, limit, offset, status, externalType, parentExternalId } = request;
2161
+ const _queryParams = {};
2162
+ if (limit != null) {
2163
+ _queryParams.limit = limit.toString();
2164
+ }
2165
+ if (offset != null) {
2166
+ _queryParams.offset = offset.toString();
2167
+ }
2168
+ if (status != null) {
2169
+ _queryParams.status = status;
2170
+ }
2171
+ if (externalType != null) {
2172
+ _queryParams.externalType = externalType;
2173
+ }
2174
+ if (parentExternalId != null) {
2175
+ _queryParams.parentExternalId = parentExternalId;
2176
+ }
2177
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2178
+ const _response = yield core.fetcher({
2179
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units`),
2180
+ method: "GET",
2181
+ headers: _headers,
2182
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2183
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2184
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2185
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2186
+ });
2187
+ if (_response.ok) {
2188
+ return { data: _response.body, rawResponse: _response.rawResponse };
2189
+ }
2190
+ if (_response.error.reason === "status-code") {
2191
+ switch (_response.error.statusCode) {
2192
+ case 400:
2193
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2194
+ case 403:
2195
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2196
+ case 404:
2197
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2198
+ case 500:
2199
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2200
+ default:
2201
+ throw new errors.PaidError({
2202
+ statusCode: _response.error.statusCode,
2203
+ body: _response.error.body,
2204
+ rawResponse: _response.rawResponse,
2205
+ });
2206
+ }
2207
+ }
2208
+ switch (_response.error.reason) {
2209
+ case "non-json":
2210
+ throw new errors.PaidError({
2211
+ statusCode: _response.error.statusCode,
2212
+ body: _response.error.rawBody,
2213
+ rawResponse: _response.rawResponse,
2214
+ });
2215
+ case "timeout":
2216
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/customer-units.");
2217
+ case "unknown":
2218
+ throw new errors.PaidError({
2219
+ message: _response.error.errorMessage,
2220
+ rawResponse: _response.rawResponse,
2221
+ });
2222
+ }
2223
+ });
2224
+ }
2225
+ /**
2226
+ * Creates a unit for this customer. `externalId` is your own key for it: required, unique within the customer and immutable; every unit route addresses the unit by it, and `name` defaults to it. Omit `parentExternalId` to create the customer's root unit (its first unit; `409 ROOT_EXISTS` if it already has one — a customer created with an external id usable as a unit key already has its root, keyed by that external id, so name it as the parent instead); otherwise the parent must exist (`409 PARENT_NOT_FOUND`) and be ACTIVE. Units are never created implicitly: a signal that names a unit before it exists is accepted and its spend attaches to the unit once you create it with that key. `409` also when the externalId is taken (`CUSTOMER_UNIT_EXISTS`), the tree would get too deep, or the customer is on seat-based billing. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2227
+ *
2228
+ * @param {Paid.CreateCustomerUnitRequest} request
2229
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2230
+ *
2231
+ * @throws {@link Paid.BadRequestError}
2232
+ * @throws {@link Paid.ForbiddenError}
2233
+ * @throws {@link Paid.NotFoundError}
2234
+ * @throws {@link Paid.ConflictError}
2235
+ * @throws {@link Paid.InternalServerError}
2236
+ *
2237
+ * @example
2238
+ * await client.customers.createCustomerUnit({
2239
+ * id: "cus_abc123",
2240
+ * body: {
2241
+ * externalId: "team-research"
2242
+ * }
2243
+ * })
2244
+ */
2245
+ createCustomerUnit(request, requestOptions) {
2246
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerUnit(request, requestOptions));
2247
+ }
2248
+ __createCustomerUnit(request, requestOptions) {
2249
+ return __awaiter(this, void 0, void 0, function* () {
2250
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2251
+ const { id, body: _body } = request;
2252
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2253
+ const _response = yield core.fetcher({
2254
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units`),
2255
+ method: "POST",
2256
+ headers: _headers,
2257
+ contentType: "application/json",
2258
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2259
+ requestType: "json",
2260
+ body: _body,
2261
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2262
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2263
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2264
+ });
2265
+ if (_response.ok) {
2266
+ return { data: _response.body, rawResponse: _response.rawResponse };
2267
+ }
2268
+ if (_response.error.reason === "status-code") {
2269
+ switch (_response.error.statusCode) {
2270
+ case 400:
2271
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2272
+ case 403:
2273
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2274
+ case 404:
2275
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2276
+ case 409:
2277
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2278
+ case 500:
2279
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2280
+ default:
2281
+ throw new errors.PaidError({
2282
+ statusCode: _response.error.statusCode,
2283
+ body: _response.error.body,
2284
+ rawResponse: _response.rawResponse,
2285
+ });
2286
+ }
2287
+ }
2288
+ switch (_response.error.reason) {
2289
+ case "non-json":
2290
+ throw new errors.PaidError({
2291
+ statusCode: _response.error.statusCode,
2292
+ body: _response.error.rawBody,
2293
+ rawResponse: _response.rawResponse,
2294
+ });
2295
+ case "timeout":
2296
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/{id}/customer-units.");
2297
+ case "unknown":
2298
+ throw new errors.PaidError({
2299
+ message: _response.error.errorMessage,
2300
+ rawResponse: _response.rawResponse,
2301
+ });
2302
+ }
2303
+ });
2304
+ }
2305
+ /**
2306
+ * Returns one unit of this customer by its `externalId`, including a deleted one. `404` when the unit does not exist or belongs to another customer. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2307
+ *
2308
+ * @param {Paid.GetCustomerUnitRequest} request
2309
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2310
+ *
2311
+ * @throws {@link Paid.BadRequestError}
2312
+ * @throws {@link Paid.ForbiddenError}
2313
+ * @throws {@link Paid.NotFoundError}
2314
+ * @throws {@link Paid.InternalServerError}
2315
+ *
2316
+ * @example
2317
+ * await client.customers.getCustomerUnit({
2318
+ * id: "cus_abc123",
2319
+ * externalCustomerUnitId: "team-research"
2320
+ * })
2321
+ */
2322
+ getCustomerUnit(request, requestOptions) {
2323
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnit(request, requestOptions));
2324
+ }
2325
+ __getCustomerUnit(request, requestOptions) {
2326
+ return __awaiter(this, void 0, void 0, function* () {
2327
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2328
+ const { id, externalCustomerUnitId } = request;
2329
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2330
+ const _response = yield core.fetcher({
2331
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}`),
2332
+ method: "GET",
2333
+ headers: _headers,
2334
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2335
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2336
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2337
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2338
+ });
2339
+ if (_response.ok) {
2340
+ return { data: _response.body, rawResponse: _response.rawResponse };
2341
+ }
2342
+ if (_response.error.reason === "status-code") {
2343
+ switch (_response.error.statusCode) {
2344
+ case 400:
2345
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2346
+ case 403:
2347
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2348
+ case 404:
2349
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2350
+ case 500:
2351
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2352
+ default:
2353
+ throw new errors.PaidError({
2354
+ statusCode: _response.error.statusCode,
2355
+ body: _response.error.body,
2356
+ rawResponse: _response.rawResponse,
2357
+ });
2358
+ }
2359
+ }
2360
+ switch (_response.error.reason) {
2361
+ case "non-json":
2362
+ throw new errors.PaidError({
2363
+ statusCode: _response.error.statusCode,
2364
+ body: _response.error.rawBody,
2365
+ rawResponse: _response.rawResponse,
2366
+ });
2367
+ case "timeout":
2368
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/customer-units/{externalCustomerUnitId}.");
2369
+ case "unknown":
2370
+ throw new errors.PaidError({
2371
+ message: _response.error.errorMessage,
2372
+ rawResponse: _response.rawResponse,
2373
+ });
2374
+ }
2375
+ });
2376
+ }
2377
+ /**
2378
+ * Soft-deletes a unit: it stays readable with `status: DELETED` and cannot be reactivated. Spend history that references it is kept, and signals that keep naming it are still attributed to it. `409` while the unit has ACTIVE children or a cap in force or scheduled; the root follows the same rules, and once it is deleted a new root can be created. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2379
+ *
2380
+ * @param {Paid.DeleteCustomerUnitRequest} request
2381
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2382
+ *
2383
+ * @throws {@link Paid.BadRequestError}
2384
+ * @throws {@link Paid.ForbiddenError}
2385
+ * @throws {@link Paid.NotFoundError}
2386
+ * @throws {@link Paid.ConflictError}
2387
+ * @throws {@link Paid.InternalServerError}
2388
+ *
2389
+ * @example
2390
+ * await client.customers.deleteCustomerUnit({
2391
+ * id: "cus_abc123",
2392
+ * externalCustomerUnitId: "team-research"
2393
+ * })
2394
+ */
2395
+ deleteCustomerUnit(request, requestOptions) {
2396
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerUnit(request, requestOptions));
2397
+ }
2398
+ __deleteCustomerUnit(request, requestOptions) {
2399
+ return __awaiter(this, void 0, void 0, function* () {
2400
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2401
+ const { id, externalCustomerUnitId } = request;
2402
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2403
+ const _response = yield core.fetcher({
2404
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}`),
2405
+ method: "DELETE",
2406
+ headers: _headers,
2407
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2408
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2409
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2410
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2411
+ });
2412
+ if (_response.ok) {
2413
+ return { data: _response.body, rawResponse: _response.rawResponse };
2414
+ }
2415
+ if (_response.error.reason === "status-code") {
2416
+ switch (_response.error.statusCode) {
2417
+ case 400:
2418
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2419
+ case 403:
2420
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2421
+ case 404:
2422
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2423
+ case 409:
2424
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2425
+ case 500:
2426
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2427
+ default:
2428
+ throw new errors.PaidError({
2429
+ statusCode: _response.error.statusCode,
2430
+ body: _response.error.body,
2431
+ rawResponse: _response.rawResponse,
2432
+ });
2433
+ }
2434
+ }
2435
+ switch (_response.error.reason) {
2436
+ case "non-json":
2437
+ throw new errors.PaidError({
2438
+ statusCode: _response.error.statusCode,
2439
+ body: _response.error.rawBody,
2440
+ rawResponse: _response.rawResponse,
2441
+ });
2442
+ case "timeout":
2443
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}/customer-units/{externalCustomerUnitId}.");
2444
+ case "unknown":
2445
+ throw new errors.PaidError({
2446
+ message: _response.error.errorMessage,
2447
+ rawResponse: _response.rawResponse,
2448
+ });
2449
+ }
2450
+ });
2451
+ }
2452
+ /**
2453
+ * Renames, re-types, re-parents or annotates a unit, the root included. `externalId` cannot change. Re-parenting (`parentExternalId`) moves the unit with everything under it. Spend already recorded keeps naming the unit it landed on; caps are evaluated on the current tree, so from the move on the unit's spend in the running cap period counts toward its new ancestors' caps and no longer toward the old ones. `409` for a deleted unit, a parent that does not exist or is not ACTIVE, a move of the root (`ROOT_UNIT_IMMOVABLE`), a move under the unit's own subtree, or a tree that would get too deep. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2454
+ *
2455
+ * @param {Paid.UpdateCustomerUnitRequest} request
2456
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2457
+ *
2458
+ * @throws {@link Paid.BadRequestError}
2459
+ * @throws {@link Paid.ForbiddenError}
2460
+ * @throws {@link Paid.NotFoundError}
2461
+ * @throws {@link Paid.ConflictError}
2462
+ * @throws {@link Paid.InternalServerError}
2463
+ *
2464
+ * @example
2465
+ * await client.customers.updateCustomerUnit({
2466
+ * id: "cus_abc123",
2467
+ * externalCustomerUnitId: "team-research",
2468
+ * body: {}
2469
+ * })
2470
+ */
2471
+ updateCustomerUnit(request, requestOptions) {
2472
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerUnit(request, requestOptions));
2473
+ }
2474
+ __updateCustomerUnit(request, requestOptions) {
2475
+ return __awaiter(this, void 0, void 0, function* () {
2476
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2477
+ const { id, externalCustomerUnitId, body: _body } = request;
2478
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2479
+ const _response = yield core.fetcher({
2480
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}`),
2481
+ method: "PATCH",
2482
+ headers: _headers,
2483
+ contentType: "application/json",
2484
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2485
+ requestType: "json",
2486
+ body: _body,
2487
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2488
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2489
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2490
+ });
2491
+ if (_response.ok) {
2492
+ return { data: _response.body, rawResponse: _response.rawResponse };
2493
+ }
2494
+ if (_response.error.reason === "status-code") {
2495
+ switch (_response.error.statusCode) {
2496
+ case 400:
2497
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2498
+ case 403:
2499
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2500
+ case 404:
2501
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2502
+ case 409:
2503
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2504
+ case 500:
2505
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2506
+ default:
2507
+ throw new errors.PaidError({
2508
+ statusCode: _response.error.statusCode,
2509
+ body: _response.error.body,
2510
+ rawResponse: _response.rawResponse,
2511
+ });
2512
+ }
2513
+ }
2514
+ switch (_response.error.reason) {
2515
+ case "non-json":
2516
+ throw new errors.PaidError({
2517
+ statusCode: _response.error.statusCode,
2518
+ body: _response.error.rawBody,
2519
+ rawResponse: _response.rawResponse,
2520
+ });
2521
+ case "timeout":
2522
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PATCH /customers/{id}/customer-units/{externalCustomerUnitId}.");
2523
+ case "unknown":
2524
+ throw new errors.PaidError({
2525
+ message: _response.error.errorMessage,
2526
+ rawResponse: _response.rawResponse,
2527
+ });
2528
+ }
2529
+ });
2530
+ }
2531
+ /**
2532
+ * Returns the cap in force on this customer unit for one credits currency, with usage in the current period when available. Select the currency with `creditsCurrencyId`; it may be omitted only when the organization has exactly one credits currency, which is then used and echoed back. `404` when the customer or the unit does not exist, or the unit has no cap in force for that currency. The usage figures are advisory: other spend may land between this read and the next burn. Addresses the customer by your external customer id.
2533
+ *
2534
+ * @param {Paid.GetCustomerUnitCapByExternalIdRequest} request
2535
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2536
+ *
2537
+ * @throws {@link Paid.BadRequestError}
2538
+ * @throws {@link Paid.ForbiddenError}
2539
+ * @throws {@link Paid.NotFoundError}
2540
+ * @throws {@link Paid.InternalServerError}
2541
+ *
2542
+ * @example
2543
+ * await client.customers.getCustomerUnitCapByExternalId({
2544
+ * externalId: "customer_123",
2545
+ * externalCustomerUnitId: "tenant-a",
2546
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2547
+ * })
2548
+ */
2549
+ getCustomerUnitCapByExternalId(request, requestOptions) {
2550
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnitCapByExternalId(request, requestOptions));
2551
+ }
2552
+ __getCustomerUnitCapByExternalId(request, requestOptions) {
2553
+ return __awaiter(this, void 0, void 0, function* () {
2554
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2555
+ const { externalId, externalCustomerUnitId, creditsCurrencyId } = request;
2556
+ const _queryParams = {};
2557
+ if (creditsCurrencyId != null) {
2558
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2559
+ }
2560
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2561
+ const _response = yield core.fetcher({
2562
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}/cap`),
2563
+ method: "GET",
2564
+ headers: _headers,
2565
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2566
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2567
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2568
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2569
+ });
2570
+ if (_response.ok) {
2571
+ return { data: _response.body, rawResponse: _response.rawResponse };
2572
+ }
2573
+ if (_response.error.reason === "status-code") {
2574
+ switch (_response.error.statusCode) {
2575
+ case 400:
2576
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2577
+ case 403:
2578
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2579
+ case 404:
2580
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2581
+ case 500:
2582
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2583
+ default:
2584
+ throw new errors.PaidError({
2585
+ statusCode: _response.error.statusCode,
2586
+ body: _response.error.body,
2587
+ rawResponse: _response.rawResponse,
2588
+ });
2589
+ }
2590
+ }
2591
+ switch (_response.error.reason) {
2592
+ case "non-json":
2593
+ throw new errors.PaidError({
2594
+ statusCode: _response.error.statusCode,
2595
+ body: _response.error.rawBody,
2596
+ rawResponse: _response.rawResponse,
2597
+ });
2598
+ case "timeout":
2599
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/customer-units/{externalCustomerUnitId}/cap.");
2600
+ case "unknown":
2601
+ throw new errors.PaidError({
2602
+ message: _response.error.errorMessage,
2603
+ rawResponse: _response.rawResponse,
2604
+ });
2605
+ }
2606
+ });
2607
+ }
2608
+ /**
2609
+ * Sets the cap on this customer unit for one credits currency by recording a new cap version; earlier versions are kept and never modified, and the newest version wins where they overlap. The new version applies from `effectiveFrom` (default now) and its periods are anchored on that day of the month. Select the currency with `creditsCurrencyId` in the body; it may be omitted only when the organization has exactly one credits currency. A cap on the customer's root unit is the customer-wide cap. `404` when the customer or the unit does not exist. `409` for customers on seat-based billing. Addresses the customer by your external customer id.
2610
+ *
2611
+ * @param {Paid.SetCustomerUnitCapByExternalIdRequest} request
2612
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2613
+ *
2614
+ * @throws {@link Paid.BadRequestError}
2615
+ * @throws {@link Paid.ForbiddenError}
2616
+ * @throws {@link Paid.NotFoundError}
2617
+ * @throws {@link Paid.ConflictError}
2618
+ * @throws {@link Paid.InternalServerError}
2619
+ *
2620
+ * @example
2621
+ * await client.customers.setCustomerUnitCapByExternalId({
2622
+ * externalId: "customer_123",
2623
+ * externalCustomerUnitId: "tenant-a",
2624
+ * body: {
2625
+ * amount: 10000
2626
+ * }
2627
+ * })
2628
+ */
2629
+ setCustomerUnitCapByExternalId(request, requestOptions) {
2630
+ return core.HttpResponsePromise.fromPromise(this.__setCustomerUnitCapByExternalId(request, requestOptions));
2631
+ }
2632
+ __setCustomerUnitCapByExternalId(request, requestOptions) {
2633
+ return __awaiter(this, void 0, void 0, function* () {
2634
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2635
+ const { externalId, externalCustomerUnitId, body: _body } = request;
2636
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2637
+ const _response = yield core.fetcher({
2638
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}/cap`),
2639
+ method: "PUT",
2640
+ headers: _headers,
2641
+ contentType: "application/json",
2642
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2643
+ requestType: "json",
2644
+ body: _body,
2645
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2646
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2647
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2648
+ });
2649
+ if (_response.ok) {
2650
+ return { data: _response.body, rawResponse: _response.rawResponse };
2651
+ }
2652
+ if (_response.error.reason === "status-code") {
2653
+ switch (_response.error.statusCode) {
2654
+ case 400:
2655
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2656
+ case 403:
2657
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2658
+ case 404:
2659
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2660
+ case 409:
2661
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2662
+ case 500:
2663
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2664
+ default:
2665
+ throw new errors.PaidError({
2666
+ statusCode: _response.error.statusCode,
2667
+ body: _response.error.body,
2668
+ rawResponse: _response.rawResponse,
2669
+ });
2670
+ }
2671
+ }
2672
+ switch (_response.error.reason) {
2673
+ case "non-json":
2674
+ throw new errors.PaidError({
2675
+ statusCode: _response.error.statusCode,
2676
+ body: _response.error.rawBody,
2677
+ rawResponse: _response.rawResponse,
2678
+ });
2679
+ case "timeout":
2680
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/external/{externalId}/customer-units/{externalCustomerUnitId}/cap.");
2681
+ case "unknown":
2682
+ throw new errors.PaidError({
2683
+ message: _response.error.errorMessage,
2684
+ rawResponse: _response.rawResponse,
2685
+ });
2686
+ }
2687
+ });
2688
+ }
2689
+ /**
2690
+ * Ends the cap on this customer unit for one credits currency by setting `effectiveUntil` to now on every open version — the one in force, older overlapping versions still open, and versions scheduled to start later — so nothing can resurface or activate afterwards; nothing is deleted and history is kept. Select the currency with `creditsCurrencyId`; it may be omitted only when the organization has exactly one credits currency. `404` when the customer or the unit does not exist, or there is no open version for that currency. Addresses the customer by your external customer id.
2691
+ *
2692
+ * @param {Paid.EndCustomerUnitCapByExternalIdRequest} request
2693
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2694
+ *
2695
+ * @throws {@link Paid.BadRequestError}
2696
+ * @throws {@link Paid.ForbiddenError}
2697
+ * @throws {@link Paid.NotFoundError}
2698
+ * @throws {@link Paid.ConflictError}
2699
+ * @throws {@link Paid.InternalServerError}
2700
+ *
2701
+ * @example
2702
+ * await client.customers.endCustomerUnitCapByExternalId({
2703
+ * externalId: "customer_123",
2704
+ * externalCustomerUnitId: "tenant-a",
2705
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2706
+ * })
2707
+ */
2708
+ endCustomerUnitCapByExternalId(request, requestOptions) {
2709
+ return core.HttpResponsePromise.fromPromise(this.__endCustomerUnitCapByExternalId(request, requestOptions));
2710
+ }
2711
+ __endCustomerUnitCapByExternalId(request, requestOptions) {
2712
+ return __awaiter(this, void 0, void 0, function* () {
2713
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2714
+ const { externalId, externalCustomerUnitId, creditsCurrencyId } = request;
2715
+ const _queryParams = {};
2716
+ if (creditsCurrencyId != null) {
2717
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2718
+ }
2719
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2720
+ const _response = yield core.fetcher({
2721
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/external/${core.url.encodePathParam(externalId)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}/cap`),
2722
+ method: "DELETE",
2723
+ headers: _headers,
2724
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2725
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2726
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2727
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2728
+ });
2729
+ if (_response.ok) {
2730
+ return { data: _response.body, rawResponse: _response.rawResponse };
2731
+ }
2732
+ if (_response.error.reason === "status-code") {
2733
+ switch (_response.error.statusCode) {
2734
+ case 400:
2735
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2736
+ case 403:
2737
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2738
+ case 404:
2739
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2740
+ case 409:
2741
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2742
+ case 500:
2743
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2744
+ default:
2745
+ throw new errors.PaidError({
2746
+ statusCode: _response.error.statusCode,
2747
+ body: _response.error.body,
2748
+ rawResponse: _response.rawResponse,
2749
+ });
2750
+ }
2751
+ }
2752
+ switch (_response.error.reason) {
2753
+ case "non-json":
2754
+ throw new errors.PaidError({
2755
+ statusCode: _response.error.statusCode,
2756
+ body: _response.error.rawBody,
2757
+ rawResponse: _response.rawResponse,
2758
+ });
2759
+ case "timeout":
2760
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}/customer-units/{externalCustomerUnitId}/cap.");
2761
+ case "unknown":
2762
+ throw new errors.PaidError({
2763
+ message: _response.error.errorMessage,
2764
+ rawResponse: _response.rawResponse,
2765
+ });
2766
+ }
2767
+ });
2768
+ }
2769
+ /**
2770
+ * Returns the cap in force on this customer unit for one credits currency, with usage in the current period when available. Select the currency with `creditsCurrencyId`; it may be omitted only when the organization has exactly one credits currency, which is then used and echoed back. `404` when the customer or the unit does not exist, or the unit has no cap in force for that currency. The usage figures are advisory: other spend may land between this read and the next burn. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2771
+ *
2772
+ * @param {Paid.GetCustomerUnitCapRequest} request
2773
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2774
+ *
2775
+ * @throws {@link Paid.BadRequestError}
2776
+ * @throws {@link Paid.ForbiddenError}
2777
+ * @throws {@link Paid.NotFoundError}
2778
+ * @throws {@link Paid.InternalServerError}
2779
+ *
2780
+ * @example
2781
+ * await client.customers.getCustomerUnitCap({
2782
+ * id: "cus_abc123",
2783
+ * externalCustomerUnitId: "tenant-a",
2784
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2785
+ * })
2786
+ */
2787
+ getCustomerUnitCap(request, requestOptions) {
2788
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnitCap(request, requestOptions));
2789
+ }
2790
+ __getCustomerUnitCap(request, requestOptions) {
2791
+ return __awaiter(this, void 0, void 0, function* () {
2792
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2793
+ const { id, externalCustomerUnitId, creditsCurrencyId } = request;
2794
+ const _queryParams = {};
2795
+ if (creditsCurrencyId != null) {
2796
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2797
+ }
2798
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2799
+ const _response = yield core.fetcher({
2800
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}/cap`),
2801
+ method: "GET",
2802
+ headers: _headers,
2803
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2804
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2805
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2806
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2807
+ });
2808
+ if (_response.ok) {
2809
+ return { data: _response.body, rawResponse: _response.rawResponse };
2810
+ }
2811
+ if (_response.error.reason === "status-code") {
2812
+ switch (_response.error.statusCode) {
2813
+ case 400:
2814
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2815
+ case 403:
2816
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2817
+ case 404:
2818
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2819
+ case 500:
2820
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2821
+ default:
2822
+ throw new errors.PaidError({
2823
+ statusCode: _response.error.statusCode,
2824
+ body: _response.error.body,
2825
+ rawResponse: _response.rawResponse,
2826
+ });
2827
+ }
2828
+ }
2829
+ switch (_response.error.reason) {
2830
+ case "non-json":
2831
+ throw new errors.PaidError({
2832
+ statusCode: _response.error.statusCode,
2833
+ body: _response.error.rawBody,
2834
+ rawResponse: _response.rawResponse,
2835
+ });
2836
+ case "timeout":
2837
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/customer-units/{externalCustomerUnitId}/cap.");
2838
+ case "unknown":
2839
+ throw new errors.PaidError({
2840
+ message: _response.error.errorMessage,
2841
+ rawResponse: _response.rawResponse,
2842
+ });
2843
+ }
2844
+ });
2845
+ }
2846
+ /**
2847
+ * Sets the cap on this customer unit for one credits currency by recording a new cap version; earlier versions are kept and never modified, and the newest version wins where they overlap. The new version applies from `effectiveFrom` (default now) and its periods are anchored on that day of the month. Select the currency with `creditsCurrencyId` in the body; it may be omitted only when the organization has exactly one credits currency. A cap on the customer's root unit is the customer-wide cap. `404` when the customer or the unit does not exist. `409` for customers on seat-based billing. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2848
+ *
2849
+ * @param {Paid.SetCustomerUnitCapRequest} request
2850
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2851
+ *
2852
+ * @throws {@link Paid.BadRequestError}
2853
+ * @throws {@link Paid.ForbiddenError}
2854
+ * @throws {@link Paid.NotFoundError}
2855
+ * @throws {@link Paid.ConflictError}
2856
+ * @throws {@link Paid.InternalServerError}
2857
+ *
2858
+ * @example
2859
+ * await client.customers.setCustomerUnitCap({
2860
+ * id: "cus_abc123",
2861
+ * externalCustomerUnitId: "tenant-a",
2862
+ * body: {
2863
+ * amount: 10000
2864
+ * }
2865
+ * })
2866
+ */
2867
+ setCustomerUnitCap(request, requestOptions) {
2868
+ return core.HttpResponsePromise.fromPromise(this.__setCustomerUnitCap(request, requestOptions));
2869
+ }
2870
+ __setCustomerUnitCap(request, requestOptions) {
2871
+ return __awaiter(this, void 0, void 0, function* () {
2872
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2873
+ const { id, externalCustomerUnitId, body: _body } = request;
2874
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2875
+ const _response = yield core.fetcher({
2876
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}/cap`),
2877
+ method: "PUT",
2878
+ headers: _headers,
2879
+ contentType: "application/json",
2880
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2881
+ requestType: "json",
2882
+ body: _body,
2883
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2884
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2885
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2886
+ });
2887
+ if (_response.ok) {
2888
+ return { data: _response.body, rawResponse: _response.rawResponse };
2889
+ }
2890
+ if (_response.error.reason === "status-code") {
2891
+ switch (_response.error.statusCode) {
2892
+ case 400:
2893
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2894
+ case 403:
2895
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2896
+ case 404:
2897
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2898
+ case 409:
2899
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2900
+ case 500:
2901
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2902
+ default:
2903
+ throw new errors.PaidError({
2904
+ statusCode: _response.error.statusCode,
2905
+ body: _response.error.body,
2906
+ rawResponse: _response.rawResponse,
2907
+ });
2908
+ }
2909
+ }
2910
+ switch (_response.error.reason) {
2911
+ case "non-json":
2912
+ throw new errors.PaidError({
2913
+ statusCode: _response.error.statusCode,
2914
+ body: _response.error.rawBody,
2915
+ rawResponse: _response.rawResponse,
2916
+ });
2917
+ case "timeout":
2918
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{id}/customer-units/{externalCustomerUnitId}/cap.");
2919
+ case "unknown":
2920
+ throw new errors.PaidError({
2921
+ message: _response.error.errorMessage,
2922
+ rawResponse: _response.rawResponse,
2923
+ });
2924
+ }
2925
+ });
2926
+ }
2927
+ /**
2928
+ * Ends the cap on this customer unit for one credits currency by setting `effectiveUntil` to now on every open version — the one in force, older overlapping versions still open, and versions scheduled to start later — so nothing can resurface or activate afterwards; nothing is deleted and history is kept. Select the currency with `creditsCurrencyId`; it may be omitted only when the organization has exactly one credits currency. `404` when the customer or the unit does not exist, or there is no open version for that currency. Use the value returned as `customer.id`, for example `cus_abc123`; if you have your own customer ID, use the `/api/v2/customers/external/{externalId}/…` twin.
2929
+ *
2930
+ * @param {Paid.EndCustomerUnitCapRequest} request
2931
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2932
+ *
2933
+ * @throws {@link Paid.BadRequestError}
2934
+ * @throws {@link Paid.ForbiddenError}
2935
+ * @throws {@link Paid.NotFoundError}
2936
+ * @throws {@link Paid.ConflictError}
2937
+ * @throws {@link Paid.InternalServerError}
2938
+ *
2939
+ * @example
2940
+ * await client.customers.endCustomerUnitCap({
2941
+ * id: "cus_abc123",
2942
+ * externalCustomerUnitId: "tenant-a",
2943
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2944
+ * })
2945
+ */
2946
+ endCustomerUnitCap(request, requestOptions) {
2947
+ return core.HttpResponsePromise.fromPromise(this.__endCustomerUnitCap(request, requestOptions));
2948
+ }
2949
+ __endCustomerUnitCap(request, requestOptions) {
2950
+ return __awaiter(this, void 0, void 0, function* () {
2951
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2952
+ const { id, externalCustomerUnitId, creditsCurrencyId } = request;
2953
+ const _queryParams = {};
2954
+ if (creditsCurrencyId != null) {
2955
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2956
+ }
2957
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2958
+ const _response = yield core.fetcher({
2959
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(id)}/customer-units/${core.url.encodePathParam(externalCustomerUnitId)}/cap`),
2960
+ method: "DELETE",
2961
+ headers: _headers,
2962
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2963
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2964
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2965
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2966
+ });
2967
+ if (_response.ok) {
2968
+ return { data: _response.body, rawResponse: _response.rawResponse };
2969
+ }
2970
+ if (_response.error.reason === "status-code") {
2971
+ switch (_response.error.statusCode) {
2972
+ case 400:
2973
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2974
+ case 403:
2975
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2976
+ case 404:
2977
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2978
+ case 409:
2979
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2980
+ case 500:
2981
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2982
+ default:
2983
+ throw new errors.PaidError({
2984
+ statusCode: _response.error.statusCode,
2985
+ body: _response.error.body,
2986
+ rawResponse: _response.rawResponse,
2987
+ });
2988
+ }
2989
+ }
2990
+ switch (_response.error.reason) {
2991
+ case "non-json":
2992
+ throw new errors.PaidError({
2993
+ statusCode: _response.error.statusCode,
2994
+ body: _response.error.rawBody,
2995
+ rawResponse: _response.rawResponse,
2996
+ });
2997
+ case "timeout":
2998
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}/customer-units/{externalCustomerUnitId}/cap.");
805
2999
  case "unknown":
806
3000
  throw new errors.PaidError({
807
3001
  message: _response.error.errorMessage,