@metronome/sdk 0.3.0 → 1.0.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 (808) hide show
  1. package/CHANGELOG.md +48 -28
  2. package/README.md +123 -51
  3. package/api-promise.d.mts +2 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +2 -0
  6. package/api-promise.d.ts.map +1 -0
  7. package/api-promise.js +6 -0
  8. package/api-promise.js.map +1 -0
  9. package/api-promise.mjs +2 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/bin/cli +53 -0
  12. package/bin/migration-config.json +6 -0
  13. package/client.d.mts +232 -0
  14. package/client.d.mts.map +1 -0
  15. package/client.d.ts +232 -0
  16. package/client.d.ts.map +1 -0
  17. package/client.js +464 -0
  18. package/client.js.map +1 -0
  19. package/client.mjs +460 -0
  20. package/client.mjs.map +1 -0
  21. package/core/api-promise.d.mts +46 -0
  22. package/core/api-promise.d.mts.map +1 -0
  23. package/core/api-promise.d.ts +46 -0
  24. package/core/api-promise.d.ts.map +1 -0
  25. package/core/api-promise.js +74 -0
  26. package/core/api-promise.js.map +1 -0
  27. package/core/api-promise.mjs +70 -0
  28. package/core/api-promise.mjs.map +1 -0
  29. package/core/error.d.mts +46 -0
  30. package/core/error.d.mts.map +1 -0
  31. package/core/error.d.ts +46 -0
  32. package/core/error.d.ts.map +1 -0
  33. package/core/error.js +113 -0
  34. package/core/error.js.map +1 -0
  35. package/core/error.mjs +97 -0
  36. package/core/error.mjs.map +1 -0
  37. package/core/pagination.d.mts +137 -0
  38. package/core/pagination.d.mts.map +1 -0
  39. package/core/pagination.d.ts +137 -0
  40. package/core/pagination.d.ts.map +1 -0
  41. package/core/pagination.js +158 -0
  42. package/core/pagination.js.map +1 -0
  43. package/core/pagination.mjs +150 -0
  44. package/core/pagination.mjs.map +1 -0
  45. package/core/resource.d.mts +6 -0
  46. package/core/resource.d.mts.map +1 -0
  47. package/core/resource.d.ts +6 -0
  48. package/core/resource.d.ts.map +1 -0
  49. package/core/resource.js +11 -0
  50. package/core/resource.js.map +1 -0
  51. package/core/resource.mjs +7 -0
  52. package/core/resource.mjs.map +1 -0
  53. package/core/uploads.d.mts +3 -0
  54. package/core/uploads.d.mts.map +1 -0
  55. package/core/uploads.d.ts +3 -0
  56. package/core/uploads.d.ts.map +1 -0
  57. package/core/uploads.js +6 -0
  58. package/core/uploads.js.map +1 -0
  59. package/core/uploads.mjs +2 -0
  60. package/core/uploads.mjs.map +1 -0
  61. package/error.d.mts +2 -0
  62. package/error.d.mts.map +1 -0
  63. package/error.d.ts +1 -46
  64. package/error.d.ts.map +1 -1
  65. package/error.js +3 -110
  66. package/error.js.map +1 -1
  67. package/error.mjs +1 -96
  68. package/error.mjs.map +1 -1
  69. package/index.d.mts +7 -144
  70. package/index.d.mts.map +1 -0
  71. package/index.d.ts +6 -143
  72. package/index.d.ts.map +1 -1
  73. package/index.js +14 -120
  74. package/index.js.map +1 -1
  75. package/index.mjs +6 -93
  76. package/index.mjs.map +1 -1
  77. package/internal/builtin-types.d.mts +73 -0
  78. package/internal/builtin-types.d.mts.map +1 -0
  79. package/internal/builtin-types.d.ts +73 -0
  80. package/internal/builtin-types.d.ts.map +1 -0
  81. package/internal/builtin-types.js +4 -0
  82. package/internal/builtin-types.js.map +1 -0
  83. package/internal/builtin-types.mjs +3 -0
  84. package/internal/builtin-types.mjs.map +1 -0
  85. package/internal/detect-platform.d.mts +15 -0
  86. package/internal/detect-platform.d.mts.map +1 -0
  87. package/internal/detect-platform.d.ts +15 -0
  88. package/internal/detect-platform.d.ts.map +1 -0
  89. package/internal/detect-platform.js +162 -0
  90. package/internal/detect-platform.js.map +1 -0
  91. package/internal/detect-platform.mjs +157 -0
  92. package/internal/detect-platform.mjs.map +1 -0
  93. package/internal/errors.d.mts +3 -0
  94. package/internal/errors.d.mts.map +1 -0
  95. package/internal/errors.d.ts +3 -0
  96. package/internal/errors.d.ts.map +1 -0
  97. package/internal/errors.js +41 -0
  98. package/internal/errors.js.map +1 -0
  99. package/internal/errors.mjs +36 -0
  100. package/internal/errors.mjs.map +1 -0
  101. package/internal/headers.d.mts +26 -0
  102. package/internal/headers.d.mts.map +1 -0
  103. package/internal/headers.d.ts +26 -0
  104. package/internal/headers.d.ts.map +1 -0
  105. package/internal/headers.js +120 -0
  106. package/internal/headers.js.map +1 -0
  107. package/internal/headers.mjs +112 -0
  108. package/internal/headers.mjs.map +1 -0
  109. package/internal/parse.d.mts +12 -0
  110. package/internal/parse.d.mts.map +1 -0
  111. package/internal/parse.d.ts +12 -0
  112. package/internal/parse.d.ts.map +1 -0
  113. package/internal/parse.js +35 -0
  114. package/internal/parse.js.map +1 -0
  115. package/internal/parse.mjs +32 -0
  116. package/internal/parse.mjs.map +1 -0
  117. package/internal/qs/formats.d.mts +7 -0
  118. package/internal/qs/formats.d.mts.map +1 -0
  119. package/internal/qs/formats.d.ts +1 -0
  120. package/internal/qs/formats.d.ts.map +1 -1
  121. package/internal/qs/formats.js +4 -2
  122. package/internal/qs/formats.js.map +1 -1
  123. package/internal/qs/formats.mjs +2 -1
  124. package/internal/qs/formats.mjs.map +1 -1
  125. package/internal/qs/index.d.mts +10 -0
  126. package/internal/qs/index.d.mts.map +1 -0
  127. package/internal/qs/index.d.ts.map +1 -1
  128. package/internal/qs/stringify.d.mts +3 -0
  129. package/internal/qs/stringify.d.mts.map +1 -0
  130. package/internal/qs/stringify.d.ts.map +1 -1
  131. package/internal/qs/stringify.js +16 -19
  132. package/internal/qs/stringify.js.map +1 -1
  133. package/internal/qs/stringify.mjs +17 -19
  134. package/internal/qs/stringify.mjs.map +1 -1
  135. package/internal/qs/types.d.mts +57 -0
  136. package/internal/qs/types.d.mts.map +1 -0
  137. package/internal/qs/utils.d.mts +15 -0
  138. package/internal/qs/utils.d.mts.map +1 -0
  139. package/internal/qs/utils.d.ts +1 -0
  140. package/internal/qs/utils.d.ts.map +1 -1
  141. package/internal/qs/utils.js +22 -21
  142. package/internal/qs/utils.js.map +1 -1
  143. package/internal/qs/utils.mjs +12 -12
  144. package/internal/qs/utils.mjs.map +1 -1
  145. package/internal/request-options.d.mts +75 -0
  146. package/internal/request-options.d.mts.map +1 -0
  147. package/internal/request-options.d.ts +75 -0
  148. package/internal/request-options.d.ts.map +1 -0
  149. package/internal/request-options.js +14 -0
  150. package/internal/request-options.js.map +1 -0
  151. package/internal/request-options.mjs +10 -0
  152. package/internal/request-options.mjs.map +1 -0
  153. package/internal/shim-types.d.mts +17 -0
  154. package/internal/shim-types.d.mts.map +1 -0
  155. package/internal/shim-types.d.ts +17 -0
  156. package/internal/shim-types.d.ts.map +1 -0
  157. package/internal/shim-types.js +4 -0
  158. package/internal/shim-types.js.map +1 -0
  159. package/internal/shim-types.mjs +3 -0
  160. package/internal/shim-types.mjs.map +1 -0
  161. package/internal/shims.d.mts +20 -0
  162. package/internal/shims.d.mts.map +1 -0
  163. package/internal/shims.d.ts +20 -0
  164. package/internal/shims.d.ts.map +1 -0
  165. package/internal/shims.js +92 -0
  166. package/internal/shims.js.map +1 -0
  167. package/internal/shims.mjs +85 -0
  168. package/internal/shims.mjs.map +1 -0
  169. package/internal/to-file.d.mts +45 -0
  170. package/internal/to-file.d.mts.map +1 -0
  171. package/internal/to-file.d.ts +45 -0
  172. package/internal/to-file.d.ts.map +1 -0
  173. package/internal/to-file.js +91 -0
  174. package/internal/to-file.js.map +1 -0
  175. package/internal/to-file.mjs +88 -0
  176. package/internal/to-file.mjs.map +1 -0
  177. package/internal/tslib.js +81 -0
  178. package/internal/tslib.mjs +17 -0
  179. package/internal/types.d.mts +69 -0
  180. package/internal/types.d.mts.map +1 -0
  181. package/internal/types.d.ts +69 -0
  182. package/internal/types.d.ts.map +1 -0
  183. package/internal/types.js +4 -0
  184. package/internal/types.js.map +1 -0
  185. package/internal/types.mjs +3 -0
  186. package/internal/types.mjs.map +1 -0
  187. package/internal/uploads.d.mts +42 -0
  188. package/internal/uploads.d.mts.map +1 -0
  189. package/internal/uploads.d.ts +42 -0
  190. package/internal/uploads.d.ts.map +1 -0
  191. package/internal/uploads.js +141 -0
  192. package/internal/uploads.js.map +1 -0
  193. package/internal/uploads.mjs +131 -0
  194. package/internal/uploads.mjs.map +1 -0
  195. package/internal/utils/base64.d.mts +3 -0
  196. package/internal/utils/base64.d.mts.map +1 -0
  197. package/internal/utils/base64.d.ts +3 -0
  198. package/internal/utils/base64.d.ts.map +1 -0
  199. package/internal/utils/base64.js +38 -0
  200. package/internal/utils/base64.js.map +1 -0
  201. package/internal/utils/base64.mjs +33 -0
  202. package/internal/utils/base64.mjs.map +1 -0
  203. package/internal/utils/bytes.d.mts +4 -0
  204. package/internal/utils/bytes.d.mts.map +1 -0
  205. package/internal/utils/bytes.d.ts +4 -0
  206. package/internal/utils/bytes.d.ts.map +1 -0
  207. package/internal/utils/bytes.js +31 -0
  208. package/internal/utils/bytes.js.map +1 -0
  209. package/internal/utils/bytes.mjs +26 -0
  210. package/internal/utils/bytes.mjs.map +1 -0
  211. package/internal/utils/env.d.mts +9 -0
  212. package/internal/utils/env.d.mts.map +1 -0
  213. package/internal/utils/env.d.ts +9 -0
  214. package/internal/utils/env.d.ts.map +1 -0
  215. package/internal/utils/env.js +22 -0
  216. package/internal/utils/env.js.map +1 -0
  217. package/internal/utils/env.mjs +18 -0
  218. package/internal/utils/env.mjs.map +1 -0
  219. package/internal/utils/log.d.mts +37 -0
  220. package/internal/utils/log.d.mts.map +1 -0
  221. package/internal/utils/log.d.ts +37 -0
  222. package/internal/utils/log.d.ts.map +1 -0
  223. package/internal/utils/log.js +85 -0
  224. package/internal/utils/log.js.map +1 -0
  225. package/internal/utils/log.mjs +79 -0
  226. package/internal/utils/log.mjs.map +1 -0
  227. package/internal/utils/path.d.mts +15 -0
  228. package/internal/utils/path.d.mts.map +1 -0
  229. package/internal/utils/path.d.ts +15 -0
  230. package/internal/utils/path.d.ts.map +1 -0
  231. package/internal/utils/path.js +79 -0
  232. package/internal/utils/path.js.map +1 -0
  233. package/internal/utils/path.mjs +74 -0
  234. package/internal/utils/path.mjs.map +1 -0
  235. package/internal/utils/sleep.d.mts +2 -0
  236. package/internal/utils/sleep.d.mts.map +1 -0
  237. package/internal/utils/sleep.d.ts +2 -0
  238. package/internal/utils/sleep.d.ts.map +1 -0
  239. package/internal/utils/sleep.js +7 -0
  240. package/internal/utils/sleep.js.map +1 -0
  241. package/internal/utils/sleep.mjs +3 -0
  242. package/internal/utils/sleep.mjs.map +1 -0
  243. package/internal/utils/uuid.d.mts +5 -0
  244. package/internal/utils/uuid.d.mts.map +1 -0
  245. package/internal/utils/uuid.d.ts +5 -0
  246. package/internal/utils/uuid.d.ts.map +1 -0
  247. package/internal/utils/uuid.js +19 -0
  248. package/internal/utils/uuid.js.map +1 -0
  249. package/internal/utils/uuid.mjs +15 -0
  250. package/internal/utils/uuid.mjs.map +1 -0
  251. package/internal/utils/values.d.mts +18 -0
  252. package/internal/utils/values.d.mts.map +1 -0
  253. package/internal/utils/values.d.ts +18 -0
  254. package/internal/utils/values.d.ts.map +1 -0
  255. package/internal/utils/values.js +112 -0
  256. package/internal/utils/values.js.map +1 -0
  257. package/internal/utils/values.mjs +94 -0
  258. package/internal/utils/values.mjs.map +1 -0
  259. package/internal/utils.d.mts +7 -0
  260. package/internal/utils.d.mts.map +1 -0
  261. package/internal/utils.d.ts +7 -0
  262. package/internal/utils.d.ts.map +1 -0
  263. package/internal/utils.js +11 -0
  264. package/internal/utils.js.map +1 -0
  265. package/internal/utils.mjs +8 -0
  266. package/internal/utils.mjs.map +1 -0
  267. package/package.json +113 -64
  268. package/pagination.d.mts +2 -0
  269. package/pagination.d.mts.map +1 -0
  270. package/pagination.d.ts +1 -36
  271. package/pagination.d.ts.map +1 -1
  272. package/pagination.js +3 -40
  273. package/pagination.js.map +1 -1
  274. package/pagination.mjs +1 -38
  275. package/pagination.mjs.map +1 -1
  276. package/resource.d.mts +2 -0
  277. package/resource.d.mts.map +1 -0
  278. package/resource.d.ts +1 -5
  279. package/resource.d.ts.map +1 -1
  280. package/resource.js +3 -8
  281. package/resource.js.map +1 -1
  282. package/resource.mjs +1 -6
  283. package/resource.mjs.map +1 -1
  284. package/resources/index.d.mts +5 -0
  285. package/resources/index.d.mts.map +1 -0
  286. package/resources/index.d.ts.map +1 -1
  287. package/resources/index.js +2 -15
  288. package/resources/index.js.map +1 -1
  289. package/resources/shared.d.mts +2239 -0
  290. package/resources/shared.d.mts.map +1 -0
  291. package/resources/shared.d.ts +1404 -523
  292. package/resources/shared.d.ts.map +1 -1
  293. package/resources/v1/alerts.d.mts +203 -0
  294. package/resources/v1/alerts.d.mts.map +1 -0
  295. package/resources/v1/alerts.d.ts +78 -7
  296. package/resources/v1/alerts.d.ts.map +1 -1
  297. package/resources/v1/alerts.js +73 -3
  298. package/resources/v1/alerts.js.map +1 -1
  299. package/resources/v1/alerts.mjs +73 -3
  300. package/resources/v1/alerts.mjs.map +1 -1
  301. package/resources/v1/audit-logs.d.mts +108 -0
  302. package/resources/v1/audit-logs.d.mts.map +1 -0
  303. package/resources/v1/audit-logs.d.ts +45 -12
  304. package/resources/v1/audit-logs.d.ts.map +1 -1
  305. package/resources/v1/audit-logs.js +53 -12
  306. package/resources/v1/audit-logs.js.map +1 -1
  307. package/resources/v1/audit-logs.mjs +52 -10
  308. package/resources/v1/audit-logs.mjs.map +1 -1
  309. package/resources/v1/billable-metrics.d.mts +293 -0
  310. package/resources/v1/billable-metrics.d.mts.map +1 -0
  311. package/resources/v1/billable-metrics.d.ts +70 -15
  312. package/resources/v1/billable-metrics.d.ts.map +1 -1
  313. package/resources/v1/billable-metrics.js +70 -16
  314. package/resources/v1/billable-metrics.js.map +1 -1
  315. package/resources/v1/billable-metrics.mjs +69 -14
  316. package/resources/v1/billable-metrics.mjs.map +1 -1
  317. package/resources/v1/contracts/contracts.d.mts +2984 -0
  318. package/resources/v1/contracts/contracts.d.mts.map +1 -0
  319. package/resources/v1/contracts/contracts.d.ts +401 -1294
  320. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  321. package/resources/v1/contracts/contracts.js +268 -50
  322. package/resources/v1/contracts/contracts.js.map +1 -1
  323. package/resources/v1/contracts/contracts.mjs +266 -26
  324. package/resources/v1/contracts/contracts.mjs.map +1 -1
  325. package/resources/v1/contracts/index.d.mts +5 -0
  326. package/resources/v1/contracts/index.d.mts.map +1 -0
  327. package/resources/v1/contracts/index.d.ts +3 -3
  328. package/resources/v1/contracts/index.d.ts.map +1 -1
  329. package/resources/v1/contracts/index.js +1 -3
  330. package/resources/v1/contracts/index.js.map +1 -1
  331. package/resources/v1/contracts/index.mjs +2 -2
  332. package/resources/v1/contracts/index.mjs.map +1 -1
  333. package/resources/v1/contracts/named-schedules.d.mts +82 -0
  334. package/resources/v1/contracts/named-schedules.d.mts.map +1 -0
  335. package/resources/v1/contracts/named-schedules.d.ts +5 -4
  336. package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
  337. package/resources/v1/contracts/named-schedules.js +3 -2
  338. package/resources/v1/contracts/named-schedules.js.map +1 -1
  339. package/resources/v1/contracts/named-schedules.mjs +3 -2
  340. package/resources/v1/contracts/named-schedules.mjs.map +1 -1
  341. package/resources/v1/contracts/products.d.mts +502 -0
  342. package/resources/v1/contracts/products.d.mts.map +1 -0
  343. package/resources/v1/contracts/products.d.ts +44 -17
  344. package/resources/v1/contracts/products.d.ts.map +1 -1
  345. package/resources/v1/contracts/products.js +41 -17
  346. package/resources/v1/contracts/products.js.map +1 -1
  347. package/resources/v1/contracts/products.mjs +40 -15
  348. package/resources/v1/contracts/products.mjs.map +1 -1
  349. package/resources/v1/contracts/rate-cards/index.d.mts +5 -0
  350. package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -0
  351. package/resources/v1/contracts/rate-cards/index.d.ts +2 -2
  352. package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
  353. package/resources/v1/contracts/rate-cards/index.js +1 -3
  354. package/resources/v1/contracts/rate-cards/index.js.map +1 -1
  355. package/resources/v1/contracts/rate-cards/index.mjs +2 -2
  356. package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
  357. package/resources/v1/contracts/rate-cards/named-schedules.d.mts +94 -0
  358. package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -0
  359. package/resources/v1/contracts/rate-cards/named-schedules.d.ts +5 -4
  360. package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
  361. package/resources/v1/contracts/rate-cards/named-schedules.js +3 -2
  362. package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
  363. package/resources/v1/contracts/rate-cards/named-schedules.mjs +3 -2
  364. package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
  365. package/resources/v1/contracts/rate-cards/product-orders.d.mts +85 -0
  366. package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -0
  367. package/resources/v1/contracts/rate-cards/product-orders.d.ts +12 -6
  368. package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
  369. package/resources/v1/contracts/rate-cards/product-orders.js +8 -3
  370. package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
  371. package/resources/v1/contracts/rate-cards/product-orders.mjs +8 -3
  372. package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
  373. package/resources/v1/contracts/rate-cards/rate-cards.d.mts +452 -0
  374. package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -0
  375. package/resources/v1/contracts/rate-cards/rate-cards.d.ts +134 -41
  376. package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
  377. package/resources/v1/contracts/rate-cards/rate-cards.js +127 -47
  378. package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
  379. package/resources/v1/contracts/rate-cards/rate-cards.mjs +123 -20
  380. package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
  381. package/resources/v1/contracts/rate-cards/rates.d.mts +382 -0
  382. package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -0
  383. package/resources/v1/contracts/rate-cards/rates.d.ts +25 -82
  384. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
  385. package/resources/v1/contracts/rate-cards/rates.js +13 -9
  386. package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
  387. package/resources/v1/contracts/rate-cards/rates.mjs +12 -7
  388. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
  389. package/resources/v1/contracts/rate-cards.d.mts +2 -0
  390. package/resources/v1/contracts/rate-cards.d.mts.map +1 -0
  391. package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
  392. package/resources/v1/contracts/rate-cards.js +2 -15
  393. package/resources/v1/contracts/rate-cards.js.map +1 -1
  394. package/resources/v1/contracts.d.mts +2 -0
  395. package/resources/v1/contracts.d.mts.map +1 -0
  396. package/resources/v1/contracts.d.ts.map +1 -1
  397. package/resources/v1/contracts.js +2 -15
  398. package/resources/v1/contracts.js.map +1 -1
  399. package/resources/v1/credit-grants.d.mts +505 -0
  400. package/resources/v1/credit-grants.d.mts.map +1 -0
  401. package/resources/v1/credit-grants.d.ts +73 -74
  402. package/resources/v1/credit-grants.d.ts.map +1 -1
  403. package/resources/v1/credit-grants.js +52 -18
  404. package/resources/v1/credit-grants.js.map +1 -1
  405. package/resources/v1/credit-grants.mjs +51 -16
  406. package/resources/v1/credit-grants.mjs.map +1 -1
  407. package/resources/v1/custom-fields.d.mts +151 -0
  408. package/resources/v1/custom-fields.d.mts.map +1 -0
  409. package/resources/v1/custom-fields.d.ts +69 -38
  410. package/resources/v1/custom-fields.d.ts.map +1 -1
  411. package/resources/v1/custom-fields.js +66 -22
  412. package/resources/v1/custom-fields.js.map +1 -1
  413. package/resources/v1/custom-fields.mjs +66 -22
  414. package/resources/v1/custom-fields.mjs.map +1 -1
  415. package/resources/v1/customers/alerts.d.mts +288 -0
  416. package/resources/v1/customers/alerts.d.mts.map +1 -0
  417. package/resources/v1/customers/alerts.d.ts +128 -23
  418. package/resources/v1/customers/alerts.d.ts.map +1 -1
  419. package/resources/v1/customers/alerts.js +112 -10
  420. package/resources/v1/customers/alerts.js.map +1 -1
  421. package/resources/v1/customers/alerts.mjs +112 -10
  422. package/resources/v1/customers/alerts.mjs.map +1 -1
  423. package/resources/v1/customers/billing-config.d.mts +125 -0
  424. package/resources/v1/customers/billing-config.d.mts.map +1 -0
  425. package/resources/v1/customers/billing-config.d.ts +8 -7
  426. package/resources/v1/customers/billing-config.d.ts.map +1 -1
  427. package/resources/v1/customers/billing-config.js +8 -6
  428. package/resources/v1/customers/billing-config.js.map +1 -1
  429. package/resources/v1/customers/billing-config.mjs +8 -6
  430. package/resources/v1/customers/billing-config.mjs.map +1 -1
  431. package/resources/v1/customers/commits.d.mts +456 -0
  432. package/resources/v1/customers/commits.d.mts.map +1 -0
  433. package/resources/v1/customers/commits.d.ts +139 -47
  434. package/resources/v1/customers/commits.d.ts.map +1 -1
  435. package/resources/v1/customers/commits.js +131 -12
  436. package/resources/v1/customers/commits.js.map +1 -1
  437. package/resources/v1/customers/commits.mjs +131 -12
  438. package/resources/v1/customers/commits.mjs.map +1 -1
  439. package/resources/v1/customers/credits.d.mts +310 -0
  440. package/resources/v1/customers/credits.d.mts.map +1 -0
  441. package/resources/v1/customers/credits.d.ts +124 -46
  442. package/resources/v1/customers/credits.d.ts.map +1 -1
  443. package/resources/v1/customers/credits.js +116 -11
  444. package/resources/v1/customers/credits.js.map +1 -1
  445. package/resources/v1/customers/credits.mjs +116 -11
  446. package/resources/v1/customers/credits.mjs.map +1 -1
  447. package/resources/v1/customers/customers.d.mts +818 -0
  448. package/resources/v1/customers/customers.d.mts.map +1 -0
  449. package/resources/v1/customers/customers.d.ts +304 -41
  450. package/resources/v1/customers/customers.d.ts.map +1 -1
  451. package/resources/v1/customers/customers.js +214 -73
  452. package/resources/v1/customers/customers.js.map +1 -1
  453. package/resources/v1/customers/customers.mjs +207 -41
  454. package/resources/v1/customers/customers.mjs.map +1 -1
  455. package/resources/v1/customers/index.d.mts +9 -0
  456. package/resources/v1/customers/index.d.mts.map +1 -0
  457. package/resources/v1/customers/index.d.ts +6 -6
  458. package/resources/v1/customers/index.d.ts.map +1 -1
  459. package/resources/v1/customers/index.js +1 -8
  460. package/resources/v1/customers/index.js.map +1 -1
  461. package/resources/v1/customers/index.mjs +3 -3
  462. package/resources/v1/customers/index.mjs.map +1 -1
  463. package/resources/v1/customers/invoices.d.mts +710 -0
  464. package/resources/v1/customers/invoices.d.mts.map +1 -0
  465. package/resources/v1/customers/invoices.d.ts +193 -24
  466. package/resources/v1/customers/invoices.d.ts.map +1 -1
  467. package/resources/v1/customers/invoices.js +131 -22
  468. package/resources/v1/customers/invoices.js.map +1 -1
  469. package/resources/v1/customers/invoices.mjs +130 -19
  470. package/resources/v1/customers/invoices.mjs.map +1 -1
  471. package/resources/v1/customers/named-schedules.d.mts +82 -0
  472. package/resources/v1/customers/named-schedules.d.mts.map +1 -0
  473. package/resources/v1/customers/named-schedules.d.ts +5 -4
  474. package/resources/v1/customers/named-schedules.d.ts.map +1 -1
  475. package/resources/v1/customers/named-schedules.js +3 -2
  476. package/resources/v1/customers/named-schedules.js.map +1 -1
  477. package/resources/v1/customers/named-schedules.mjs +3 -2
  478. package/resources/v1/customers/named-schedules.mjs.map +1 -1
  479. package/resources/v1/customers/plans.d.mts +281 -0
  480. package/resources/v1/customers/plans.d.mts.map +1 -0
  481. package/resources/v1/customers/plans.d.ts +14 -12
  482. package/resources/v1/customers/plans.d.ts.map +1 -1
  483. package/resources/v1/customers/plans.js +8 -15
  484. package/resources/v1/customers/plans.js.map +1 -1
  485. package/resources/v1/customers/plans.mjs +7 -12
  486. package/resources/v1/customers/plans.mjs.map +1 -1
  487. package/resources/v1/customers.d.mts +2 -0
  488. package/resources/v1/customers.d.mts.map +1 -0
  489. package/resources/v1/customers.d.ts.map +1 -1
  490. package/resources/v1/customers.js +2 -15
  491. package/resources/v1/customers.js.map +1 -1
  492. package/resources/v1/dashboards.d.mts +133 -0
  493. package/resources/v1/dashboards.d.mts.map +1 -0
  494. package/resources/v1/dashboards.d.ts +33 -6
  495. package/resources/v1/dashboards.d.ts.map +1 -1
  496. package/resources/v1/dashboards.js +30 -4
  497. package/resources/v1/dashboards.js.map +1 -1
  498. package/resources/v1/dashboards.mjs +30 -4
  499. package/resources/v1/dashboards.mjs.map +1 -1
  500. package/resources/v1/index.d.mts +15 -0
  501. package/resources/v1/index.d.mts.map +1 -0
  502. package/resources/v1/index.d.ts +9 -9
  503. package/resources/v1/index.d.ts.map +1 -1
  504. package/resources/v1/index.js +1 -12
  505. package/resources/v1/index.js.map +1 -1
  506. package/resources/v1/index.mjs +7 -7
  507. package/resources/v1/index.mjs.map +1 -1
  508. package/resources/v1/invoices.d.mts +83 -0
  509. package/resources/v1/invoices.d.mts.map +1 -0
  510. package/resources/v1/invoices.d.ts +28 -6
  511. package/resources/v1/invoices.d.ts.map +1 -1
  512. package/resources/v1/invoices.js +24 -3
  513. package/resources/v1/invoices.js.map +1 -1
  514. package/resources/v1/invoices.mjs +24 -3
  515. package/resources/v1/invoices.mjs.map +1 -1
  516. package/resources/v1/plans.d.mts +240 -0
  517. package/resources/v1/plans.d.mts.map +1 -0
  518. package/resources/v1/plans.d.ts +24 -15
  519. package/resources/v1/plans.d.ts.map +1 -1
  520. package/resources/v1/plans.js +19 -26
  521. package/resources/v1/plans.js.map +1 -1
  522. package/resources/v1/plans.mjs +18 -22
  523. package/resources/v1/plans.mjs.map +1 -1
  524. package/resources/v1/pricing-units.d.mts +34 -0
  525. package/resources/v1/pricing-units.d.mts.map +1 -0
  526. package/resources/v1/pricing-units.d.ts +12 -9
  527. package/resources/v1/pricing-units.d.ts.map +1 -1
  528. package/resources/v1/pricing-units.js +20 -12
  529. package/resources/v1/pricing-units.js.map +1 -1
  530. package/resources/v1/pricing-units.mjs +19 -10
  531. package/resources/v1/pricing-units.mjs.map +1 -1
  532. package/resources/v1/services.d.mts +33 -0
  533. package/resources/v1/services.d.mts.map +1 -0
  534. package/resources/v1/services.d.ts +10 -7
  535. package/resources/v1/services.d.ts.map +1 -1
  536. package/resources/v1/services.js +7 -5
  537. package/resources/v1/services.js.map +1 -1
  538. package/resources/v1/services.mjs +7 -5
  539. package/resources/v1/services.mjs.map +1 -1
  540. package/resources/v1/usage.d.mts +488 -0
  541. package/resources/v1/usage.d.mts.map +1 -0
  542. package/resources/v1/usage.d.ts +220 -57
  543. package/resources/v1/usage.d.ts.map +1 -1
  544. package/resources/v1/usage.js +212 -26
  545. package/resources/v1/usage.js.map +1 -1
  546. package/resources/v1/usage.mjs +211 -24
  547. package/resources/v1/usage.mjs.map +1 -1
  548. package/resources/v1/v1.d.mts +58 -0
  549. package/resources/v1/v1.d.mts.map +1 -0
  550. package/resources/v1/v1.d.ts +15 -15
  551. package/resources/v1/v1.d.ts.map +1 -1
  552. package/resources/v1/v1.js +15 -48
  553. package/resources/v1/v1.js.map +1 -1
  554. package/resources/v1/v1.mjs +8 -19
  555. package/resources/v1/v1.mjs.map +1 -1
  556. package/resources/v1.d.mts +2 -0
  557. package/resources/v1.d.mts.map +1 -0
  558. package/resources/v1.d.ts.map +1 -1
  559. package/resources/v1.js +2 -15
  560. package/resources/v1.js.map +1 -1
  561. package/resources/v2/contracts.d.mts +2794 -0
  562. package/resources/v2/contracts.d.mts.map +1 -0
  563. package/resources/v2/contracts.d.ts +333 -3870
  564. package/resources/v2/contracts.d.ts.map +1 -1
  565. package/resources/v2/contracts.js +102 -12
  566. package/resources/v2/contracts.js.map +1 -1
  567. package/resources/v2/contracts.mjs +102 -12
  568. package/resources/v2/contracts.mjs.map +1 -1
  569. package/resources/v2/index.d.mts +3 -0
  570. package/resources/v2/index.d.mts.map +1 -0
  571. package/resources/v2/index.d.ts.map +1 -1
  572. package/resources/v2/v2.d.mts +10 -0
  573. package/resources/v2/v2.d.mts.map +1 -0
  574. package/resources/v2/v2.d.ts +1 -1
  575. package/resources/v2/v2.d.ts.map +1 -1
  576. package/resources/v2/v2.js +3 -25
  577. package/resources/v2/v2.js.map +1 -1
  578. package/resources/v2/v2.mjs +1 -1
  579. package/resources/v2.d.mts +2 -0
  580. package/resources/v2.d.mts.map +1 -0
  581. package/resources/v2.d.ts.map +1 -1
  582. package/resources/v2.js +2 -15
  583. package/resources/v2.js.map +1 -1
  584. package/resources/webhooks.d.mts +22 -0
  585. package/resources/webhooks.d.mts.map +1 -0
  586. package/resources/webhooks.d.ts +1 -1
  587. package/resources/webhooks.d.ts.map +1 -1
  588. package/resources/webhooks.js +3 -3
  589. package/resources/webhooks.js.map +1 -1
  590. package/resources/webhooks.mjs +1 -1
  591. package/resources/webhooks.mjs.map +1 -1
  592. package/resources.d.mts +2 -0
  593. package/resources.d.mts.map +1 -0
  594. package/resources.d.ts.map +1 -1
  595. package/resources.js +2 -15
  596. package/resources.js.map +1 -1
  597. package/src/api-promise.ts +2 -0
  598. package/src/client.ts +809 -0
  599. package/src/core/README.md +3 -0
  600. package/src/core/api-promise.ts +92 -0
  601. package/src/core/error.ts +130 -0
  602. package/src/core/pagination.ts +319 -0
  603. package/src/core/resource.ts +11 -0
  604. package/src/core/uploads.ts +2 -0
  605. package/src/error.ts +2 -130
  606. package/src/index.ts +6 -221
  607. package/src/internal/README.md +3 -0
  608. package/src/internal/builtin-types.ts +93 -0
  609. package/src/internal/detect-platform.ts +196 -0
  610. package/src/internal/errors.ts +33 -0
  611. package/src/internal/headers.ts +144 -0
  612. package/src/internal/parse.ts +50 -0
  613. package/src/internal/qs/formats.ts +3 -2
  614. package/src/internal/qs/index.ts +3 -3
  615. package/src/internal/qs/stringify.ts +18 -21
  616. package/src/internal/qs/utils.ts +16 -16
  617. package/src/internal/request-options.ts +91 -0
  618. package/src/internal/shim-types.ts +26 -0
  619. package/src/internal/shims.ts +107 -0
  620. package/src/internal/to-file.ts +154 -0
  621. package/src/internal/types.ts +95 -0
  622. package/src/internal/uploads.ts +187 -0
  623. package/src/internal/utils/base64.ts +40 -0
  624. package/src/internal/utils/bytes.ts +32 -0
  625. package/src/internal/utils/env.ts +18 -0
  626. package/src/internal/utils/log.ts +126 -0
  627. package/src/internal/utils/path.ts +88 -0
  628. package/src/internal/utils/sleep.ts +3 -0
  629. package/src/internal/utils/uuid.ts +17 -0
  630. package/src/internal/utils/values.ts +105 -0
  631. package/src/internal/utils.ts +8 -0
  632. package/src/pagination.ts +2 -82
  633. package/src/resource.ts +2 -11
  634. package/src/resources/index.ts +4 -4
  635. package/src/resources/shared.ts +1794 -534
  636. package/src/resources/v1/alerts.ts +79 -8
  637. package/src/resources/v1/audit-logs.ts +48 -26
  638. package/src/resources/v1/billable-metrics.ts +79 -34
  639. package/src/resources/v1/contracts/contracts.ts +465 -1633
  640. package/src/resources/v1/contracts/index.ts +7 -6
  641. package/src/resources/v1/contracts/named-schedules.ts +8 -6
  642. package/src/resources/v1/contracts/products.ts +50 -38
  643. package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
  644. package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
  645. package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
  646. package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
  647. package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
  648. package/src/resources/v1/contracts/rate-cards.ts +1 -1
  649. package/src/resources/v1/contracts.ts +1 -1
  650. package/src/resources/v1/credit-grants.ts +100 -112
  651. package/src/resources/v1/custom-fields.ts +106 -74
  652. package/src/resources/v1/customers/alerts.ts +147 -28
  653. package/src/resources/v1/customers/billing-config.ts +27 -13
  654. package/src/resources/v1/customers/commits.ts +146 -54
  655. package/src/resources/v1/customers/credits.ts +131 -53
  656. package/src/resources/v1/customers/customers.ts +390 -101
  657. package/src/resources/v1/customers/index.ts +19 -18
  658. package/src/resources/v1/customers/invoices.ts +202 -42
  659. package/src/resources/v1/customers/named-schedules.ts +8 -6
  660. package/src/resources/v1/customers/plans.ts +24 -22
  661. package/src/resources/v1/customers.ts +1 -1
  662. package/src/resources/v1/dashboards.ts +34 -7
  663. package/src/resources/v1/index.ts +32 -25
  664. package/src/resources/v1/invoices.ts +28 -9
  665. package/src/resources/v1/plans.ts +42 -43
  666. package/src/resources/v1/pricing-units.ts +15 -23
  667. package/src/resources/v1/services.ts +10 -7
  668. package/src/resources/v1/usage.ts +244 -72
  669. package/src/resources/v1/v1.ts +52 -49
  670. package/src/resources/v1.ts +1 -1
  671. package/src/resources/v2/contracts.ts +420 -5022
  672. package/src/resources/v2/index.ts +2 -2
  673. package/src/resources/v2/v2.ts +3 -3
  674. package/src/resources/v2.ts +1 -1
  675. package/src/resources/webhooks.ts +2 -2
  676. package/src/resources.ts +1 -1
  677. package/src/tsconfig.json +2 -2
  678. package/src/uploads.ts +2 -255
  679. package/src/version.ts +1 -1
  680. package/uploads.d.mts +2 -0
  681. package/uploads.d.mts.map +1 -0
  682. package/uploads.d.ts +1 -74
  683. package/uploads.d.ts.map +1 -1
  684. package/uploads.js +3 -168
  685. package/uploads.js.map +1 -1
  686. package/uploads.mjs +1 -157
  687. package/uploads.mjs.map +1 -1
  688. package/version.d.mts +2 -0
  689. package/version.d.mts.map +1 -0
  690. package/version.d.ts +1 -1
  691. package/version.js +1 -1
  692. package/version.mjs +1 -1
  693. package/_shims/MultipartBody.d.ts +0 -9
  694. package/_shims/MultipartBody.d.ts.map +0 -1
  695. package/_shims/MultipartBody.js +0 -16
  696. package/_shims/MultipartBody.js.map +0 -1
  697. package/_shims/MultipartBody.mjs +0 -12
  698. package/_shims/MultipartBody.mjs.map +0 -1
  699. package/_shims/README.md +0 -46
  700. package/_shims/auto/runtime-bun.d.ts +0 -5
  701. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  702. package/_shims/auto/runtime-bun.js +0 -21
  703. package/_shims/auto/runtime-bun.js.map +0 -1
  704. package/_shims/auto/runtime-bun.mjs +0 -2
  705. package/_shims/auto/runtime-bun.mjs.map +0 -1
  706. package/_shims/auto/runtime-node.d.ts +0 -5
  707. package/_shims/auto/runtime-node.d.ts.map +0 -1
  708. package/_shims/auto/runtime-node.js +0 -21
  709. package/_shims/auto/runtime-node.js.map +0 -1
  710. package/_shims/auto/runtime-node.mjs +0 -2
  711. package/_shims/auto/runtime-node.mjs.map +0 -1
  712. package/_shims/auto/runtime.d.ts +0 -5
  713. package/_shims/auto/runtime.d.ts.map +0 -1
  714. package/_shims/auto/runtime.js +0 -21
  715. package/_shims/auto/runtime.js.map +0 -1
  716. package/_shims/auto/runtime.mjs +0 -2
  717. package/_shims/auto/runtime.mjs.map +0 -1
  718. package/_shims/auto/types-node.d.ts +0 -5
  719. package/_shims/auto/types-node.d.ts.map +0 -1
  720. package/_shims/auto/types-node.js +0 -21
  721. package/_shims/auto/types-node.js.map +0 -1
  722. package/_shims/auto/types-node.mjs +0 -2
  723. package/_shims/auto/types-node.mjs.map +0 -1
  724. package/_shims/auto/types.d.ts +0 -101
  725. package/_shims/auto/types.js +0 -3
  726. package/_shims/auto/types.mjs +0 -3
  727. package/_shims/bun-runtime.d.ts +0 -6
  728. package/_shims/bun-runtime.d.ts.map +0 -1
  729. package/_shims/bun-runtime.js +0 -14
  730. package/_shims/bun-runtime.js.map +0 -1
  731. package/_shims/bun-runtime.mjs +0 -10
  732. package/_shims/bun-runtime.mjs.map +0 -1
  733. package/_shims/index.d.ts +0 -83
  734. package/_shims/index.js +0 -17
  735. package/_shims/index.mjs +0 -11
  736. package/_shims/manual-types.d.ts +0 -12
  737. package/_shims/manual-types.js +0 -3
  738. package/_shims/manual-types.mjs +0 -3
  739. package/_shims/node-runtime.d.ts +0 -3
  740. package/_shims/node-runtime.d.ts.map +0 -1
  741. package/_shims/node-runtime.js +0 -89
  742. package/_shims/node-runtime.js.map +0 -1
  743. package/_shims/node-runtime.mjs +0 -56
  744. package/_shims/node-runtime.mjs.map +0 -1
  745. package/_shims/node-types.d.ts +0 -42
  746. package/_shims/node-types.js +0 -3
  747. package/_shims/node-types.mjs +0 -3
  748. package/_shims/registry.d.ts +0 -37
  749. package/_shims/registry.d.ts.map +0 -1
  750. package/_shims/registry.js +0 -41
  751. package/_shims/registry.js.map +0 -1
  752. package/_shims/registry.mjs +0 -37
  753. package/_shims/registry.mjs.map +0 -1
  754. package/_shims/web-runtime.d.ts +0 -5
  755. package/_shims/web-runtime.d.ts.map +0 -1
  756. package/_shims/web-runtime.js +0 -78
  757. package/_shims/web-runtime.js.map +0 -1
  758. package/_shims/web-runtime.mjs +0 -71
  759. package/_shims/web-runtime.mjs.map +0 -1
  760. package/_shims/web-types.d.ts +0 -83
  761. package/_shims/web-types.js +0 -3
  762. package/_shims/web-types.mjs +0 -3
  763. package/core.d.ts +0 -255
  764. package/core.d.ts.map +0 -1
  765. package/core.js +0 -924
  766. package/core.js.map +0 -1
  767. package/core.mjs +0 -892
  768. package/core.mjs.map +0 -1
  769. package/shims/node.d.ts +0 -30
  770. package/shims/node.d.ts.map +0 -1
  771. package/shims/node.js +0 -31
  772. package/shims/node.js.map +0 -1
  773. package/shims/node.mjs +0 -5
  774. package/shims/node.mjs.map +0 -1
  775. package/shims/web.d.ts +0 -26
  776. package/shims/web.d.ts.map +0 -1
  777. package/shims/web.js +0 -31
  778. package/shims/web.js.map +0 -1
  779. package/shims/web.mjs +0 -5
  780. package/shims/web.mjs.map +0 -1
  781. package/src/_shims/MultipartBody.ts +0 -9
  782. package/src/_shims/README.md +0 -46
  783. package/src/_shims/auto/runtime-bun.ts +0 -4
  784. package/src/_shims/auto/runtime-node.ts +0 -4
  785. package/src/_shims/auto/runtime.ts +0 -4
  786. package/src/_shims/auto/types-node.ts +0 -4
  787. package/src/_shims/auto/types.d.ts +0 -101
  788. package/src/_shims/auto/types.js +0 -3
  789. package/src/_shims/auto/types.mjs +0 -3
  790. package/src/_shims/bun-runtime.ts +0 -14
  791. package/src/_shims/index.d.ts +0 -83
  792. package/src/_shims/index.js +0 -17
  793. package/src/_shims/index.mjs +0 -11
  794. package/src/_shims/manual-types.d.ts +0 -12
  795. package/src/_shims/manual-types.js +0 -3
  796. package/src/_shims/manual-types.mjs +0 -3
  797. package/src/_shims/node-runtime.ts +0 -81
  798. package/src/_shims/node-types.d.ts +0 -42
  799. package/src/_shims/node-types.js +0 -3
  800. package/src/_shims/node-types.mjs +0 -3
  801. package/src/_shims/registry.ts +0 -67
  802. package/src/_shims/web-runtime.ts +0 -103
  803. package/src/_shims/web-types.d.ts +0 -83
  804. package/src/_shims/web-types.js +0 -3
  805. package/src/_shims/web-types.mjs +0 -3
  806. package/src/core.ts +0 -1236
  807. package/src/shims/node.ts +0 -50
  808. package/src/shims/web.ts +0 -50
@@ -1,16 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from "../../../resource.js";
4
- import * as Core from "../../../core.js";
5
- import * as Shared from "../../shared.js";
6
- import * as NamedSchedulesAPI from "./named-schedules.js";
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as Shared from '../../shared';
5
+ import * as NamedSchedulesAPI from './named-schedules';
7
6
  import {
8
7
  NamedScheduleRetrieveParams,
9
8
  NamedScheduleRetrieveResponse,
10
9
  NamedScheduleUpdateParams,
11
10
  NamedSchedules,
12
- } from "./named-schedules.js";
13
- import * as ProductsAPI from "./products.js";
11
+ } from './named-schedules';
12
+ import * as ProductsAPI from './products';
14
13
  import {
15
14
  ProductArchiveParams,
16
15
  ProductArchiveResponse,
@@ -27,9 +26,9 @@ import {
27
26
  Products,
28
27
  QuantityConversion,
29
28
  QuantityRounding,
30
- } from "./products.js";
31
- import * as InvoicesAPI from "../customers/invoices.js";
32
- import * as RateCardsAPI from "./rate-cards/rate-cards.js";
29
+ } from './products';
30
+ import * as InvoicesAPI from '../customers/invoices';
31
+ import * as RateCardsAPI from './rate-cards/rate-cards';
33
32
  import {
34
33
  RateCardArchiveParams,
35
34
  RateCardArchiveResponse,
@@ -45,7 +44,11 @@ import {
45
44
  RateCardUpdateParams,
46
45
  RateCardUpdateResponse,
47
46
  RateCards,
48
- } from "./rate-cards/rate-cards.js";
47
+ } from './rate-cards/rate-cards';
48
+ import { APIPromise } from '../../../core/api-promise';
49
+ import { BodyCursorPage, type BodyCursorPageParams, PagePromise } from '../../../core/pagination';
50
+ import { buildHeaders } from '../../../internal/headers';
51
+ import { RequestOptions } from '../../../internal/request-options';
49
52
 
50
53
  export class Contracts extends APIResource {
51
54
  products: ProductsAPI.Products = new ProductsAPI.Products(this._client);
@@ -53,7 +56,129 @@ export class Contracts extends APIResource {
53
56
  namedSchedules: NamedSchedulesAPI.NamedSchedules = new NamedSchedulesAPI.NamedSchedules(this._client);
54
57
 
55
58
  /**
56
- * Create a new contract
59
+ * Contracts define a customer's products, pricing, discounts, access duration, and
60
+ * billing configuration. Contracts serve as the central billing agreement for both
61
+ * PLG and Enterprise customers, you can automatically customers access to your
62
+ * products and services directly from your product or CRM.
63
+ *
64
+ * ### Use this endpoint to:
65
+ *
66
+ * - PLG onboarding: Automatically provision new self-serve customers with
67
+ * contracts when they sign up.
68
+ * - Enterprise sales: Push negotiated contracts from Salesforce with custom
69
+ * pricing and commitments
70
+ * - Promotional pricing: Implement time-limited discounts and free trials through
71
+ * overrides
72
+ *
73
+ * ### Key components:
74
+ *
75
+ * #### Contract Term and Billing Schedule
76
+ *
77
+ * - Set contract duration using `starting_at` and `ending_before` fields. PLG
78
+ * contracts typically use perpetual agreements (no end date), while Enterprise
79
+ * contracts have fixed end dates which can be edited over time in the case of
80
+ * co-term upsells.
81
+ *
82
+ * #### Rate Card
83
+ *
84
+ * If you are offering usage based pricing, you can set a rate card for the
85
+ * contract to reference through `rate_card_id` or `rate_card_alias`. The rate card
86
+ * is a store of all of your usage based products and their centralized pricing.
87
+ * Any new products or price changes on the rate card can be set to automatically
88
+ * propagate to all associated contracts - this ensures consistent pricing and
89
+ * product launches flow to contracts without manual updates and migrations. The
90
+ * `usage_statement_schedule` determines the cadence on which Metronome will
91
+ * finalize a usage invoice for the customer. This defaults to monthly on the 1st,
92
+ * with options for custom dates, quarterly, or annual cadences. Note: Most usage
93
+ * based billing companies align usage statements to be evaluated aligned to the
94
+ * first of the month. Read more about
95
+ * [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).
96
+ *
97
+ * #### Overrides and discounts
98
+ *
99
+ * Customize pricing on the contract through time-bounded overrides that can target
100
+ * specific products, product families, or complex usage scenarios. Overrides
101
+ * enable two key capabilities:
102
+ *
103
+ * - Discounts: Apply percentage discounts, fixed rate reductions, or
104
+ * quantity-based pricing tiers
105
+ * - Entitlements: Provide special pricing or access to specific products for
106
+ * negotiated deals
107
+ *
108
+ * Read more about
109
+ * [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).
110
+ *
111
+ * #### Commits and Credits
112
+ *
113
+ * Using commits, configure prepaid or postpaid spending commitments where
114
+ * customers promise to spend a certain amount over the contract period paid in
115
+ * advance or in arrears. Use credits to provide free spending allowances. Under
116
+ * the hood these are the same mechanisms, however, credits are typically offered
117
+ * for free (SLA or promotional) or as a part of an allotment associated with a
118
+ * Subscription.
119
+ *
120
+ * In Metronome, you can set commits and credits to only be applicable for a subset
121
+ * of usage. Use `applicable_product_ids` or `applicable_product_tags` to create
122
+ * product or product-family specific commits or credits, or you can build complex
123
+ * boolean logic specifiers to target usage based on pricing and presentation group
124
+ * values using `override_specifiers`.
125
+ *
126
+ * These objects can also also be configured to have a recurrence schedule to
127
+ * easily model customer packaging which includes recurring monthly or quarterly
128
+ * allotments.
129
+ *
130
+ * Commits support rollover settings (`rollover_fraction`) to transfer unused
131
+ * balances between contract periods, either entirely or as a percentage.
132
+ *
133
+ * Read more about
134
+ * [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).
135
+ *
136
+ * #### Subscriptions
137
+ *
138
+ * You can add a fixed recurring charge to a contract, like monthly licenses or
139
+ * seat-based fees, using the subscription charge. Subscription charges are defined
140
+ * on your rate card and you can select which subscription is applicable to add to
141
+ * each contract. When you add a subscription to a contract you need to:
142
+ *
143
+ * - Define whether the subscription is paid for in-advance or in-arrears
144
+ * (`collection_schedule`)
145
+ * - Define the proration behavior (`proration`)
146
+ * - Specify an initial quantity (`initial_quantity`)
147
+ * - Define which subscription rate on the rate card should be used
148
+ * (`subscription_rate`)
149
+ *
150
+ * Read more about
151
+ * [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).
152
+ *
153
+ * #### Scheduled Charges
154
+ *
155
+ * Set up one-time, recurring, or entirely custom charges that occur on specific
156
+ * dates, separate from usage-based billing or commitments. These can be used to
157
+ * model non-recurring platform charges or professional services.
158
+ *
159
+ * #### Threshold Billing
160
+ *
161
+ * Metronome allows you to configure automatic billing triggers when customers
162
+ * reach spending thresholds to prevent fraud and manage risk. You can use
163
+ * `spend_threshold_configuration` to trigger an invoice to cover current charges
164
+ * whenever the threshold is reached or you can ensure the customer maintains a
165
+ * minimum prepaid balance using the `prepaid_balance_configuration`.
166
+ *
167
+ * Read more about
168
+ * [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/)
169
+ * and
170
+ * [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).
171
+ *
172
+ * ### Usage guidelines:
173
+ *
174
+ * - You can always
175
+ * [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/)
176
+ * after it has been created, using the `editContract` endpoint. Metronome keeps
177
+ * track of all edits, both in the audit log and over the `getEditHistory`
178
+ * endpoint.
179
+ * - Customers in Metronome can have multiple concurrent contracts at one time. Use
180
+ * `usage_filters` to route the correct usage to each contract.
181
+ * [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).
57
182
  *
58
183
  * @example
59
184
  * ```ts
@@ -68,7 +193,7 @@ export class Contracts extends APIResource {
68
193
  * });
69
194
  * ```
70
195
  */
71
- create(body: ContractCreateParams, options?: Core.RequestOptions): Core.APIPromise<ContractCreateResponse> {
196
+ create(body: ContractCreateParams, options?: RequestOptions): APIPromise<ContractCreateResponse> {
72
197
  return this._client.post('/v1/contracts/create', { body, ...options });
73
198
  }
74
199
 
@@ -84,16 +209,18 @@ export class Contracts extends APIResource {
84
209
  * });
85
210
  * ```
86
211
  */
87
- retrieve(
88
- body: ContractRetrieveParams,
89
- options?: Core.RequestOptions,
90
- ): Core.APIPromise<ContractRetrieveResponse> {
212
+ retrieve(body: ContractRetrieveParams, options?: RequestOptions): APIPromise<ContractRetrieveResponse> {
91
213
  return this._client.post('/v1/contracts/get', { body, ...options });
92
214
  }
93
215
 
94
216
  /**
95
- * This is the v1 endpoint to list all contracts for a customer. New clients should
96
- * implement using the v2 endpoint.
217
+ * Retrieves all contracts for a specific customer, including pricing, terms,
218
+ * credits, and commitments. Use this to view a customer's contract history and
219
+ * current agreements for billing management. Returns contract details with
220
+ * optional ledgers and balance information.
221
+ *
222
+ * ⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2
223
+ * endpoint for enhanced features.
97
224
  *
98
225
  * @example
99
226
  * ```ts
@@ -102,12 +229,29 @@ export class Contracts extends APIResource {
102
229
  * });
103
230
  * ```
104
231
  */
105
- list(body: ContractListParams, options?: Core.RequestOptions): Core.APIPromise<ContractListResponse> {
232
+ list(body: ContractListParams, options?: RequestOptions): APIPromise<ContractListResponse> {
106
233
  return this._client.post('/v1/contracts/list', { body, ...options });
107
234
  }
108
235
 
109
236
  /**
110
- * Add a manual balance entry
237
+ * Manually adjust the available balance on a commit or credit. This entry is
238
+ * appended to the commit ledger as a new event. Optionally include a description
239
+ * that provides the reasoning for the entry.
240
+ *
241
+ * ### Use this endpoint to:
242
+ *
243
+ * - Address incorrect usage burn-down caused by malformed usage or invalid config
244
+ * - Decrease available balance to account for outages where usage may have not
245
+ * been tracked or sent to Metronome
246
+ * - Issue credits to customers in the form of increased balance on existing commit
247
+ * or credit
248
+ *
249
+ * ### Usage guidelines:
250
+ *
251
+ * Manual ledger entries can be extremely useful for resolving discrepancies in
252
+ * Metronome. However, most corrections to inaccurate billings can be modified
253
+ * upstream of the commit, whether that is via contract editing, rate editing, or
254
+ * other actions that cause an invoice to be recalculated.
111
255
  *
112
256
  * @example
113
257
  * ```ts
@@ -123,18 +267,18 @@ export class Contracts extends APIResource {
123
267
  */
124
268
  addManualBalanceEntry(
125
269
  body: ContractAddManualBalanceEntryParams,
126
- options?: Core.RequestOptions,
127
- ): Core.APIPromise<void> {
270
+ options?: RequestOptions,
271
+ ): APIPromise<void> {
128
272
  return this._client.post('/v1/contracts/addManualBalanceLedgerEntry', {
129
273
  body,
130
274
  ...options,
131
- headers: { Accept: '*/*', ...options?.headers },
275
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
132
276
  });
133
277
  }
134
278
 
135
279
  /**
136
280
  * Amendments will be replaced by Contract editing. New clients should implement
137
- * using the editContract endpoint. Read more about the migration to contract
281
+ * using the `editContract` endpoint. Read more about the migration to contract
138
282
  * editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
139
283
  * reach out to your Metronome representative for more details. Once contract
140
284
  * editing is enabled, access to this endpoint will be removed.
@@ -148,12 +292,31 @@ export class Contracts extends APIResource {
148
292
  * });
149
293
  * ```
150
294
  */
151
- amend(body: ContractAmendParams, options?: Core.RequestOptions): Core.APIPromise<ContractAmendResponse> {
295
+ amend(body: ContractAmendParams, options?: RequestOptions): APIPromise<ContractAmendResponse> {
152
296
  return this._client.post('/v1/contracts/amend', { body, ...options });
153
297
  }
154
298
 
155
299
  /**
156
- * Archive a contract
300
+ * Permanently end and archive a contract along with all its terms. Any draft
301
+ * invoices will be canceled, and all upcoming scheduled invoices will be
302
+ * voided–also all finalized invoices can optionally be voided. Use this in the
303
+ * event a contract was incorrectly created and needed to be removed from a
304
+ * customer.
305
+ *
306
+ * #### Impact on commits and credits:
307
+ *
308
+ * When archiving a contract, all associated commits and credits are also archived.
309
+ * For prepaid commits with active segments, Metronome automatically generates
310
+ * expiration ledger entries to close out any remaining balances, ensuring accurate
311
+ * accounting of unused prepaid amounts. These ledger entries will appear in the
312
+ * commit's transaction history with type `PREPAID_COMMIT_EXPIRATION`.
313
+ *
314
+ * #### Archived contract visibility:
315
+ *
316
+ * Archived contracts remain accessible for historical reporting and audit
317
+ * purposes. They can be retrieved using the `ListContracts` endpoint by setting
318
+ * the `include_archived` parameter to `true` or in the Metronome UI when the "Show
319
+ * archived" option is enabled.
157
320
  *
158
321
  * @example
159
322
  * ```ts
@@ -164,15 +327,16 @@ export class Contracts extends APIResource {
164
327
  * });
165
328
  * ```
166
329
  */
167
- archive(
168
- body: ContractArchiveParams,
169
- options?: Core.RequestOptions,
170
- ): Core.APIPromise<ContractArchiveResponse> {
330
+ archive(body: ContractArchiveParams, options?: RequestOptions): APIPromise<ContractArchiveResponse> {
171
331
  return this._client.post('/v1/contracts/archive', { body, ...options });
172
332
  }
173
333
 
174
334
  /**
175
- * Creates historical usage invoices for a contract
335
+ * Create historical usage invoices for past billing periods on specific contracts.
336
+ * Use this endpoint to generate retroactive invoices with custom usage line items,
337
+ * quantities, and date ranges. Supports preview mode to validate invoice data
338
+ * before creation. Ideal for billing migrations or correcting past billing
339
+ * periods.
176
340
  *
177
341
  * @example
178
342
  * ```ts
@@ -205,32 +369,80 @@ export class Contracts extends APIResource {
205
369
  */
206
370
  createHistoricalInvoices(
207
371
  body: ContractCreateHistoricalInvoicesParams,
208
- options?: Core.RequestOptions,
209
- ): Core.APIPromise<ContractCreateHistoricalInvoicesResponse> {
372
+ options?: RequestOptions,
373
+ ): APIPromise<ContractCreateHistoricalInvoicesResponse> {
210
374
  return this._client.post('/v1/contracts/createHistoricalInvoices', { body, ...options });
211
375
  }
212
376
 
213
377
  /**
214
- * List balances (commits and credits).
378
+ * Retrieve a comprehensive view of all available balances (commits and credits)
379
+ * for a customer. This endpoint provides real-time visibility into prepaid funds,
380
+ * postpaid commitments, promotional credits, and other balance types that can
381
+ * offset usage charges, helping you build transparent billing experiences.
382
+ *
383
+ * ### Use this endpoint to:
384
+ *
385
+ * - Display current available balances in customer dashboards
386
+ * - Verify available funds before approving high-usage operations
387
+ * - Generate balance reports for finance teams
388
+ * - Filter balances by contract or date ranges
389
+ *
390
+ * ### Key response fields:
391
+ *
392
+ * An array of balance objects (all credits and commits) containing:
393
+ *
394
+ * - Balance details: Current available amount for each commit or credit
395
+ * - Metadata: Product associations, priorities, applicable date ranges
396
+ * - Optional ledger entries: Detailed transaction history (if
397
+ * `include_ledgers=true`)
398
+ * - Balance calculations: Including pending transactions and future-dated entries
399
+ * - Custom fields: Any additional metadata attached to balances
400
+ *
401
+ * ### Usage guidelines:
402
+ *
403
+ * - Date filtering: Use `effective_before` to include only balances with access
404
+ * before a specific date (exclusive)
405
+ * - Set `include_balance=true` for calculated balance amounts on each commit or
406
+ * credit
407
+ * - Set `include_ledgers=true` for full transaction history
408
+ * - Set `include_contract_balances = true` to see contract level balances
409
+ * - Balance logic: Reflects currently accessible amounts, excluding expired/future
410
+ * segments
411
+ * - Manual adjustments: Includes all manual ledger entries, even future-dated ones
215
412
  *
216
413
  * @example
217
414
  * ```ts
218
- * const response = await client.v1.contracts.listBalances({
219
- * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
220
- * id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
221
- * include_ledgers: true,
222
- * });
415
+ * // Automatically fetches more pages as needed.
416
+ * for await (const contractListBalancesResponse of client.v1.contracts.listBalances(
417
+ * {
418
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
419
+ * id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
420
+ * include_ledgers: true,
421
+ * },
422
+ * )) {
423
+ * // ...
424
+ * }
223
425
  * ```
224
426
  */
225
427
  listBalances(
226
428
  body: ContractListBalancesParams,
227
- options?: Core.RequestOptions,
228
- ): Core.APIPromise<ContractListBalancesResponse> {
229
- return this._client.post('/v1/contracts/customerBalances/list', { body, ...options });
429
+ options?: RequestOptions,
430
+ ): PagePromise<ContractListBalancesResponsesBodyCursorPage, ContractListBalancesResponse> {
431
+ return this._client.getAPIList(
432
+ '/v1/contracts/customerBalances/list',
433
+ BodyCursorPage<ContractListBalancesResponse>,
434
+ { body, method: 'post', ...options },
435
+ );
230
436
  }
231
437
 
232
438
  /**
233
- * Get the rate schedule for the rate card on a given contract.
439
+ * For a specific customer and contract, get the rates at a specific point in time.
440
+ * This endpoint takes the contract's rate card into consideration, including
441
+ * scheduled changes. It also takes into account overrides on the contract.
442
+ *
443
+ * For example, if you want to show your customer a summary of the prices they are
444
+ * paying, inclusive of any negotiated discounts or promotions, use this endpoint.
445
+ * This endpoint only returns rates that are entitled.
234
446
  *
235
447
  * @example
236
448
  * ```ts
@@ -253,8 +465,8 @@ export class Contracts extends APIResource {
253
465
  */
254
466
  retrieveRateSchedule(
255
467
  params: ContractRetrieveRateScheduleParams,
256
- options?: Core.RequestOptions,
257
- ): Core.APIPromise<ContractRetrieveRateScheduleResponse> {
468
+ options?: RequestOptions,
469
+ ): APIPromise<ContractRetrieveRateScheduleResponse> {
258
470
  const { limit, next_page, ...body } = params;
259
471
  return this._client.post('/v1/contracts/getContractRateSchedule', {
260
472
  query: { limit, next_page },
@@ -264,8 +476,16 @@ export class Contracts extends APIResource {
264
476
  }
265
477
 
266
478
  /**
267
- * Fetch the quantity and price for a subscription over time. End-point does not
268
- * return future scheduled changes.
479
+ * Get the history of subscription quantities and prices over time for a given
480
+ * `subscription_id`. This endpoint can be used to power an in-product experience
481
+ * where you show a customer their historical changes to seat count. Future changes
482
+ * are not included in this endpoint - use the `getContract` endpoint to view the
483
+ * future scheduled changes to a subscription's quantity.
484
+ *
485
+ * Subscriptions are used to model fixed recurring fees as well as seat-based
486
+ * recurring fees. To model changes to the number of seats in Metronome, you can
487
+ * increment or decrement the quantity on a subscription at any point in the past
488
+ * or future.
269
489
  *
270
490
  * @example
271
491
  * ```ts
@@ -282,8 +502,8 @@ export class Contracts extends APIResource {
282
502
  */
283
503
  retrieveSubscriptionQuantityHistory(
284
504
  body: ContractRetrieveSubscriptionQuantityHistoryParams,
285
- options?: Core.RequestOptions,
286
- ): Core.APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse> {
505
+ options?: RequestOptions,
506
+ ): APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse> {
287
507
  return this._client.post('/v1/contracts/getSubscriptionQuantityHistory', { body, ...options });
288
508
  }
289
509
 
@@ -300,994 +520,95 @@ export class Contracts extends APIResource {
300
520
  * issued_at: '2019-12-27T18:11:19.117Z',
301
521
  * line_items: [
302
522
  * {
303
- * professional_service_id:
304
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
305
- * },
306
- * ],
307
- * });
308
- * ```
309
- */
310
- scheduleProServicesInvoice(
311
- body: ContractScheduleProServicesInvoiceParams,
312
- options?: Core.RequestOptions,
313
- ): Core.APIPromise<ContractScheduleProServicesInvoiceResponse> {
314
- return this._client.post('/v1/contracts/scheduleProServicesInvoice', { body, ...options });
315
- }
316
-
317
- /**
318
- * Set usage filter for a contract
319
- *
320
- * @example
321
- * ```ts
322
- * await client.v1.contracts.setUsageFilter({
323
- * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
324
- * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
325
- * group_key: 'business_subscription_id',
326
- * group_values: ['ID-1', 'ID-2'],
327
- * starting_at: '2020-01-01T00:00:00.000Z',
328
- * });
329
- * ```
330
- */
331
- setUsageFilter(body: ContractSetUsageFilterParams, options?: Core.RequestOptions): Core.APIPromise<void> {
332
- return this._client.post('/v1/contracts/setUsageFilter', {
333
- body,
334
- ...options,
335
- headers: { Accept: '*/*', ...options?.headers },
336
- });
337
- }
338
-
339
- /**
340
- * Update the end date of a contract
341
- *
342
- * @example
343
- * ```ts
344
- * const response = await client.v1.contracts.updateEndDate({
345
- * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
346
- * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
347
- * ending_before: '2020-01-01T00:00:00.000Z',
348
- * });
349
- * ```
350
- */
351
- updateEndDate(
352
- body: ContractUpdateEndDateParams,
353
- options?: Core.RequestOptions,
354
- ): Core.APIPromise<ContractUpdateEndDateResponse> {
355
- return this._client.post('/v1/contracts/updateEndDate', { body, ...options });
356
- }
357
- }
358
-
359
- export interface ContractCreateResponse {
360
- data: Shared.ID;
361
- }
362
-
363
- export interface ContractRetrieveResponse {
364
- data: ContractRetrieveResponse.Data;
365
- }
366
-
367
- export namespace ContractRetrieveResponse {
368
- export interface Data {
369
- id: string;
370
-
371
- amendments: Array<Data.Amendment>;
372
-
373
- current: Shared.ContractWithoutAmendments;
374
-
375
- customer_id: string;
376
-
377
- initial: Shared.ContractWithoutAmendments;
378
-
379
- /**
380
- * RFC 3339 timestamp indicating when the contract was archived. If not returned,
381
- * the contract is not archived.
382
- */
383
- archived_at?: string;
384
-
385
- custom_fields?: { [key: string]: string };
386
-
387
- /**
388
- * The billing provider configuration associated with a contract.
389
- */
390
- customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
391
-
392
- prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
393
-
394
- /**
395
- * Priority of the contract.
396
- */
397
- priority?: number;
398
-
399
- /**
400
- * Determines which scheduled and commit charges to consolidate onto the Contract's
401
- * usage invoice. The charge's `timestamp` must match the usage invoice's
402
- * `ending_before` date for consolidation to occur. This field cannot be modified
403
- * after a Contract has been created. If this field is omitted, charges will appear
404
- * on a separate invoice from usage charges.
405
- */
406
- scheduled_charges_on_usage_invoices?: 'ALL';
407
-
408
- spend_threshold_configuration?: Data.SpendThresholdConfiguration;
409
-
410
- /**
411
- * List of subscriptions on the contract.
412
- */
413
- subscriptions?: Array<Data.Subscription>;
414
-
415
- /**
416
- * Prevents the creation of duplicates. If a request to create a record is made
417
- * with a previously used uniqueness key, a new record will not be created and the
418
- * request will fail with a 409 error.
419
- */
420
- uniqueness_key?: string;
421
- }
422
-
423
- export namespace Data {
424
- export interface Amendment {
425
- id: string;
426
-
427
- commits: Array<Shared.Commit>;
428
-
429
- created_at: string;
430
-
431
- created_by: string;
432
-
433
- overrides: Array<Shared.Override>;
434
-
435
- scheduled_charges: Array<Shared.ScheduledCharge>;
436
-
437
- starting_at: string;
438
-
439
- credits?: Array<Shared.Credit>;
440
-
441
- /**
442
- * This field's availability is dependent on your client's configuration.
443
- */
444
- discounts?: Array<Shared.Discount>;
445
-
446
- /**
447
- * This field's availability is dependent on your client's configuration.
448
- */
449
- netsuite_sales_order_id?: string;
450
-
451
- /**
452
- * This field's availability is dependent on your client's configuration.
453
- */
454
- professional_services?: Array<Shared.ProService>;
455
-
456
- /**
457
- * This field's availability is dependent on your client's configuration.
458
- */
459
- reseller_royalties?: Array<Amendment.ResellerRoyalty>;
460
-
461
- /**
462
- * This field's availability is dependent on your client's configuration.
463
- */
464
- salesforce_opportunity_id?: string;
465
- }
466
-
467
- export namespace Amendment {
468
- export interface ResellerRoyalty {
469
- reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
470
-
471
- aws_account_number?: string;
472
-
473
- aws_offer_id?: string;
474
-
475
- aws_payer_reference_id?: string;
476
-
477
- ending_before?: string | null;
478
-
479
- fraction?: number;
480
-
481
- gcp_account_id?: string;
482
-
483
- gcp_offer_id?: string;
484
-
485
- netsuite_reseller_id?: string;
486
-
487
- reseller_contract_value?: number;
488
-
489
- starting_at?: string;
490
- }
491
- }
492
-
493
- /**
494
- * The billing provider configuration associated with a contract.
495
- */
496
- export interface CustomerBillingProviderConfiguration {
497
- billing_provider:
498
- | 'aws_marketplace'
499
- | 'stripe'
500
- | 'netsuite'
501
- | 'custom'
502
- | 'azure_marketplace'
503
- | 'quickbooks_online'
504
- | 'workday'
505
- | 'gcp_marketplace';
506
-
507
- delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
508
-
509
- id?: string;
510
-
511
- /**
512
- * Configuration for the billing provider. The structure of this object is specific
513
- * to the billing provider.
514
- */
515
- configuration?: { [key: string]: unknown };
516
- }
517
-
518
- export interface PrepaidBalanceThresholdConfiguration {
519
- commit: PrepaidBalanceThresholdConfiguration.Commit;
520
-
521
- /**
522
- * When set to false, the contract will not be evaluated against the
523
- * threshold_amount. Toggling to true will result an immediate evaluation,
524
- * regardless of prior state.
525
- */
526
- is_enabled: boolean;
527
-
528
- payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
529
-
530
- /**
531
- * Specify the amount the balance should be recharged to.
532
- */
533
- recharge_to_amount: number;
534
-
535
- /**
536
- * Specify the threshold amount for the contract. Each time the contract's prepaid
537
- * balance lowers to this amount, a threshold charge will be initiated.
538
- */
539
- threshold_amount: number;
540
-
541
- /**
542
- * If provided, the threshold, recharge-to amount, and the resulting threshold
543
- * commit amount will be in terms of this credit type instead of the fiat currency.
544
- */
545
- custom_credit_type_id?: string;
546
- }
547
-
548
- export namespace PrepaidBalanceThresholdConfiguration {
549
- export interface Commit {
550
- /**
551
- * The commit product that will be used to generate the line item for commit
552
- * payment.
553
- */
554
- product_id: string;
555
-
556
- /**
557
- * Which products the threshold commit applies to. If applicable_product_ids,
558
- * applicable_product_tags or specifiers are not provided, the commit applies to
559
- * all products.
560
- */
561
- applicable_product_ids?: Array<string>;
562
-
563
- /**
564
- * Which tags the threshold commit applies to. If applicable_product_ids,
565
- * applicable_product_tags or specifiers are not provided, the commit applies to
566
- * all products.
567
- */
568
- applicable_product_tags?: Array<string>;
569
-
570
- description?: string;
571
-
572
- /**
573
- * Specify the name of the line item for the threshold charge. If left blank, it
574
- * will default to the commit product name.
575
- */
576
- name?: string;
577
-
578
- /**
579
- * List of filters that determine what kind of customer usage draws down a commit
580
- * or credit. A customer's usage needs to meet the condition of at least one of the
581
- * specifiers to contribute to a commit's or credit's drawdown. This field cannot
582
- * be used together with `applicable_product_ids` or `applicable_product_tags`.
583
- */
584
- specifiers?: Array<Commit.Specifier>;
585
- }
586
-
587
- export namespace Commit {
588
- export interface Specifier {
589
- presentation_group_values?: { [key: string]: string };
590
-
591
- pricing_group_values?: { [key: string]: string };
592
-
593
- /**
594
- * If provided, the specifier will only apply to the product with the specified ID.
595
- */
596
- product_id?: string;
597
-
598
- /**
599
- * If provided, the specifier will only apply to products with all the specified
600
- * tags.
601
- */
602
- product_tags?: Array<string>;
603
- }
604
- }
605
-
606
- export interface PaymentGateConfig {
607
- /**
608
- * Gate access to the commit balance based on successful collection of payment.
609
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
610
- * facilitate payment using your own payment integration. Select NONE if you do not
611
- * wish to payment gate the commit balance.
612
- */
613
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
614
-
615
- /**
616
- * Only applicable if using PRECALCULATED as your tax type.
617
- */
618
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
619
-
620
- /**
621
- * Only applicable if using STRIPE as your payment gate type.
622
- */
623
- stripe_config?: PaymentGateConfig.StripeConfig;
624
-
625
- /**
626
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
627
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
628
- * will default to NONE.
629
- */
630
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
631
- }
632
-
633
- export namespace PaymentGateConfig {
634
- /**
635
- * Only applicable if using PRECALCULATED as your tax type.
636
- */
637
- export interface PrecalculatedTaxConfig {
638
- /**
639
- * Amount of tax to be applied. This should be in the same currency and
640
- * denomination as the commit's invoice schedule
641
- */
642
- tax_amount: number;
643
-
644
- /**
645
- * Name of the tax to be applied. This may be used in an invoice line item
646
- * description.
647
- */
648
- tax_name?: string;
649
- }
650
-
651
- /**
652
- * Only applicable if using STRIPE as your payment gate type.
653
- */
654
- export interface StripeConfig {
655
- /**
656
- * If left blank, will default to INVOICE
657
- */
658
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
659
-
660
- /**
661
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
662
- * your payment type.
663
- */
664
- invoice_metadata?: { [key: string]: string };
665
- }
666
- }
667
- }
668
-
669
- export interface SpendThresholdConfiguration {
670
- commit: SpendThresholdConfiguration.Commit;
671
-
672
- /**
673
- * When set to false, the contract will not be evaluated against the
674
- * threshold_amount. Toggling to true will result an immediate evaluation,
675
- * regardless of prior state.
676
- */
677
- is_enabled: boolean;
678
-
679
- payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
680
-
681
- /**
682
- * Specify the threshold amount for the contract. Each time the contract's usage
683
- * hits this amount, a threshold charge will be initiated.
684
- */
685
- threshold_amount: number;
686
- }
687
-
688
- export namespace SpendThresholdConfiguration {
689
- export interface Commit {
690
- /**
691
- * The commit product that will be used to generate the line item for commit
692
- * payment.
693
- */
694
- product_id: string;
695
-
696
- description?: string;
697
-
698
- /**
699
- * Specify the name of the line item for the threshold charge. If left blank, it
700
- * will default to the commit product name.
701
- */
702
- name?: string;
703
- }
704
-
705
- export interface PaymentGateConfig {
706
- /**
707
- * Gate access to the commit balance based on successful collection of payment.
708
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
709
- * facilitate payment using your own payment integration. Select NONE if you do not
710
- * wish to payment gate the commit balance.
711
- */
712
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
713
-
714
- /**
715
- * Only applicable if using PRECALCULATED as your tax type.
716
- */
717
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
718
-
719
- /**
720
- * Only applicable if using STRIPE as your payment gate type.
721
- */
722
- stripe_config?: PaymentGateConfig.StripeConfig;
723
-
724
- /**
725
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
726
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
727
- * will default to NONE.
728
- */
729
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
730
- }
731
-
732
- export namespace PaymentGateConfig {
733
- /**
734
- * Only applicable if using PRECALCULATED as your tax type.
735
- */
736
- export interface PrecalculatedTaxConfig {
737
- /**
738
- * Amount of tax to be applied. This should be in the same currency and
739
- * denomination as the commit's invoice schedule
740
- */
741
- tax_amount: number;
742
-
743
- /**
744
- * Name of the tax to be applied. This may be used in an invoice line item
745
- * description.
746
- */
747
- tax_name?: string;
748
- }
749
-
750
- /**
751
- * Only applicable if using STRIPE as your payment gate type.
752
- */
753
- export interface StripeConfig {
754
- /**
755
- * If left blank, will default to INVOICE
756
- */
757
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
758
-
759
- /**
760
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
761
- * your payment type.
762
- */
763
- invoice_metadata?: { [key: string]: string };
764
- }
765
- }
766
- }
767
-
768
- export interface Subscription {
769
- collection_schedule: 'ADVANCE' | 'ARREARS';
770
-
771
- proration: Subscription.Proration;
772
-
773
- /**
774
- * List of quantity schedule items for the subscription. Only includes the current
775
- * quantity and future quantity changes.
776
- */
777
- quantity_schedule: Array<Subscription.QuantitySchedule>;
778
-
779
- starting_at: string;
780
-
781
- subscription_rate: Subscription.SubscriptionRate;
782
-
783
- id?: string;
784
-
785
- custom_fields?: { [key: string]: string };
786
-
787
- description?: string;
788
-
789
- ending_before?: string;
790
-
791
- fiat_credit_type_id?: string;
792
-
793
- name?: string;
794
- }
795
-
796
- export namespace Subscription {
797
- export interface Proration {
798
- invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
799
-
800
- is_prorated: boolean;
801
- }
802
-
803
- export interface QuantitySchedule {
804
- quantity: number;
805
-
806
- starting_at: string;
807
-
808
- ending_before?: string;
809
- }
810
-
811
- export interface SubscriptionRate {
812
- billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
813
-
814
- product: SubscriptionRate.Product;
815
- }
816
-
817
- export namespace SubscriptionRate {
818
- export interface Product {
819
- id: string;
820
-
821
- name: string;
822
- }
823
- }
824
- }
825
- }
826
- }
827
-
828
- export interface ContractListResponse {
829
- data: Array<ContractListResponse.Data>;
830
- }
831
-
832
- export namespace ContractListResponse {
833
- export interface Data {
834
- id: string;
835
-
836
- amendments: Array<Data.Amendment>;
837
-
838
- current: Shared.ContractWithoutAmendments;
839
-
840
- customer_id: string;
841
-
842
- initial: Shared.ContractWithoutAmendments;
843
-
844
- /**
845
- * RFC 3339 timestamp indicating when the contract was archived. If not returned,
846
- * the contract is not archived.
847
- */
848
- archived_at?: string;
849
-
850
- custom_fields?: { [key: string]: string };
851
-
852
- /**
853
- * The billing provider configuration associated with a contract.
854
- */
855
- customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
856
-
857
- prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
858
-
859
- /**
860
- * Priority of the contract.
861
- */
862
- priority?: number;
863
-
864
- /**
865
- * Determines which scheduled and commit charges to consolidate onto the Contract's
866
- * usage invoice. The charge's `timestamp` must match the usage invoice's
867
- * `ending_before` date for consolidation to occur. This field cannot be modified
868
- * after a Contract has been created. If this field is omitted, charges will appear
869
- * on a separate invoice from usage charges.
870
- */
871
- scheduled_charges_on_usage_invoices?: 'ALL';
872
-
873
- spend_threshold_configuration?: Data.SpendThresholdConfiguration;
874
-
875
- /**
876
- * List of subscriptions on the contract.
877
- */
878
- subscriptions?: Array<Data.Subscription>;
879
-
880
- /**
881
- * Prevents the creation of duplicates. If a request to create a record is made
882
- * with a previously used uniqueness key, a new record will not be created and the
883
- * request will fail with a 409 error.
884
- */
885
- uniqueness_key?: string;
886
- }
887
-
888
- export namespace Data {
889
- export interface Amendment {
890
- id: string;
891
-
892
- commits: Array<Shared.Commit>;
893
-
894
- created_at: string;
895
-
896
- created_by: string;
897
-
898
- overrides: Array<Shared.Override>;
899
-
900
- scheduled_charges: Array<Shared.ScheduledCharge>;
901
-
902
- starting_at: string;
903
-
904
- credits?: Array<Shared.Credit>;
905
-
906
- /**
907
- * This field's availability is dependent on your client's configuration.
908
- */
909
- discounts?: Array<Shared.Discount>;
910
-
911
- /**
912
- * This field's availability is dependent on your client's configuration.
913
- */
914
- netsuite_sales_order_id?: string;
915
-
916
- /**
917
- * This field's availability is dependent on your client's configuration.
918
- */
919
- professional_services?: Array<Shared.ProService>;
920
-
921
- /**
922
- * This field's availability is dependent on your client's configuration.
923
- */
924
- reseller_royalties?: Array<Amendment.ResellerRoyalty>;
925
-
926
- /**
927
- * This field's availability is dependent on your client's configuration.
928
- */
929
- salesforce_opportunity_id?: string;
930
- }
931
-
932
- export namespace Amendment {
933
- export interface ResellerRoyalty {
934
- reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
935
-
936
- aws_account_number?: string;
937
-
938
- aws_offer_id?: string;
939
-
940
- aws_payer_reference_id?: string;
941
-
942
- ending_before?: string | null;
943
-
944
- fraction?: number;
945
-
946
- gcp_account_id?: string;
947
-
948
- gcp_offer_id?: string;
949
-
950
- netsuite_reseller_id?: string;
951
-
952
- reseller_contract_value?: number;
953
-
954
- starting_at?: string;
955
- }
956
- }
957
-
958
- /**
959
- * The billing provider configuration associated with a contract.
960
- */
961
- export interface CustomerBillingProviderConfiguration {
962
- billing_provider:
963
- | 'aws_marketplace'
964
- | 'stripe'
965
- | 'netsuite'
966
- | 'custom'
967
- | 'azure_marketplace'
968
- | 'quickbooks_online'
969
- | 'workday'
970
- | 'gcp_marketplace';
971
-
972
- delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
973
-
974
- id?: string;
975
-
976
- /**
977
- * Configuration for the billing provider. The structure of this object is specific
978
- * to the billing provider.
979
- */
980
- configuration?: { [key: string]: unknown };
981
- }
982
-
983
- export interface PrepaidBalanceThresholdConfiguration {
984
- commit: PrepaidBalanceThresholdConfiguration.Commit;
985
-
986
- /**
987
- * When set to false, the contract will not be evaluated against the
988
- * threshold_amount. Toggling to true will result an immediate evaluation,
989
- * regardless of prior state.
990
- */
991
- is_enabled: boolean;
992
-
993
- payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
994
-
995
- /**
996
- * Specify the amount the balance should be recharged to.
997
- */
998
- recharge_to_amount: number;
999
-
1000
- /**
1001
- * Specify the threshold amount for the contract. Each time the contract's prepaid
1002
- * balance lowers to this amount, a threshold charge will be initiated.
1003
- */
1004
- threshold_amount: number;
1005
-
1006
- /**
1007
- * If provided, the threshold, recharge-to amount, and the resulting threshold
1008
- * commit amount will be in terms of this credit type instead of the fiat currency.
1009
- */
1010
- custom_credit_type_id?: string;
1011
- }
1012
-
1013
- export namespace PrepaidBalanceThresholdConfiguration {
1014
- export interface Commit {
1015
- /**
1016
- * The commit product that will be used to generate the line item for commit
1017
- * payment.
1018
- */
1019
- product_id: string;
1020
-
1021
- /**
1022
- * Which products the threshold commit applies to. If applicable_product_ids,
1023
- * applicable_product_tags or specifiers are not provided, the commit applies to
1024
- * all products.
1025
- */
1026
- applicable_product_ids?: Array<string>;
1027
-
1028
- /**
1029
- * Which tags the threshold commit applies to. If applicable_product_ids,
1030
- * applicable_product_tags or specifiers are not provided, the commit applies to
1031
- * all products.
1032
- */
1033
- applicable_product_tags?: Array<string>;
1034
-
1035
- description?: string;
1036
-
1037
- /**
1038
- * Specify the name of the line item for the threshold charge. If left blank, it
1039
- * will default to the commit product name.
1040
- */
1041
- name?: string;
1042
-
1043
- /**
1044
- * List of filters that determine what kind of customer usage draws down a commit
1045
- * or credit. A customer's usage needs to meet the condition of at least one of the
1046
- * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1047
- * be used together with `applicable_product_ids` or `applicable_product_tags`.
1048
- */
1049
- specifiers?: Array<Commit.Specifier>;
1050
- }
1051
-
1052
- export namespace Commit {
1053
- export interface Specifier {
1054
- presentation_group_values?: { [key: string]: string };
1055
-
1056
- pricing_group_values?: { [key: string]: string };
1057
-
1058
- /**
1059
- * If provided, the specifier will only apply to the product with the specified ID.
1060
- */
1061
- product_id?: string;
1062
-
1063
- /**
1064
- * If provided, the specifier will only apply to products with all the specified
1065
- * tags.
1066
- */
1067
- product_tags?: Array<string>;
1068
- }
1069
- }
1070
-
1071
- export interface PaymentGateConfig {
1072
- /**
1073
- * Gate access to the commit balance based on successful collection of payment.
1074
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1075
- * facilitate payment using your own payment integration. Select NONE if you do not
1076
- * wish to payment gate the commit balance.
1077
- */
1078
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
1079
-
1080
- /**
1081
- * Only applicable if using PRECALCULATED as your tax type.
1082
- */
1083
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
1084
-
1085
- /**
1086
- * Only applicable if using STRIPE as your payment gate type.
1087
- */
1088
- stripe_config?: PaymentGateConfig.StripeConfig;
1089
-
1090
- /**
1091
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1092
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
1093
- * will default to NONE.
1094
- */
1095
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
1096
- }
1097
-
1098
- export namespace PaymentGateConfig {
1099
- /**
1100
- * Only applicable if using PRECALCULATED as your tax type.
1101
- */
1102
- export interface PrecalculatedTaxConfig {
1103
- /**
1104
- * Amount of tax to be applied. This should be in the same currency and
1105
- * denomination as the commit's invoice schedule
1106
- */
1107
- tax_amount: number;
1108
-
1109
- /**
1110
- * Name of the tax to be applied. This may be used in an invoice line item
1111
- * description.
1112
- */
1113
- tax_name?: string;
1114
- }
1115
-
1116
- /**
1117
- * Only applicable if using STRIPE as your payment gate type.
1118
- */
1119
- export interface StripeConfig {
1120
- /**
1121
- * If left blank, will default to INVOICE
1122
- */
1123
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
1124
-
1125
- /**
1126
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1127
- * your payment type.
1128
- */
1129
- invoice_metadata?: { [key: string]: string };
1130
- }
1131
- }
1132
- }
1133
-
1134
- export interface SpendThresholdConfiguration {
1135
- commit: SpendThresholdConfiguration.Commit;
1136
-
1137
- /**
1138
- * When set to false, the contract will not be evaluated against the
1139
- * threshold_amount. Toggling to true will result an immediate evaluation,
1140
- * regardless of prior state.
1141
- */
1142
- is_enabled: boolean;
1143
-
1144
- payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
1145
-
1146
- /**
1147
- * Specify the threshold amount for the contract. Each time the contract's usage
1148
- * hits this amount, a threshold charge will be initiated.
1149
- */
1150
- threshold_amount: number;
1151
- }
1152
-
1153
- export namespace SpendThresholdConfiguration {
1154
- export interface Commit {
1155
- /**
1156
- * The commit product that will be used to generate the line item for commit
1157
- * payment.
1158
- */
1159
- product_id: string;
1160
-
1161
- description?: string;
1162
-
1163
- /**
1164
- * Specify the name of the line item for the threshold charge. If left blank, it
1165
- * will default to the commit product name.
1166
- */
1167
- name?: string;
1168
- }
1169
-
1170
- export interface PaymentGateConfig {
1171
- /**
1172
- * Gate access to the commit balance based on successful collection of payment.
1173
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1174
- * facilitate payment using your own payment integration. Select NONE if you do not
1175
- * wish to payment gate the commit balance.
1176
- */
1177
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
1178
-
1179
- /**
1180
- * Only applicable if using PRECALCULATED as your tax type.
1181
- */
1182
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
1183
-
1184
- /**
1185
- * Only applicable if using STRIPE as your payment gate type.
1186
- */
1187
- stripe_config?: PaymentGateConfig.StripeConfig;
1188
-
1189
- /**
1190
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1191
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
1192
- * will default to NONE.
1193
- */
1194
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
1195
- }
1196
-
1197
- export namespace PaymentGateConfig {
1198
- /**
1199
- * Only applicable if using PRECALCULATED as your tax type.
1200
- */
1201
- export interface PrecalculatedTaxConfig {
1202
- /**
1203
- * Amount of tax to be applied. This should be in the same currency and
1204
- * denomination as the commit's invoice schedule
1205
- */
1206
- tax_amount: number;
1207
-
1208
- /**
1209
- * Name of the tax to be applied. This may be used in an invoice line item
1210
- * description.
1211
- */
1212
- tax_name?: string;
1213
- }
1214
-
1215
- /**
1216
- * Only applicable if using STRIPE as your payment gate type.
1217
- */
1218
- export interface StripeConfig {
1219
- /**
1220
- * If left blank, will default to INVOICE
1221
- */
1222
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
1223
-
1224
- /**
1225
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1226
- * your payment type.
1227
- */
1228
- invoice_metadata?: { [key: string]: string };
1229
- }
1230
- }
1231
- }
1232
-
1233
- export interface Subscription {
1234
- collection_schedule: 'ADVANCE' | 'ARREARS';
1235
-
1236
- proration: Subscription.Proration;
1237
-
1238
- /**
1239
- * List of quantity schedule items for the subscription. Only includes the current
1240
- * quantity and future quantity changes.
1241
- */
1242
- quantity_schedule: Array<Subscription.QuantitySchedule>;
1243
-
1244
- starting_at: string;
1245
-
1246
- subscription_rate: Subscription.SubscriptionRate;
1247
-
1248
- id?: string;
1249
-
1250
- custom_fields?: { [key: string]: string };
1251
-
1252
- description?: string;
1253
-
1254
- ending_before?: string;
1255
-
1256
- fiat_credit_type_id?: string;
1257
-
1258
- name?: string;
1259
- }
1260
-
1261
- export namespace Subscription {
1262
- export interface Proration {
1263
- invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
1264
-
1265
- is_prorated: boolean;
1266
- }
1267
-
1268
- export interface QuantitySchedule {
1269
- quantity: number;
523
+ * professional_service_id:
524
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
525
+ * },
526
+ * ],
527
+ * });
528
+ * ```
529
+ */
530
+ scheduleProServicesInvoice(
531
+ body: ContractScheduleProServicesInvoiceParams,
532
+ options?: RequestOptions,
533
+ ): APIPromise<ContractScheduleProServicesInvoiceResponse> {
534
+ return this._client.post('/v1/contracts/scheduleProServicesInvoice', { body, ...options });
535
+ }
1270
536
 
1271
- starting_at: string;
537
+ /**
538
+ * If a customer has multiple contracts with overlapping rates, the usage filter
539
+ * routes usage to the appropriate contract based on a predefined group key.
540
+ *
541
+ * As an example, imagine you have a customer associated with two projects. Each
542
+ * project is associated with its own contract. You can create a usage filter with
543
+ * group key `project_id` on each contract, and route usage for `project_1` to the
544
+ * first contract and `project_2` to the second contract.
545
+ *
546
+ * ### Use this endpoint to:
547
+ *
548
+ * - Support enterprise contracting scenarios where multiple contracts are
549
+ * associated to the same customer with the same rates.
550
+ * - Update the usage filter associated with the contract over time.
551
+ *
552
+ * ### Usage guidelines:
553
+ *
554
+ * To use usage filters, the `group_key` must be defined on the billable metrics
555
+ * underlying the rate card on the contracts.
556
+ *
557
+ * @example
558
+ * ```ts
559
+ * await client.v1.contracts.setUsageFilter({
560
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
561
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
562
+ * group_key: 'business_subscription_id',
563
+ * group_values: ['ID-1', 'ID-2'],
564
+ * starting_at: '2020-01-01T00:00:00.000Z',
565
+ * });
566
+ * ```
567
+ */
568
+ setUsageFilter(body: ContractSetUsageFilterParams, options?: RequestOptions): APIPromise<void> {
569
+ return this._client.post('/v1/contracts/setUsageFilter', {
570
+ body,
571
+ ...options,
572
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
573
+ });
574
+ }
1272
575
 
1273
- ending_before?: string;
1274
- }
576
+ /**
577
+ * Update or and an end date to a contract. Ending a contract early will impact
578
+ * draft usage statements, truncate any terms, and remove upcoming scheduled
579
+ * invoices. Moving the date into the future will only extend the contract length.
580
+ * Terms and scheduled invoices are not extended. Use this if a contract's end date
581
+ * has changed or if a perpetual contract ends.
582
+ *
583
+ * @example
584
+ * ```ts
585
+ * const response = await client.v1.contracts.updateEndDate({
586
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
587
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
588
+ * ending_before: '2020-01-01T00:00:00.000Z',
589
+ * });
590
+ * ```
591
+ */
592
+ updateEndDate(
593
+ body: ContractUpdateEndDateParams,
594
+ options?: RequestOptions,
595
+ ): APIPromise<ContractUpdateEndDateResponse> {
596
+ return this._client.post('/v1/contracts/updateEndDate', { body, ...options });
597
+ }
598
+ }
1275
599
 
1276
- export interface SubscriptionRate {
1277
- billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
600
+ export type ContractListBalancesResponsesBodyCursorPage = BodyCursorPage<ContractListBalancesResponse>;
1278
601
 
1279
- product: SubscriptionRate.Product;
1280
- }
602
+ export interface ContractCreateResponse {
603
+ data: Shared.ID;
604
+ }
1281
605
 
1282
- export namespace SubscriptionRate {
1283
- export interface Product {
1284
- id: string;
606
+ export interface ContractRetrieveResponse {
607
+ data: Shared.Contract;
608
+ }
1285
609
 
1286
- name: string;
1287
- }
1288
- }
1289
- }
1290
- }
610
+ export interface ContractListResponse {
611
+ data: Array<Shared.Contract>;
1291
612
  }
1292
613
 
1293
614
  export interface ContractAmendResponse {
@@ -1302,11 +623,7 @@ export interface ContractCreateHistoricalInvoicesResponse {
1302
623
  data: Array<InvoicesAPI.Invoice>;
1303
624
  }
1304
625
 
1305
- export interface ContractListBalancesResponse {
1306
- data: Array<Shared.Commit | Shared.Credit>;
1307
-
1308
- next_page: string | null;
1309
- }
626
+ export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
1310
627
 
1311
628
  export interface ContractRetrieveRateScheduleResponse {
1312
629
  data: Array<ContractRetrieveRateScheduleResponse.Data>;
@@ -1320,6 +637,9 @@ export namespace ContractRetrieveRateScheduleResponse {
1320
637
 
1321
638
  list_rate: Shared.Rate;
1322
639
 
640
+ /**
641
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
642
+ */
1323
643
  product_custom_fields: { [key: string]: string };
1324
644
 
1325
645
  product_id: string;
@@ -1338,7 +658,7 @@ export namespace ContractRetrieveRateScheduleResponse {
1338
658
  * A distinct rate on the rate card. You can choose to use this rate rather than
1339
659
  * list rate when consuming a credit or commit.
1340
660
  */
1341
- commit_rate?: Data.CommitRate;
661
+ commit_rate?: Shared.CommitRate;
1342
662
 
1343
663
  ending_before?: string;
1344
664
 
@@ -1346,26 +666,6 @@ export namespace ContractRetrieveRateScheduleResponse {
1346
666
 
1347
667
  pricing_group_values?: { [key: string]: string };
1348
668
  }
1349
-
1350
- export namespace Data {
1351
- /**
1352
- * A distinct rate on the rate card. You can choose to use this rate rather than
1353
- * list rate when consuming a credit or commit.
1354
- */
1355
- export interface CommitRate {
1356
- rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
1357
-
1358
- /**
1359
- * Commit rate price. For FLAT rate_type, this must be >=0.
1360
- */
1361
- price?: number;
1362
-
1363
- /**
1364
- * Only set for TIERED rate_type.
1365
- */
1366
- tiers?: Array<Shared.Tier>;
1367
- }
1368
- }
1369
669
  }
1370
670
 
1371
671
  export interface ContractRetrieveSubscriptionQuantityHistoryResponse {
@@ -1426,6 +726,9 @@ export interface ContractCreateParams {
1426
726
 
1427
727
  credits?: Array<ContractCreateParams.Credit>;
1428
728
 
729
+ /**
730
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
731
+ */
1429
732
  custom_fields?: { [key: string]: string };
1430
733
 
1431
734
  /**
@@ -1459,7 +762,7 @@ export interface ContractCreateParams {
1459
762
 
1460
763
  overrides?: Array<ContractCreateParams.Override>;
1461
764
 
1462
- prepaid_balance_threshold_configuration?: ContractCreateParams.PrepaidBalanceThresholdConfiguration;
765
+ prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfiguration;
1463
766
 
1464
767
  /**
1465
768
  * Priority of the contract.
@@ -1504,7 +807,7 @@ export interface ContractCreateParams {
1504
807
  */
1505
808
  scheduled_charges_on_usage_invoices?: 'ALL';
1506
809
 
1507
- spend_threshold_configuration?: ContractCreateParams.SpendThresholdConfiguration;
810
+ spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
1508
811
 
1509
812
  /**
1510
813
  * Optional list of
@@ -1587,6 +890,9 @@ export namespace ContractCreateParams {
1587
890
  */
1588
891
  applicable_product_tags?: Array<string>;
1589
892
 
893
+ /**
894
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
895
+ */
1590
896
  custom_fields?: { [key: string]: string };
1591
897
 
1592
898
  /**
@@ -1597,7 +903,7 @@ export namespace ContractCreateParams {
1597
903
  /**
1598
904
  * Optional configuration for commit hierarchy access control
1599
905
  */
1600
- hierarchy_configuration?: Commit.HierarchyConfiguration;
906
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
1601
907
 
1602
908
  /**
1603
909
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
@@ -1641,7 +947,7 @@ export namespace ContractCreateParams {
1641
947
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1642
948
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
1643
949
  */
1644
- specifiers?: Array<Commit.Specifier>;
950
+ specifiers?: Array<Shared.CommitSpecifierInput>;
1645
951
 
1646
952
  /**
1647
953
  * A temporary ID for the commit that can be used to reference the commit for
@@ -1681,32 +987,6 @@ export namespace ContractCreateParams {
1681
987
  }
1682
988
  }
1683
989
 
1684
- /**
1685
- * Optional configuration for commit hierarchy access control
1686
- */
1687
- export interface HierarchyConfiguration {
1688
- child_access:
1689
- | HierarchyConfiguration.CommitHierarchyChildAccessAll
1690
- | HierarchyConfiguration.CommitHierarchyChildAccessNone
1691
- | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
1692
- }
1693
-
1694
- export namespace HierarchyConfiguration {
1695
- export interface CommitHierarchyChildAccessAll {
1696
- type: 'ALL';
1697
- }
1698
-
1699
- export interface CommitHierarchyChildAccessNone {
1700
- type: 'NONE';
1701
- }
1702
-
1703
- export interface CommitHierarchyChildAccessContractIDs {
1704
- contract_ids: Array<string>;
1705
-
1706
- type: 'CONTRACT_IDS';
1707
- }
1708
- }
1709
-
1710
990
  /**
1711
991
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
1712
992
  * time and only one schedule item is allowed; the total must match access_schedule
@@ -1886,23 +1166,6 @@ export namespace ContractCreateParams {
1886
1166
  on_session_payment?: boolean;
1887
1167
  }
1888
1168
  }
1889
-
1890
- export interface Specifier {
1891
- presentation_group_values?: { [key: string]: string };
1892
-
1893
- pricing_group_values?: { [key: string]: string };
1894
-
1895
- /**
1896
- * If provided, the specifier will only apply to the product with the specified ID.
1897
- */
1898
- product_id?: string;
1899
-
1900
- /**
1901
- * If provided, the specifier will only apply to products with all the specified
1902
- * tags.
1903
- */
1904
- product_tags?: Array<string>;
1905
- }
1906
1169
  }
1907
1170
 
1908
1171
  export interface Credit {
@@ -1925,6 +1188,9 @@ export namespace ContractCreateParams {
1925
1188
  */
1926
1189
  applicable_product_tags?: Array<string>;
1927
1190
 
1191
+ /**
1192
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1193
+ */
1928
1194
  custom_fields?: { [key: string]: string };
1929
1195
 
1930
1196
  /**
@@ -1935,7 +1201,7 @@ export namespace ContractCreateParams {
1935
1201
  /**
1936
1202
  * Optional configuration for credit hierarchy access control
1937
1203
  */
1938
- hierarchy_configuration?: Credit.HierarchyConfiguration;
1204
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
1939
1205
 
1940
1206
  /**
1941
1207
  * displayed on invoices
@@ -1961,7 +1227,7 @@ export namespace ContractCreateParams {
1961
1227
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1962
1228
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
1963
1229
  */
1964
- specifiers?: Array<Credit.Specifier>;
1230
+ specifiers?: Array<Shared.CommitSpecifierInput>;
1965
1231
  }
1966
1232
 
1967
1233
  export namespace Credit {
@@ -1992,49 +1258,6 @@ export namespace ContractCreateParams {
1992
1258
  starting_at: string;
1993
1259
  }
1994
1260
  }
1995
-
1996
- /**
1997
- * Optional configuration for credit hierarchy access control
1998
- */
1999
- export interface HierarchyConfiguration {
2000
- child_access:
2001
- | HierarchyConfiguration.CommitHierarchyChildAccessAll
2002
- | HierarchyConfiguration.CommitHierarchyChildAccessNone
2003
- | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
2004
- }
2005
-
2006
- export namespace HierarchyConfiguration {
2007
- export interface CommitHierarchyChildAccessAll {
2008
- type: 'ALL';
2009
- }
2010
-
2011
- export interface CommitHierarchyChildAccessNone {
2012
- type: 'NONE';
2013
- }
2014
-
2015
- export interface CommitHierarchyChildAccessContractIDs {
2016
- contract_ids: Array<string>;
2017
-
2018
- type: 'CONTRACT_IDS';
2019
- }
2020
- }
2021
-
2022
- export interface Specifier {
2023
- presentation_group_values?: { [key: string]: string };
2024
-
2025
- pricing_group_values?: { [key: string]: string };
2026
-
2027
- /**
2028
- * If provided, the specifier will only apply to the product with the specified ID.
2029
- */
2030
- product_id?: string;
2031
-
2032
- /**
2033
- * If provided, the specifier will only apply to products with all the specified
2034
- * tags.
2035
- */
2036
- product_tags?: Array<string>;
2037
- }
2038
1261
  }
2039
1262
 
2040
1263
  export interface Discount {
@@ -2045,6 +1268,9 @@ export namespace ContractCreateParams {
2045
1268
  */
2046
1269
  schedule: Discount.Schedule;
2047
1270
 
1271
+ /**
1272
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1273
+ */
2048
1274
  custom_fields?: { [key: string]: string };
2049
1275
 
2050
1276
  /**
@@ -2253,8 +1479,8 @@ export namespace ContractCreateParams {
2253
1479
 
2254
1480
  /**
2255
1481
  * Can only be used for commit specific overrides. Must be used in conjunction with
2256
- * one of product_id, product_tags, pricing_group_values, or
2257
- * presentation_group_values. If provided, the override will only apply to the
1482
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1483
+ * `presentation_group_values`. If provided, the override will only apply to the
2258
1484
  * specified commits. If not provided, the override will apply to all commits.
2259
1485
  */
2260
1486
  commit_ids?: Array<string>;
@@ -2284,17 +1510,17 @@ export namespace ContractCreateParams {
2284
1510
 
2285
1511
  /**
2286
1512
  * Can only be used for commit specific overrides. Must be used in conjunction with
2287
- * one of product_id, product_tags, pricing_group_values, or
2288
- * presentation_group_values. If provided, the override will only apply to commits
2289
- * created by the specified recurring commit ids.
1513
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1514
+ * `presentation_group_values`. If provided, the override will only apply to
1515
+ * commits created by the specified recurring commit ids.
2290
1516
  */
2291
1517
  recurring_commit_ids?: Array<string>;
2292
1518
 
2293
1519
  /**
2294
1520
  * Can only be used for commit specific overrides. Must be used in conjunction with
2295
- * one of product_id, product_tags, pricing_group_values, or
2296
- * presentation_group_values. If provided, the override will only apply to credits
2297
- * created by the specified recurring credit ids.
1521
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1522
+ * `presentation_group_values`. If provided, the override will only apply to
1523
+ * credits created by the specified recurring credit ids.
2298
1524
  */
2299
1525
  recurring_credit_ids?: Array<string>;
2300
1526
  }
@@ -2320,177 +1546,26 @@ export namespace ContractCreateParams {
2320
1546
  is_prorated?: boolean;
2321
1547
 
2322
1548
  /**
2323
- * Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
2324
- * this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
2325
- */
2326
- price?: number;
2327
-
2328
- /**
2329
- * Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
2330
- */
2331
- quantity?: number;
2332
-
2333
- /**
2334
- * Only set for TIERED rate_type.
2335
- */
2336
- tiers?: Array<Shared.Tier>;
2337
- }
2338
-
2339
- export interface Tier {
2340
- multiplier: number;
2341
-
2342
- size?: number;
2343
- }
2344
- }
2345
-
2346
- export interface PrepaidBalanceThresholdConfiguration {
2347
- commit: PrepaidBalanceThresholdConfiguration.Commit;
2348
-
2349
- /**
2350
- * When set to false, the contract will not be evaluated against the
2351
- * threshold_amount. Toggling to true will result an immediate evaluation,
2352
- * regardless of prior state.
2353
- */
2354
- is_enabled: boolean;
2355
-
2356
- payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
2357
-
2358
- /**
2359
- * Specify the amount the balance should be recharged to.
2360
- */
2361
- recharge_to_amount: number;
2362
-
2363
- /**
2364
- * Specify the threshold amount for the contract. Each time the contract's prepaid
2365
- * balance lowers to this amount, a threshold charge will be initiated.
2366
- */
2367
- threshold_amount: number;
2368
-
2369
- /**
2370
- * If provided, the threshold, recharge-to amount, and the resulting threshold
2371
- * commit amount will be in terms of this credit type instead of the fiat currency.
2372
- */
2373
- custom_credit_type_id?: string;
2374
- }
2375
-
2376
- export namespace PrepaidBalanceThresholdConfiguration {
2377
- export interface Commit {
2378
- /**
2379
- * The commit product that will be used to generate the line item for commit
2380
- * payment.
2381
- */
2382
- product_id: string;
2383
-
2384
- /**
2385
- * Which products the threshold commit applies to. If applicable_product_ids,
2386
- * applicable_product_tags or specifiers are not provided, the commit applies to
2387
- * all products.
2388
- */
2389
- applicable_product_ids?: Array<string>;
2390
-
2391
- /**
2392
- * Which tags the threshold commit applies to. If applicable_product_ids,
2393
- * applicable_product_tags or specifiers are not provided, the commit applies to
2394
- * all products.
2395
- */
2396
- applicable_product_tags?: Array<string>;
2397
-
2398
- description?: string;
2399
-
2400
- /**
2401
- * Specify the name of the line item for the threshold charge. If left blank, it
2402
- * will default to the commit product name.
2403
- */
2404
- name?: string;
2405
-
2406
- /**
2407
- * List of filters that determine what kind of customer usage draws down a commit
2408
- * or credit. A customer's usage needs to meet the condition of at least one of the
2409
- * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2410
- * be used together with `applicable_product_ids` or `applicable_product_tags`.
2411
- */
2412
- specifiers?: Array<Commit.Specifier>;
2413
- }
2414
-
2415
- export namespace Commit {
2416
- export interface Specifier {
2417
- presentation_group_values?: { [key: string]: string };
2418
-
2419
- pricing_group_values?: { [key: string]: string };
2420
-
2421
- /**
2422
- * If provided, the specifier will only apply to the product with the specified ID.
2423
- */
2424
- product_id?: string;
2425
-
2426
- /**
2427
- * If provided, the specifier will only apply to products with all the specified
2428
- * tags.
2429
- */
2430
- product_tags?: Array<string>;
2431
- }
2432
- }
2433
-
2434
- export interface PaymentGateConfig {
2435
- /**
2436
- * Gate access to the commit balance based on successful collection of payment.
2437
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2438
- * facilitate payment using your own payment integration. Select NONE if you do not
2439
- * wish to payment gate the commit balance.
2440
- */
2441
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
2442
-
2443
- /**
2444
- * Only applicable if using PRECALCULATED as your tax type.
2445
- */
2446
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
2447
-
2448
- /**
2449
- * Only applicable if using STRIPE as your payment gate type.
2450
- */
2451
- stripe_config?: PaymentGateConfig.StripeConfig;
2452
-
2453
- /**
2454
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2455
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
2456
- * will default to NONE.
2457
- */
2458
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
2459
- }
2460
-
2461
- export namespace PaymentGateConfig {
2462
- /**
2463
- * Only applicable if using PRECALCULATED as your tax type.
2464
- */
2465
- export interface PrecalculatedTaxConfig {
2466
- /**
2467
- * Amount of tax to be applied. This should be in the same currency and
2468
- * denomination as the commit's invoice schedule
2469
- */
2470
- tax_amount: number;
2471
-
2472
- /**
2473
- * Name of the tax to be applied. This may be used in an invoice line item
2474
- * description.
2475
- */
2476
- tax_name?: string;
2477
- }
1549
+ * Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
1550
+ * this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
1551
+ */
1552
+ price?: number;
2478
1553
 
2479
1554
  /**
2480
- * Only applicable if using STRIPE as your payment gate type.
1555
+ * Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
2481
1556
  */
2482
- export interface StripeConfig {
2483
- /**
2484
- * If left blank, will default to INVOICE
2485
- */
2486
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
1557
+ quantity?: number;
2487
1558
 
2488
- /**
2489
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2490
- * your payment type.
2491
- */
2492
- invoice_metadata?: { [key: string]: string };
2493
- }
1559
+ /**
1560
+ * Only set for TIERED rate_type.
1561
+ */
1562
+ tiers?: Array<Shared.Tier>;
1563
+ }
1564
+
1565
+ export interface Tier {
1566
+ multiplier: number;
1567
+
1568
+ size?: number;
2494
1569
  }
2495
1570
  }
2496
1571
 
@@ -2514,6 +1589,9 @@ export namespace ContractCreateParams {
2514
1589
  */
2515
1590
  unit_price: number;
2516
1591
 
1592
+ /**
1593
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1594
+ */
2517
1595
  custom_fields?: { [key: string]: string };
2518
1596
 
2519
1597
  description?: string;
@@ -2572,7 +1650,7 @@ export namespace ContractCreateParams {
2572
1650
  /**
2573
1651
  * Optional configuration for recurring commit/credit hierarchy access control
2574
1652
  */
2575
- hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
1653
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2576
1654
 
2577
1655
  /**
2578
1656
  * The amount the customer should be billed for the commit. Not required.
@@ -2622,7 +1700,7 @@ export namespace ContractCreateParams {
2622
1700
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2623
1701
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
2624
1702
  */
2625
- specifiers?: Array<RecurringCommit.Specifier>;
1703
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2626
1704
 
2627
1705
  /**
2628
1706
  * Attach a subscription to the recurring commit/credit.
@@ -2663,32 +1741,6 @@ export namespace ContractCreateParams {
2663
1741
  unit?: 'PERIODS';
2664
1742
  }
2665
1743
 
2666
- /**
2667
- * Optional configuration for recurring commit/credit hierarchy access control
2668
- */
2669
- export interface HierarchyConfiguration {
2670
- child_access:
2671
- | HierarchyConfiguration.CommitHierarchyChildAccessAll
2672
- | HierarchyConfiguration.CommitHierarchyChildAccessNone
2673
- | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
2674
- }
2675
-
2676
- export namespace HierarchyConfiguration {
2677
- export interface CommitHierarchyChildAccessAll {
2678
- type: 'ALL';
2679
- }
2680
-
2681
- export interface CommitHierarchyChildAccessNone {
2682
- type: 'NONE';
2683
- }
2684
-
2685
- export interface CommitHierarchyChildAccessContractIDs {
2686
- contract_ids: Array<string>;
2687
-
2688
- type: 'CONTRACT_IDS';
2689
- }
2690
- }
2691
-
2692
1744
  /**
2693
1745
  * The amount the customer should be billed for the commit. Not required.
2694
1746
  */
@@ -2700,23 +1752,6 @@ export namespace ContractCreateParams {
2700
1752
  unit_price: number;
2701
1753
  }
2702
1754
 
2703
- export interface Specifier {
2704
- presentation_group_values?: { [key: string]: string };
2705
-
2706
- pricing_group_values?: { [key: string]: string };
2707
-
2708
- /**
2709
- * If provided, the specifier will only apply to the product with the specified ID.
2710
- */
2711
- product_id?: string;
2712
-
2713
- /**
2714
- * If provided, the specifier will only apply to products with all the specified
2715
- * tags.
2716
- */
2717
- product_tags?: Array<string>;
2718
- }
2719
-
2720
1755
  /**
2721
1756
  * Attach a subscription to the recurring commit/credit.
2722
1757
  */
@@ -2731,7 +1766,7 @@ export namespace ContractCreateParams {
2731
1766
  /**
2732
1767
  * If set to POOLED, allocation added per seat is pooled across the account.
2733
1768
  */
2734
- allocation?: 'POOLED';
1769
+ allocation?: 'INDIVIDUAL' | 'POOLED';
2735
1770
  }
2736
1771
 
2737
1772
  export namespace SubscriptionConfig {
@@ -2792,7 +1827,7 @@ export namespace ContractCreateParams {
2792
1827
  /**
2793
1828
  * Optional configuration for recurring commit/credit hierarchy access control
2794
1829
  */
2795
- hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
1830
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2796
1831
 
2797
1832
  /**
2798
1833
  * displayed on invoices. will be passed through to the individual commits
@@ -2837,7 +1872,7 @@ export namespace ContractCreateParams {
2837
1872
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2838
1873
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
2839
1874
  */
2840
- specifiers?: Array<RecurringCredit.Specifier>;
1875
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2841
1876
 
2842
1877
  /**
2843
1878
  * Attach a subscription to the recurring commit/credit.
@@ -2878,49 +1913,6 @@ export namespace ContractCreateParams {
2878
1913
  unit?: 'PERIODS';
2879
1914
  }
2880
1915
 
2881
- /**
2882
- * Optional configuration for recurring commit/credit hierarchy access control
2883
- */
2884
- export interface HierarchyConfiguration {
2885
- child_access:
2886
- | HierarchyConfiguration.CommitHierarchyChildAccessAll
2887
- | HierarchyConfiguration.CommitHierarchyChildAccessNone
2888
- | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
2889
- }
2890
-
2891
- export namespace HierarchyConfiguration {
2892
- export interface CommitHierarchyChildAccessAll {
2893
- type: 'ALL';
2894
- }
2895
-
2896
- export interface CommitHierarchyChildAccessNone {
2897
- type: 'NONE';
2898
- }
2899
-
2900
- export interface CommitHierarchyChildAccessContractIDs {
2901
- contract_ids: Array<string>;
2902
-
2903
- type: 'CONTRACT_IDS';
2904
- }
2905
- }
2906
-
2907
- export interface Specifier {
2908
- presentation_group_values?: { [key: string]: string };
2909
-
2910
- pricing_group_values?: { [key: string]: string };
2911
-
2912
- /**
2913
- * If provided, the specifier will only apply to the product with the specified ID.
2914
- */
2915
- product_id?: string;
2916
-
2917
- /**
2918
- * If provided, the specifier will only apply to products with all the specified
2919
- * tags.
2920
- */
2921
- product_tags?: Array<string>;
2922
- }
2923
-
2924
1916
  /**
2925
1917
  * Attach a subscription to the recurring commit/credit.
2926
1918
  */
@@ -2935,7 +1927,7 @@ export namespace ContractCreateParams {
2935
1927
  /**
2936
1928
  * If set to POOLED, allocation added per seat is pooled across the account.
2937
1929
  */
2938
- allocation?: 'POOLED';
1930
+ allocation?: 'INDIVIDUAL' | 'POOLED';
2939
1931
  }
2940
1932
 
2941
1933
  export namespace SubscriptionConfig {
@@ -3000,6 +1992,9 @@ export namespace ContractCreateParams {
3000
1992
  */
3001
1993
  schedule: ScheduledCharge.Schedule;
3002
1994
 
1995
+ /**
1996
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1997
+ */
3003
1998
  custom_fields?: { [key: string]: string };
3004
1999
 
3005
2000
  /**
@@ -3115,117 +2110,16 @@ export namespace ContractCreateParams {
3115
2110
  }
3116
2111
  }
3117
2112
 
3118
- export interface SpendThresholdConfiguration {
3119
- commit: SpendThresholdConfiguration.Commit;
3120
-
3121
- /**
3122
- * When set to false, the contract will not be evaluated against the
3123
- * threshold_amount. Toggling to true will result an immediate evaluation,
3124
- * regardless of prior state.
3125
- */
3126
- is_enabled: boolean;
3127
-
3128
- payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
3129
-
3130
- /**
3131
- * Specify the threshold amount for the contract. Each time the contract's usage
3132
- * hits this amount, a threshold charge will be initiated.
3133
- */
3134
- threshold_amount: number;
3135
- }
3136
-
3137
- export namespace SpendThresholdConfiguration {
3138
- export interface Commit {
3139
- /**
3140
- * The commit product that will be used to generate the line item for commit
3141
- * payment.
3142
- */
3143
- product_id: string;
3144
-
3145
- description?: string;
3146
-
3147
- /**
3148
- * Specify the name of the line item for the threshold charge. If left blank, it
3149
- * will default to the commit product name.
3150
- */
3151
- name?: string;
3152
- }
3153
-
3154
- export interface PaymentGateConfig {
3155
- /**
3156
- * Gate access to the commit balance based on successful collection of payment.
3157
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3158
- * facilitate payment using your own payment integration. Select NONE if you do not
3159
- * wish to payment gate the commit balance.
3160
- */
3161
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
3162
-
3163
- /**
3164
- * Only applicable if using PRECALCULATED as your tax type.
3165
- */
3166
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
3167
-
3168
- /**
3169
- * Only applicable if using STRIPE as your payment gate type.
3170
- */
3171
- stripe_config?: PaymentGateConfig.StripeConfig;
3172
-
3173
- /**
3174
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3175
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
3176
- * will default to NONE.
3177
- */
3178
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
3179
- }
3180
-
3181
- export namespace PaymentGateConfig {
3182
- /**
3183
- * Only applicable if using PRECALCULATED as your tax type.
3184
- */
3185
- export interface PrecalculatedTaxConfig {
3186
- /**
3187
- * Amount of tax to be applied. This should be in the same currency and
3188
- * denomination as the commit's invoice schedule
3189
- */
3190
- tax_amount: number;
3191
-
3192
- /**
3193
- * Name of the tax to be applied. This may be used in an invoice line item
3194
- * description.
3195
- */
3196
- tax_name?: string;
3197
- }
3198
-
3199
- /**
3200
- * Only applicable if using STRIPE as your payment gate type.
3201
- */
3202
- export interface StripeConfig {
3203
- /**
3204
- * If left blank, will default to INVOICE
3205
- */
3206
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
3207
-
3208
- /**
3209
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3210
- * your payment type.
3211
- */
3212
- invoice_metadata?: { [key: string]: string };
3213
- }
3214
- }
3215
- }
3216
-
3217
2113
  export interface Subscription {
3218
2114
  collection_schedule: 'ADVANCE' | 'ARREARS';
3219
2115
 
3220
- /**
3221
- * The initial quantity for the subscription. It must be non-negative value.
3222
- */
3223
- initial_quantity: number;
3224
-
3225
2116
  proration: Subscription.Proration;
3226
2117
 
3227
2118
  subscription_rate: Subscription.SubscriptionRate;
3228
2119
 
2120
+ /**
2121
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2122
+ */
3229
2123
  custom_fields?: { [key: string]: string };
3230
2124
 
3231
2125
  description?: string;
@@ -3236,8 +2130,22 @@ export namespace ContractCreateParams {
3236
2130
  */
3237
2131
  ending_before?: string;
3238
2132
 
2133
+ /**
2134
+ * The initial quantity for the subscription. It must be non-negative value.
2135
+ * Required if quantity_management_mode is QUANTITY_ONLY.
2136
+ */
2137
+ initial_quantity?: number;
2138
+
3239
2139
  name?: string;
3240
2140
 
2141
+ /**
2142
+ * Determines how the subscription's quantity is controlled. Defaults to
2143
+ * QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2144
+ * directly on the subscription. `initial_quantity` must be provided with this
2145
+ * option. Compatible with recurring commits/credits that use POOLED allocation.
2146
+ */
2147
+ quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY';
2148
+
3241
2149
  /**
3242
2150
  * Inclusive start time for the subscription. If not provided, defaults to contract
3243
2151
  * start date
@@ -3441,6 +2349,9 @@ export interface ContractAmendParams {
3441
2349
 
3442
2350
  credits?: Array<ContractAmendParams.Credit>;
3443
2351
 
2352
+ /**
2353
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2354
+ */
3444
2355
  custom_fields?: { [key: string]: string };
3445
2356
 
3446
2357
  /**
@@ -3510,6 +2421,9 @@ export namespace ContractAmendParams {
3510
2421
  */
3511
2422
  applicable_product_tags?: Array<string>;
3512
2423
 
2424
+ /**
2425
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2426
+ */
3513
2427
  custom_fields?: { [key: string]: string };
3514
2428
 
3515
2429
  /**
@@ -3520,7 +2434,7 @@ export namespace ContractAmendParams {
3520
2434
  /**
3521
2435
  * Optional configuration for commit hierarchy access control
3522
2436
  */
3523
- hierarchy_configuration?: Commit.HierarchyConfiguration;
2437
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
3524
2438
 
3525
2439
  /**
3526
2440
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
@@ -3564,7 +2478,7 @@ export namespace ContractAmendParams {
3564
2478
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
3565
2479
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
3566
2480
  */
3567
- specifiers?: Array<Commit.Specifier>;
2481
+ specifiers?: Array<Shared.CommitSpecifierInput>;
3568
2482
 
3569
2483
  /**
3570
2484
  * A temporary ID for the commit that can be used to reference the commit for
@@ -3604,32 +2518,6 @@ export namespace ContractAmendParams {
3604
2518
  }
3605
2519
  }
3606
2520
 
3607
- /**
3608
- * Optional configuration for commit hierarchy access control
3609
- */
3610
- export interface HierarchyConfiguration {
3611
- child_access:
3612
- | HierarchyConfiguration.CommitHierarchyChildAccessAll
3613
- | HierarchyConfiguration.CommitHierarchyChildAccessNone
3614
- | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
3615
- }
3616
-
3617
- export namespace HierarchyConfiguration {
3618
- export interface CommitHierarchyChildAccessAll {
3619
- type: 'ALL';
3620
- }
3621
-
3622
- export interface CommitHierarchyChildAccessNone {
3623
- type: 'NONE';
3624
- }
3625
-
3626
- export interface CommitHierarchyChildAccessContractIDs {
3627
- contract_ids: Array<string>;
3628
-
3629
- type: 'CONTRACT_IDS';
3630
- }
3631
- }
3632
-
3633
2521
  /**
3634
2522
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
3635
2523
  * time and only one schedule item is allowed; the total must match access_schedule
@@ -3809,23 +2697,6 @@ export namespace ContractAmendParams {
3809
2697
  on_session_payment?: boolean;
3810
2698
  }
3811
2699
  }
3812
-
3813
- export interface Specifier {
3814
- presentation_group_values?: { [key: string]: string };
3815
-
3816
- pricing_group_values?: { [key: string]: string };
3817
-
3818
- /**
3819
- * If provided, the specifier will only apply to the product with the specified ID.
3820
- */
3821
- product_id?: string;
3822
-
3823
- /**
3824
- * If provided, the specifier will only apply to products with all the specified
3825
- * tags.
3826
- */
3827
- product_tags?: Array<string>;
3828
- }
3829
2700
  }
3830
2701
 
3831
2702
  export interface Credit {
@@ -3848,6 +2719,9 @@ export namespace ContractAmendParams {
3848
2719
  */
3849
2720
  applicable_product_tags?: Array<string>;
3850
2721
 
2722
+ /**
2723
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2724
+ */
3851
2725
  custom_fields?: { [key: string]: string };
3852
2726
 
3853
2727
  /**
@@ -3858,7 +2732,7 @@ export namespace ContractAmendParams {
3858
2732
  /**
3859
2733
  * Optional configuration for credit hierarchy access control
3860
2734
  */
3861
- hierarchy_configuration?: Credit.HierarchyConfiguration;
2735
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
3862
2736
 
3863
2737
  /**
3864
2738
  * displayed on invoices
@@ -3884,7 +2758,7 @@ export namespace ContractAmendParams {
3884
2758
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
3885
2759
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
3886
2760
  */
3887
- specifiers?: Array<Credit.Specifier>;
2761
+ specifiers?: Array<Shared.CommitSpecifierInput>;
3888
2762
  }
3889
2763
 
3890
2764
  export namespace Credit {
@@ -3915,49 +2789,6 @@ export namespace ContractAmendParams {
3915
2789
  starting_at: string;
3916
2790
  }
3917
2791
  }
3918
-
3919
- /**
3920
- * Optional configuration for credit hierarchy access control
3921
- */
3922
- export interface HierarchyConfiguration {
3923
- child_access:
3924
- | HierarchyConfiguration.CommitHierarchyChildAccessAll
3925
- | HierarchyConfiguration.CommitHierarchyChildAccessNone
3926
- | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
3927
- }
3928
-
3929
- export namespace HierarchyConfiguration {
3930
- export interface CommitHierarchyChildAccessAll {
3931
- type: 'ALL';
3932
- }
3933
-
3934
- export interface CommitHierarchyChildAccessNone {
3935
- type: 'NONE';
3936
- }
3937
-
3938
- export interface CommitHierarchyChildAccessContractIDs {
3939
- contract_ids: Array<string>;
3940
-
3941
- type: 'CONTRACT_IDS';
3942
- }
3943
- }
3944
-
3945
- export interface Specifier {
3946
- presentation_group_values?: { [key: string]: string };
3947
-
3948
- pricing_group_values?: { [key: string]: string };
3949
-
3950
- /**
3951
- * If provided, the specifier will only apply to the product with the specified ID.
3952
- */
3953
- product_id?: string;
3954
-
3955
- /**
3956
- * If provided, the specifier will only apply to products with all the specified
3957
- * tags.
3958
- */
3959
- product_tags?: Array<string>;
3960
- }
3961
2792
  }
3962
2793
 
3963
2794
  export interface Discount {
@@ -3968,6 +2799,9 @@ export namespace ContractAmendParams {
3968
2799
  */
3969
2800
  schedule: Discount.Schedule;
3970
2801
 
2802
+ /**
2803
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2804
+ */
3971
2805
  custom_fields?: { [key: string]: string };
3972
2806
 
3973
2807
  /**
@@ -4164,8 +2998,8 @@ export namespace ContractAmendParams {
4164
2998
 
4165
2999
  /**
4166
3000
  * Can only be used for commit specific overrides. Must be used in conjunction with
4167
- * one of product_id, product_tags, pricing_group_values, or
4168
- * presentation_group_values. If provided, the override will only apply to the
3001
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
3002
+ * `presentation_group_values`. If provided, the override will only apply to the
4169
3003
  * specified commits. If not provided, the override will apply to all commits.
4170
3004
  */
4171
3005
  commit_ids?: Array<string>;
@@ -4195,17 +3029,17 @@ export namespace ContractAmendParams {
4195
3029
 
4196
3030
  /**
4197
3031
  * Can only be used for commit specific overrides. Must be used in conjunction with
4198
- * one of product_id, product_tags, pricing_group_values, or
4199
- * presentation_group_values. If provided, the override will only apply to commits
4200
- * created by the specified recurring commit ids.
3032
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
3033
+ * `presentation_group_values`. If provided, the override will only apply to
3034
+ * commits created by the specified recurring commit ids.
4201
3035
  */
4202
3036
  recurring_commit_ids?: Array<string>;
4203
3037
 
4204
3038
  /**
4205
3039
  * Can only be used for commit specific overrides. Must be used in conjunction with
4206
- * one of product_id, product_tags, pricing_group_values, or
4207
- * presentation_group_values. If provided, the override will only apply to credits
4208
- * created by the specified recurring credit ids.
3040
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
3041
+ * `presentation_group_values`. If provided, the override will only apply to
3042
+ * credits created by the specified recurring credit ids.
4209
3043
  */
4210
3044
  recurring_credit_ids?: Array<string>;
4211
3045
  }
@@ -4274,6 +3108,9 @@ export namespace ContractAmendParams {
4274
3108
  */
4275
3109
  unit_price: number;
4276
3110
 
3111
+ /**
3112
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3113
+ */
4277
3114
  custom_fields?: { [key: string]: string };
4278
3115
 
4279
3116
  description?: string;
@@ -4339,6 +3176,9 @@ export namespace ContractAmendParams {
4339
3176
  */
4340
3177
  schedule: ScheduledCharge.Schedule;
4341
3178
 
3179
+ /**
3180
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3181
+ */
4342
3182
  custom_fields?: { [key: string]: string };
4343
3183
 
4344
3184
  /**
@@ -4502,6 +3342,9 @@ export namespace ContractCreateHistoricalInvoicesParams {
4502
3342
 
4503
3343
  breakdown_granularity?: 'HOUR' | 'DAY';
4504
3344
 
3345
+ /**
3346
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3347
+ */
4505
3348
  custom_fields?: { [key: string]: string };
4506
3349
  }
4507
3350
 
@@ -4534,7 +3377,7 @@ export namespace ContractCreateHistoricalInvoicesParams {
4534
3377
  }
4535
3378
  }
4536
3379
 
4537
- export interface ContractListBalancesParams {
3380
+ export interface ContractListBalancesParams extends BodyCursorPageParams {
4538
3381
  customer_id: string;
4539
3382
 
4540
3383
  id?: string;
@@ -4571,16 +3414,6 @@ export interface ContractListBalancesParams {
4571
3414
  */
4572
3415
  include_ledgers?: boolean;
4573
3416
 
4574
- /**
4575
- * The maximum number of commits to return. Defaults to 25.
4576
- */
4577
- limit?: number;
4578
-
4579
- /**
4580
- * The next page token from a previous response.
4581
- */
4582
- next_page?: string;
4583
-
4584
3417
  /**
4585
3418
  * Include only balances that have any access on or after the provided date
4586
3419
  */
@@ -4774,9 +3607,7 @@ export interface ContractUpdateEndDateParams {
4774
3607
  }
4775
3608
 
4776
3609
  Contracts.Products = Products;
4777
- Contracts.ProductListResponsesCursorPage = ProductListResponsesCursorPage;
4778
3610
  Contracts.RateCards = RateCards;
4779
- Contracts.RateCardListResponsesCursorPage = RateCardListResponsesCursorPage;
4780
3611
  Contracts.NamedSchedules = NamedSchedules;
4781
3612
 
4782
3613
  export declare namespace Contracts {
@@ -4792,6 +3623,7 @@ export declare namespace Contracts {
4792
3623
  type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse,
4793
3624
  type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse,
4794
3625
  type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse,
3626
+ type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage,
4795
3627
  type ContractCreateParams as ContractCreateParams,
4796
3628
  type ContractRetrieveParams as ContractRetrieveParams,
4797
3629
  type ContractListParams as ContractListParams,
@@ -4817,7 +3649,7 @@ export declare namespace Contracts {
4817
3649
  type ProductUpdateResponse as ProductUpdateResponse,
4818
3650
  type ProductListResponse as ProductListResponse,
4819
3651
  type ProductArchiveResponse as ProductArchiveResponse,
4820
- ProductListResponsesCursorPage as ProductListResponsesCursorPage,
3652
+ type ProductListResponsesCursorPage as ProductListResponsesCursorPage,
4821
3653
  type ProductCreateParams as ProductCreateParams,
4822
3654
  type ProductRetrieveParams as ProductRetrieveParams,
4823
3655
  type ProductUpdateParams as ProductUpdateParams,
@@ -4833,7 +3665,7 @@ export declare namespace Contracts {
4833
3665
  type RateCardListResponse as RateCardListResponse,
4834
3666
  type RateCardArchiveResponse as RateCardArchiveResponse,
4835
3667
  type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse,
4836
- RateCardListResponsesCursorPage as RateCardListResponsesCursorPage,
3668
+ type RateCardListResponsesCursorPage as RateCardListResponsesCursorPage,
4837
3669
  type RateCardCreateParams as RateCardCreateParams,
4838
3670
  type RateCardRetrieveParams as RateCardRetrieveParams,
4839
3671
  type RateCardUpdateParams as RateCardUpdateParams,