@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
@@ -83,7 +83,7 @@ class Customers {
83
83
  __listCustomers() {
84
84
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
85
85
  var _a, _b, _c, _d, _e, _f, _g, _h;
86
- const { limit, offset } = request;
86
+ const { limit, offset, name, status, creationState, createdAtFrom, createdAtTo, externalId } = request;
87
87
  const _queryParams = {};
88
88
  if (limit != null) {
89
89
  _queryParams.limit = limit.toString();
@@ -91,6 +91,24 @@ class Customers {
91
91
  if (offset != null) {
92
92
  _queryParams.offset = offset.toString();
93
93
  }
94
+ if (name != null) {
95
+ _queryParams.name = name;
96
+ }
97
+ if (status != null) {
98
+ _queryParams.status = status;
99
+ }
100
+ if (creationState != null) {
101
+ _queryParams.creationState = creationState;
102
+ }
103
+ if (createdAtFrom != null) {
104
+ _queryParams.createdAtFrom = createdAtFrom;
105
+ }
106
+ if (createdAtTo != null) {
107
+ _queryParams.createdAtTo = createdAtTo;
108
+ }
109
+ if (externalId != null) {
110
+ _queryParams.externalId = externalId;
111
+ }
94
112
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
95
113
  const _response = yield core.fetcher({
96
114
  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/"),
@@ -208,33 +226,41 @@ class Customers {
208
226
  });
209
227
  }
210
228
  /**
211
- * Get a customer by ID
229
+ * List alternate external identifiers that resolve to a customer by Paid display ID.
212
230
  *
213
- * @param {Paid.GetCustomerByIdRequest} request
231
+ * @param {Paid.ListCustomerAliasesRequest} request
214
232
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
215
233
  *
234
+ * @throws {@link Paid.BadRequestError}
216
235
  * @throws {@link Paid.ForbiddenError}
217
236
  * @throws {@link Paid.NotFoundError}
218
237
  * @throws {@link Paid.InternalServerError}
219
238
  *
220
239
  * @example
221
- * await client.customers.getCustomerById({
222
- * id: "id"
240
+ * await client.customers.listCustomerAliases({
241
+ * id: "cus_abc123"
223
242
  * })
224
243
  */
225
- getCustomerById(request, requestOptions) {
226
- return core.HttpResponsePromise.fromPromise(this.__getCustomerById(request, requestOptions));
244
+ listCustomerAliases(request, requestOptions) {
245
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerAliases(request, requestOptions));
227
246
  }
228
- __getCustomerById(request, requestOptions) {
247
+ __listCustomerAliases(request, requestOptions) {
229
248
  return __awaiter(this, void 0, void 0, function* () {
230
249
  var _a, _b, _c, _d, _e, _f, _g, _h;
231
- const { id } = request;
250
+ const { id, limit, offset } = request;
251
+ const _queryParams = {};
252
+ if (limit != null) {
253
+ _queryParams.limit = limit.toString();
254
+ }
255
+ if (offset != null) {
256
+ _queryParams.offset = offset.toString();
257
+ }
232
258
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
233
259
  const _response = yield core.fetcher({
234
- 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)}`),
260
+ 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`),
235
261
  method: "GET",
236
262
  headers: _headers,
237
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
263
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
238
264
  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,
239
265
  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,
240
266
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -244,6 +270,8 @@ class Customers {
244
270
  }
245
271
  if (_response.error.reason === "status-code") {
246
272
  switch (_response.error.statusCode) {
273
+ case 400:
274
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
247
275
  case 403:
248
276
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
249
277
  case 404:
@@ -266,7 +294,7 @@ class Customers {
266
294
  rawResponse: _response.rawResponse,
267
295
  });
268
296
  case "timeout":
269
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}.");
297
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/aliases.");
270
298
  case "unknown":
271
299
  throw new errors.PaidError({
272
300
  message: _response.error.errorMessage,
@@ -276,33 +304,36 @@ class Customers {
276
304
  });
277
305
  }
278
306
  /**
279
- * Update a customer by ID
307
+ * Create an alternate external identifier for a customer by Paid display ID.
280
308
  *
281
- * @param {Paid.UpdateCustomerByIdRequest} request
309
+ * @param {Paid.CreateCustomerAliasRequest} request
282
310
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
283
311
  *
284
312
  * @throws {@link Paid.BadRequestError}
285
313
  * @throws {@link Paid.ForbiddenError}
286
314
  * @throws {@link Paid.NotFoundError}
315
+ * @throws {@link Paid.ConflictError}
287
316
  * @throws {@link Paid.InternalServerError}
288
317
  *
289
318
  * @example
290
- * await client.customers.updateCustomerById({
291
- * id: "id",
292
- * body: {}
319
+ * await client.customers.createCustomerAlias({
320
+ * id: "cus_abc123",
321
+ * body: {
322
+ * alias: "child-customer-1"
323
+ * }
293
324
  * })
294
325
  */
295
- updateCustomerById(request, requestOptions) {
296
- return core.HttpResponsePromise.fromPromise(this.__updateCustomerById(request, requestOptions));
326
+ createCustomerAlias(request, requestOptions) {
327
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerAlias(request, requestOptions));
297
328
  }
298
- __updateCustomerById(request, requestOptions) {
329
+ __createCustomerAlias(request, requestOptions) {
299
330
  return __awaiter(this, void 0, void 0, function* () {
300
331
  var _a, _b, _c, _d, _e, _f, _g, _h;
301
332
  const { id, body: _body } = request;
302
333
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
303
334
  const _response = yield core.fetcher({
304
- 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)}`),
305
- method: "PUT",
335
+ 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`),
336
+ method: "POST",
306
337
  headers: _headers,
307
338
  contentType: "application/json",
308
339
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -323,6 +354,8 @@ class Customers {
323
354
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
324
355
  case 404:
325
356
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
357
+ case 409:
358
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
326
359
  case 500:
327
360
  throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
328
361
  default:
@@ -341,7 +374,7 @@ class Customers {
341
374
  rawResponse: _response.rawResponse,
342
375
  });
343
376
  case "timeout":
344
- throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{id}.");
377
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/{id}/aliases.");
345
378
  case "unknown":
346
379
  throw new errors.PaidError({
347
380
  message: _response.error.errorMessage,
@@ -351,31 +384,31 @@ class Customers {
351
384
  });
352
385
  }
353
386
  /**
354
- * Delete a customer by ID
387
+ * Remove an alternate external identifier from a customer by Paid display ID.
355
388
  *
356
- * @param {Paid.DeleteCustomerByIdRequest} request
389
+ * @param {Paid.DeleteCustomerAliasRequest} request
357
390
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
358
391
  *
359
- * @throws {@link Paid.BadRequestError}
360
392
  * @throws {@link Paid.ForbiddenError}
361
393
  * @throws {@link Paid.NotFoundError}
362
394
  * @throws {@link Paid.InternalServerError}
363
395
  *
364
396
  * @example
365
- * await client.customers.deleteCustomerById({
366
- * id: "id"
397
+ * await client.customers.deleteCustomerAlias({
398
+ * id: "cus_abc123",
399
+ * alias: "child-customer-1"
367
400
  * })
368
401
  */
369
- deleteCustomerById(request, requestOptions) {
370
- return core.HttpResponsePromise.fromPromise(this.__deleteCustomerById(request, requestOptions));
402
+ deleteCustomerAlias(request, requestOptions) {
403
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerAlias(request, requestOptions));
371
404
  }
372
- __deleteCustomerById(request, requestOptions) {
405
+ __deleteCustomerAlias(request, requestOptions) {
373
406
  return __awaiter(this, void 0, void 0, function* () {
374
407
  var _a, _b, _c, _d, _e, _f, _g, _h;
375
- const { id } = request;
408
+ const { id, alias } = request;
376
409
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
377
410
  const _response = yield core.fetcher({
378
- 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)}`),
411
+ 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)}`),
379
412
  method: "DELETE",
380
413
  headers: _headers,
381
414
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -388,8 +421,6 @@ class Customers {
388
421
  }
389
422
  if (_response.error.reason === "status-code") {
390
423
  switch (_response.error.statusCode) {
391
- case 400:
392
- throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
393
424
  case 403:
394
425
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
395
426
  case 404:
@@ -412,7 +443,7 @@ class Customers {
412
443
  rawResponse: _response.rawResponse,
413
444
  });
414
445
  case "timeout":
415
- throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}.");
446
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}/aliases/{alias}.");
416
447
  case "unknown":
417
448
  throw new errors.PaidError({
418
449
  message: _response.error.errorMessage,
@@ -422,9 +453,9 @@ class Customers {
422
453
  });
423
454
  }
424
455
  /**
425
- * Get a customer by external ID
456
+ * 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}`.
426
457
  *
427
- * @param {Paid.GetCustomerByExternalIdRequest} request
458
+ * @param {Paid.GetCustomerByIdRequest} request
428
459
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
429
460
  *
430
461
  * @throws {@link Paid.ForbiddenError}
@@ -432,20 +463,20 @@ class Customers {
432
463
  * @throws {@link Paid.InternalServerError}
433
464
  *
434
465
  * @example
435
- * await client.customers.getCustomerByExternalId({
436
- * externalId: "externalId"
466
+ * await client.customers.getCustomerById({
467
+ * id: "cus_abc123"
437
468
  * })
438
469
  */
439
- getCustomerByExternalId(request, requestOptions) {
440
- return core.HttpResponsePromise.fromPromise(this.__getCustomerByExternalId(request, requestOptions));
470
+ getCustomerById(request, requestOptions) {
471
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerById(request, requestOptions));
441
472
  }
442
- __getCustomerByExternalId(request, requestOptions) {
473
+ __getCustomerById(request, requestOptions) {
443
474
  return __awaiter(this, void 0, void 0, function* () {
444
475
  var _a, _b, _c, _d, _e, _f, _g, _h;
445
- const { externalId } = request;
476
+ const { id } = request;
446
477
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
447
478
  const _response = yield core.fetcher({
448
- 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)}`),
479
+ 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)}`),
449
480
  method: "GET",
450
481
  headers: _headers,
451
482
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -480,7 +511,7 @@ class Customers {
480
511
  rawResponse: _response.rawResponse,
481
512
  });
482
513
  case "timeout":
483
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}.");
514
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}.");
484
515
  case "unknown":
485
516
  throw new errors.PaidError({
486
517
  message: _response.error.errorMessage,
@@ -490,9 +521,9 @@ class Customers {
490
521
  });
491
522
  }
492
523
  /**
493
- * Update a customer by external ID
524
+ * 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}`.
494
525
  *
495
- * @param {Paid.UpdateCustomerByExternalIdRequest} request
526
+ * @param {Paid.UpdateCustomerByIdRequest} request
496
527
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
497
528
  *
498
529
  * @throws {@link Paid.BadRequestError}
@@ -501,21 +532,21 @@ class Customers {
501
532
  * @throws {@link Paid.InternalServerError}
502
533
  *
503
534
  * @example
504
- * await client.customers.updateCustomerByExternalId({
505
- * externalId: "externalId",
535
+ * await client.customers.updateCustomerById({
536
+ * id: "cus_abc123",
506
537
  * body: {}
507
538
  * })
508
539
  */
509
- updateCustomerByExternalId(request, requestOptions) {
510
- return core.HttpResponsePromise.fromPromise(this.__updateCustomerByExternalId(request, requestOptions));
540
+ updateCustomerById(request, requestOptions) {
541
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerById(request, requestOptions));
511
542
  }
512
- __updateCustomerByExternalId(request, requestOptions) {
543
+ __updateCustomerById(request, requestOptions) {
513
544
  return __awaiter(this, void 0, void 0, function* () {
514
545
  var _a, _b, _c, _d, _e, _f, _g, _h;
515
- const { externalId, body: _body } = request;
546
+ const { id, body: _body } = request;
516
547
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
517
548
  const _response = yield core.fetcher({
518
- 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)}`),
549
+ 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)}`),
519
550
  method: "PUT",
520
551
  headers: _headers,
521
552
  contentType: "application/json",
@@ -555,7 +586,7 @@ class Customers {
555
586
  rawResponse: _response.rawResponse,
556
587
  });
557
588
  case "timeout":
558
- throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/external/{externalId}.");
589
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{id}.");
559
590
  case "unknown":
560
591
  throw new errors.PaidError({
561
592
  message: _response.error.errorMessage,
@@ -565,9 +596,9 @@ class Customers {
565
596
  });
566
597
  }
567
598
  /**
568
- * Delete a customer by external ID
599
+ * 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}`.
569
600
  *
570
- * @param {Paid.DeleteCustomerByExternalIdRequest} request
601
+ * @param {Paid.DeleteCustomerByIdRequest} request
571
602
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
572
603
  *
573
604
  * @throws {@link Paid.BadRequestError}
@@ -576,20 +607,20 @@ class Customers {
576
607
  * @throws {@link Paid.InternalServerError}
577
608
  *
578
609
  * @example
579
- * await client.customers.deleteCustomerByExternalId({
580
- * externalId: "externalId"
610
+ * await client.customers.deleteCustomerById({
611
+ * id: "cus_abc123"
581
612
  * })
582
613
  */
583
- deleteCustomerByExternalId(request, requestOptions) {
584
- return core.HttpResponsePromise.fromPromise(this.__deleteCustomerByExternalId(request, requestOptions));
614
+ deleteCustomerById(request, requestOptions) {
615
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerById(request, requestOptions));
585
616
  }
586
- __deleteCustomerByExternalId(request, requestOptions) {
617
+ __deleteCustomerById(request, requestOptions) {
587
618
  return __awaiter(this, void 0, void 0, function* () {
588
619
  var _a, _b, _c, _d, _e, _f, _g, _h;
589
- const { externalId } = request;
620
+ const { id } = request;
590
621
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
591
622
  const _response = yield core.fetcher({
592
- 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)}`),
623
+ 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)}`),
593
624
  method: "DELETE",
594
625
  headers: _headers,
595
626
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -626,7 +657,7 @@ class Customers {
626
657
  rawResponse: _response.rawResponse,
627
658
  });
628
659
  case "timeout":
629
- throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}.");
660
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}.");
630
661
  case "unknown":
631
662
  throw new errors.PaidError({
632
663
  message: _response.error.errorMessage,
@@ -636,9 +667,9 @@ class Customers {
636
667
  });
637
668
  }
638
669
  /**
639
- * Get current customer credit balances grouped by currency
670
+ * Get the current customer state by Paid display ID
640
671
  *
641
- * @param {Paid.GetCustomerCreditBalancesRequest} request
672
+ * @param {Paid.GetCustomerStateByIdRequest} request
642
673
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
643
674
  *
644
675
  * @throws {@link Paid.ForbiddenError}
@@ -646,20 +677,20 @@ class Customers {
646
677
  * @throws {@link Paid.InternalServerError}
647
678
  *
648
679
  * @example
649
- * await client.customers.getCustomerCreditBalances({
650
- * id: "id"
680
+ * await client.customers.getCustomerStateById({
681
+ * id: "cus_abc123"
651
682
  * })
652
683
  */
653
- getCustomerCreditBalances(request, requestOptions) {
654
- return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalances(request, requestOptions));
684
+ getCustomerStateById(request, requestOptions) {
685
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerStateById(request, requestOptions));
655
686
  }
656
- __getCustomerCreditBalances(request, requestOptions) {
687
+ __getCustomerStateById(request, requestOptions) {
657
688
  return __awaiter(this, void 0, void 0, function* () {
658
689
  var _a, _b, _c, _d, _e, _f, _g, _h;
659
690
  const { id } = request;
660
691
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
661
692
  const _response = yield core.fetcher({
662
- 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`),
693
+ 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`),
663
694
  method: "GET",
664
695
  headers: _headers,
665
696
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -694,7 +725,7 @@ class Customers {
694
725
  rawResponse: _response.rawResponse,
695
726
  });
696
727
  case "timeout":
697
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/credits/balances.");
728
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/state.");
698
729
  case "unknown":
699
730
  throw new errors.PaidError({
700
731
  message: _response.error.errorMessage,
@@ -704,33 +735,41 @@ class Customers {
704
735
  });
705
736
  }
706
737
  /**
707
- * Get current customer credit balances grouped by currency, looked up by external ID
738
+ * List alternate external identifiers that resolve to a customer by external ID.
708
739
  *
709
- * @param {Paid.GetCustomerCreditBalancesByExternalIdRequest} request
740
+ * @param {Paid.ListCustomerAliasesByExternalIdRequest} request
710
741
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
711
742
  *
743
+ * @throws {@link Paid.BadRequestError}
712
744
  * @throws {@link Paid.ForbiddenError}
713
745
  * @throws {@link Paid.NotFoundError}
714
746
  * @throws {@link Paid.InternalServerError}
715
747
  *
716
748
  * @example
717
- * await client.customers.getCustomerCreditBalancesByExternalId({
718
- * externalId: "externalId"
749
+ * await client.customers.listCustomerAliasesByExternalId({
750
+ * externalId: "customer_123"
719
751
  * })
720
752
  */
721
- getCustomerCreditBalancesByExternalId(request, requestOptions) {
722
- return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalancesByExternalId(request, requestOptions));
753
+ listCustomerAliasesByExternalId(request, requestOptions) {
754
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerAliasesByExternalId(request, requestOptions));
723
755
  }
724
- __getCustomerCreditBalancesByExternalId(request, requestOptions) {
756
+ __listCustomerAliasesByExternalId(request, requestOptions) {
725
757
  return __awaiter(this, void 0, void 0, function* () {
726
758
  var _a, _b, _c, _d, _e, _f, _g, _h;
727
- const { externalId } = request;
759
+ const { externalId, limit, offset } = request;
760
+ const _queryParams = {};
761
+ if (limit != null) {
762
+ _queryParams.limit = limit.toString();
763
+ }
764
+ if (offset != null) {
765
+ _queryParams.offset = offset.toString();
766
+ }
728
767
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
729
768
  const _response = yield core.fetcher({
730
- 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`),
769
+ 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`),
731
770
  method: "GET",
732
771
  headers: _headers,
733
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
772
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
734
773
  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,
735
774
  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,
736
775
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -740,6 +779,8 @@ class Customers {
740
779
  }
741
780
  if (_response.error.reason === "status-code") {
742
781
  switch (_response.error.statusCode) {
782
+ case 400:
783
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
743
784
  case 403:
744
785
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
745
786
  case 404:
@@ -762,7 +803,7 @@ class Customers {
762
803
  rawResponse: _response.rawResponse,
763
804
  });
764
805
  case "timeout":
765
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/credits/balances.");
806
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/aliases.");
766
807
  case "unknown":
767
808
  throw new errors.PaidError({
768
809
  message: _response.error.errorMessage,
@@ -772,33 +813,36 @@ class Customers {
772
813
  });
773
814
  }
774
815
  /**
775
- * Create or update a customer user using customer and user external IDs
816
+ * Create an alternate external identifier for a customer by external ID.
776
817
  *
777
- * @param {Paid.UpsertCustomerUserRequest} request
818
+ * @param {Paid.CreateCustomerAliasByExternalIdRequest} request
778
819
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
779
820
  *
780
821
  * @throws {@link Paid.BadRequestError}
781
822
  * @throws {@link Paid.ForbiddenError}
782
823
  * @throws {@link Paid.NotFoundError}
824
+ * @throws {@link Paid.ConflictError}
783
825
  * @throws {@link Paid.InternalServerError}
784
826
  *
785
827
  * @example
786
- * await client.customers.upsertCustomerUserByExternalId({
787
- * customerExternalId: "customerExternalId",
788
- * userExternalId: "userExternalId"
828
+ * await client.customers.createCustomerAliasByExternalId({
829
+ * externalId: "customer_123",
830
+ * body: {
831
+ * alias: "child-customer-1"
832
+ * }
789
833
  * })
790
834
  */
791
- upsertCustomerUserByExternalId(request, requestOptions) {
792
- return core.HttpResponsePromise.fromPromise(this.__upsertCustomerUserByExternalId(request, requestOptions));
835
+ createCustomerAliasByExternalId(request, requestOptions) {
836
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerAliasByExternalId(request, requestOptions));
793
837
  }
794
- __upsertCustomerUserByExternalId(request, requestOptions) {
838
+ __createCustomerAliasByExternalId(request, requestOptions) {
795
839
  return __awaiter(this, void 0, void 0, function* () {
796
840
  var _a, _b, _c, _d, _e, _f, _g, _h;
797
- const { customerExternalId, userExternalId } = request, _body = __rest(request, ["customerExternalId", "userExternalId"]);
841
+ const { externalId, body: _body } = request;
798
842
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
799
843
  const _response = yield core.fetcher({
800
- 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)}`),
801
- method: "PUT",
844
+ 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`),
845
+ method: "POST",
802
846
  headers: _headers,
803
847
  contentType: "application/json",
804
848
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -819,6 +863,8 @@ class Customers {
819
863
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
820
864
  case 404:
821
865
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
866
+ case 409:
867
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
822
868
  case 500:
823
869
  throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
824
870
  default:
@@ -837,7 +883,2155 @@ class Customers {
837
883
  rawResponse: _response.rawResponse,
838
884
  });
839
885
  case "timeout":
840
- throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{customerExternalId}/users/{userExternalId}.");
886
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/external/{externalId}/aliases.");
887
+ case "unknown":
888
+ throw new errors.PaidError({
889
+ message: _response.error.errorMessage,
890
+ rawResponse: _response.rawResponse,
891
+ });
892
+ }
893
+ });
894
+ }
895
+ /**
896
+ * Remove an alternate external identifier from a customer by external ID.
897
+ *
898
+ * @param {Paid.DeleteCustomerAliasByExternalIdRequest} request
899
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
900
+ *
901
+ * @throws {@link Paid.ForbiddenError}
902
+ * @throws {@link Paid.NotFoundError}
903
+ * @throws {@link Paid.InternalServerError}
904
+ *
905
+ * @example
906
+ * await client.customers.deleteCustomerAliasByExternalId({
907
+ * externalId: "customer_123",
908
+ * alias: "child-customer-1"
909
+ * })
910
+ */
911
+ deleteCustomerAliasByExternalId(request, requestOptions) {
912
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerAliasByExternalId(request, requestOptions));
913
+ }
914
+ __deleteCustomerAliasByExternalId(request, requestOptions) {
915
+ return __awaiter(this, void 0, void 0, function* () {
916
+ var _a, _b, _c, _d, _e, _f, _g, _h;
917
+ const { externalId, alias } = request;
918
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
919
+ const _response = yield core.fetcher({
920
+ 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)}`),
921
+ method: "DELETE",
922
+ headers: _headers,
923
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
924
+ 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,
925
+ 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,
926
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
927
+ });
928
+ if (_response.ok) {
929
+ return { data: _response.body, rawResponse: _response.rawResponse };
930
+ }
931
+ if (_response.error.reason === "status-code") {
932
+ switch (_response.error.statusCode) {
933
+ case 403:
934
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
935
+ case 404:
936
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
937
+ case 500:
938
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
939
+ default:
940
+ throw new errors.PaidError({
941
+ statusCode: _response.error.statusCode,
942
+ body: _response.error.body,
943
+ rawResponse: _response.rawResponse,
944
+ });
945
+ }
946
+ }
947
+ switch (_response.error.reason) {
948
+ case "non-json":
949
+ throw new errors.PaidError({
950
+ statusCode: _response.error.statusCode,
951
+ body: _response.error.rawBody,
952
+ rawResponse: _response.rawResponse,
953
+ });
954
+ case "timeout":
955
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}/aliases/{alias}.");
956
+ case "unknown":
957
+ throw new errors.PaidError({
958
+ message: _response.error.errorMessage,
959
+ rawResponse: _response.rawResponse,
960
+ });
961
+ }
962
+ });
963
+ }
964
+ /**
965
+ * Get a customer by external ID
966
+ *
967
+ * @param {Paid.GetCustomerByExternalIdRequest} request
968
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
969
+ *
970
+ * @throws {@link Paid.ForbiddenError}
971
+ * @throws {@link Paid.NotFoundError}
972
+ * @throws {@link Paid.InternalServerError}
973
+ *
974
+ * @example
975
+ * await client.customers.getCustomerByExternalId({
976
+ * externalId: "customer_123"
977
+ * })
978
+ */
979
+ getCustomerByExternalId(request, requestOptions) {
980
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerByExternalId(request, requestOptions));
981
+ }
982
+ __getCustomerByExternalId(request, requestOptions) {
983
+ return __awaiter(this, void 0, void 0, function* () {
984
+ var _a, _b, _c, _d, _e, _f, _g, _h;
985
+ const { externalId } = request;
986
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
987
+ const _response = yield core.fetcher({
988
+ 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)}`),
989
+ method: "GET",
990
+ headers: _headers,
991
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
992
+ 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,
993
+ 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,
994
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
995
+ });
996
+ if (_response.ok) {
997
+ return { data: _response.body, rawResponse: _response.rawResponse };
998
+ }
999
+ if (_response.error.reason === "status-code") {
1000
+ switch (_response.error.statusCode) {
1001
+ case 403:
1002
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1003
+ case 404:
1004
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1005
+ case 500:
1006
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1007
+ default:
1008
+ throw new errors.PaidError({
1009
+ statusCode: _response.error.statusCode,
1010
+ body: _response.error.body,
1011
+ rawResponse: _response.rawResponse,
1012
+ });
1013
+ }
1014
+ }
1015
+ switch (_response.error.reason) {
1016
+ case "non-json":
1017
+ throw new errors.PaidError({
1018
+ statusCode: _response.error.statusCode,
1019
+ body: _response.error.rawBody,
1020
+ rawResponse: _response.rawResponse,
1021
+ });
1022
+ case "timeout":
1023
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}.");
1024
+ case "unknown":
1025
+ throw new errors.PaidError({
1026
+ message: _response.error.errorMessage,
1027
+ rawResponse: _response.rawResponse,
1028
+ });
1029
+ }
1030
+ });
1031
+ }
1032
+ /**
1033
+ * Update a customer by external ID
1034
+ *
1035
+ * @param {Paid.UpdateCustomerByExternalIdRequest} request
1036
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1037
+ *
1038
+ * @throws {@link Paid.BadRequestError}
1039
+ * @throws {@link Paid.ForbiddenError}
1040
+ * @throws {@link Paid.NotFoundError}
1041
+ * @throws {@link Paid.InternalServerError}
1042
+ *
1043
+ * @example
1044
+ * await client.customers.updateCustomerByExternalId({
1045
+ * externalId: "customer_123",
1046
+ * body: {}
1047
+ * })
1048
+ */
1049
+ updateCustomerByExternalId(request, requestOptions) {
1050
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerByExternalId(request, requestOptions));
1051
+ }
1052
+ __updateCustomerByExternalId(request, requestOptions) {
1053
+ return __awaiter(this, void 0, void 0, function* () {
1054
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1055
+ const { externalId, body: _body } = request;
1056
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1057
+ const _response = yield core.fetcher({
1058
+ 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)}`),
1059
+ method: "PUT",
1060
+ headers: _headers,
1061
+ contentType: "application/json",
1062
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1063
+ requestType: "json",
1064
+ body: _body,
1065
+ 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,
1066
+ 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,
1067
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1068
+ });
1069
+ if (_response.ok) {
1070
+ return { data: _response.body, rawResponse: _response.rawResponse };
1071
+ }
1072
+ if (_response.error.reason === "status-code") {
1073
+ switch (_response.error.statusCode) {
1074
+ case 400:
1075
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1076
+ case 403:
1077
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1078
+ case 404:
1079
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1080
+ case 500:
1081
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1082
+ default:
1083
+ throw new errors.PaidError({
1084
+ statusCode: _response.error.statusCode,
1085
+ body: _response.error.body,
1086
+ rawResponse: _response.rawResponse,
1087
+ });
1088
+ }
1089
+ }
1090
+ switch (_response.error.reason) {
1091
+ case "non-json":
1092
+ throw new errors.PaidError({
1093
+ statusCode: _response.error.statusCode,
1094
+ body: _response.error.rawBody,
1095
+ rawResponse: _response.rawResponse,
1096
+ });
1097
+ case "timeout":
1098
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/external/{externalId}.");
1099
+ case "unknown":
1100
+ throw new errors.PaidError({
1101
+ message: _response.error.errorMessage,
1102
+ rawResponse: _response.rawResponse,
1103
+ });
1104
+ }
1105
+ });
1106
+ }
1107
+ /**
1108
+ * Delete a customer by external ID
1109
+ *
1110
+ * @param {Paid.DeleteCustomerByExternalIdRequest} request
1111
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1112
+ *
1113
+ * @throws {@link Paid.BadRequestError}
1114
+ * @throws {@link Paid.ForbiddenError}
1115
+ * @throws {@link Paid.NotFoundError}
1116
+ * @throws {@link Paid.InternalServerError}
1117
+ *
1118
+ * @example
1119
+ * await client.customers.deleteCustomerByExternalId({
1120
+ * externalId: "customer_123"
1121
+ * })
1122
+ */
1123
+ deleteCustomerByExternalId(request, requestOptions) {
1124
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerByExternalId(request, requestOptions));
1125
+ }
1126
+ __deleteCustomerByExternalId(request, requestOptions) {
1127
+ return __awaiter(this, void 0, void 0, function* () {
1128
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1129
+ const { externalId } = request;
1130
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1131
+ const _response = yield core.fetcher({
1132
+ 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)}`),
1133
+ method: "DELETE",
1134
+ headers: _headers,
1135
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1136
+ 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,
1137
+ 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,
1138
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1139
+ });
1140
+ if (_response.ok) {
1141
+ return { data: _response.body, rawResponse: _response.rawResponse };
1142
+ }
1143
+ if (_response.error.reason === "status-code") {
1144
+ switch (_response.error.statusCode) {
1145
+ case 400:
1146
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1147
+ case 403:
1148
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1149
+ case 404:
1150
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1151
+ case 500:
1152
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1153
+ default:
1154
+ throw new errors.PaidError({
1155
+ statusCode: _response.error.statusCode,
1156
+ body: _response.error.body,
1157
+ rawResponse: _response.rawResponse,
1158
+ });
1159
+ }
1160
+ }
1161
+ switch (_response.error.reason) {
1162
+ case "non-json":
1163
+ throw new errors.PaidError({
1164
+ statusCode: _response.error.statusCode,
1165
+ body: _response.error.rawBody,
1166
+ rawResponse: _response.rawResponse,
1167
+ });
1168
+ case "timeout":
1169
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}.");
1170
+ case "unknown":
1171
+ throw new errors.PaidError({
1172
+ message: _response.error.errorMessage,
1173
+ rawResponse: _response.rawResponse,
1174
+ });
1175
+ }
1176
+ });
1177
+ }
1178
+ /**
1179
+ * 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`.
1180
+ *
1181
+ * @param {Paid.GetCustomerStateByExternalIdRequest} request
1182
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1183
+ *
1184
+ * @throws {@link Paid.ForbiddenError}
1185
+ * @throws {@link Paid.NotFoundError}
1186
+ * @throws {@link Paid.InternalServerError}
1187
+ *
1188
+ * @example
1189
+ * await client.customers.getCustomerStateByExternalId({
1190
+ * externalId: "customer_123"
1191
+ * })
1192
+ */
1193
+ getCustomerStateByExternalId(request, requestOptions) {
1194
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerStateByExternalId(request, requestOptions));
1195
+ }
1196
+ __getCustomerStateByExternalId(request, requestOptions) {
1197
+ return __awaiter(this, void 0, void 0, function* () {
1198
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1199
+ const { externalId } = request;
1200
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1201
+ const _response = yield core.fetcher({
1202
+ 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`),
1203
+ method: "GET",
1204
+ headers: _headers,
1205
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1206
+ 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,
1207
+ 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,
1208
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1209
+ });
1210
+ if (_response.ok) {
1211
+ return { data: _response.body, rawResponse: _response.rawResponse };
1212
+ }
1213
+ if (_response.error.reason === "status-code") {
1214
+ switch (_response.error.statusCode) {
1215
+ case 403:
1216
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1217
+ case 404:
1218
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1219
+ case 500:
1220
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1221
+ default:
1222
+ throw new errors.PaidError({
1223
+ statusCode: _response.error.statusCode,
1224
+ body: _response.error.body,
1225
+ rawResponse: _response.rawResponse,
1226
+ });
1227
+ }
1228
+ }
1229
+ switch (_response.error.reason) {
1230
+ case "non-json":
1231
+ throw new errors.PaidError({
1232
+ statusCode: _response.error.statusCode,
1233
+ body: _response.error.rawBody,
1234
+ rawResponse: _response.rawResponse,
1235
+ });
1236
+ case "timeout":
1237
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/state.");
1238
+ case "unknown":
1239
+ throw new errors.PaidError({
1240
+ message: _response.error.errorMessage,
1241
+ rawResponse: _response.rawResponse,
1242
+ });
1243
+ }
1244
+ });
1245
+ }
1246
+ /**
1247
+ * 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`.
1248
+ *
1249
+ * @param {Paid.GetCustomerCreditBalancesRequest} request
1250
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1251
+ *
1252
+ * @throws {@link Paid.ForbiddenError}
1253
+ * @throws {@link Paid.NotFoundError}
1254
+ * @throws {@link Paid.InternalServerError}
1255
+ *
1256
+ * @example
1257
+ * await client.customers.getCustomerCreditBalances({
1258
+ * id: "cus_abc123"
1259
+ * })
1260
+ */
1261
+ getCustomerCreditBalances(request, requestOptions) {
1262
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalances(request, requestOptions));
1263
+ }
1264
+ __getCustomerCreditBalances(request, requestOptions) {
1265
+ return __awaiter(this, void 0, void 0, function* () {
1266
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1267
+ const { id } = request;
1268
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1269
+ const _response = yield core.fetcher({
1270
+ 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`),
1271
+ method: "GET",
1272
+ headers: _headers,
1273
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1274
+ 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,
1275
+ 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,
1276
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1277
+ });
1278
+ if (_response.ok) {
1279
+ return { data: _response.body, rawResponse: _response.rawResponse };
1280
+ }
1281
+ if (_response.error.reason === "status-code") {
1282
+ switch (_response.error.statusCode) {
1283
+ case 403:
1284
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1285
+ case 404:
1286
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1287
+ case 500:
1288
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1289
+ default:
1290
+ throw new errors.PaidError({
1291
+ statusCode: _response.error.statusCode,
1292
+ body: _response.error.body,
1293
+ rawResponse: _response.rawResponse,
1294
+ });
1295
+ }
1296
+ }
1297
+ switch (_response.error.reason) {
1298
+ case "non-json":
1299
+ throw new errors.PaidError({
1300
+ statusCode: _response.error.statusCode,
1301
+ body: _response.error.rawBody,
1302
+ rawResponse: _response.rawResponse,
1303
+ });
1304
+ case "timeout":
1305
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/credits/balances.");
1306
+ case "unknown":
1307
+ throw new errors.PaidError({
1308
+ message: _response.error.errorMessage,
1309
+ rawResponse: _response.rawResponse,
1310
+ });
1311
+ }
1312
+ });
1313
+ }
1314
+ /**
1315
+ * Immediately grant credits to a customer using an active credit currency key.
1316
+ *
1317
+ * @param {Paid.GrantCustomerCreditsRequest} request
1318
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1319
+ *
1320
+ * @throws {@link Paid.BadRequestError}
1321
+ * @throws {@link Paid.ForbiddenError}
1322
+ * @throws {@link Paid.NotFoundError}
1323
+ * @throws {@link Paid.InternalServerError}
1324
+ *
1325
+ * @example
1326
+ * await client.customers.grantCustomerCredits({
1327
+ * id: "cus_abc123",
1328
+ * body: {
1329
+ * creditCurrencyKey: "api_credits",
1330
+ * amount: 10000,
1331
+ * startsAt: "2026-06-05T12:00:00Z",
1332
+ * expiresAt: "2026-12-31T23:59:59Z"
1333
+ * }
1334
+ * })
1335
+ */
1336
+ grantCustomerCredits(request, requestOptions) {
1337
+ return core.HttpResponsePromise.fromPromise(this.__grantCustomerCredits(request, requestOptions));
1338
+ }
1339
+ __grantCustomerCredits(request, requestOptions) {
1340
+ return __awaiter(this, void 0, void 0, function* () {
1341
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1342
+ const { id, body: _body } = request;
1343
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1344
+ const _response = yield core.fetcher({
1345
+ 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`),
1346
+ method: "POST",
1347
+ headers: _headers,
1348
+ contentType: "application/json",
1349
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1350
+ requestType: "json",
1351
+ body: _body,
1352
+ 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,
1353
+ 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,
1354
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1355
+ });
1356
+ if (_response.ok) {
1357
+ return { data: _response.body, rawResponse: _response.rawResponse };
1358
+ }
1359
+ if (_response.error.reason === "status-code") {
1360
+ switch (_response.error.statusCode) {
1361
+ case 400:
1362
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1363
+ case 403:
1364
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1365
+ case 404:
1366
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1367
+ case 500:
1368
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1369
+ default:
1370
+ throw new errors.PaidError({
1371
+ statusCode: _response.error.statusCode,
1372
+ body: _response.error.body,
1373
+ rawResponse: _response.rawResponse,
1374
+ });
1375
+ }
1376
+ }
1377
+ switch (_response.error.reason) {
1378
+ case "non-json":
1379
+ throw new errors.PaidError({
1380
+ statusCode: _response.error.statusCode,
1381
+ body: _response.error.rawBody,
1382
+ rawResponse: _response.rawResponse,
1383
+ });
1384
+ case "timeout":
1385
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/{id}/credits/grants.");
1386
+ case "unknown":
1387
+ throw new errors.PaidError({
1388
+ message: _response.error.errorMessage,
1389
+ rawResponse: _response.rawResponse,
1390
+ });
1391
+ }
1392
+ });
1393
+ }
1394
+ /**
1395
+ * Get current customer credit balances grouped by currency, looked up by external ID
1396
+ *
1397
+ * @param {Paid.GetCustomerCreditBalancesByExternalIdRequest} request
1398
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1399
+ *
1400
+ * @throws {@link Paid.ForbiddenError}
1401
+ * @throws {@link Paid.NotFoundError}
1402
+ * @throws {@link Paid.InternalServerError}
1403
+ *
1404
+ * @example
1405
+ * await client.customers.getCustomerCreditBalancesByExternalId({
1406
+ * externalId: "customer_123"
1407
+ * })
1408
+ */
1409
+ getCustomerCreditBalancesByExternalId(request, requestOptions) {
1410
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerCreditBalancesByExternalId(request, requestOptions));
1411
+ }
1412
+ __getCustomerCreditBalancesByExternalId(request, requestOptions) {
1413
+ return __awaiter(this, void 0, void 0, function* () {
1414
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1415
+ const { externalId } = request;
1416
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1417
+ const _response = yield core.fetcher({
1418
+ 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`),
1419
+ method: "GET",
1420
+ headers: _headers,
1421
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1422
+ 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,
1423
+ 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,
1424
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1425
+ });
1426
+ if (_response.ok) {
1427
+ return { data: _response.body, rawResponse: _response.rawResponse };
1428
+ }
1429
+ if (_response.error.reason === "status-code") {
1430
+ switch (_response.error.statusCode) {
1431
+ case 403:
1432
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1433
+ case 404:
1434
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1435
+ case 500:
1436
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1437
+ default:
1438
+ throw new errors.PaidError({
1439
+ statusCode: _response.error.statusCode,
1440
+ body: _response.error.body,
1441
+ rawResponse: _response.rawResponse,
1442
+ });
1443
+ }
1444
+ }
1445
+ switch (_response.error.reason) {
1446
+ case "non-json":
1447
+ throw new errors.PaidError({
1448
+ statusCode: _response.error.statusCode,
1449
+ body: _response.error.rawBody,
1450
+ rawResponse: _response.rawResponse,
1451
+ });
1452
+ case "timeout":
1453
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/credits/balances.");
1454
+ case "unknown":
1455
+ throw new errors.PaidError({
1456
+ message: _response.error.errorMessage,
1457
+ rawResponse: _response.rawResponse,
1458
+ });
1459
+ }
1460
+ });
1461
+ }
1462
+ /**
1463
+ * 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`.
1464
+ *
1465
+ * @param {Paid.ListCustomerPendingCreditConsumptionRequest} request
1466
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1467
+ *
1468
+ * @throws {@link Paid.BadRequestError}
1469
+ * @throws {@link Paid.ForbiddenError}
1470
+ * @throws {@link Paid.NotFoundError}
1471
+ * @throws {@link Paid.InternalServerError}
1472
+ *
1473
+ * @example
1474
+ * await client.customers.listCustomerPendingCreditConsumption({
1475
+ * id: "cus_abc123"
1476
+ * })
1477
+ */
1478
+ listCustomerPendingCreditConsumption(request, requestOptions) {
1479
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerPendingCreditConsumption(request, requestOptions));
1480
+ }
1481
+ __listCustomerPendingCreditConsumption(request, requestOptions) {
1482
+ return __awaiter(this, void 0, void 0, function* () {
1483
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1484
+ const { id, limit, offset } = request;
1485
+ const _queryParams = {};
1486
+ if (limit != null) {
1487
+ _queryParams.limit = limit.toString();
1488
+ }
1489
+ if (offset != null) {
1490
+ _queryParams.offset = offset.toString();
1491
+ }
1492
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1493
+ const _response = yield core.fetcher({
1494
+ 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`),
1495
+ method: "GET",
1496
+ headers: _headers,
1497
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1498
+ 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,
1499
+ 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,
1500
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1501
+ });
1502
+ if (_response.ok) {
1503
+ return {
1504
+ data: _response.body,
1505
+ rawResponse: _response.rawResponse,
1506
+ };
1507
+ }
1508
+ if (_response.error.reason === "status-code") {
1509
+ switch (_response.error.statusCode) {
1510
+ case 400:
1511
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1512
+ case 403:
1513
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1514
+ case 404:
1515
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1516
+ case 500:
1517
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1518
+ default:
1519
+ throw new errors.PaidError({
1520
+ statusCode: _response.error.statusCode,
1521
+ body: _response.error.body,
1522
+ rawResponse: _response.rawResponse,
1523
+ });
1524
+ }
1525
+ }
1526
+ switch (_response.error.reason) {
1527
+ case "non-json":
1528
+ throw new errors.PaidError({
1529
+ statusCode: _response.error.statusCode,
1530
+ body: _response.error.rawBody,
1531
+ rawResponse: _response.rawResponse,
1532
+ });
1533
+ case "timeout":
1534
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/credits/pending-consumption.");
1535
+ case "unknown":
1536
+ throw new errors.PaidError({
1537
+ message: _response.error.errorMessage,
1538
+ rawResponse: _response.rawResponse,
1539
+ });
1540
+ }
1541
+ });
1542
+ }
1543
+ /**
1544
+ * List credit consumption recorded before a matching credit pool existed, for a customer looked up by external ID.
1545
+ *
1546
+ * @param {Paid.ListCustomerPendingCreditConsumptionByExternalIdRequest} request
1547
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1548
+ *
1549
+ * @throws {@link Paid.BadRequestError}
1550
+ * @throws {@link Paid.ForbiddenError}
1551
+ * @throws {@link Paid.NotFoundError}
1552
+ * @throws {@link Paid.InternalServerError}
1553
+ *
1554
+ * @example
1555
+ * await client.customers.listCustomerPendingCreditConsumptionByExternalId({
1556
+ * externalId: "customer_123"
1557
+ * })
1558
+ */
1559
+ listCustomerPendingCreditConsumptionByExternalId(request, requestOptions) {
1560
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerPendingCreditConsumptionByExternalId(request, requestOptions));
1561
+ }
1562
+ __listCustomerPendingCreditConsumptionByExternalId(request, requestOptions) {
1563
+ return __awaiter(this, void 0, void 0, function* () {
1564
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1565
+ const { externalId, limit, offset } = request;
1566
+ const _queryParams = {};
1567
+ if (limit != null) {
1568
+ _queryParams.limit = limit.toString();
1569
+ }
1570
+ if (offset != null) {
1571
+ _queryParams.offset = offset.toString();
1572
+ }
1573
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1574
+ const _response = yield core.fetcher({
1575
+ 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`),
1576
+ method: "GET",
1577
+ headers: _headers,
1578
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1579
+ 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,
1580
+ 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,
1581
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1582
+ });
1583
+ if (_response.ok) {
1584
+ return {
1585
+ data: _response.body,
1586
+ rawResponse: _response.rawResponse,
1587
+ };
1588
+ }
1589
+ if (_response.error.reason === "status-code") {
1590
+ switch (_response.error.statusCode) {
1591
+ case 400:
1592
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1593
+ case 403:
1594
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1595
+ case 404:
1596
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1597
+ case 500:
1598
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1599
+ default:
1600
+ throw new errors.PaidError({
1601
+ statusCode: _response.error.statusCode,
1602
+ body: _response.error.body,
1603
+ rawResponse: _response.rawResponse,
1604
+ });
1605
+ }
1606
+ }
1607
+ switch (_response.error.reason) {
1608
+ case "non-json":
1609
+ throw new errors.PaidError({
1610
+ statusCode: _response.error.statusCode,
1611
+ body: _response.error.rawBody,
1612
+ rawResponse: _response.rawResponse,
1613
+ });
1614
+ case "timeout":
1615
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/credits/pending-consumption.");
1616
+ case "unknown":
1617
+ throw new errors.PaidError({
1618
+ message: _response.error.errorMessage,
1619
+ rawResponse: _response.rawResponse,
1620
+ });
1621
+ }
1622
+ });
1623
+ }
1624
+ /**
1625
+ * Immediately grant credits to a customer looked up by external ID using an active credit currency key.
1626
+ *
1627
+ * @param {Paid.GrantCustomerCreditsByExternalIdRequest} request
1628
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1629
+ *
1630
+ * @throws {@link Paid.BadRequestError}
1631
+ * @throws {@link Paid.ForbiddenError}
1632
+ * @throws {@link Paid.NotFoundError}
1633
+ * @throws {@link Paid.InternalServerError}
1634
+ *
1635
+ * @example
1636
+ * await client.customers.grantCustomerCreditsByExternalId({
1637
+ * externalId: "customer_123",
1638
+ * body: {
1639
+ * creditCurrencyKey: "api_credits",
1640
+ * amount: 10000,
1641
+ * startsAt: "2026-06-05T12:00:00Z",
1642
+ * expiresAt: "2026-12-31T23:59:59Z"
1643
+ * }
1644
+ * })
1645
+ */
1646
+ grantCustomerCreditsByExternalId(request, requestOptions) {
1647
+ return core.HttpResponsePromise.fromPromise(this.__grantCustomerCreditsByExternalId(request, requestOptions));
1648
+ }
1649
+ __grantCustomerCreditsByExternalId(request, requestOptions) {
1650
+ return __awaiter(this, void 0, void 0, function* () {
1651
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1652
+ const { externalId, body: _body } = request;
1653
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1654
+ const _response = yield core.fetcher({
1655
+ 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`),
1656
+ method: "POST",
1657
+ headers: _headers,
1658
+ contentType: "application/json",
1659
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1660
+ requestType: "json",
1661
+ body: _body,
1662
+ 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,
1663
+ 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,
1664
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1665
+ });
1666
+ if (_response.ok) {
1667
+ return { data: _response.body, rawResponse: _response.rawResponse };
1668
+ }
1669
+ if (_response.error.reason === "status-code") {
1670
+ switch (_response.error.statusCode) {
1671
+ case 400:
1672
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1673
+ case 403:
1674
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1675
+ case 404:
1676
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1677
+ case 500:
1678
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1679
+ default:
1680
+ throw new errors.PaidError({
1681
+ statusCode: _response.error.statusCode,
1682
+ body: _response.error.body,
1683
+ rawResponse: _response.rawResponse,
1684
+ });
1685
+ }
1686
+ }
1687
+ switch (_response.error.reason) {
1688
+ case "non-json":
1689
+ throw new errors.PaidError({
1690
+ statusCode: _response.error.statusCode,
1691
+ body: _response.error.rawBody,
1692
+ rawResponse: _response.rawResponse,
1693
+ });
1694
+ case "timeout":
1695
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/external/{externalId}/credits/grants.");
1696
+ case "unknown":
1697
+ throw new errors.PaidError({
1698
+ message: _response.error.errorMessage,
1699
+ rawResponse: _response.rawResponse,
1700
+ });
1701
+ }
1702
+ });
1703
+ }
1704
+ /**
1705
+ * Create or update a customer user using customer and user external IDs
1706
+ *
1707
+ * @param {Paid.UpsertCustomerUserRequest} request
1708
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1709
+ *
1710
+ * @throws {@link Paid.BadRequestError}
1711
+ * @throws {@link Paid.ForbiddenError}
1712
+ * @throws {@link Paid.NotFoundError}
1713
+ * @throws {@link Paid.InternalServerError}
1714
+ *
1715
+ * @example
1716
+ * await client.customers.upsertCustomerUserByExternalId({
1717
+ * customerExternalId: "customerExternalId",
1718
+ * userExternalId: "userExternalId"
1719
+ * })
1720
+ */
1721
+ upsertCustomerUserByExternalId(request, requestOptions) {
1722
+ return core.HttpResponsePromise.fromPromise(this.__upsertCustomerUserByExternalId(request, requestOptions));
1723
+ }
1724
+ __upsertCustomerUserByExternalId(request, requestOptions) {
1725
+ return __awaiter(this, void 0, void 0, function* () {
1726
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1727
+ const { customerExternalId, userExternalId } = request, _body = __rest(request, ["customerExternalId", "userExternalId"]);
1728
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1729
+ const _response = yield core.fetcher({
1730
+ 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)}`),
1731
+ method: "PUT",
1732
+ headers: _headers,
1733
+ contentType: "application/json",
1734
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1735
+ requestType: "json",
1736
+ body: _body,
1737
+ 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,
1738
+ 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,
1739
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1740
+ });
1741
+ if (_response.ok) {
1742
+ return { data: _response.body, rawResponse: _response.rawResponse };
1743
+ }
1744
+ if (_response.error.reason === "status-code") {
1745
+ switch (_response.error.statusCode) {
1746
+ case 400:
1747
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1748
+ case 403:
1749
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1750
+ case 404:
1751
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1752
+ case 500:
1753
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1754
+ default:
1755
+ throw new errors.PaidError({
1756
+ statusCode: _response.error.statusCode,
1757
+ body: _response.error.body,
1758
+ rawResponse: _response.rawResponse,
1759
+ });
1760
+ }
1761
+ }
1762
+ switch (_response.error.reason) {
1763
+ case "non-json":
1764
+ throw new errors.PaidError({
1765
+ statusCode: _response.error.statusCode,
1766
+ body: _response.error.rawBody,
1767
+ rawResponse: _response.rawResponse,
1768
+ });
1769
+ case "timeout":
1770
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{customerExternalId}/users/{userExternalId}.");
1771
+ case "unknown":
1772
+ throw new errors.PaidError({
1773
+ message: _response.error.errorMessage,
1774
+ rawResponse: _response.rawResponse,
1775
+ });
1776
+ }
1777
+ });
1778
+ }
1779
+ /**
1780
+ * 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.
1781
+ *
1782
+ * @param {Paid.ListCustomerUnitsByExternalIdRequest} request
1783
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1784
+ *
1785
+ * @throws {@link Paid.BadRequestError}
1786
+ * @throws {@link Paid.ForbiddenError}
1787
+ * @throws {@link Paid.NotFoundError}
1788
+ * @throws {@link Paid.InternalServerError}
1789
+ *
1790
+ * @example
1791
+ * await client.customers.listCustomerUnitsByExternalId({
1792
+ * externalId: "customer_123",
1793
+ * parentExternalId: "dept-rnd"
1794
+ * })
1795
+ */
1796
+ listCustomerUnitsByExternalId(request, requestOptions) {
1797
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerUnitsByExternalId(request, requestOptions));
1798
+ }
1799
+ __listCustomerUnitsByExternalId(request, requestOptions) {
1800
+ return __awaiter(this, void 0, void 0, function* () {
1801
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1802
+ const { externalId, limit, offset, status, externalType, parentExternalId } = request;
1803
+ const _queryParams = {};
1804
+ if (limit != null) {
1805
+ _queryParams.limit = limit.toString();
1806
+ }
1807
+ if (offset != null) {
1808
+ _queryParams.offset = offset.toString();
1809
+ }
1810
+ if (status != null) {
1811
+ _queryParams.status = status;
1812
+ }
1813
+ if (externalType != null) {
1814
+ _queryParams.externalType = externalType;
1815
+ }
1816
+ if (parentExternalId != null) {
1817
+ _queryParams.parentExternalId = parentExternalId;
1818
+ }
1819
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1820
+ const _response = yield core.fetcher({
1821
+ 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`),
1822
+ method: "GET",
1823
+ headers: _headers,
1824
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1825
+ 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,
1826
+ 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,
1827
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1828
+ });
1829
+ if (_response.ok) {
1830
+ return { data: _response.body, rawResponse: _response.rawResponse };
1831
+ }
1832
+ if (_response.error.reason === "status-code") {
1833
+ switch (_response.error.statusCode) {
1834
+ case 400:
1835
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1836
+ case 403:
1837
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1838
+ case 404:
1839
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1840
+ case 500:
1841
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1842
+ default:
1843
+ throw new errors.PaidError({
1844
+ statusCode: _response.error.statusCode,
1845
+ body: _response.error.body,
1846
+ rawResponse: _response.rawResponse,
1847
+ });
1848
+ }
1849
+ }
1850
+ switch (_response.error.reason) {
1851
+ case "non-json":
1852
+ throw new errors.PaidError({
1853
+ statusCode: _response.error.statusCode,
1854
+ body: _response.error.rawBody,
1855
+ rawResponse: _response.rawResponse,
1856
+ });
1857
+ case "timeout":
1858
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/customer-units.");
1859
+ case "unknown":
1860
+ throw new errors.PaidError({
1861
+ message: _response.error.errorMessage,
1862
+ rawResponse: _response.rawResponse,
1863
+ });
1864
+ }
1865
+ });
1866
+ }
1867
+ /**
1868
+ * 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.
1869
+ *
1870
+ * @param {Paid.CreateCustomerUnitByExternalIdRequest} request
1871
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1872
+ *
1873
+ * @throws {@link Paid.BadRequestError}
1874
+ * @throws {@link Paid.ForbiddenError}
1875
+ * @throws {@link Paid.NotFoundError}
1876
+ * @throws {@link Paid.ConflictError}
1877
+ * @throws {@link Paid.InternalServerError}
1878
+ *
1879
+ * @example
1880
+ * await client.customers.createCustomerUnitByExternalId({
1881
+ * externalId: "customer_123",
1882
+ * body: {
1883
+ * externalId: "team-research"
1884
+ * }
1885
+ * })
1886
+ */
1887
+ createCustomerUnitByExternalId(request, requestOptions) {
1888
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerUnitByExternalId(request, requestOptions));
1889
+ }
1890
+ __createCustomerUnitByExternalId(request, requestOptions) {
1891
+ return __awaiter(this, void 0, void 0, function* () {
1892
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1893
+ const { externalId, body: _body } = request;
1894
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1895
+ const _response = yield core.fetcher({
1896
+ 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`),
1897
+ method: "POST",
1898
+ headers: _headers,
1899
+ contentType: "application/json",
1900
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1901
+ requestType: "json",
1902
+ body: _body,
1903
+ 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,
1904
+ 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,
1905
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1906
+ });
1907
+ if (_response.ok) {
1908
+ return { data: _response.body, rawResponse: _response.rawResponse };
1909
+ }
1910
+ if (_response.error.reason === "status-code") {
1911
+ switch (_response.error.statusCode) {
1912
+ case 400:
1913
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1914
+ case 403:
1915
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1916
+ case 404:
1917
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1918
+ case 409:
1919
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
1920
+ case 500:
1921
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1922
+ default:
1923
+ throw new errors.PaidError({
1924
+ statusCode: _response.error.statusCode,
1925
+ body: _response.error.body,
1926
+ rawResponse: _response.rawResponse,
1927
+ });
1928
+ }
1929
+ }
1930
+ switch (_response.error.reason) {
1931
+ case "non-json":
1932
+ throw new errors.PaidError({
1933
+ statusCode: _response.error.statusCode,
1934
+ body: _response.error.rawBody,
1935
+ rawResponse: _response.rawResponse,
1936
+ });
1937
+ case "timeout":
1938
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/external/{externalId}/customer-units.");
1939
+ case "unknown":
1940
+ throw new errors.PaidError({
1941
+ message: _response.error.errorMessage,
1942
+ rawResponse: _response.rawResponse,
1943
+ });
1944
+ }
1945
+ });
1946
+ }
1947
+ /**
1948
+ * 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.
1949
+ *
1950
+ * @param {Paid.GetCustomerUnitByExternalIdRequest} request
1951
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
1952
+ *
1953
+ * @throws {@link Paid.BadRequestError}
1954
+ * @throws {@link Paid.ForbiddenError}
1955
+ * @throws {@link Paid.NotFoundError}
1956
+ * @throws {@link Paid.InternalServerError}
1957
+ *
1958
+ * @example
1959
+ * await client.customers.getCustomerUnitByExternalId({
1960
+ * externalId: "customer_123",
1961
+ * externalCustomerUnitId: "team-research"
1962
+ * })
1963
+ */
1964
+ getCustomerUnitByExternalId(request, requestOptions) {
1965
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnitByExternalId(request, requestOptions));
1966
+ }
1967
+ __getCustomerUnitByExternalId(request, requestOptions) {
1968
+ return __awaiter(this, void 0, void 0, function* () {
1969
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1970
+ const { externalId, externalCustomerUnitId } = request;
1971
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1972
+ const _response = yield core.fetcher({
1973
+ 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)}`),
1974
+ method: "GET",
1975
+ headers: _headers,
1976
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1977
+ 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,
1978
+ 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,
1979
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1980
+ });
1981
+ if (_response.ok) {
1982
+ return { data: _response.body, rawResponse: _response.rawResponse };
1983
+ }
1984
+ if (_response.error.reason === "status-code") {
1985
+ switch (_response.error.statusCode) {
1986
+ case 400:
1987
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
1988
+ case 403:
1989
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
1990
+ case 404:
1991
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
1992
+ case 500:
1993
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
1994
+ default:
1995
+ throw new errors.PaidError({
1996
+ statusCode: _response.error.statusCode,
1997
+ body: _response.error.body,
1998
+ rawResponse: _response.rawResponse,
1999
+ });
2000
+ }
2001
+ }
2002
+ switch (_response.error.reason) {
2003
+ case "non-json":
2004
+ throw new errors.PaidError({
2005
+ statusCode: _response.error.statusCode,
2006
+ body: _response.error.rawBody,
2007
+ rawResponse: _response.rawResponse,
2008
+ });
2009
+ case "timeout":
2010
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/customer-units/{externalCustomerUnitId}.");
2011
+ case "unknown":
2012
+ throw new errors.PaidError({
2013
+ message: _response.error.errorMessage,
2014
+ rawResponse: _response.rawResponse,
2015
+ });
2016
+ }
2017
+ });
2018
+ }
2019
+ /**
2020
+ * 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.
2021
+ *
2022
+ * @param {Paid.DeleteCustomerUnitByExternalIdRequest} request
2023
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2024
+ *
2025
+ * @throws {@link Paid.BadRequestError}
2026
+ * @throws {@link Paid.ForbiddenError}
2027
+ * @throws {@link Paid.NotFoundError}
2028
+ * @throws {@link Paid.ConflictError}
2029
+ * @throws {@link Paid.InternalServerError}
2030
+ *
2031
+ * @example
2032
+ * await client.customers.deleteCustomerUnitByExternalId({
2033
+ * externalId: "customer_123",
2034
+ * externalCustomerUnitId: "team-research"
2035
+ * })
2036
+ */
2037
+ deleteCustomerUnitByExternalId(request, requestOptions) {
2038
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerUnitByExternalId(request, requestOptions));
2039
+ }
2040
+ __deleteCustomerUnitByExternalId(request, requestOptions) {
2041
+ return __awaiter(this, void 0, void 0, function* () {
2042
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2043
+ const { externalId, externalCustomerUnitId } = request;
2044
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2045
+ const _response = yield core.fetcher({
2046
+ 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)}`),
2047
+ method: "DELETE",
2048
+ headers: _headers,
2049
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2050
+ 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,
2051
+ 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,
2052
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2053
+ });
2054
+ if (_response.ok) {
2055
+ return { data: _response.body, rawResponse: _response.rawResponse };
2056
+ }
2057
+ if (_response.error.reason === "status-code") {
2058
+ switch (_response.error.statusCode) {
2059
+ case 400:
2060
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2061
+ case 403:
2062
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2063
+ case 404:
2064
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2065
+ case 409:
2066
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2067
+ case 500:
2068
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2069
+ default:
2070
+ throw new errors.PaidError({
2071
+ statusCode: _response.error.statusCode,
2072
+ body: _response.error.body,
2073
+ rawResponse: _response.rawResponse,
2074
+ });
2075
+ }
2076
+ }
2077
+ switch (_response.error.reason) {
2078
+ case "non-json":
2079
+ throw new errors.PaidError({
2080
+ statusCode: _response.error.statusCode,
2081
+ body: _response.error.rawBody,
2082
+ rawResponse: _response.rawResponse,
2083
+ });
2084
+ case "timeout":
2085
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}/customer-units/{externalCustomerUnitId}.");
2086
+ case "unknown":
2087
+ throw new errors.PaidError({
2088
+ message: _response.error.errorMessage,
2089
+ rawResponse: _response.rawResponse,
2090
+ });
2091
+ }
2092
+ });
2093
+ }
2094
+ /**
2095
+ * 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.
2096
+ *
2097
+ * @param {Paid.UpdateCustomerUnitByExternalIdRequest} request
2098
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2099
+ *
2100
+ * @throws {@link Paid.BadRequestError}
2101
+ * @throws {@link Paid.ForbiddenError}
2102
+ * @throws {@link Paid.NotFoundError}
2103
+ * @throws {@link Paid.ConflictError}
2104
+ * @throws {@link Paid.InternalServerError}
2105
+ *
2106
+ * @example
2107
+ * await client.customers.updateCustomerUnitByExternalId({
2108
+ * externalId: "customer_123",
2109
+ * externalCustomerUnitId: "team-research",
2110
+ * body: {}
2111
+ * })
2112
+ */
2113
+ updateCustomerUnitByExternalId(request, requestOptions) {
2114
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerUnitByExternalId(request, requestOptions));
2115
+ }
2116
+ __updateCustomerUnitByExternalId(request, requestOptions) {
2117
+ return __awaiter(this, void 0, void 0, function* () {
2118
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2119
+ const { externalId, externalCustomerUnitId, body: _body } = request;
2120
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2121
+ const _response = yield core.fetcher({
2122
+ 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)}`),
2123
+ method: "PATCH",
2124
+ headers: _headers,
2125
+ contentType: "application/json",
2126
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2127
+ requestType: "json",
2128
+ body: _body,
2129
+ 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,
2130
+ 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,
2131
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2132
+ });
2133
+ if (_response.ok) {
2134
+ return { data: _response.body, rawResponse: _response.rawResponse };
2135
+ }
2136
+ if (_response.error.reason === "status-code") {
2137
+ switch (_response.error.statusCode) {
2138
+ case 400:
2139
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2140
+ case 403:
2141
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2142
+ case 404:
2143
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2144
+ case 409:
2145
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2146
+ case 500:
2147
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2148
+ default:
2149
+ throw new errors.PaidError({
2150
+ statusCode: _response.error.statusCode,
2151
+ body: _response.error.body,
2152
+ rawResponse: _response.rawResponse,
2153
+ });
2154
+ }
2155
+ }
2156
+ switch (_response.error.reason) {
2157
+ case "non-json":
2158
+ throw new errors.PaidError({
2159
+ statusCode: _response.error.statusCode,
2160
+ body: _response.error.rawBody,
2161
+ rawResponse: _response.rawResponse,
2162
+ });
2163
+ case "timeout":
2164
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PATCH /customers/external/{externalId}/customer-units/{externalCustomerUnitId}.");
2165
+ case "unknown":
2166
+ throw new errors.PaidError({
2167
+ message: _response.error.errorMessage,
2168
+ rawResponse: _response.rawResponse,
2169
+ });
2170
+ }
2171
+ });
2172
+ }
2173
+ /**
2174
+ * 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.
2175
+ *
2176
+ * @param {Paid.ListCustomerUnitsRequest} request
2177
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2178
+ *
2179
+ * @throws {@link Paid.BadRequestError}
2180
+ * @throws {@link Paid.ForbiddenError}
2181
+ * @throws {@link Paid.NotFoundError}
2182
+ * @throws {@link Paid.InternalServerError}
2183
+ *
2184
+ * @example
2185
+ * await client.customers.listCustomerUnits({
2186
+ * id: "cus_abc123",
2187
+ * parentExternalId: "dept-rnd"
2188
+ * })
2189
+ */
2190
+ listCustomerUnits(request, requestOptions) {
2191
+ return core.HttpResponsePromise.fromPromise(this.__listCustomerUnits(request, requestOptions));
2192
+ }
2193
+ __listCustomerUnits(request, requestOptions) {
2194
+ return __awaiter(this, void 0, void 0, function* () {
2195
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2196
+ const { id, limit, offset, status, externalType, parentExternalId } = request;
2197
+ const _queryParams = {};
2198
+ if (limit != null) {
2199
+ _queryParams.limit = limit.toString();
2200
+ }
2201
+ if (offset != null) {
2202
+ _queryParams.offset = offset.toString();
2203
+ }
2204
+ if (status != null) {
2205
+ _queryParams.status = status;
2206
+ }
2207
+ if (externalType != null) {
2208
+ _queryParams.externalType = externalType;
2209
+ }
2210
+ if (parentExternalId != null) {
2211
+ _queryParams.parentExternalId = parentExternalId;
2212
+ }
2213
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2214
+ const _response = yield core.fetcher({
2215
+ 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`),
2216
+ method: "GET",
2217
+ headers: _headers,
2218
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2219
+ 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,
2220
+ 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,
2221
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2222
+ });
2223
+ if (_response.ok) {
2224
+ return { data: _response.body, rawResponse: _response.rawResponse };
2225
+ }
2226
+ if (_response.error.reason === "status-code") {
2227
+ switch (_response.error.statusCode) {
2228
+ case 400:
2229
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2230
+ case 403:
2231
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2232
+ case 404:
2233
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2234
+ case 500:
2235
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2236
+ default:
2237
+ throw new errors.PaidError({
2238
+ statusCode: _response.error.statusCode,
2239
+ body: _response.error.body,
2240
+ rawResponse: _response.rawResponse,
2241
+ });
2242
+ }
2243
+ }
2244
+ switch (_response.error.reason) {
2245
+ case "non-json":
2246
+ throw new errors.PaidError({
2247
+ statusCode: _response.error.statusCode,
2248
+ body: _response.error.rawBody,
2249
+ rawResponse: _response.rawResponse,
2250
+ });
2251
+ case "timeout":
2252
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/customer-units.");
2253
+ case "unknown":
2254
+ throw new errors.PaidError({
2255
+ message: _response.error.errorMessage,
2256
+ rawResponse: _response.rawResponse,
2257
+ });
2258
+ }
2259
+ });
2260
+ }
2261
+ /**
2262
+ * 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.
2263
+ *
2264
+ * @param {Paid.CreateCustomerUnitRequest} request
2265
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2266
+ *
2267
+ * @throws {@link Paid.BadRequestError}
2268
+ * @throws {@link Paid.ForbiddenError}
2269
+ * @throws {@link Paid.NotFoundError}
2270
+ * @throws {@link Paid.ConflictError}
2271
+ * @throws {@link Paid.InternalServerError}
2272
+ *
2273
+ * @example
2274
+ * await client.customers.createCustomerUnit({
2275
+ * id: "cus_abc123",
2276
+ * body: {
2277
+ * externalId: "team-research"
2278
+ * }
2279
+ * })
2280
+ */
2281
+ createCustomerUnit(request, requestOptions) {
2282
+ return core.HttpResponsePromise.fromPromise(this.__createCustomerUnit(request, requestOptions));
2283
+ }
2284
+ __createCustomerUnit(request, requestOptions) {
2285
+ return __awaiter(this, void 0, void 0, function* () {
2286
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2287
+ const { id, body: _body } = request;
2288
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2289
+ const _response = yield core.fetcher({
2290
+ 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`),
2291
+ method: "POST",
2292
+ headers: _headers,
2293
+ contentType: "application/json",
2294
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2295
+ requestType: "json",
2296
+ body: _body,
2297
+ 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,
2298
+ 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,
2299
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2300
+ });
2301
+ if (_response.ok) {
2302
+ return { data: _response.body, rawResponse: _response.rawResponse };
2303
+ }
2304
+ if (_response.error.reason === "status-code") {
2305
+ switch (_response.error.statusCode) {
2306
+ case 400:
2307
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2308
+ case 403:
2309
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2310
+ case 404:
2311
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2312
+ case 409:
2313
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2314
+ case 500:
2315
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2316
+ default:
2317
+ throw new errors.PaidError({
2318
+ statusCode: _response.error.statusCode,
2319
+ body: _response.error.body,
2320
+ rawResponse: _response.rawResponse,
2321
+ });
2322
+ }
2323
+ }
2324
+ switch (_response.error.reason) {
2325
+ case "non-json":
2326
+ throw new errors.PaidError({
2327
+ statusCode: _response.error.statusCode,
2328
+ body: _response.error.rawBody,
2329
+ rawResponse: _response.rawResponse,
2330
+ });
2331
+ case "timeout":
2332
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /customers/{id}/customer-units.");
2333
+ case "unknown":
2334
+ throw new errors.PaidError({
2335
+ message: _response.error.errorMessage,
2336
+ rawResponse: _response.rawResponse,
2337
+ });
2338
+ }
2339
+ });
2340
+ }
2341
+ /**
2342
+ * 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.
2343
+ *
2344
+ * @param {Paid.GetCustomerUnitRequest} request
2345
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2346
+ *
2347
+ * @throws {@link Paid.BadRequestError}
2348
+ * @throws {@link Paid.ForbiddenError}
2349
+ * @throws {@link Paid.NotFoundError}
2350
+ * @throws {@link Paid.InternalServerError}
2351
+ *
2352
+ * @example
2353
+ * await client.customers.getCustomerUnit({
2354
+ * id: "cus_abc123",
2355
+ * externalCustomerUnitId: "team-research"
2356
+ * })
2357
+ */
2358
+ getCustomerUnit(request, requestOptions) {
2359
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnit(request, requestOptions));
2360
+ }
2361
+ __getCustomerUnit(request, requestOptions) {
2362
+ return __awaiter(this, void 0, void 0, function* () {
2363
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2364
+ const { id, externalCustomerUnitId } = request;
2365
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2366
+ const _response = yield core.fetcher({
2367
+ 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)}`),
2368
+ method: "GET",
2369
+ headers: _headers,
2370
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2371
+ 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,
2372
+ 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,
2373
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2374
+ });
2375
+ if (_response.ok) {
2376
+ return { data: _response.body, rawResponse: _response.rawResponse };
2377
+ }
2378
+ if (_response.error.reason === "status-code") {
2379
+ switch (_response.error.statusCode) {
2380
+ case 400:
2381
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2382
+ case 403:
2383
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2384
+ case 404:
2385
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2386
+ case 500:
2387
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2388
+ default:
2389
+ throw new errors.PaidError({
2390
+ statusCode: _response.error.statusCode,
2391
+ body: _response.error.body,
2392
+ rawResponse: _response.rawResponse,
2393
+ });
2394
+ }
2395
+ }
2396
+ switch (_response.error.reason) {
2397
+ case "non-json":
2398
+ throw new errors.PaidError({
2399
+ statusCode: _response.error.statusCode,
2400
+ body: _response.error.rawBody,
2401
+ rawResponse: _response.rawResponse,
2402
+ });
2403
+ case "timeout":
2404
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/customer-units/{externalCustomerUnitId}.");
2405
+ case "unknown":
2406
+ throw new errors.PaidError({
2407
+ message: _response.error.errorMessage,
2408
+ rawResponse: _response.rawResponse,
2409
+ });
2410
+ }
2411
+ });
2412
+ }
2413
+ /**
2414
+ * 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.
2415
+ *
2416
+ * @param {Paid.DeleteCustomerUnitRequest} request
2417
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2418
+ *
2419
+ * @throws {@link Paid.BadRequestError}
2420
+ * @throws {@link Paid.ForbiddenError}
2421
+ * @throws {@link Paid.NotFoundError}
2422
+ * @throws {@link Paid.ConflictError}
2423
+ * @throws {@link Paid.InternalServerError}
2424
+ *
2425
+ * @example
2426
+ * await client.customers.deleteCustomerUnit({
2427
+ * id: "cus_abc123",
2428
+ * externalCustomerUnitId: "team-research"
2429
+ * })
2430
+ */
2431
+ deleteCustomerUnit(request, requestOptions) {
2432
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomerUnit(request, requestOptions));
2433
+ }
2434
+ __deleteCustomerUnit(request, requestOptions) {
2435
+ return __awaiter(this, void 0, void 0, function* () {
2436
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2437
+ const { id, externalCustomerUnitId } = request;
2438
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2439
+ const _response = yield core.fetcher({
2440
+ 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)}`),
2441
+ method: "DELETE",
2442
+ headers: _headers,
2443
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2444
+ 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,
2445
+ 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,
2446
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2447
+ });
2448
+ if (_response.ok) {
2449
+ return { data: _response.body, rawResponse: _response.rawResponse };
2450
+ }
2451
+ if (_response.error.reason === "status-code") {
2452
+ switch (_response.error.statusCode) {
2453
+ case 400:
2454
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2455
+ case 403:
2456
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2457
+ case 404:
2458
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2459
+ case 409:
2460
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2461
+ case 500:
2462
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2463
+ default:
2464
+ throw new errors.PaidError({
2465
+ statusCode: _response.error.statusCode,
2466
+ body: _response.error.body,
2467
+ rawResponse: _response.rawResponse,
2468
+ });
2469
+ }
2470
+ }
2471
+ switch (_response.error.reason) {
2472
+ case "non-json":
2473
+ throw new errors.PaidError({
2474
+ statusCode: _response.error.statusCode,
2475
+ body: _response.error.rawBody,
2476
+ rawResponse: _response.rawResponse,
2477
+ });
2478
+ case "timeout":
2479
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}/customer-units/{externalCustomerUnitId}.");
2480
+ case "unknown":
2481
+ throw new errors.PaidError({
2482
+ message: _response.error.errorMessage,
2483
+ rawResponse: _response.rawResponse,
2484
+ });
2485
+ }
2486
+ });
2487
+ }
2488
+ /**
2489
+ * 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.
2490
+ *
2491
+ * @param {Paid.UpdateCustomerUnitRequest} request
2492
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2493
+ *
2494
+ * @throws {@link Paid.BadRequestError}
2495
+ * @throws {@link Paid.ForbiddenError}
2496
+ * @throws {@link Paid.NotFoundError}
2497
+ * @throws {@link Paid.ConflictError}
2498
+ * @throws {@link Paid.InternalServerError}
2499
+ *
2500
+ * @example
2501
+ * await client.customers.updateCustomerUnit({
2502
+ * id: "cus_abc123",
2503
+ * externalCustomerUnitId: "team-research",
2504
+ * body: {}
2505
+ * })
2506
+ */
2507
+ updateCustomerUnit(request, requestOptions) {
2508
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomerUnit(request, requestOptions));
2509
+ }
2510
+ __updateCustomerUnit(request, requestOptions) {
2511
+ return __awaiter(this, void 0, void 0, function* () {
2512
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2513
+ const { id, externalCustomerUnitId, body: _body } = request;
2514
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2515
+ const _response = yield core.fetcher({
2516
+ 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)}`),
2517
+ method: "PATCH",
2518
+ headers: _headers,
2519
+ contentType: "application/json",
2520
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2521
+ requestType: "json",
2522
+ body: _body,
2523
+ 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,
2524
+ 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,
2525
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2526
+ });
2527
+ if (_response.ok) {
2528
+ return { data: _response.body, rawResponse: _response.rawResponse };
2529
+ }
2530
+ if (_response.error.reason === "status-code") {
2531
+ switch (_response.error.statusCode) {
2532
+ case 400:
2533
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2534
+ case 403:
2535
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2536
+ case 404:
2537
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2538
+ case 409:
2539
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2540
+ case 500:
2541
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2542
+ default:
2543
+ throw new errors.PaidError({
2544
+ statusCode: _response.error.statusCode,
2545
+ body: _response.error.body,
2546
+ rawResponse: _response.rawResponse,
2547
+ });
2548
+ }
2549
+ }
2550
+ switch (_response.error.reason) {
2551
+ case "non-json":
2552
+ throw new errors.PaidError({
2553
+ statusCode: _response.error.statusCode,
2554
+ body: _response.error.rawBody,
2555
+ rawResponse: _response.rawResponse,
2556
+ });
2557
+ case "timeout":
2558
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PATCH /customers/{id}/customer-units/{externalCustomerUnitId}.");
2559
+ case "unknown":
2560
+ throw new errors.PaidError({
2561
+ message: _response.error.errorMessage,
2562
+ rawResponse: _response.rawResponse,
2563
+ });
2564
+ }
2565
+ });
2566
+ }
2567
+ /**
2568
+ * 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.
2569
+ *
2570
+ * @param {Paid.GetCustomerUnitCapByExternalIdRequest} request
2571
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2572
+ *
2573
+ * @throws {@link Paid.BadRequestError}
2574
+ * @throws {@link Paid.ForbiddenError}
2575
+ * @throws {@link Paid.NotFoundError}
2576
+ * @throws {@link Paid.InternalServerError}
2577
+ *
2578
+ * @example
2579
+ * await client.customers.getCustomerUnitCapByExternalId({
2580
+ * externalId: "customer_123",
2581
+ * externalCustomerUnitId: "tenant-a",
2582
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2583
+ * })
2584
+ */
2585
+ getCustomerUnitCapByExternalId(request, requestOptions) {
2586
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnitCapByExternalId(request, requestOptions));
2587
+ }
2588
+ __getCustomerUnitCapByExternalId(request, requestOptions) {
2589
+ return __awaiter(this, void 0, void 0, function* () {
2590
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2591
+ const { externalId, externalCustomerUnitId, creditsCurrencyId } = request;
2592
+ const _queryParams = {};
2593
+ if (creditsCurrencyId != null) {
2594
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2595
+ }
2596
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2597
+ const _response = yield core.fetcher({
2598
+ 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`),
2599
+ method: "GET",
2600
+ headers: _headers,
2601
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2602
+ 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,
2603
+ 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,
2604
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2605
+ });
2606
+ if (_response.ok) {
2607
+ return { data: _response.body, rawResponse: _response.rawResponse };
2608
+ }
2609
+ if (_response.error.reason === "status-code") {
2610
+ switch (_response.error.statusCode) {
2611
+ case 400:
2612
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2613
+ case 403:
2614
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2615
+ case 404:
2616
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2617
+ case 500:
2618
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2619
+ default:
2620
+ throw new errors.PaidError({
2621
+ statusCode: _response.error.statusCode,
2622
+ body: _response.error.body,
2623
+ rawResponse: _response.rawResponse,
2624
+ });
2625
+ }
2626
+ }
2627
+ switch (_response.error.reason) {
2628
+ case "non-json":
2629
+ throw new errors.PaidError({
2630
+ statusCode: _response.error.statusCode,
2631
+ body: _response.error.rawBody,
2632
+ rawResponse: _response.rawResponse,
2633
+ });
2634
+ case "timeout":
2635
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/external/{externalId}/customer-units/{externalCustomerUnitId}/cap.");
2636
+ case "unknown":
2637
+ throw new errors.PaidError({
2638
+ message: _response.error.errorMessage,
2639
+ rawResponse: _response.rawResponse,
2640
+ });
2641
+ }
2642
+ });
2643
+ }
2644
+ /**
2645
+ * 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.
2646
+ *
2647
+ * @param {Paid.SetCustomerUnitCapByExternalIdRequest} request
2648
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2649
+ *
2650
+ * @throws {@link Paid.BadRequestError}
2651
+ * @throws {@link Paid.ForbiddenError}
2652
+ * @throws {@link Paid.NotFoundError}
2653
+ * @throws {@link Paid.ConflictError}
2654
+ * @throws {@link Paid.InternalServerError}
2655
+ *
2656
+ * @example
2657
+ * await client.customers.setCustomerUnitCapByExternalId({
2658
+ * externalId: "customer_123",
2659
+ * externalCustomerUnitId: "tenant-a",
2660
+ * body: {
2661
+ * amount: 10000
2662
+ * }
2663
+ * })
2664
+ */
2665
+ setCustomerUnitCapByExternalId(request, requestOptions) {
2666
+ return core.HttpResponsePromise.fromPromise(this.__setCustomerUnitCapByExternalId(request, requestOptions));
2667
+ }
2668
+ __setCustomerUnitCapByExternalId(request, requestOptions) {
2669
+ return __awaiter(this, void 0, void 0, function* () {
2670
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2671
+ const { externalId, externalCustomerUnitId, body: _body } = request;
2672
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2673
+ const _response = yield core.fetcher({
2674
+ 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`),
2675
+ method: "PUT",
2676
+ headers: _headers,
2677
+ contentType: "application/json",
2678
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2679
+ requestType: "json",
2680
+ body: _body,
2681
+ 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,
2682
+ 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,
2683
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2684
+ });
2685
+ if (_response.ok) {
2686
+ return { data: _response.body, rawResponse: _response.rawResponse };
2687
+ }
2688
+ if (_response.error.reason === "status-code") {
2689
+ switch (_response.error.statusCode) {
2690
+ case 400:
2691
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2692
+ case 403:
2693
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2694
+ case 404:
2695
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2696
+ case 409:
2697
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2698
+ case 500:
2699
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2700
+ default:
2701
+ throw new errors.PaidError({
2702
+ statusCode: _response.error.statusCode,
2703
+ body: _response.error.body,
2704
+ rawResponse: _response.rawResponse,
2705
+ });
2706
+ }
2707
+ }
2708
+ switch (_response.error.reason) {
2709
+ case "non-json":
2710
+ throw new errors.PaidError({
2711
+ statusCode: _response.error.statusCode,
2712
+ body: _response.error.rawBody,
2713
+ rawResponse: _response.rawResponse,
2714
+ });
2715
+ case "timeout":
2716
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/external/{externalId}/customer-units/{externalCustomerUnitId}/cap.");
2717
+ case "unknown":
2718
+ throw new errors.PaidError({
2719
+ message: _response.error.errorMessage,
2720
+ rawResponse: _response.rawResponse,
2721
+ });
2722
+ }
2723
+ });
2724
+ }
2725
+ /**
2726
+ * 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.
2727
+ *
2728
+ * @param {Paid.EndCustomerUnitCapByExternalIdRequest} request
2729
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2730
+ *
2731
+ * @throws {@link Paid.BadRequestError}
2732
+ * @throws {@link Paid.ForbiddenError}
2733
+ * @throws {@link Paid.NotFoundError}
2734
+ * @throws {@link Paid.ConflictError}
2735
+ * @throws {@link Paid.InternalServerError}
2736
+ *
2737
+ * @example
2738
+ * await client.customers.endCustomerUnitCapByExternalId({
2739
+ * externalId: "customer_123",
2740
+ * externalCustomerUnitId: "tenant-a",
2741
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2742
+ * })
2743
+ */
2744
+ endCustomerUnitCapByExternalId(request, requestOptions) {
2745
+ return core.HttpResponsePromise.fromPromise(this.__endCustomerUnitCapByExternalId(request, requestOptions));
2746
+ }
2747
+ __endCustomerUnitCapByExternalId(request, requestOptions) {
2748
+ return __awaiter(this, void 0, void 0, function* () {
2749
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2750
+ const { externalId, externalCustomerUnitId, creditsCurrencyId } = request;
2751
+ const _queryParams = {};
2752
+ if (creditsCurrencyId != null) {
2753
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2754
+ }
2755
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2756
+ const _response = yield core.fetcher({
2757
+ 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`),
2758
+ method: "DELETE",
2759
+ headers: _headers,
2760
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2761
+ 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,
2762
+ 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,
2763
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2764
+ });
2765
+ if (_response.ok) {
2766
+ return { data: _response.body, rawResponse: _response.rawResponse };
2767
+ }
2768
+ if (_response.error.reason === "status-code") {
2769
+ switch (_response.error.statusCode) {
2770
+ case 400:
2771
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2772
+ case 403:
2773
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2774
+ case 404:
2775
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2776
+ case 409:
2777
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2778
+ case 500:
2779
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2780
+ default:
2781
+ throw new errors.PaidError({
2782
+ statusCode: _response.error.statusCode,
2783
+ body: _response.error.body,
2784
+ rawResponse: _response.rawResponse,
2785
+ });
2786
+ }
2787
+ }
2788
+ switch (_response.error.reason) {
2789
+ case "non-json":
2790
+ throw new errors.PaidError({
2791
+ statusCode: _response.error.statusCode,
2792
+ body: _response.error.rawBody,
2793
+ rawResponse: _response.rawResponse,
2794
+ });
2795
+ case "timeout":
2796
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/external/{externalId}/customer-units/{externalCustomerUnitId}/cap.");
2797
+ case "unknown":
2798
+ throw new errors.PaidError({
2799
+ message: _response.error.errorMessage,
2800
+ rawResponse: _response.rawResponse,
2801
+ });
2802
+ }
2803
+ });
2804
+ }
2805
+ /**
2806
+ * 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.
2807
+ *
2808
+ * @param {Paid.GetCustomerUnitCapRequest} request
2809
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2810
+ *
2811
+ * @throws {@link Paid.BadRequestError}
2812
+ * @throws {@link Paid.ForbiddenError}
2813
+ * @throws {@link Paid.NotFoundError}
2814
+ * @throws {@link Paid.InternalServerError}
2815
+ *
2816
+ * @example
2817
+ * await client.customers.getCustomerUnitCap({
2818
+ * id: "cus_abc123",
2819
+ * externalCustomerUnitId: "tenant-a",
2820
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2821
+ * })
2822
+ */
2823
+ getCustomerUnitCap(request, requestOptions) {
2824
+ return core.HttpResponsePromise.fromPromise(this.__getCustomerUnitCap(request, requestOptions));
2825
+ }
2826
+ __getCustomerUnitCap(request, requestOptions) {
2827
+ return __awaiter(this, void 0, void 0, function* () {
2828
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2829
+ const { id, externalCustomerUnitId, creditsCurrencyId } = request;
2830
+ const _queryParams = {};
2831
+ if (creditsCurrencyId != null) {
2832
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2833
+ }
2834
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2835
+ const _response = yield core.fetcher({
2836
+ 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`),
2837
+ method: "GET",
2838
+ headers: _headers,
2839
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2840
+ 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,
2841
+ 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,
2842
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2843
+ });
2844
+ if (_response.ok) {
2845
+ return { data: _response.body, rawResponse: _response.rawResponse };
2846
+ }
2847
+ if (_response.error.reason === "status-code") {
2848
+ switch (_response.error.statusCode) {
2849
+ case 400:
2850
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2851
+ case 403:
2852
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2853
+ case 404:
2854
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2855
+ case 500:
2856
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2857
+ default:
2858
+ throw new errors.PaidError({
2859
+ statusCode: _response.error.statusCode,
2860
+ body: _response.error.body,
2861
+ rawResponse: _response.rawResponse,
2862
+ });
2863
+ }
2864
+ }
2865
+ switch (_response.error.reason) {
2866
+ case "non-json":
2867
+ throw new errors.PaidError({
2868
+ statusCode: _response.error.statusCode,
2869
+ body: _response.error.rawBody,
2870
+ rawResponse: _response.rawResponse,
2871
+ });
2872
+ case "timeout":
2873
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /customers/{id}/customer-units/{externalCustomerUnitId}/cap.");
2874
+ case "unknown":
2875
+ throw new errors.PaidError({
2876
+ message: _response.error.errorMessage,
2877
+ rawResponse: _response.rawResponse,
2878
+ });
2879
+ }
2880
+ });
2881
+ }
2882
+ /**
2883
+ * 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.
2884
+ *
2885
+ * @param {Paid.SetCustomerUnitCapRequest} request
2886
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2887
+ *
2888
+ * @throws {@link Paid.BadRequestError}
2889
+ * @throws {@link Paid.ForbiddenError}
2890
+ * @throws {@link Paid.NotFoundError}
2891
+ * @throws {@link Paid.ConflictError}
2892
+ * @throws {@link Paid.InternalServerError}
2893
+ *
2894
+ * @example
2895
+ * await client.customers.setCustomerUnitCap({
2896
+ * id: "cus_abc123",
2897
+ * externalCustomerUnitId: "tenant-a",
2898
+ * body: {
2899
+ * amount: 10000
2900
+ * }
2901
+ * })
2902
+ */
2903
+ setCustomerUnitCap(request, requestOptions) {
2904
+ return core.HttpResponsePromise.fromPromise(this.__setCustomerUnitCap(request, requestOptions));
2905
+ }
2906
+ __setCustomerUnitCap(request, requestOptions) {
2907
+ return __awaiter(this, void 0, void 0, function* () {
2908
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2909
+ const { id, externalCustomerUnitId, body: _body } = request;
2910
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2911
+ const _response = yield core.fetcher({
2912
+ 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`),
2913
+ method: "PUT",
2914
+ headers: _headers,
2915
+ contentType: "application/json",
2916
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
2917
+ requestType: "json",
2918
+ body: _body,
2919
+ 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,
2920
+ 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,
2921
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2922
+ });
2923
+ if (_response.ok) {
2924
+ return { data: _response.body, rawResponse: _response.rawResponse };
2925
+ }
2926
+ if (_response.error.reason === "status-code") {
2927
+ switch (_response.error.statusCode) {
2928
+ case 400:
2929
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
2930
+ case 403:
2931
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
2932
+ case 404:
2933
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
2934
+ case 409:
2935
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
2936
+ case 500:
2937
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
2938
+ default:
2939
+ throw new errors.PaidError({
2940
+ statusCode: _response.error.statusCode,
2941
+ body: _response.error.body,
2942
+ rawResponse: _response.rawResponse,
2943
+ });
2944
+ }
2945
+ }
2946
+ switch (_response.error.reason) {
2947
+ case "non-json":
2948
+ throw new errors.PaidError({
2949
+ statusCode: _response.error.statusCode,
2950
+ body: _response.error.rawBody,
2951
+ rawResponse: _response.rawResponse,
2952
+ });
2953
+ case "timeout":
2954
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{id}/customer-units/{externalCustomerUnitId}/cap.");
2955
+ case "unknown":
2956
+ throw new errors.PaidError({
2957
+ message: _response.error.errorMessage,
2958
+ rawResponse: _response.rawResponse,
2959
+ });
2960
+ }
2961
+ });
2962
+ }
2963
+ /**
2964
+ * 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.
2965
+ *
2966
+ * @param {Paid.EndCustomerUnitCapRequest} request
2967
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
2968
+ *
2969
+ * @throws {@link Paid.BadRequestError}
2970
+ * @throws {@link Paid.ForbiddenError}
2971
+ * @throws {@link Paid.NotFoundError}
2972
+ * @throws {@link Paid.ConflictError}
2973
+ * @throws {@link Paid.InternalServerError}
2974
+ *
2975
+ * @example
2976
+ * await client.customers.endCustomerUnitCap({
2977
+ * id: "cus_abc123",
2978
+ * externalCustomerUnitId: "tenant-a",
2979
+ * creditsCurrencyId: "7f4f5d4c-55e9-4d5b-a3e7-c9eb3d2d01bf"
2980
+ * })
2981
+ */
2982
+ endCustomerUnitCap(request, requestOptions) {
2983
+ return core.HttpResponsePromise.fromPromise(this.__endCustomerUnitCap(request, requestOptions));
2984
+ }
2985
+ __endCustomerUnitCap(request, requestOptions) {
2986
+ return __awaiter(this, void 0, void 0, function* () {
2987
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2988
+ const { id, externalCustomerUnitId, creditsCurrencyId } = request;
2989
+ const _queryParams = {};
2990
+ if (creditsCurrencyId != null) {
2991
+ _queryParams.creditsCurrencyId = creditsCurrencyId;
2992
+ }
2993
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2994
+ const _response = yield core.fetcher({
2995
+ 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`),
2996
+ method: "DELETE",
2997
+ headers: _headers,
2998
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2999
+ 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,
3000
+ 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,
3001
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
3002
+ });
3003
+ if (_response.ok) {
3004
+ return { data: _response.body, rawResponse: _response.rawResponse };
3005
+ }
3006
+ if (_response.error.reason === "status-code") {
3007
+ switch (_response.error.statusCode) {
3008
+ case 400:
3009
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
3010
+ case 403:
3011
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
3012
+ case 404:
3013
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
3014
+ case 409:
3015
+ throw new Paid.ConflictError(_response.error.body, _response.rawResponse);
3016
+ case 500:
3017
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
3018
+ default:
3019
+ throw new errors.PaidError({
3020
+ statusCode: _response.error.statusCode,
3021
+ body: _response.error.body,
3022
+ rawResponse: _response.rawResponse,
3023
+ });
3024
+ }
3025
+ }
3026
+ switch (_response.error.reason) {
3027
+ case "non-json":
3028
+ throw new errors.PaidError({
3029
+ statusCode: _response.error.statusCode,
3030
+ body: _response.error.rawBody,
3031
+ rawResponse: _response.rawResponse,
3032
+ });
3033
+ case "timeout":
3034
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /customers/{id}/customer-units/{externalCustomerUnitId}/cap.");
841
3035
  case "unknown":
842
3036
  throw new errors.PaidError({
843
3037
  message: _response.error.errorMessage,