@metronome/sdk 0.3.0 → 2.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 (817) hide show
  1. package/CHANGELOG.md +113 -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 +46 -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 +2363 -0
  290. package/resources/shared.d.mts.map +1 -0
  291. package/resources/shared.d.ts +1470 -465
  292. package/resources/shared.d.ts.map +1 -1
  293. package/resources/v1/alerts.d.mts +207 -0
  294. package/resources/v1/alerts.d.mts.map +1 -0
  295. package/resources/v1/alerts.d.ts +107 -32
  296. package/resources/v1/alerts.d.ts.map +1 -1
  297. package/resources/v1/alerts.js +74 -3
  298. package/resources/v1/alerts.js.map +1 -1
  299. package/resources/v1/alerts.mjs +74 -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 +3006 -0
  318. package/resources/v1/contracts/contracts.d.mts.map +1 -0
  319. package/resources/v1/contracts/contracts.d.ts +428 -1299
  320. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  321. package/resources/v1/contracts/contracts.js +269 -50
  322. package/resources/v1/contracts/contracts.js.map +1 -1
  323. package/resources/v1/contracts/contracts.mjs +267 -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 +309 -0
  416. package/resources/v1/customers/alerts.d.mts.map +1 -0
  417. package/resources/v1/customers/alerts.d.ts +176 -50
  418. package/resources/v1/customers/alerts.d.ts.map +1 -1
  419. package/resources/v1/customers/alerts.js +131 -10
  420. package/resources/v1/customers/alerts.js.map +1 -1
  421. package/resources/v1/customers/alerts.mjs +131 -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 +819 -0
  448. package/resources/v1/customers/customers.d.mts.map +1 -0
  449. package/resources/v1/customers/customers.d.ts +319 -55
  450. package/resources/v1/customers/customers.d.ts.map +1 -1
  451. package/resources/v1/customers/customers.js +220 -76
  452. package/resources/v1/customers/customers.js.map +1 -1
  453. package/resources/v1/customers/customers.mjs +213 -44
  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 +825 -0
  464. package/resources/v1/customers/invoices.d.mts.map +1 -0
  465. package/resources/v1/customers/invoices.d.ts +309 -25
  466. package/resources/v1/customers/invoices.d.ts.map +1 -1
  467. package/resources/v1/customers/invoices.js +180 -22
  468. package/resources/v1/customers/invoices.js.map +1 -1
  469. package/resources/v1/customers/invoices.mjs +179 -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 +16 -0
  501. package/resources/v1/index.d.mts.map +1 -0
  502. package/resources/v1/index.d.ts +10 -9
  503. package/resources/v1/index.d.ts.map +1 -1
  504. package/resources/v1/index.js +3 -12
  505. package/resources/v1/index.js.map +1 -1
  506. package/resources/v1/index.mjs +8 -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/payments.d.mts +116 -0
  517. package/resources/v1/payments.d.mts.map +1 -0
  518. package/resources/v1/payments.d.ts +116 -0
  519. package/resources/v1/payments.d.ts.map +1 -0
  520. package/resources/v1/payments.js +71 -0
  521. package/resources/v1/payments.js.map +1 -0
  522. package/resources/v1/payments.mjs +67 -0
  523. package/resources/v1/payments.mjs.map +1 -0
  524. package/resources/v1/plans.d.mts +240 -0
  525. package/resources/v1/plans.d.mts.map +1 -0
  526. package/resources/v1/plans.d.ts +24 -15
  527. package/resources/v1/plans.d.ts.map +1 -1
  528. package/resources/v1/plans.js +19 -26
  529. package/resources/v1/plans.js.map +1 -1
  530. package/resources/v1/plans.mjs +18 -22
  531. package/resources/v1/plans.mjs.map +1 -1
  532. package/resources/v1/pricing-units.d.mts +34 -0
  533. package/resources/v1/pricing-units.d.mts.map +1 -0
  534. package/resources/v1/pricing-units.d.ts +12 -9
  535. package/resources/v1/pricing-units.d.ts.map +1 -1
  536. package/resources/v1/pricing-units.js +20 -12
  537. package/resources/v1/pricing-units.js.map +1 -1
  538. package/resources/v1/pricing-units.mjs +19 -10
  539. package/resources/v1/pricing-units.mjs.map +1 -1
  540. package/resources/v1/services.d.mts +33 -0
  541. package/resources/v1/services.d.mts.map +1 -0
  542. package/resources/v1/services.d.ts +10 -7
  543. package/resources/v1/services.d.ts.map +1 -1
  544. package/resources/v1/services.js +7 -5
  545. package/resources/v1/services.js.map +1 -1
  546. package/resources/v1/services.mjs +7 -5
  547. package/resources/v1/services.mjs.map +1 -1
  548. package/resources/v1/usage.d.mts +490 -0
  549. package/resources/v1/usage.d.mts.map +1 -0
  550. package/resources/v1/usage.d.ts +223 -58
  551. package/resources/v1/usage.d.ts.map +1 -1
  552. package/resources/v1/usage.js +214 -26
  553. package/resources/v1/usage.js.map +1 -1
  554. package/resources/v1/usage.mjs +213 -24
  555. package/resources/v1/usage.mjs.map +1 -1
  556. package/resources/v1/v1.d.mts +62 -0
  557. package/resources/v1/v1.d.mts.map +1 -0
  558. package/resources/v1/v1.d.ts +19 -15
  559. package/resources/v1/v1.d.ts.map +1 -1
  560. package/resources/v1/v1.js +19 -48
  561. package/resources/v1/v1.js.map +1 -1
  562. package/resources/v1/v1.mjs +12 -19
  563. package/resources/v1/v1.mjs.map +1 -1
  564. package/resources/v1.d.mts +2 -0
  565. package/resources/v1.d.mts.map +1 -0
  566. package/resources/v1.d.ts.map +1 -1
  567. package/resources/v1.js +2 -15
  568. package/resources/v1.js.map +1 -1
  569. package/resources/v2/contracts.d.mts +2900 -0
  570. package/resources/v2/contracts.d.mts.map +1 -0
  571. package/resources/v2/contracts.d.ts +399 -3830
  572. package/resources/v2/contracts.d.ts.map +1 -1
  573. package/resources/v2/contracts.js +102 -12
  574. package/resources/v2/contracts.js.map +1 -1
  575. package/resources/v2/contracts.mjs +102 -12
  576. package/resources/v2/contracts.mjs.map +1 -1
  577. package/resources/v2/index.d.mts +3 -0
  578. package/resources/v2/index.d.mts.map +1 -0
  579. package/resources/v2/index.d.ts.map +1 -1
  580. package/resources/v2/v2.d.mts +10 -0
  581. package/resources/v2/v2.d.mts.map +1 -0
  582. package/resources/v2/v2.d.ts +1 -1
  583. package/resources/v2/v2.d.ts.map +1 -1
  584. package/resources/v2/v2.js +3 -25
  585. package/resources/v2/v2.js.map +1 -1
  586. package/resources/v2/v2.mjs +1 -1
  587. package/resources/v2.d.mts +2 -0
  588. package/resources/v2.d.mts.map +1 -0
  589. package/resources/v2.d.ts.map +1 -1
  590. package/resources/v2.js +2 -15
  591. package/resources/v2.js.map +1 -1
  592. package/resources/webhooks.d.mts +22 -0
  593. package/resources/webhooks.d.mts.map +1 -0
  594. package/resources/webhooks.d.ts +1 -1
  595. package/resources/webhooks.d.ts.map +1 -1
  596. package/resources/webhooks.js +3 -3
  597. package/resources/webhooks.js.map +1 -1
  598. package/resources/webhooks.mjs +1 -1
  599. package/resources/webhooks.mjs.map +1 -1
  600. package/resources.d.mts +2 -0
  601. package/resources.d.mts.map +1 -0
  602. package/resources.d.ts.map +1 -1
  603. package/resources.js +2 -15
  604. package/resources.js.map +1 -1
  605. package/src/api-promise.ts +2 -0
  606. package/src/client.ts +809 -0
  607. package/src/core/README.md +3 -0
  608. package/src/core/api-promise.ts +92 -0
  609. package/src/core/error.ts +130 -0
  610. package/src/core/pagination.ts +319 -0
  611. package/src/core/resource.ts +11 -0
  612. package/src/core/uploads.ts +2 -0
  613. package/src/error.ts +2 -130
  614. package/src/index.ts +6 -221
  615. package/src/internal/README.md +3 -0
  616. package/src/internal/builtin-types.ts +93 -0
  617. package/src/internal/detect-platform.ts +196 -0
  618. package/src/internal/errors.ts +33 -0
  619. package/src/internal/headers.ts +144 -0
  620. package/src/internal/parse.ts +50 -0
  621. package/src/internal/qs/formats.ts +3 -2
  622. package/src/internal/qs/index.ts +3 -3
  623. package/src/internal/qs/stringify.ts +18 -21
  624. package/src/internal/qs/utils.ts +16 -16
  625. package/src/internal/request-options.ts +91 -0
  626. package/src/internal/shim-types.ts +26 -0
  627. package/src/internal/shims.ts +107 -0
  628. package/src/internal/to-file.ts +154 -0
  629. package/src/internal/types.ts +95 -0
  630. package/src/internal/uploads.ts +187 -0
  631. package/src/internal/utils/base64.ts +40 -0
  632. package/src/internal/utils/bytes.ts +32 -0
  633. package/src/internal/utils/env.ts +18 -0
  634. package/src/internal/utils/log.ts +126 -0
  635. package/src/internal/utils/path.ts +88 -0
  636. package/src/internal/utils/sleep.ts +3 -0
  637. package/src/internal/utils/uuid.ts +17 -0
  638. package/src/internal/utils/values.ts +105 -0
  639. package/src/internal/utils.ts +8 -0
  640. package/src/pagination.ts +2 -82
  641. package/src/resource.ts +2 -11
  642. package/src/resources/index.ts +4 -4
  643. package/src/resources/shared.ts +1921 -506
  644. package/src/resources/v1/alerts.ts +108 -33
  645. package/src/resources/v1/audit-logs.ts +48 -26
  646. package/src/resources/v1/billable-metrics.ts +79 -34
  647. package/src/resources/v1/contracts/contracts.ts +490 -1632
  648. package/src/resources/v1/contracts/index.ts +7 -6
  649. package/src/resources/v1/contracts/named-schedules.ts +8 -6
  650. package/src/resources/v1/contracts/products.ts +50 -38
  651. package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
  652. package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
  653. package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
  654. package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
  655. package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
  656. package/src/resources/v1/contracts/rate-cards.ts +1 -1
  657. package/src/resources/v1/contracts.ts +1 -1
  658. package/src/resources/v1/credit-grants.ts +100 -112
  659. package/src/resources/v1/custom-fields.ts +106 -74
  660. package/src/resources/v1/customers/alerts.ts +195 -55
  661. package/src/resources/v1/customers/billing-config.ts +27 -13
  662. package/src/resources/v1/customers/commits.ts +146 -54
  663. package/src/resources/v1/customers/credits.ts +131 -53
  664. package/src/resources/v1/customers/customers.ts +407 -115
  665. package/src/resources/v1/customers/index.ts +20 -18
  666. package/src/resources/v1/customers/invoices.ts +343 -42
  667. package/src/resources/v1/customers/named-schedules.ts +8 -6
  668. package/src/resources/v1/customers/plans.ts +24 -22
  669. package/src/resources/v1/customers.ts +1 -1
  670. package/src/resources/v1/dashboards.ts +34 -7
  671. package/src/resources/v1/index.ts +43 -25
  672. package/src/resources/v1/invoices.ts +28 -9
  673. package/src/resources/v1/payments.ts +170 -0
  674. package/src/resources/v1/plans.ts +42 -43
  675. package/src/resources/v1/pricing-units.ts +15 -23
  676. package/src/resources/v1/services.ts +10 -7
  677. package/src/resources/v1/usage.ts +247 -73
  678. package/src/resources/v1/v1.ts +78 -49
  679. package/src/resources/v1.ts +1 -1
  680. package/src/resources/v2/contracts.ts +469 -4930
  681. package/src/resources/v2/index.ts +2 -2
  682. package/src/resources/v2/v2.ts +3 -3
  683. package/src/resources/v2.ts +1 -1
  684. package/src/resources/webhooks.ts +2 -2
  685. package/src/resources.ts +1 -1
  686. package/src/tsconfig.json +2 -2
  687. package/src/uploads.ts +2 -255
  688. package/src/version.ts +1 -1
  689. package/uploads.d.mts +2 -0
  690. package/uploads.d.mts.map +1 -0
  691. package/uploads.d.ts +1 -74
  692. package/uploads.d.ts.map +1 -1
  693. package/uploads.js +3 -168
  694. package/uploads.js.map +1 -1
  695. package/uploads.mjs +1 -157
  696. package/uploads.mjs.map +1 -1
  697. package/version.d.mts +2 -0
  698. package/version.d.mts.map +1 -0
  699. package/version.d.ts +1 -1
  700. package/version.js +1 -1
  701. package/version.mjs +1 -1
  702. package/_shims/MultipartBody.d.ts +0 -9
  703. package/_shims/MultipartBody.d.ts.map +0 -1
  704. package/_shims/MultipartBody.js +0 -16
  705. package/_shims/MultipartBody.js.map +0 -1
  706. package/_shims/MultipartBody.mjs +0 -12
  707. package/_shims/MultipartBody.mjs.map +0 -1
  708. package/_shims/README.md +0 -46
  709. package/_shims/auto/runtime-bun.d.ts +0 -5
  710. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  711. package/_shims/auto/runtime-bun.js +0 -21
  712. package/_shims/auto/runtime-bun.js.map +0 -1
  713. package/_shims/auto/runtime-bun.mjs +0 -2
  714. package/_shims/auto/runtime-bun.mjs.map +0 -1
  715. package/_shims/auto/runtime-node.d.ts +0 -5
  716. package/_shims/auto/runtime-node.d.ts.map +0 -1
  717. package/_shims/auto/runtime-node.js +0 -21
  718. package/_shims/auto/runtime-node.js.map +0 -1
  719. package/_shims/auto/runtime-node.mjs +0 -2
  720. package/_shims/auto/runtime-node.mjs.map +0 -1
  721. package/_shims/auto/runtime.d.ts +0 -5
  722. package/_shims/auto/runtime.d.ts.map +0 -1
  723. package/_shims/auto/runtime.js +0 -21
  724. package/_shims/auto/runtime.js.map +0 -1
  725. package/_shims/auto/runtime.mjs +0 -2
  726. package/_shims/auto/runtime.mjs.map +0 -1
  727. package/_shims/auto/types-node.d.ts +0 -5
  728. package/_shims/auto/types-node.d.ts.map +0 -1
  729. package/_shims/auto/types-node.js +0 -21
  730. package/_shims/auto/types-node.js.map +0 -1
  731. package/_shims/auto/types-node.mjs +0 -2
  732. package/_shims/auto/types-node.mjs.map +0 -1
  733. package/_shims/auto/types.d.ts +0 -101
  734. package/_shims/auto/types.js +0 -3
  735. package/_shims/auto/types.mjs +0 -3
  736. package/_shims/bun-runtime.d.ts +0 -6
  737. package/_shims/bun-runtime.d.ts.map +0 -1
  738. package/_shims/bun-runtime.js +0 -14
  739. package/_shims/bun-runtime.js.map +0 -1
  740. package/_shims/bun-runtime.mjs +0 -10
  741. package/_shims/bun-runtime.mjs.map +0 -1
  742. package/_shims/index.d.ts +0 -83
  743. package/_shims/index.js +0 -17
  744. package/_shims/index.mjs +0 -11
  745. package/_shims/manual-types.d.ts +0 -12
  746. package/_shims/manual-types.js +0 -3
  747. package/_shims/manual-types.mjs +0 -3
  748. package/_shims/node-runtime.d.ts +0 -3
  749. package/_shims/node-runtime.d.ts.map +0 -1
  750. package/_shims/node-runtime.js +0 -89
  751. package/_shims/node-runtime.js.map +0 -1
  752. package/_shims/node-runtime.mjs +0 -56
  753. package/_shims/node-runtime.mjs.map +0 -1
  754. package/_shims/node-types.d.ts +0 -42
  755. package/_shims/node-types.js +0 -3
  756. package/_shims/node-types.mjs +0 -3
  757. package/_shims/registry.d.ts +0 -37
  758. package/_shims/registry.d.ts.map +0 -1
  759. package/_shims/registry.js +0 -41
  760. package/_shims/registry.js.map +0 -1
  761. package/_shims/registry.mjs +0 -37
  762. package/_shims/registry.mjs.map +0 -1
  763. package/_shims/web-runtime.d.ts +0 -5
  764. package/_shims/web-runtime.d.ts.map +0 -1
  765. package/_shims/web-runtime.js +0 -78
  766. package/_shims/web-runtime.js.map +0 -1
  767. package/_shims/web-runtime.mjs +0 -71
  768. package/_shims/web-runtime.mjs.map +0 -1
  769. package/_shims/web-types.d.ts +0 -83
  770. package/_shims/web-types.js +0 -3
  771. package/_shims/web-types.mjs +0 -3
  772. package/core.d.ts +0 -255
  773. package/core.d.ts.map +0 -1
  774. package/core.js +0 -924
  775. package/core.js.map +0 -1
  776. package/core.mjs +0 -892
  777. package/core.mjs.map +0 -1
  778. package/shims/node.d.ts +0 -30
  779. package/shims/node.d.ts.map +0 -1
  780. package/shims/node.js +0 -31
  781. package/shims/node.js.map +0 -1
  782. package/shims/node.mjs +0 -5
  783. package/shims/node.mjs.map +0 -1
  784. package/shims/web.d.ts +0 -26
  785. package/shims/web.d.ts.map +0 -1
  786. package/shims/web.js +0 -31
  787. package/shims/web.js.map +0 -1
  788. package/shims/web.mjs +0 -5
  789. package/shims/web.mjs.map +0 -1
  790. package/src/_shims/MultipartBody.ts +0 -9
  791. package/src/_shims/README.md +0 -46
  792. package/src/_shims/auto/runtime-bun.ts +0 -4
  793. package/src/_shims/auto/runtime-node.ts +0 -4
  794. package/src/_shims/auto/runtime.ts +0 -4
  795. package/src/_shims/auto/types-node.ts +0 -4
  796. package/src/_shims/auto/types.d.ts +0 -101
  797. package/src/_shims/auto/types.js +0 -3
  798. package/src/_shims/auto/types.mjs +0 -3
  799. package/src/_shims/bun-runtime.ts +0 -14
  800. package/src/_shims/index.d.ts +0 -83
  801. package/src/_shims/index.js +0 -17
  802. package/src/_shims/index.mjs +0 -11
  803. package/src/_shims/manual-types.d.ts +0 -12
  804. package/src/_shims/manual-types.js +0 -3
  805. package/src/_shims/manual-types.mjs +0 -3
  806. package/src/_shims/node-runtime.ts +0 -81
  807. package/src/_shims/node-types.d.ts +0 -42
  808. package/src/_shims/node-types.js +0 -3
  809. package/src/_shims/node-types.mjs +0 -3
  810. package/src/_shims/registry.ts +0 -67
  811. package/src/_shims/web-runtime.ts +0 -103
  812. package/src/_shims/web-types.d.ts +0 -83
  813. package/src/_shims/web-types.js +0 -3
  814. package/src/_shims/web-types.mjs +0 -3
  815. package/src/core.ts +0 -1236
  816. package/src/shims/node.ts +0 -50
  817. package/src/shims/web.ts +0 -50
@@ -0,0 +1,3006 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as Shared from "../../shared.mjs";
3
+ import * as NamedSchedulesAPI from "./named-schedules.mjs";
4
+ import { NamedScheduleRetrieveParams, NamedScheduleRetrieveResponse, NamedScheduleUpdateParams, NamedSchedules } from "./named-schedules.mjs";
5
+ import * as ProductsAPI from "./products.mjs";
6
+ import { ProductArchiveParams, ProductArchiveResponse, ProductCreateParams, ProductCreateResponse, ProductListItemState, ProductListParams, ProductListResponse, ProductListResponsesCursorPage, ProductRetrieveParams, ProductRetrieveResponse, ProductUpdateParams, ProductUpdateResponse, Products, QuantityConversion, QuantityRounding } from "./products.mjs";
7
+ import * as InvoicesAPI from "../customers/invoices.mjs";
8
+ import * as RateCardsAPI from "./rate-cards/rate-cards.mjs";
9
+ import { RateCardArchiveParams, RateCardArchiveResponse, RateCardCreateParams, RateCardCreateResponse, RateCardListParams, RateCardListResponse, RateCardListResponsesCursorPage, RateCardRetrieveParams, RateCardRetrieveRateScheduleParams, RateCardRetrieveRateScheduleResponse, RateCardRetrieveResponse, RateCardUpdateParams, RateCardUpdateResponse, RateCards } from "./rate-cards/rate-cards.mjs";
10
+ import { APIPromise } from "../../../core/api-promise.mjs";
11
+ import { BodyCursorPage, type BodyCursorPageParams, PagePromise } from "../../../core/pagination.mjs";
12
+ import { RequestOptions } from "../../../internal/request-options.mjs";
13
+ export declare class Contracts extends APIResource {
14
+ products: ProductsAPI.Products;
15
+ rateCards: RateCardsAPI.RateCards;
16
+ namedSchedules: NamedSchedulesAPI.NamedSchedules;
17
+ /**
18
+ * Contracts define a customer's products, pricing, discounts, access duration, and
19
+ * billing configuration. Contracts serve as the central billing agreement for both
20
+ * PLG and Enterprise customers, you can automatically customers access to your
21
+ * products and services directly from your product or CRM.
22
+ *
23
+ * ### Use this endpoint to:
24
+ *
25
+ * - PLG onboarding: Automatically provision new self-serve customers with
26
+ * contracts when they sign up.
27
+ * - Enterprise sales: Push negotiated contracts from Salesforce with custom
28
+ * pricing and commitments
29
+ * - Promotional pricing: Implement time-limited discounts and free trials through
30
+ * overrides
31
+ *
32
+ * ### Key components:
33
+ *
34
+ * #### Contract Term and Billing Schedule
35
+ *
36
+ * - Set contract duration using `starting_at` and `ending_before` fields. PLG
37
+ * contracts typically use perpetual agreements (no end date), while Enterprise
38
+ * contracts have fixed end dates which can be edited over time in the case of
39
+ * co-term upsells.
40
+ *
41
+ * #### Rate Card
42
+ *
43
+ * If you are offering usage based pricing, you can set a rate card for the
44
+ * contract to reference through `rate_card_id` or `rate_card_alias`. The rate card
45
+ * is a store of all of your usage based products and their centralized pricing.
46
+ * Any new products or price changes on the rate card can be set to automatically
47
+ * propagate to all associated contracts - this ensures consistent pricing and
48
+ * product launches flow to contracts without manual updates and migrations. The
49
+ * `usage_statement_schedule` determines the cadence on which Metronome will
50
+ * finalize a usage invoice for the customer. This defaults to monthly on the 1st,
51
+ * with options for custom dates, quarterly, or annual cadences. Note: Most usage
52
+ * based billing companies align usage statements to be evaluated aligned to the
53
+ * first of the month. Read more about
54
+ * [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).
55
+ *
56
+ * #### Overrides and discounts
57
+ *
58
+ * Customize pricing on the contract through time-bounded overrides that can target
59
+ * specific products, product families, or complex usage scenarios. Overrides
60
+ * enable two key capabilities:
61
+ *
62
+ * - Discounts: Apply percentage discounts, fixed rate reductions, or
63
+ * quantity-based pricing tiers
64
+ * - Entitlements: Provide special pricing or access to specific products for
65
+ * negotiated deals
66
+ *
67
+ * Read more about
68
+ * [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).
69
+ *
70
+ * #### Commits and Credits
71
+ *
72
+ * Using commits, configure prepaid or postpaid spending commitments where
73
+ * customers promise to spend a certain amount over the contract period paid in
74
+ * advance or in arrears. Use credits to provide free spending allowances. Under
75
+ * the hood these are the same mechanisms, however, credits are typically offered
76
+ * for free (SLA or promotional) or as a part of an allotment associated with a
77
+ * Subscription.
78
+ *
79
+ * In Metronome, you can set commits and credits to only be applicable for a subset
80
+ * of usage. Use `applicable_product_ids` or `applicable_product_tags` to create
81
+ * product or product-family specific commits or credits, or you can build complex
82
+ * boolean logic specifiers to target usage based on pricing and presentation group
83
+ * values using `override_specifiers`.
84
+ *
85
+ * These objects can also also be configured to have a recurrence schedule to
86
+ * easily model customer packaging which includes recurring monthly or quarterly
87
+ * allotments.
88
+ *
89
+ * Commits support rollover settings (`rollover_fraction`) to transfer unused
90
+ * balances between contract periods, either entirely or as a percentage.
91
+ *
92
+ * Read more about
93
+ * [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).
94
+ *
95
+ * #### Subscriptions
96
+ *
97
+ * You can add a fixed recurring charge to a contract, like monthly licenses or
98
+ * seat-based fees, using the subscription charge. Subscription charges are defined
99
+ * on your rate card and you can select which subscription is applicable to add to
100
+ * each contract. When you add a subscription to a contract you need to:
101
+ *
102
+ * - Define whether the subscription is paid for in-advance or in-arrears
103
+ * (`collection_schedule`)
104
+ * - Define the proration behavior (`proration`)
105
+ * - Specify an initial quantity (`initial_quantity`)
106
+ * - Define which subscription rate on the rate card should be used
107
+ * (`subscription_rate`)
108
+ *
109
+ * Read more about
110
+ * [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).
111
+ *
112
+ * #### Scheduled Charges
113
+ *
114
+ * Set up one-time, recurring, or entirely custom charges that occur on specific
115
+ * dates, separate from usage-based billing or commitments. These can be used to
116
+ * model non-recurring platform charges or professional services.
117
+ *
118
+ * #### Threshold Billing
119
+ *
120
+ * Metronome allows you to configure automatic billing triggers when customers
121
+ * reach spending thresholds to prevent fraud and manage risk. You can use
122
+ * `spend_threshold_configuration` to trigger an invoice to cover current charges
123
+ * whenever the threshold is reached or you can ensure the customer maintains a
124
+ * minimum prepaid balance using the `prepaid_balance_configuration`.
125
+ *
126
+ * Read more about
127
+ * [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/)
128
+ * and
129
+ * [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).
130
+ *
131
+ * ### Usage guidelines:
132
+ *
133
+ * - You can always
134
+ * [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/)
135
+ * after it has been created, using the `editContract` endpoint. Metronome keeps
136
+ * track of all edits, both in the audit log and over the `getEditHistory`
137
+ * endpoint.
138
+ * - Customers in Metronome can have multiple concurrent contracts at one time. Use
139
+ * `usage_filters` to route the correct usage to each contract.
140
+ * [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * const contract = await client.v1.contracts.create({
145
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
146
+ * starting_at: '2020-01-01T00:00:00.000Z',
147
+ * billing_provider_configuration: {
148
+ * billing_provider: 'stripe',
149
+ * delivery_method: 'direct_to_billing_provider',
150
+ * },
151
+ * rate_card_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
152
+ * });
153
+ * ```
154
+ */
155
+ create(body: ContractCreateParams, options?: RequestOptions): APIPromise<ContractCreateResponse>;
156
+ /**
157
+ * This is the v1 endpoint to get a contract. New clients should implement using
158
+ * the v2 endpoint.
159
+ *
160
+ * @example
161
+ * ```ts
162
+ * const contract = await client.v1.contracts.retrieve({
163
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
164
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
165
+ * });
166
+ * ```
167
+ */
168
+ retrieve(body: ContractRetrieveParams, options?: RequestOptions): APIPromise<ContractRetrieveResponse>;
169
+ /**
170
+ * Retrieves all contracts for a specific customer, including pricing, terms,
171
+ * credits, and commitments. Use this to view a customer's contract history and
172
+ * current agreements for billing management. Returns contract details with
173
+ * optional ledgers and balance information.
174
+ *
175
+ * ⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2
176
+ * endpoint for enhanced features.
177
+ *
178
+ * @example
179
+ * ```ts
180
+ * const contracts = await client.v1.contracts.list({
181
+ * customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
182
+ * });
183
+ * ```
184
+ */
185
+ list(body: ContractListParams, options?: RequestOptions): APIPromise<ContractListResponse>;
186
+ /**
187
+ * Manually adjust the available balance on a commit or credit. This entry is
188
+ * appended to the commit ledger as a new event. Optionally include a description
189
+ * that provides the reasoning for the entry.
190
+ *
191
+ * ### Use this endpoint to:
192
+ *
193
+ * - Address incorrect usage burn-down caused by malformed usage or invalid config
194
+ * - Decrease available balance to account for outages where usage may have not
195
+ * been tracked or sent to Metronome
196
+ * - Issue credits to customers in the form of increased balance on existing commit
197
+ * or credit
198
+ *
199
+ * ### Usage guidelines:
200
+ *
201
+ * Manual ledger entries can be extremely useful for resolving discrepancies in
202
+ * Metronome. However, most corrections to inaccurate billings can be modified
203
+ * upstream of the commit, whether that is via contract editing, rate editing, or
204
+ * other actions that cause an invoice to be recalculated.
205
+ *
206
+ * @example
207
+ * ```ts
208
+ * await client.v1.contracts.addManualBalanceEntry({
209
+ * id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
210
+ * amount: -1000,
211
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
212
+ * reason: 'Reason for entry',
213
+ * segment_id: '66368e29-3f97-4d15-a6e9-120897f0070a',
214
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
215
+ * });
216
+ * ```
217
+ */
218
+ addManualBalanceEntry(body: ContractAddManualBalanceEntryParams, options?: RequestOptions): APIPromise<void>;
219
+ /**
220
+ * Amendments will be replaced by Contract editing. New clients should implement
221
+ * using the `editContract` endpoint. Read more about the migration to contract
222
+ * editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
223
+ * reach out to your Metronome representative for more details. Once contract
224
+ * editing is enabled, access to this endpoint will be removed.
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * const response = await client.v1.contracts.amend({
229
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
230
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
231
+ * starting_at: '2020-01-01T00:00:00.000Z',
232
+ * });
233
+ * ```
234
+ */
235
+ amend(body: ContractAmendParams, options?: RequestOptions): APIPromise<ContractAmendResponse>;
236
+ /**
237
+ * Permanently end and archive a contract along with all its terms. Any draft
238
+ * invoices will be canceled, and all upcoming scheduled invoices will be
239
+ * voided–also all finalized invoices can optionally be voided. Use this in the
240
+ * event a contract was incorrectly created and needed to be removed from a
241
+ * customer.
242
+ *
243
+ * #### Impact on commits and credits:
244
+ *
245
+ * When archiving a contract, all associated commits and credits are also archived.
246
+ * For prepaid commits with active segments, Metronome automatically generates
247
+ * expiration ledger entries to close out any remaining balances, ensuring accurate
248
+ * accounting of unused prepaid amounts. These ledger entries will appear in the
249
+ * commit's transaction history with type `PREPAID_COMMIT_EXPIRATION`.
250
+ *
251
+ * #### Archived contract visibility:
252
+ *
253
+ * Archived contracts remain accessible for historical reporting and audit
254
+ * purposes. They can be retrieved using the `ListContracts` endpoint by setting
255
+ * the `include_archived` parameter to `true` or in the Metronome UI when the "Show
256
+ * archived" option is enabled.
257
+ *
258
+ * @example
259
+ * ```ts
260
+ * const response = await client.v1.contracts.archive({
261
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
262
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
263
+ * void_invoices: true,
264
+ * });
265
+ * ```
266
+ */
267
+ archive(body: ContractArchiveParams, options?: RequestOptions): APIPromise<ContractArchiveResponse>;
268
+ /**
269
+ * Create historical usage invoices for past billing periods on specific contracts.
270
+ * Use this endpoint to generate retroactive invoices with custom usage line items,
271
+ * quantities, and date ranges. Supports preview mode to validate invoice data
272
+ * before creation. Ideal for billing migrations or correcting past billing
273
+ * periods.
274
+ *
275
+ * @example
276
+ * ```ts
277
+ * const response =
278
+ * await client.v1.contracts.createHistoricalInvoices({
279
+ * invoices: [
280
+ * {
281
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
282
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
283
+ * credit_type_id:
284
+ * '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
285
+ * inclusive_start_date: '2020-01-01T00:00:00.000Z',
286
+ * exclusive_end_date: '2020-02-01T00:00:00.000Z',
287
+ * issue_date: '2020-02-01T00:00:00.000Z',
288
+ * usage_line_items: [
289
+ * {
290
+ * product_id:
291
+ * 'f14d6729-6a44-4b13-9908-9387f1918790',
292
+ * inclusive_start_date:
293
+ * '2020-01-01T00:00:00.000Z',
294
+ * exclusive_end_date: '2020-02-01T00:00:00.000Z',
295
+ * quantity: 100,
296
+ * },
297
+ * ],
298
+ * },
299
+ * ],
300
+ * preview: false,
301
+ * });
302
+ * ```
303
+ */
304
+ createHistoricalInvoices(body: ContractCreateHistoricalInvoicesParams, options?: RequestOptions): APIPromise<ContractCreateHistoricalInvoicesResponse>;
305
+ /**
306
+ * Retrieve a comprehensive view of all available balances (commits and credits)
307
+ * for a customer. This endpoint provides real-time visibility into prepaid funds,
308
+ * postpaid commitments, promotional credits, and other balance types that can
309
+ * offset usage charges, helping you build transparent billing experiences.
310
+ *
311
+ * ### Use this endpoint to:
312
+ *
313
+ * - Display current available balances in customer dashboards
314
+ * - Verify available funds before approving high-usage operations
315
+ * - Generate balance reports for finance teams
316
+ * - Filter balances by contract or date ranges
317
+ *
318
+ * ### Key response fields:
319
+ *
320
+ * An array of balance objects (all credits and commits) containing:
321
+ *
322
+ * - Balance details: Current available amount for each commit or credit
323
+ * - Metadata: Product associations, priorities, applicable date ranges
324
+ * - Optional ledger entries: Detailed transaction history (if
325
+ * `include_ledgers=true`)
326
+ * - Balance calculations: Including pending transactions and future-dated entries
327
+ * - Custom fields: Any additional metadata attached to balances
328
+ *
329
+ * ### Usage guidelines:
330
+ *
331
+ * - Date filtering: Use `effective_before` to include only balances with access
332
+ * before a specific date (exclusive)
333
+ * - Set `include_balance=true` for calculated balance amounts on each commit or
334
+ * credit
335
+ * - Set `include_ledgers=true` for full transaction history
336
+ * - Set `include_contract_balances = true` to see contract level balances
337
+ * - Balance logic: Reflects currently accessible amounts, excluding expired/future
338
+ * segments
339
+ * - Manual adjustments: Includes all manual ledger entries, even future-dated ones
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * // Automatically fetches more pages as needed.
344
+ * for await (const contractListBalancesResponse of client.v1.contracts.listBalances(
345
+ * {
346
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
347
+ * id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
348
+ * include_ledgers: true,
349
+ * },
350
+ * )) {
351
+ * // ...
352
+ * }
353
+ * ```
354
+ */
355
+ listBalances(body: ContractListBalancesParams, options?: RequestOptions): PagePromise<ContractListBalancesResponsesBodyCursorPage, ContractListBalancesResponse>;
356
+ /**
357
+ * For a specific customer and contract, get the rates at a specific point in time.
358
+ * This endpoint takes the contract's rate card into consideration, including
359
+ * scheduled changes. It also takes into account overrides on the contract.
360
+ *
361
+ * For example, if you want to show your customer a summary of the prices they are
362
+ * paying, inclusive of any negotiated discounts or promotions, use this endpoint.
363
+ * This endpoint only returns rates that are entitled.
364
+ *
365
+ * @example
366
+ * ```ts
367
+ * const response =
368
+ * await client.v1.contracts.retrieveRateSchedule({
369
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
370
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
371
+ * at: '2020-01-01T00:00:00.000Z',
372
+ * selectors: [
373
+ * {
374
+ * product_id: 'd6300dbb-882e-4d2d-8dec-5125d16b65d0',
375
+ * partial_pricing_group_values: {
376
+ * region: 'us-west-2',
377
+ * cloud: 'aws',
378
+ * },
379
+ * },
380
+ * ],
381
+ * });
382
+ * ```
383
+ */
384
+ retrieveRateSchedule(params: ContractRetrieveRateScheduleParams, options?: RequestOptions): APIPromise<ContractRetrieveRateScheduleResponse>;
385
+ /**
386
+ * Get the history of subscription quantities and prices over time for a given
387
+ * `subscription_id`. This endpoint can be used to power an in-product experience
388
+ * where you show a customer their historical changes to seat count. Future changes
389
+ * are not included in this endpoint - use the `getContract` endpoint to view the
390
+ * future scheduled changes to a subscription's quantity.
391
+ *
392
+ * Subscriptions are used to model fixed recurring fees as well as seat-based
393
+ * recurring fees. To model changes to the number of seats in Metronome, you can
394
+ * increment or decrement the quantity on a subscription at any point in the past
395
+ * or future.
396
+ *
397
+ * @example
398
+ * ```ts
399
+ * const response =
400
+ * await client.v1.contracts.retrieveSubscriptionQuantityHistory(
401
+ * {
402
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
403
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
404
+ * subscription_id:
405
+ * '1a824d53-bde6-4d82-96d7-6347ff227d5c',
406
+ * },
407
+ * );
408
+ * ```
409
+ */
410
+ retrieveSubscriptionQuantityHistory(body: ContractRetrieveSubscriptionQuantityHistoryParams, options?: RequestOptions): APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse>;
411
+ /**
412
+ * Create a new scheduled invoice for Professional Services terms on a contract.
413
+ * This endpoint's availability is dependent on your client's configuration.
414
+ *
415
+ * @example
416
+ * ```ts
417
+ * const response =
418
+ * await client.v1.contracts.scheduleProServicesInvoice({
419
+ * contract_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
420
+ * customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
421
+ * issued_at: '2019-12-27T18:11:19.117Z',
422
+ * line_items: [
423
+ * {
424
+ * professional_service_id:
425
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
426
+ * },
427
+ * ],
428
+ * });
429
+ * ```
430
+ */
431
+ scheduleProServicesInvoice(body: ContractScheduleProServicesInvoiceParams, options?: RequestOptions): APIPromise<ContractScheduleProServicesInvoiceResponse>;
432
+ /**
433
+ * If a customer has multiple contracts with overlapping rates, the usage filter
434
+ * routes usage to the appropriate contract based on a predefined group key.
435
+ *
436
+ * As an example, imagine you have a customer associated with two projects. Each
437
+ * project is associated with its own contract. You can create a usage filter with
438
+ * group key `project_id` on each contract, and route usage for `project_1` to the
439
+ * first contract and `project_2` to the second contract.
440
+ *
441
+ * ### Use this endpoint to:
442
+ *
443
+ * - Support enterprise contracting scenarios where multiple contracts are
444
+ * associated to the same customer with the same rates.
445
+ * - Update the usage filter associated with the contract over time.
446
+ *
447
+ * ### Usage guidelines:
448
+ *
449
+ * To use usage filters, the `group_key` must be defined on the billable metrics
450
+ * underlying the rate card on the contracts.
451
+ *
452
+ * @example
453
+ * ```ts
454
+ * await client.v1.contracts.setUsageFilter({
455
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
456
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
457
+ * group_key: 'business_subscription_id',
458
+ * group_values: ['ID-1', 'ID-2'],
459
+ * starting_at: '2020-01-01T00:00:00.000Z',
460
+ * });
461
+ * ```
462
+ */
463
+ setUsageFilter(body: ContractSetUsageFilterParams, options?: RequestOptions): APIPromise<void>;
464
+ /**
465
+ * Update or add an end date to a contract. Ending a contract early will impact
466
+ * draft usage statements, truncate any terms, and remove upcoming scheduled
467
+ * invoices. Moving the date into the future will only extend the contract length.
468
+ * Terms and scheduled invoices are not extended. In-advance subscriptions will not
469
+ * be extended. Use this if a contract's end date has changed or if a perpetual
470
+ * contract ends.
471
+ *
472
+ * @example
473
+ * ```ts
474
+ * const response = await client.v1.contracts.updateEndDate({
475
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
476
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
477
+ * ending_before: '2020-01-01T00:00:00.000Z',
478
+ * });
479
+ * ```
480
+ */
481
+ updateEndDate(body: ContractUpdateEndDateParams, options?: RequestOptions): APIPromise<ContractUpdateEndDateResponse>;
482
+ }
483
+ export type ContractListBalancesResponsesBodyCursorPage = BodyCursorPage<ContractListBalancesResponse>;
484
+ export interface ContractCreateResponse {
485
+ data: Shared.ID;
486
+ }
487
+ export interface ContractRetrieveResponse {
488
+ data: Shared.Contract;
489
+ }
490
+ export interface ContractListResponse {
491
+ data: Array<Shared.Contract>;
492
+ }
493
+ export interface ContractAmendResponse {
494
+ data: Shared.ID;
495
+ }
496
+ export interface ContractArchiveResponse {
497
+ data: Shared.ID;
498
+ }
499
+ export interface ContractCreateHistoricalInvoicesResponse {
500
+ data: Array<InvoicesAPI.Invoice>;
501
+ }
502
+ export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
503
+ export interface ContractRetrieveRateScheduleResponse {
504
+ data: Array<ContractRetrieveRateScheduleResponse.Data>;
505
+ next_page?: string | null;
506
+ }
507
+ export declare namespace ContractRetrieveRateScheduleResponse {
508
+ interface Data {
509
+ entitled: boolean;
510
+ list_rate: Shared.Rate;
511
+ /**
512
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
513
+ */
514
+ product_custom_fields: {
515
+ [key: string]: string;
516
+ };
517
+ product_id: string;
518
+ product_name: string;
519
+ product_tags: Array<string>;
520
+ rate_card_id: string;
521
+ starting_at: string;
522
+ billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
523
+ /**
524
+ * A distinct rate on the rate card. You can choose to use this rate rather than
525
+ * list rate when consuming a credit or commit.
526
+ */
527
+ commit_rate?: Shared.CommitRate;
528
+ ending_before?: string;
529
+ override_rate?: Shared.Rate;
530
+ pricing_group_values?: {
531
+ [key: string]: string;
532
+ };
533
+ }
534
+ }
535
+ export interface ContractRetrieveSubscriptionQuantityHistoryResponse {
536
+ data: ContractRetrieveSubscriptionQuantityHistoryResponse.Data;
537
+ }
538
+ export declare namespace ContractRetrieveSubscriptionQuantityHistoryResponse {
539
+ interface Data {
540
+ fiat_credit_type_id?: string;
541
+ history?: Array<Data.History>;
542
+ subscription_id?: string;
543
+ }
544
+ namespace Data {
545
+ interface History {
546
+ data: Array<History.Data>;
547
+ starting_at: string;
548
+ }
549
+ namespace History {
550
+ interface Data {
551
+ quantity: number;
552
+ total: number;
553
+ unit_price: number;
554
+ }
555
+ }
556
+ }
557
+ }
558
+ export interface ContractScheduleProServicesInvoiceResponse {
559
+ data: Array<InvoicesAPI.Invoice>;
560
+ }
561
+ export interface ContractUpdateEndDateResponse {
562
+ data: Shared.ID;
563
+ }
564
+ export interface ContractCreateParams {
565
+ customer_id: string;
566
+ /**
567
+ * inclusive contract start time
568
+ */
569
+ starting_at: string;
570
+ /**
571
+ * The billing provider configuration associated with a contract. Provide either an
572
+ * ID or the provider and delivery method.
573
+ */
574
+ billing_provider_configuration?: ContractCreateParams.BillingProviderConfiguration;
575
+ commits?: Array<ContractCreateParams.Commit>;
576
+ credits?: Array<ContractCreateParams.Credit>;
577
+ /**
578
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
579
+ */
580
+ custom_fields?: {
581
+ [key: string]: string;
582
+ };
583
+ /**
584
+ * This field's availability is dependent on your client's configuration.
585
+ */
586
+ discounts?: Array<ContractCreateParams.Discount>;
587
+ /**
588
+ * exclusive contract end time
589
+ */
590
+ ending_before?: string;
591
+ hierarchy_configuration?: ContractCreateParams.HierarchyConfiguration;
592
+ /**
593
+ * Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
594
+ * prices automatically. EXPLICIT prioritization requires specifying priorities for
595
+ * each multiplier; the one with the lowest priority value will be prioritized
596
+ * first. If tiered overrides are used, prioritization must be explicit.
597
+ */
598
+ multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';
599
+ name?: string;
600
+ net_payment_terms_days?: number;
601
+ /**
602
+ * This field's availability is dependent on your client's configuration.
603
+ */
604
+ netsuite_sales_order_id?: string;
605
+ overrides?: Array<ContractCreateParams.Override>;
606
+ prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfiguration;
607
+ /**
608
+ * Priority of the contract.
609
+ */
610
+ priority?: number;
611
+ /**
612
+ * This field's availability is dependent on your client's configuration.
613
+ */
614
+ professional_services?: Array<ContractCreateParams.ProfessionalService>;
615
+ /**
616
+ * Selects the rate card linked to the specified alias as of the contract's start
617
+ * date.
618
+ */
619
+ rate_card_alias?: string;
620
+ rate_card_id?: string;
621
+ recurring_commits?: Array<ContractCreateParams.RecurringCommit>;
622
+ recurring_credits?: Array<ContractCreateParams.RecurringCredit>;
623
+ /**
624
+ * This field's availability is dependent on your client's configuration.
625
+ */
626
+ reseller_royalties?: Array<ContractCreateParams.ResellerRoyalty>;
627
+ /**
628
+ * This field's availability is dependent on your client's configuration.
629
+ */
630
+ salesforce_opportunity_id?: string;
631
+ scheduled_charges?: Array<ContractCreateParams.ScheduledCharge>;
632
+ /**
633
+ * Determines which scheduled and commit charges to consolidate onto the Contract's
634
+ * usage invoice. The charge's `timestamp` must match the usage invoice's
635
+ * `ending_before` date for consolidation to occur. This field cannot be modified
636
+ * after a Contract has been created. If this field is omitted, charges will appear
637
+ * on a separate invoice from usage charges.
638
+ */
639
+ scheduled_charges_on_usage_invoices?: 'ALL';
640
+ spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
641
+ /**
642
+ * Optional list of
643
+ * [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
644
+ * to add to the contract.
645
+ */
646
+ subscriptions?: Array<ContractCreateParams.Subscription>;
647
+ /**
648
+ * This field's availability is dependent on your client's configuration.
649
+ */
650
+ total_contract_value?: number;
651
+ transition?: ContractCreateParams.Transition;
652
+ /**
653
+ * Prevents the creation of duplicates. If a request to create a record is made
654
+ * with a previously used uniqueness key, a new record will not be created and the
655
+ * request will fail with a 409 error.
656
+ */
657
+ uniqueness_key?: string;
658
+ usage_filter?: Shared.BaseUsageFilter;
659
+ usage_statement_schedule?: ContractCreateParams.UsageStatementSchedule;
660
+ }
661
+ export declare namespace ContractCreateParams {
662
+ /**
663
+ * The billing provider configuration associated with a contract. Provide either an
664
+ * ID or the provider and delivery method.
665
+ */
666
+ interface BillingProviderConfiguration {
667
+ /**
668
+ * Do not specify if using billing_provider_configuration_id.
669
+ */
670
+ billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite';
671
+ /**
672
+ * The Metronome ID of the billing provider configuration. Use when a customer has
673
+ * multiple configurations with the same billing provider and delivery method.
674
+ * Otherwise, specify the billing_provider and delivery_method.
675
+ */
676
+ billing_provider_configuration_id?: string;
677
+ /**
678
+ * Do not specify if using billing_provider_configuration_id.
679
+ */
680
+ delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
681
+ }
682
+ interface Commit {
683
+ product_id: string;
684
+ type: 'PREPAID' | 'POSTPAID';
685
+ /**
686
+ * Required: Schedule for distributing the commit to the customer. For "POSTPAID"
687
+ * commits only one schedule item is allowed and amount must match invoice_schedule
688
+ * total.
689
+ */
690
+ access_schedule?: Commit.AccessSchedule;
691
+ /**
692
+ * (DEPRECATED) Use access_schedule and invoice_schedule instead.
693
+ */
694
+ amount?: number;
695
+ /**
696
+ * Which products the commit applies to. If applicable_product_ids,
697
+ * applicable_product_tags or specifiers are not provided, the commit applies to
698
+ * all products.
699
+ */
700
+ applicable_product_ids?: Array<string>;
701
+ /**
702
+ * Which tags the commit applies to. If applicable_product_ids,
703
+ * applicable_product_tags or specifiers are not provided, the commit applies to
704
+ * all products.
705
+ */
706
+ applicable_product_tags?: Array<string>;
707
+ /**
708
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
709
+ */
710
+ custom_fields?: {
711
+ [key: string]: string;
712
+ };
713
+ /**
714
+ * Used only in UI/API. It is not exposed to end customers.
715
+ */
716
+ description?: string;
717
+ /**
718
+ * Optional configuration for commit hierarchy access control
719
+ */
720
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
721
+ /**
722
+ * Required for "POSTPAID" commits: the true up invoice will be generated at this
723
+ * time and only one schedule item is allowed; the total must match access_schedule
724
+ * amount. Optional for "PREPAID" commits: if not provided, this will be a
725
+ * "complimentary" commit with no invoice.
726
+ */
727
+ invoice_schedule?: Commit.InvoiceSchedule;
728
+ /**
729
+ * displayed on invoices
730
+ */
731
+ name?: string;
732
+ /**
733
+ * This field's availability is dependent on your client's configuration.
734
+ */
735
+ netsuite_sales_order_id?: string;
736
+ /**
737
+ * optionally payment gate this commit
738
+ */
739
+ payment_gate_config?: Commit.PaymentGateConfig;
740
+ /**
741
+ * If multiple commits are applicable, the one with the lower priority will apply
742
+ * first.
743
+ */
744
+ priority?: number;
745
+ rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
746
+ /**
747
+ * Fraction of unused segments that will be rolled over. Must be between 0 and 1.
748
+ */
749
+ rollover_fraction?: number;
750
+ /**
751
+ * List of filters that determine what kind of customer usage draws down a commit
752
+ * or credit. A customer's usage needs to meet the condition of at least one of the
753
+ * specifiers to contribute to a commit's or credit's drawdown. This field cannot
754
+ * be used together with `applicable_product_ids` or `applicable_product_tags`.
755
+ */
756
+ specifiers?: Array<Shared.CommitSpecifierInput>;
757
+ /**
758
+ * A temporary ID for the commit that can be used to reference the commit for
759
+ * commit specific overrides.
760
+ */
761
+ temporary_id?: string;
762
+ }
763
+ namespace Commit {
764
+ /**
765
+ * Required: Schedule for distributing the commit to the customer. For "POSTPAID"
766
+ * commits only one schedule item is allowed and amount must match invoice_schedule
767
+ * total.
768
+ */
769
+ interface AccessSchedule {
770
+ schedule_items: Array<AccessSchedule.ScheduleItem>;
771
+ /**
772
+ * Defaults to USD (cents) if not passed
773
+ */
774
+ credit_type_id?: string;
775
+ }
776
+ namespace AccessSchedule {
777
+ interface ScheduleItem {
778
+ amount: number;
779
+ /**
780
+ * RFC 3339 timestamp (exclusive)
781
+ */
782
+ ending_before: string;
783
+ /**
784
+ * RFC 3339 timestamp (inclusive)
785
+ */
786
+ starting_at: string;
787
+ }
788
+ }
789
+ /**
790
+ * Required for "POSTPAID" commits: the true up invoice will be generated at this
791
+ * time and only one schedule item is allowed; the total must match access_schedule
792
+ * amount. Optional for "PREPAID" commits: if not provided, this will be a
793
+ * "complimentary" commit with no invoice.
794
+ */
795
+ interface InvoiceSchedule {
796
+ /**
797
+ * Defaults to USD (cents) if not passed.
798
+ */
799
+ credit_type_id?: string;
800
+ /**
801
+ * This field is only applicable to commit invoice schedules. If true, this
802
+ * schedule will not generate an invoice.
803
+ */
804
+ do_not_invoice?: boolean;
805
+ /**
806
+ * Enter the unit price and quantity for the charge or instead only send the
807
+ * amount. If amount is sent, the unit price is assumed to be the amount and
808
+ * quantity is inferred to be 1.
809
+ */
810
+ recurring_schedule?: InvoiceSchedule.RecurringSchedule;
811
+ /**
812
+ * Either provide amount or provide both unit_price and quantity.
813
+ */
814
+ schedule_items?: Array<InvoiceSchedule.ScheduleItem>;
815
+ }
816
+ namespace InvoiceSchedule {
817
+ /**
818
+ * Enter the unit price and quantity for the charge or instead only send the
819
+ * amount. If amount is sent, the unit price is assumed to be the amount and
820
+ * quantity is inferred to be 1.
821
+ */
822
+ interface RecurringSchedule {
823
+ amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
824
+ /**
825
+ * RFC 3339 timestamp (exclusive).
826
+ */
827
+ ending_before: string;
828
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
829
+ /**
830
+ * RFC 3339 timestamp (inclusive).
831
+ */
832
+ starting_at: string;
833
+ /**
834
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
835
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
836
+ * inferred to be 1.
837
+ */
838
+ amount?: number;
839
+ /**
840
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
841
+ * amount and must be specified with unit_price. If specified amount cannot be
842
+ * provided.
843
+ */
844
+ quantity?: number;
845
+ /**
846
+ * Unit price for the charge. Will be multiplied by quantity to determine the
847
+ * amount and must be specified with quantity. If specified amount cannot be
848
+ * provided.
849
+ */
850
+ unit_price?: number;
851
+ }
852
+ interface ScheduleItem {
853
+ /**
854
+ * timestamp of the scheduled event
855
+ */
856
+ timestamp: string;
857
+ /**
858
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
859
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
860
+ * inferred to be 1.
861
+ */
862
+ amount?: number;
863
+ /**
864
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
865
+ * amount and must be specified with unit_price. If specified amount cannot be
866
+ * provided.
867
+ */
868
+ quantity?: number;
869
+ /**
870
+ * Unit price for the charge. Will be multiplied by quantity to determine the
871
+ * amount and must be specified with quantity. If specified amount cannot be
872
+ * provided.
873
+ */
874
+ unit_price?: number;
875
+ }
876
+ }
877
+ /**
878
+ * optionally payment gate this commit
879
+ */
880
+ interface PaymentGateConfig {
881
+ /**
882
+ * Gate access to the commit balance based on successful collection of payment.
883
+ * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
884
+ * facilitate payment using your own payment integration. Select NONE if you do not
885
+ * wish to payment gate the commit balance.
886
+ */
887
+ payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
888
+ /**
889
+ * Only applicable if using PRECALCULATED as your tax type.
890
+ */
891
+ precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
892
+ /**
893
+ * Only applicable if using STRIPE as your payment gate type.
894
+ */
895
+ stripe_config?: PaymentGateConfig.StripeConfig;
896
+ /**
897
+ * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
898
+ * not wish Metronome to calculate tax on your behalf. Leaving this field blank
899
+ * will default to NONE.
900
+ */
901
+ tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
902
+ }
903
+ namespace PaymentGateConfig {
904
+ /**
905
+ * Only applicable if using PRECALCULATED as your tax type.
906
+ */
907
+ interface PrecalculatedTaxConfig {
908
+ /**
909
+ * Amount of tax to be applied. This should be in the same currency and
910
+ * denomination as the commit's invoice schedule
911
+ */
912
+ tax_amount: number;
913
+ /**
914
+ * Name of the tax to be applied. This may be used in an invoice line item
915
+ * description.
916
+ */
917
+ tax_name?: string;
918
+ }
919
+ /**
920
+ * Only applicable if using STRIPE as your payment gate type.
921
+ */
922
+ interface StripeConfig {
923
+ /**
924
+ * If left blank, will default to INVOICE
925
+ */
926
+ payment_type: 'INVOICE' | 'PAYMENT_INTENT';
927
+ /**
928
+ * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
929
+ * your payment type.
930
+ */
931
+ invoice_metadata?: {
932
+ [key: string]: string;
933
+ };
934
+ /**
935
+ * If true, the payment will be made assuming the customer is present (i.e. on
936
+ * session).
937
+ *
938
+ * If false, the payment will be made assuming the customer is not present (i.e.
939
+ * off session). For cardholders from a country with an e-mandate requirement (e.g.
940
+ * India), the payment may be declined.
941
+ *
942
+ * If left blank, will default to false.
943
+ */
944
+ on_session_payment?: boolean;
945
+ }
946
+ }
947
+ }
948
+ interface Credit {
949
+ /**
950
+ * Schedule for distributing the credit to the customer.
951
+ */
952
+ access_schedule: Credit.AccessSchedule;
953
+ product_id: string;
954
+ /**
955
+ * Which products the credit applies to. If both applicable_product_ids and
956
+ * applicable_product_tags are not provided, the credit applies to all products.
957
+ */
958
+ applicable_product_ids?: Array<string>;
959
+ /**
960
+ * Which tags the credit applies to. If both applicable_product_ids and
961
+ * applicable_product_tags are not provided, the credit applies to all products.
962
+ */
963
+ applicable_product_tags?: Array<string>;
964
+ /**
965
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
966
+ */
967
+ custom_fields?: {
968
+ [key: string]: string;
969
+ };
970
+ /**
971
+ * Used only in UI/API. It is not exposed to end customers.
972
+ */
973
+ description?: string;
974
+ /**
975
+ * Optional configuration for credit hierarchy access control
976
+ */
977
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
978
+ /**
979
+ * displayed on invoices
980
+ */
981
+ name?: string;
982
+ /**
983
+ * This field's availability is dependent on your client's configuration.
984
+ */
985
+ netsuite_sales_order_id?: string;
986
+ /**
987
+ * If multiple credits are applicable, the one with the lower priority will apply
988
+ * first.
989
+ */
990
+ priority?: number;
991
+ rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
992
+ /**
993
+ * List of filters that determine what kind of customer usage draws down a commit
994
+ * or credit. A customer's usage needs to meet the condition of at least one of the
995
+ * specifiers to contribute to a commit's or credit's drawdown. This field cannot
996
+ * be used together with `applicable_product_ids` or `applicable_product_tags`.
997
+ */
998
+ specifiers?: Array<Shared.CommitSpecifierInput>;
999
+ }
1000
+ namespace Credit {
1001
+ /**
1002
+ * Schedule for distributing the credit to the customer.
1003
+ */
1004
+ interface AccessSchedule {
1005
+ schedule_items: Array<AccessSchedule.ScheduleItem>;
1006
+ /**
1007
+ * Defaults to USD (cents) if not passed
1008
+ */
1009
+ credit_type_id?: string;
1010
+ }
1011
+ namespace AccessSchedule {
1012
+ interface ScheduleItem {
1013
+ amount: number;
1014
+ /**
1015
+ * RFC 3339 timestamp (exclusive)
1016
+ */
1017
+ ending_before: string;
1018
+ /**
1019
+ * RFC 3339 timestamp (inclusive)
1020
+ */
1021
+ starting_at: string;
1022
+ }
1023
+ }
1024
+ }
1025
+ interface Discount {
1026
+ product_id: string;
1027
+ /**
1028
+ * Must provide either schedule_items or recurring_schedule.
1029
+ */
1030
+ schedule: Discount.Schedule;
1031
+ /**
1032
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1033
+ */
1034
+ custom_fields?: {
1035
+ [key: string]: string;
1036
+ };
1037
+ /**
1038
+ * displayed on invoices
1039
+ */
1040
+ name?: string;
1041
+ /**
1042
+ * This field's availability is dependent on your client's configuration.
1043
+ */
1044
+ netsuite_sales_order_id?: string;
1045
+ }
1046
+ namespace Discount {
1047
+ /**
1048
+ * Must provide either schedule_items or recurring_schedule.
1049
+ */
1050
+ interface Schedule {
1051
+ /**
1052
+ * Defaults to USD (cents) if not passed.
1053
+ */
1054
+ credit_type_id?: string;
1055
+ /**
1056
+ * This field is only applicable to commit invoice schedules. If true, this
1057
+ * schedule will not generate an invoice.
1058
+ */
1059
+ do_not_invoice?: boolean;
1060
+ /**
1061
+ * Enter the unit price and quantity for the charge or instead only send the
1062
+ * amount. If amount is sent, the unit price is assumed to be the amount and
1063
+ * quantity is inferred to be 1.
1064
+ */
1065
+ recurring_schedule?: Schedule.RecurringSchedule;
1066
+ /**
1067
+ * Either provide amount or provide both unit_price and quantity.
1068
+ */
1069
+ schedule_items?: Array<Schedule.ScheduleItem>;
1070
+ }
1071
+ namespace Schedule {
1072
+ /**
1073
+ * Enter the unit price and quantity for the charge or instead only send the
1074
+ * amount. If amount is sent, the unit price is assumed to be the amount and
1075
+ * quantity is inferred to be 1.
1076
+ */
1077
+ interface RecurringSchedule {
1078
+ amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
1079
+ /**
1080
+ * RFC 3339 timestamp (exclusive).
1081
+ */
1082
+ ending_before: string;
1083
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
1084
+ /**
1085
+ * RFC 3339 timestamp (inclusive).
1086
+ */
1087
+ starting_at: string;
1088
+ /**
1089
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
1090
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
1091
+ * inferred to be 1.
1092
+ */
1093
+ amount?: number;
1094
+ /**
1095
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
1096
+ * amount and must be specified with unit_price. If specified amount cannot be
1097
+ * provided.
1098
+ */
1099
+ quantity?: number;
1100
+ /**
1101
+ * Unit price for the charge. Will be multiplied by quantity to determine the
1102
+ * amount and must be specified with quantity. If specified amount cannot be
1103
+ * provided.
1104
+ */
1105
+ unit_price?: number;
1106
+ }
1107
+ interface ScheduleItem {
1108
+ /**
1109
+ * timestamp of the scheduled event
1110
+ */
1111
+ timestamp: string;
1112
+ /**
1113
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
1114
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
1115
+ * inferred to be 1.
1116
+ */
1117
+ amount?: number;
1118
+ /**
1119
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
1120
+ * amount and must be specified with unit_price. If specified amount cannot be
1121
+ * provided.
1122
+ */
1123
+ quantity?: number;
1124
+ /**
1125
+ * Unit price for the charge. Will be multiplied by quantity to determine the
1126
+ * amount and must be specified with quantity. If specified amount cannot be
1127
+ * provided.
1128
+ */
1129
+ unit_price?: number;
1130
+ }
1131
+ }
1132
+ }
1133
+ interface HierarchyConfiguration {
1134
+ parent?: HierarchyConfiguration.Parent;
1135
+ parent_behavior?: HierarchyConfiguration.ParentBehavior;
1136
+ /**
1137
+ * Indicates whether the parent should pay for the child's invoice charges
1138
+ */
1139
+ payer?: 'SELF' | 'PARENT';
1140
+ /**
1141
+ * Indicates the behavior of the child's invoice statements on the parent's
1142
+ * invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
1143
+ * consolidated invoices **SEPARATE**: Child's invoice statements will appear not
1144
+ * appear on parent's consolidated invoices
1145
+ */
1146
+ usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE';
1147
+ }
1148
+ namespace HierarchyConfiguration {
1149
+ interface Parent {
1150
+ contract_id: string;
1151
+ customer_id: string;
1152
+ }
1153
+ interface ParentBehavior {
1154
+ /**
1155
+ * Indicates the desired behavior of consolidated invoices generated by the parent
1156
+ * in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
1157
+ * customers will be appended to the consolidated invoice **NONE**: Do not generate
1158
+ * consolidated invoices
1159
+ */
1160
+ invoice_consolidation_type?: 'CONCATENATE' | 'NONE';
1161
+ }
1162
+ }
1163
+ interface Override {
1164
+ /**
1165
+ * RFC 3339 timestamp indicating when the override will start applying (inclusive)
1166
+ */
1167
+ starting_at: string;
1168
+ /**
1169
+ * tags identifying products whose rates are being overridden. Cannot be used in
1170
+ * conjunction with override_specifiers.
1171
+ */
1172
+ applicable_product_tags?: Array<string>;
1173
+ /**
1174
+ * RFC 3339 timestamp indicating when the override will stop applying (exclusive)
1175
+ */
1176
+ ending_before?: string;
1177
+ entitled?: boolean;
1178
+ /**
1179
+ * Indicates whether the override should only apply to commits. Defaults to
1180
+ * `false`. If `true`, you can specify relevant commits in `override_specifiers` by
1181
+ * passing `commit_ids`. if you do not specify `commit_ids`, then the override will
1182
+ * apply when consuming any prepaid or postpaid commit.
1183
+ */
1184
+ is_commit_specific?: boolean;
1185
+ /**
1186
+ * Required for MULTIPLIER type. Must be >=0.
1187
+ */
1188
+ multiplier?: number;
1189
+ /**
1190
+ * Cannot be used in conjunction with product_id or applicable_product_tags. If
1191
+ * provided, the override will apply to all products with the specified specifiers.
1192
+ */
1193
+ override_specifiers?: Array<Override.OverrideSpecifier>;
1194
+ /**
1195
+ * Required for OVERWRITE type.
1196
+ */
1197
+ overwrite_rate?: Override.OverwriteRate;
1198
+ /**
1199
+ * Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides.
1200
+ * Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered
1201
+ * and multiplier overrides are prioritized by their priority value (lowest first).
1202
+ * Must be > 0.
1203
+ */
1204
+ priority?: number;
1205
+ /**
1206
+ * ID of the product whose rate is being overridden. Cannot be used in conjunction
1207
+ * with override_specifiers.
1208
+ */
1209
+ product_id?: string;
1210
+ /**
1211
+ * Indicates whether the override applies to commit rates or list rates. Can only
1212
+ * be used for overrides that have `is_commit_specific` set to `true`. Defaults to
1213
+ * `"LIST_RATE"`.
1214
+ */
1215
+ target?: 'COMMIT_RATE' | 'LIST_RATE';
1216
+ /**
1217
+ * Required for TIERED type. Must have at least one tier.
1218
+ */
1219
+ tiers?: Array<Override.Tier>;
1220
+ /**
1221
+ * Overwrites are prioritized over multipliers and tiered overrides.
1222
+ */
1223
+ type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
1224
+ }
1225
+ namespace Override {
1226
+ interface OverrideSpecifier {
1227
+ billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1228
+ /**
1229
+ * Can only be used for commit specific overrides. Must be used in conjunction with
1230
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1231
+ * `presentation_group_values`. If provided, the override will only apply to the
1232
+ * specified commits. If not provided, the override will apply to all commits.
1233
+ */
1234
+ commit_ids?: Array<string>;
1235
+ /**
1236
+ * A map of group names to values. The override will only apply to line items with
1237
+ * the specified presentation group values.
1238
+ */
1239
+ presentation_group_values?: {
1240
+ [key: string]: string;
1241
+ };
1242
+ /**
1243
+ * A map of pricing group names to values. The override will only apply to products
1244
+ * with the specified pricing group values.
1245
+ */
1246
+ pricing_group_values?: {
1247
+ [key: string]: string;
1248
+ };
1249
+ /**
1250
+ * If provided, the override will only apply to the product with the specified ID.
1251
+ */
1252
+ product_id?: string;
1253
+ /**
1254
+ * If provided, the override will only apply to products with all the specified
1255
+ * tags.
1256
+ */
1257
+ product_tags?: Array<string>;
1258
+ /**
1259
+ * Can only be used for commit specific overrides. Must be used in conjunction with
1260
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1261
+ * `presentation_group_values`. If provided, the override will only apply to
1262
+ * commits created by the specified recurring commit ids.
1263
+ */
1264
+ recurring_commit_ids?: Array<string>;
1265
+ /**
1266
+ * Can only be used for commit specific overrides. Must be used in conjunction with
1267
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1268
+ * `presentation_group_values`. If provided, the override will only apply to
1269
+ * credits created by the specified recurring credit ids.
1270
+ */
1271
+ recurring_credit_ids?: Array<string>;
1272
+ }
1273
+ /**
1274
+ * Required for OVERWRITE type.
1275
+ */
1276
+ interface OverwriteRate {
1277
+ rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
1278
+ credit_type_id?: string;
1279
+ /**
1280
+ * Only set for CUSTOM rate_type. This field is interpreted by custom rate
1281
+ * processors.
1282
+ */
1283
+ custom_rate?: {
1284
+ [key: string]: unknown;
1285
+ };
1286
+ /**
1287
+ * Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
1288
+ * set to true.
1289
+ */
1290
+ is_prorated?: boolean;
1291
+ /**
1292
+ * Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
1293
+ * this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
1294
+ */
1295
+ price?: number;
1296
+ /**
1297
+ * Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
1298
+ */
1299
+ quantity?: number;
1300
+ /**
1301
+ * Only set for TIERED rate_type.
1302
+ */
1303
+ tiers?: Array<Shared.Tier>;
1304
+ }
1305
+ interface Tier {
1306
+ multiplier: number;
1307
+ size?: number;
1308
+ }
1309
+ }
1310
+ interface ProfessionalService {
1311
+ /**
1312
+ * Maximum amount for the term.
1313
+ */
1314
+ max_amount: number;
1315
+ product_id: string;
1316
+ /**
1317
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
1318
+ * amount.
1319
+ */
1320
+ quantity: number;
1321
+ /**
1322
+ * Unit price for the charge. Will be multiplied by quantity to determine the
1323
+ * amount and must be specified.
1324
+ */
1325
+ unit_price: number;
1326
+ /**
1327
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1328
+ */
1329
+ custom_fields?: {
1330
+ [key: string]: string;
1331
+ };
1332
+ description?: string;
1333
+ /**
1334
+ * This field's availability is dependent on your client's configuration.
1335
+ */
1336
+ netsuite_sales_order_id?: string;
1337
+ }
1338
+ interface RecurringCommit {
1339
+ /**
1340
+ * The amount of commit to grant.
1341
+ */
1342
+ access_amount: RecurringCommit.AccessAmount;
1343
+ /**
1344
+ * Defines the length of the access schedule for each created commit/credit. The
1345
+ * value represents the number of units. Unit defaults to "PERIODS", where the
1346
+ * length of a period is determined by the recurrence_frequency.
1347
+ */
1348
+ commit_duration: RecurringCommit.CommitDuration;
1349
+ /**
1350
+ * Will be passed down to the individual commits
1351
+ */
1352
+ priority: number;
1353
+ product_id: string;
1354
+ /**
1355
+ * determines the start time for the first commit
1356
+ */
1357
+ starting_at: string;
1358
+ /**
1359
+ * Will be passed down to the individual commits
1360
+ */
1361
+ applicable_product_ids?: Array<string>;
1362
+ /**
1363
+ * Will be passed down to the individual commits
1364
+ */
1365
+ applicable_product_tags?: Array<string>;
1366
+ /**
1367
+ * Will be passed down to the individual commits
1368
+ */
1369
+ description?: string;
1370
+ /**
1371
+ * Determines when the contract will stop creating recurring commits. optional
1372
+ */
1373
+ ending_before?: string;
1374
+ /**
1375
+ * Optional configuration for recurring commit/credit hierarchy access control
1376
+ */
1377
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
1378
+ /**
1379
+ * The amount the customer should be billed for the commit. Not required.
1380
+ */
1381
+ invoice_amount?: RecurringCommit.InvoiceAmount;
1382
+ /**
1383
+ * displayed on invoices. will be passed through to the individual commits
1384
+ */
1385
+ name?: string;
1386
+ /**
1387
+ * Will be passed down to the individual commits
1388
+ */
1389
+ netsuite_sales_order_id?: string;
1390
+ /**
1391
+ * Determines whether the first and last commit will be prorated. If not provided,
1392
+ * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1393
+ */
1394
+ proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1395
+ /**
1396
+ * Whether the created commits will use the commit rate or list rate
1397
+ */
1398
+ rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
1399
+ /**
1400
+ * The frequency at which the recurring commits will be created. If not provided: -
1401
+ * The commits will be created on the usage invoice frequency. If provided: - The
1402
+ * period defined in the duration will correspond to this frequency. - Commits will
1403
+ * be created aligned with the recurring commit's starting_at rather than the usage
1404
+ * invoice dates.
1405
+ */
1406
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1407
+ /**
1408
+ * Will be passed down to the individual commits. This controls how much of an
1409
+ * individual unexpired commit will roll over upon contract transition. Must be
1410
+ * between 0 and 1.
1411
+ */
1412
+ rollover_fraction?: number;
1413
+ /**
1414
+ * List of filters that determine what kind of customer usage draws down a commit
1415
+ * or credit. A customer's usage needs to meet the condition of at least one of the
1416
+ * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1417
+ * be used together with `applicable_product_ids` or `applicable_product_tags`.
1418
+ */
1419
+ specifiers?: Array<Shared.CommitSpecifierInput>;
1420
+ /**
1421
+ * Attach a subscription to the recurring commit/credit.
1422
+ */
1423
+ subscription_config?: RecurringCommit.SubscriptionConfig;
1424
+ /**
1425
+ * A temporary ID that can be used to reference the recurring commit for commit
1426
+ * specific overrides.
1427
+ */
1428
+ temporary_id?: string;
1429
+ }
1430
+ namespace RecurringCommit {
1431
+ /**
1432
+ * The amount of commit to grant.
1433
+ */
1434
+ interface AccessAmount {
1435
+ credit_type_id: string;
1436
+ unit_price: number;
1437
+ /**
1438
+ * This field is required unless a subscription is attached via
1439
+ * `subscription_config`.
1440
+ */
1441
+ quantity?: number;
1442
+ }
1443
+ /**
1444
+ * Defines the length of the access schedule for each created commit/credit. The
1445
+ * value represents the number of units. Unit defaults to "PERIODS", where the
1446
+ * length of a period is determined by the recurrence_frequency.
1447
+ */
1448
+ interface CommitDuration {
1449
+ value: number;
1450
+ unit?: 'PERIODS';
1451
+ }
1452
+ /**
1453
+ * The amount the customer should be billed for the commit. Not required.
1454
+ */
1455
+ interface InvoiceAmount {
1456
+ credit_type_id: string;
1457
+ quantity: number;
1458
+ unit_price: number;
1459
+ }
1460
+ /**
1461
+ * Attach a subscription to the recurring commit/credit.
1462
+ */
1463
+ interface SubscriptionConfig {
1464
+ apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
1465
+ /**
1466
+ * ID of the subscription to configure on the recurring commit/credit.
1467
+ */
1468
+ subscription_id: string;
1469
+ /**
1470
+ * If set to POOLED, allocation added per seat is pooled across the account.
1471
+ */
1472
+ allocation?: 'INDIVIDUAL' | 'POOLED';
1473
+ }
1474
+ namespace SubscriptionConfig {
1475
+ interface ApplySeatIncreaseConfig {
1476
+ /**
1477
+ * Indicates whether a mid-period seat increase should be prorated.
1478
+ */
1479
+ is_prorated: boolean;
1480
+ }
1481
+ }
1482
+ }
1483
+ interface RecurringCredit {
1484
+ /**
1485
+ * The amount of commit to grant.
1486
+ */
1487
+ access_amount: RecurringCredit.AccessAmount;
1488
+ /**
1489
+ * Defines the length of the access schedule for each created commit/credit. The
1490
+ * value represents the number of units. Unit defaults to "PERIODS", where the
1491
+ * length of a period is determined by the recurrence_frequency.
1492
+ */
1493
+ commit_duration: RecurringCredit.CommitDuration;
1494
+ /**
1495
+ * Will be passed down to the individual commits
1496
+ */
1497
+ priority: number;
1498
+ product_id: string;
1499
+ /**
1500
+ * determines the start time for the first commit
1501
+ */
1502
+ starting_at: string;
1503
+ /**
1504
+ * Will be passed down to the individual commits
1505
+ */
1506
+ applicable_product_ids?: Array<string>;
1507
+ /**
1508
+ * Will be passed down to the individual commits
1509
+ */
1510
+ applicable_product_tags?: Array<string>;
1511
+ /**
1512
+ * Will be passed down to the individual commits
1513
+ */
1514
+ description?: string;
1515
+ /**
1516
+ * Determines when the contract will stop creating recurring commits. optional
1517
+ */
1518
+ ending_before?: string;
1519
+ /**
1520
+ * Optional configuration for recurring commit/credit hierarchy access control
1521
+ */
1522
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
1523
+ /**
1524
+ * displayed on invoices. will be passed through to the individual commits
1525
+ */
1526
+ name?: string;
1527
+ /**
1528
+ * Will be passed down to the individual commits
1529
+ */
1530
+ netsuite_sales_order_id?: string;
1531
+ /**
1532
+ * Determines whether the first and last commit will be prorated. If not provided,
1533
+ * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1534
+ */
1535
+ proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1536
+ /**
1537
+ * Whether the created commits will use the commit rate or list rate
1538
+ */
1539
+ rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
1540
+ /**
1541
+ * The frequency at which the recurring commits will be created. If not provided: -
1542
+ * The commits will be created on the usage invoice frequency. If provided: - The
1543
+ * period defined in the duration will correspond to this frequency. - Commits will
1544
+ * be created aligned with the recurring commit's starting_at rather than the usage
1545
+ * invoice dates.
1546
+ */
1547
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1548
+ /**
1549
+ * Will be passed down to the individual commits. This controls how much of an
1550
+ * individual unexpired commit will roll over upon contract transition. Must be
1551
+ * between 0 and 1.
1552
+ */
1553
+ rollover_fraction?: number;
1554
+ /**
1555
+ * List of filters that determine what kind of customer usage draws down a commit
1556
+ * or credit. A customer's usage needs to meet the condition of at least one of the
1557
+ * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1558
+ * be used together with `applicable_product_ids` or `applicable_product_tags`.
1559
+ */
1560
+ specifiers?: Array<Shared.CommitSpecifierInput>;
1561
+ /**
1562
+ * Attach a subscription to the recurring commit/credit.
1563
+ */
1564
+ subscription_config?: RecurringCredit.SubscriptionConfig;
1565
+ /**
1566
+ * A temporary ID that can be used to reference the recurring commit for commit
1567
+ * specific overrides.
1568
+ */
1569
+ temporary_id?: string;
1570
+ }
1571
+ namespace RecurringCredit {
1572
+ /**
1573
+ * The amount of commit to grant.
1574
+ */
1575
+ interface AccessAmount {
1576
+ credit_type_id: string;
1577
+ unit_price: number;
1578
+ /**
1579
+ * This field is required unless a subscription is attached via
1580
+ * `subscription_config`.
1581
+ */
1582
+ quantity?: number;
1583
+ }
1584
+ /**
1585
+ * Defines the length of the access schedule for each created commit/credit. The
1586
+ * value represents the number of units. Unit defaults to "PERIODS", where the
1587
+ * length of a period is determined by the recurrence_frequency.
1588
+ */
1589
+ interface CommitDuration {
1590
+ value: number;
1591
+ unit?: 'PERIODS';
1592
+ }
1593
+ /**
1594
+ * Attach a subscription to the recurring commit/credit.
1595
+ */
1596
+ interface SubscriptionConfig {
1597
+ apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
1598
+ /**
1599
+ * ID of the subscription to configure on the recurring commit/credit.
1600
+ */
1601
+ subscription_id: string;
1602
+ /**
1603
+ * If set to POOLED, allocation added per seat is pooled across the account.
1604
+ */
1605
+ allocation?: 'INDIVIDUAL' | 'POOLED';
1606
+ }
1607
+ namespace SubscriptionConfig {
1608
+ interface ApplySeatIncreaseConfig {
1609
+ /**
1610
+ * Indicates whether a mid-period seat increase should be prorated.
1611
+ */
1612
+ is_prorated: boolean;
1613
+ }
1614
+ }
1615
+ }
1616
+ interface ResellerRoyalty {
1617
+ fraction: number;
1618
+ netsuite_reseller_id: string;
1619
+ reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
1620
+ starting_at: string;
1621
+ /**
1622
+ * Must provide at least one of applicable_product_ids or applicable_product_tags.
1623
+ */
1624
+ applicable_product_ids?: Array<string>;
1625
+ /**
1626
+ * Must provide at least one of applicable_product_ids or applicable_product_tags.
1627
+ */
1628
+ applicable_product_tags?: Array<string>;
1629
+ aws_options?: ResellerRoyalty.AwsOptions;
1630
+ ending_before?: string;
1631
+ gcp_options?: ResellerRoyalty.GcpOptions;
1632
+ reseller_contract_value?: number;
1633
+ }
1634
+ namespace ResellerRoyalty {
1635
+ interface AwsOptions {
1636
+ aws_account_number?: string;
1637
+ aws_offer_id?: string;
1638
+ aws_payer_reference_id?: string;
1639
+ }
1640
+ interface GcpOptions {
1641
+ gcp_account_id?: string;
1642
+ gcp_offer_id?: string;
1643
+ }
1644
+ }
1645
+ interface ScheduledCharge {
1646
+ product_id: string;
1647
+ /**
1648
+ * Must provide either schedule_items or recurring_schedule.
1649
+ */
1650
+ schedule: ScheduledCharge.Schedule;
1651
+ /**
1652
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1653
+ */
1654
+ custom_fields?: {
1655
+ [key: string]: string;
1656
+ };
1657
+ /**
1658
+ * displayed on invoices
1659
+ */
1660
+ name?: string;
1661
+ /**
1662
+ * This field's availability is dependent on your client's configuration.
1663
+ */
1664
+ netsuite_sales_order_id?: string;
1665
+ }
1666
+ namespace ScheduledCharge {
1667
+ /**
1668
+ * Must provide either schedule_items or recurring_schedule.
1669
+ */
1670
+ interface Schedule {
1671
+ /**
1672
+ * Defaults to USD (cents) if not passed.
1673
+ */
1674
+ credit_type_id?: string;
1675
+ /**
1676
+ * This field is only applicable to commit invoice schedules. If true, this
1677
+ * schedule will not generate an invoice.
1678
+ */
1679
+ do_not_invoice?: boolean;
1680
+ /**
1681
+ * Enter the unit price and quantity for the charge or instead only send the
1682
+ * amount. If amount is sent, the unit price is assumed to be the amount and
1683
+ * quantity is inferred to be 1.
1684
+ */
1685
+ recurring_schedule?: Schedule.RecurringSchedule;
1686
+ /**
1687
+ * Either provide amount or provide both unit_price and quantity.
1688
+ */
1689
+ schedule_items?: Array<Schedule.ScheduleItem>;
1690
+ }
1691
+ namespace Schedule {
1692
+ /**
1693
+ * Enter the unit price and quantity for the charge or instead only send the
1694
+ * amount. If amount is sent, the unit price is assumed to be the amount and
1695
+ * quantity is inferred to be 1.
1696
+ */
1697
+ interface RecurringSchedule {
1698
+ amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
1699
+ /**
1700
+ * RFC 3339 timestamp (exclusive).
1701
+ */
1702
+ ending_before: string;
1703
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
1704
+ /**
1705
+ * RFC 3339 timestamp (inclusive).
1706
+ */
1707
+ starting_at: string;
1708
+ /**
1709
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
1710
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
1711
+ * inferred to be 1.
1712
+ */
1713
+ amount?: number;
1714
+ /**
1715
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
1716
+ * amount and must be specified with unit_price. If specified amount cannot be
1717
+ * provided.
1718
+ */
1719
+ quantity?: number;
1720
+ /**
1721
+ * Unit price for the charge. Will be multiplied by quantity to determine the
1722
+ * amount and must be specified with quantity. If specified amount cannot be
1723
+ * provided.
1724
+ */
1725
+ unit_price?: number;
1726
+ }
1727
+ interface ScheduleItem {
1728
+ /**
1729
+ * timestamp of the scheduled event
1730
+ */
1731
+ timestamp: string;
1732
+ /**
1733
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
1734
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
1735
+ * inferred to be 1.
1736
+ */
1737
+ amount?: number;
1738
+ /**
1739
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
1740
+ * amount and must be specified with unit_price. If specified amount cannot be
1741
+ * provided.
1742
+ */
1743
+ quantity?: number;
1744
+ /**
1745
+ * Unit price for the charge. Will be multiplied by quantity to determine the
1746
+ * amount and must be specified with quantity. If specified amount cannot be
1747
+ * provided.
1748
+ */
1749
+ unit_price?: number;
1750
+ }
1751
+ }
1752
+ }
1753
+ interface Subscription {
1754
+ collection_schedule: 'ADVANCE' | 'ARREARS';
1755
+ proration: Subscription.Proration;
1756
+ subscription_rate: Subscription.SubscriptionRate;
1757
+ /**
1758
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1759
+ */
1760
+ custom_fields?: {
1761
+ [key: string]: string;
1762
+ };
1763
+ description?: string;
1764
+ /**
1765
+ * Exclusive end time for the subscription. If not provided, subscription inherits
1766
+ * contract end date.
1767
+ */
1768
+ ending_before?: string;
1769
+ /**
1770
+ * The initial quantity for the subscription. It must be non-negative value.
1771
+ * Required if quantity_management_mode is QUANTITY_ONLY.
1772
+ */
1773
+ initial_quantity?: number;
1774
+ name?: string;
1775
+ /**
1776
+ * Determines how the subscription's quantity is controlled. Defaults to
1777
+ * QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
1778
+ * directly on the subscription. `initial_quantity` must be provided with this
1779
+ * option. Compatible with recurring commits/credits that use POOLED allocation.
1780
+ */
1781
+ quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY';
1782
+ /**
1783
+ * Inclusive start time for the subscription. If not provided, defaults to contract
1784
+ * start date
1785
+ */
1786
+ starting_at?: string;
1787
+ /**
1788
+ * A temporary ID used to reference the subscription in recurring commit/credit
1789
+ * subscription configs created within the same payload.
1790
+ */
1791
+ temporary_id?: string;
1792
+ }
1793
+ namespace Subscription {
1794
+ interface Proration {
1795
+ /**
1796
+ * Indicates how mid-period quantity adjustments are invoiced.
1797
+ * **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
1798
+ * quantity increase will be billed immediately on the scheduled date.
1799
+ * **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
1800
+ * in-arrears at the end of the period.
1801
+ */
1802
+ invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
1803
+ /**
1804
+ * Indicates if the partial period will be prorated or charged a full amount.
1805
+ */
1806
+ is_prorated?: boolean;
1807
+ }
1808
+ interface SubscriptionRate {
1809
+ /**
1810
+ * Frequency to bill subscription with. Together with product_id, must match
1811
+ * existing rate on the rate card.
1812
+ */
1813
+ billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1814
+ /**
1815
+ * Must be subscription type product
1816
+ */
1817
+ product_id: string;
1818
+ }
1819
+ }
1820
+ interface Transition {
1821
+ from_contract_id: string;
1822
+ /**
1823
+ * This field's available values may vary based on your client's configuration.
1824
+ */
1825
+ type: 'SUPERSEDE' | 'RENEWAL';
1826
+ future_invoice_behavior?: Transition.FutureInvoiceBehavior;
1827
+ }
1828
+ namespace Transition {
1829
+ interface FutureInvoiceBehavior {
1830
+ /**
1831
+ * Controls whether future trueup invoices are billed or removed. Default behavior
1832
+ * is AS_IS if not specified.
1833
+ */
1834
+ trueup?: 'REMOVE' | 'AS_IS' | null;
1835
+ }
1836
+ }
1837
+ interface UsageStatementSchedule {
1838
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1839
+ /**
1840
+ * Required when using CUSTOM_DATE. This option lets you set a historical billing
1841
+ * anchor date, aligning future billing cycles with a chosen cadence. For example,
1842
+ * if a contract starts on 2024-09-15 and you set the anchor date to 2024-09-10
1843
+ * with a MONTHLY frequency, the first usage statement will cover 09-15 to 10-10.
1844
+ * Subsequent statements will follow the 10th of each month.
1845
+ */
1846
+ billing_anchor_date?: string;
1847
+ /**
1848
+ * If not provided, defaults to the first day of the month.
1849
+ */
1850
+ day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE';
1851
+ /**
1852
+ * The date Metronome should start generating usage invoices. If unspecified,
1853
+ * contract start date will be used. This is useful to set if you want to import
1854
+ * historical invoices via our 'Create Historical Invoices' API rather than having
1855
+ * Metronome automatically generate them.
1856
+ */
1857
+ invoice_generation_starting_at?: string;
1858
+ }
1859
+ }
1860
+ export interface ContractRetrieveParams {
1861
+ contract_id: string;
1862
+ customer_id: string;
1863
+ /**
1864
+ * Include the balance of credits and commits in the response. Setting this flag
1865
+ * may cause the query to be slower.
1866
+ */
1867
+ include_balance?: boolean;
1868
+ /**
1869
+ * Include commit ledgers in the response. Setting this flag may cause the query to
1870
+ * be slower.
1871
+ */
1872
+ include_ledgers?: boolean;
1873
+ }
1874
+ export interface ContractListParams {
1875
+ customer_id: string;
1876
+ /**
1877
+ * Optional RFC 3339 timestamp. If provided, the response will include only
1878
+ * contracts effective on the provided date. This cannot be provided if the
1879
+ * starting_at filter is provided.
1880
+ */
1881
+ covering_date?: string;
1882
+ /**
1883
+ * Include archived contracts in the response
1884
+ */
1885
+ include_archived?: boolean;
1886
+ /**
1887
+ * Include the balance of credits and commits in the response. Setting this flag
1888
+ * may cause the query to be slower.
1889
+ */
1890
+ include_balance?: boolean;
1891
+ /**
1892
+ * Include commit ledgers in the response. Setting this flag may cause the query to
1893
+ * be slower.
1894
+ */
1895
+ include_ledgers?: boolean;
1896
+ /**
1897
+ * Optional RFC 3339 timestamp. If provided, the response will include only
1898
+ * contracts where effective_at is on or after the provided date. This cannot be
1899
+ * provided if the covering_date filter is provided.
1900
+ */
1901
+ starting_at?: string;
1902
+ }
1903
+ export interface ContractAddManualBalanceEntryParams {
1904
+ /**
1905
+ * ID of the balance (commit or credit) to update.
1906
+ */
1907
+ id: string;
1908
+ /**
1909
+ * Amount to add to the segment. A negative number will draw down from the balance.
1910
+ */
1911
+ amount: number;
1912
+ /**
1913
+ * ID of the customer whose balance is to be updated.
1914
+ */
1915
+ customer_id: string;
1916
+ /**
1917
+ * Reason for the manual adjustment. This will be displayed in the ledger.
1918
+ */
1919
+ reason: string;
1920
+ /**
1921
+ * ID of the segment to update.
1922
+ */
1923
+ segment_id: string;
1924
+ /**
1925
+ * ID of the contract to update. Leave blank to update a customer level balance.
1926
+ */
1927
+ contract_id?: string;
1928
+ /**
1929
+ * RFC 3339 timestamp indicating when the manual adjustment takes place. If not
1930
+ * provided, it will default to the start of the segment.
1931
+ */
1932
+ timestamp?: string;
1933
+ }
1934
+ export interface ContractAmendParams {
1935
+ /**
1936
+ * ID of the contract to amend
1937
+ */
1938
+ contract_id: string;
1939
+ /**
1940
+ * ID of the customer whose contract is to be amended
1941
+ */
1942
+ customer_id: string;
1943
+ /**
1944
+ * inclusive start time for the amendment
1945
+ */
1946
+ starting_at: string;
1947
+ commits?: Array<ContractAmendParams.Commit>;
1948
+ credits?: Array<ContractAmendParams.Credit>;
1949
+ /**
1950
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1951
+ */
1952
+ custom_fields?: {
1953
+ [key: string]: string;
1954
+ };
1955
+ /**
1956
+ * This field's availability is dependent on your client's configuration.
1957
+ */
1958
+ discounts?: Array<ContractAmendParams.Discount>;
1959
+ /**
1960
+ * This field's availability is dependent on your client's configuration.
1961
+ */
1962
+ netsuite_sales_order_id?: string;
1963
+ overrides?: Array<ContractAmendParams.Override>;
1964
+ /**
1965
+ * This field's availability is dependent on your client's configuration.
1966
+ */
1967
+ professional_services?: Array<ContractAmendParams.ProfessionalService>;
1968
+ /**
1969
+ * This field's availability is dependent on your client's configuration.
1970
+ */
1971
+ reseller_royalties?: Array<ContractAmendParams.ResellerRoyalty>;
1972
+ /**
1973
+ * This field's availability is dependent on your client's configuration.
1974
+ */
1975
+ salesforce_opportunity_id?: string;
1976
+ scheduled_charges?: Array<ContractAmendParams.ScheduledCharge>;
1977
+ /**
1978
+ * This field's availability is dependent on your client's configuration.
1979
+ */
1980
+ total_contract_value?: number;
1981
+ }
1982
+ export declare namespace ContractAmendParams {
1983
+ interface Commit {
1984
+ product_id: string;
1985
+ type: 'PREPAID' | 'POSTPAID';
1986
+ /**
1987
+ * Required: Schedule for distributing the commit to the customer. For "POSTPAID"
1988
+ * commits only one schedule item is allowed and amount must match invoice_schedule
1989
+ * total.
1990
+ */
1991
+ access_schedule?: Commit.AccessSchedule;
1992
+ /**
1993
+ * (DEPRECATED) Use access_schedule and invoice_schedule instead.
1994
+ */
1995
+ amount?: number;
1996
+ /**
1997
+ * Which products the commit applies to. If applicable_product_ids,
1998
+ * applicable_product_tags or specifiers are not provided, the commit applies to
1999
+ * all products.
2000
+ */
2001
+ applicable_product_ids?: Array<string>;
2002
+ /**
2003
+ * Which tags the commit applies to. If applicable_product_ids,
2004
+ * applicable_product_tags or specifiers are not provided, the commit applies to
2005
+ * all products.
2006
+ */
2007
+ applicable_product_tags?: Array<string>;
2008
+ /**
2009
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2010
+ */
2011
+ custom_fields?: {
2012
+ [key: string]: string;
2013
+ };
2014
+ /**
2015
+ * Used only in UI/API. It is not exposed to end customers.
2016
+ */
2017
+ description?: string;
2018
+ /**
2019
+ * Optional configuration for commit hierarchy access control
2020
+ */
2021
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2022
+ /**
2023
+ * Required for "POSTPAID" commits: the true up invoice will be generated at this
2024
+ * time and only one schedule item is allowed; the total must match access_schedule
2025
+ * amount. Optional for "PREPAID" commits: if not provided, this will be a
2026
+ * "complimentary" commit with no invoice.
2027
+ */
2028
+ invoice_schedule?: Commit.InvoiceSchedule;
2029
+ /**
2030
+ * displayed on invoices
2031
+ */
2032
+ name?: string;
2033
+ /**
2034
+ * This field's availability is dependent on your client's configuration.
2035
+ */
2036
+ netsuite_sales_order_id?: string;
2037
+ /**
2038
+ * optionally payment gate this commit
2039
+ */
2040
+ payment_gate_config?: Commit.PaymentGateConfig;
2041
+ /**
2042
+ * If multiple commits are applicable, the one with the lower priority will apply
2043
+ * first.
2044
+ */
2045
+ priority?: number;
2046
+ rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
2047
+ /**
2048
+ * Fraction of unused segments that will be rolled over. Must be between 0 and 1.
2049
+ */
2050
+ rollover_fraction?: number;
2051
+ /**
2052
+ * List of filters that determine what kind of customer usage draws down a commit
2053
+ * or credit. A customer's usage needs to meet the condition of at least one of the
2054
+ * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2055
+ * be used together with `applicable_product_ids` or `applicable_product_tags`.
2056
+ */
2057
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2058
+ /**
2059
+ * A temporary ID for the commit that can be used to reference the commit for
2060
+ * commit specific overrides.
2061
+ */
2062
+ temporary_id?: string;
2063
+ }
2064
+ namespace Commit {
2065
+ /**
2066
+ * Required: Schedule for distributing the commit to the customer. For "POSTPAID"
2067
+ * commits only one schedule item is allowed and amount must match invoice_schedule
2068
+ * total.
2069
+ */
2070
+ interface AccessSchedule {
2071
+ schedule_items: Array<AccessSchedule.ScheduleItem>;
2072
+ /**
2073
+ * Defaults to USD (cents) if not passed
2074
+ */
2075
+ credit_type_id?: string;
2076
+ }
2077
+ namespace AccessSchedule {
2078
+ interface ScheduleItem {
2079
+ amount: number;
2080
+ /**
2081
+ * RFC 3339 timestamp (exclusive)
2082
+ */
2083
+ ending_before: string;
2084
+ /**
2085
+ * RFC 3339 timestamp (inclusive)
2086
+ */
2087
+ starting_at: string;
2088
+ }
2089
+ }
2090
+ /**
2091
+ * Required for "POSTPAID" commits: the true up invoice will be generated at this
2092
+ * time and only one schedule item is allowed; the total must match access_schedule
2093
+ * amount. Optional for "PREPAID" commits: if not provided, this will be a
2094
+ * "complimentary" commit with no invoice.
2095
+ */
2096
+ interface InvoiceSchedule {
2097
+ /**
2098
+ * Defaults to USD (cents) if not passed.
2099
+ */
2100
+ credit_type_id?: string;
2101
+ /**
2102
+ * This field is only applicable to commit invoice schedules. If true, this
2103
+ * schedule will not generate an invoice.
2104
+ */
2105
+ do_not_invoice?: boolean;
2106
+ /**
2107
+ * Enter the unit price and quantity for the charge or instead only send the
2108
+ * amount. If amount is sent, the unit price is assumed to be the amount and
2109
+ * quantity is inferred to be 1.
2110
+ */
2111
+ recurring_schedule?: InvoiceSchedule.RecurringSchedule;
2112
+ /**
2113
+ * Either provide amount or provide both unit_price and quantity.
2114
+ */
2115
+ schedule_items?: Array<InvoiceSchedule.ScheduleItem>;
2116
+ }
2117
+ namespace InvoiceSchedule {
2118
+ /**
2119
+ * Enter the unit price and quantity for the charge or instead only send the
2120
+ * amount. If amount is sent, the unit price is assumed to be the amount and
2121
+ * quantity is inferred to be 1.
2122
+ */
2123
+ interface RecurringSchedule {
2124
+ amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
2125
+ /**
2126
+ * RFC 3339 timestamp (exclusive).
2127
+ */
2128
+ ending_before: string;
2129
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
2130
+ /**
2131
+ * RFC 3339 timestamp (inclusive).
2132
+ */
2133
+ starting_at: string;
2134
+ /**
2135
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
2136
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
2137
+ * inferred to be 1.
2138
+ */
2139
+ amount?: number;
2140
+ /**
2141
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2142
+ * amount and must be specified with unit_price. If specified amount cannot be
2143
+ * provided.
2144
+ */
2145
+ quantity?: number;
2146
+ /**
2147
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2148
+ * amount and must be specified with quantity. If specified amount cannot be
2149
+ * provided.
2150
+ */
2151
+ unit_price?: number;
2152
+ }
2153
+ interface ScheduleItem {
2154
+ /**
2155
+ * timestamp of the scheduled event
2156
+ */
2157
+ timestamp: string;
2158
+ /**
2159
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
2160
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
2161
+ * inferred to be 1.
2162
+ */
2163
+ amount?: number;
2164
+ /**
2165
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2166
+ * amount and must be specified with unit_price. If specified amount cannot be
2167
+ * provided.
2168
+ */
2169
+ quantity?: number;
2170
+ /**
2171
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2172
+ * amount and must be specified with quantity. If specified amount cannot be
2173
+ * provided.
2174
+ */
2175
+ unit_price?: number;
2176
+ }
2177
+ }
2178
+ /**
2179
+ * optionally payment gate this commit
2180
+ */
2181
+ interface PaymentGateConfig {
2182
+ /**
2183
+ * Gate access to the commit balance based on successful collection of payment.
2184
+ * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2185
+ * facilitate payment using your own payment integration. Select NONE if you do not
2186
+ * wish to payment gate the commit balance.
2187
+ */
2188
+ payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
2189
+ /**
2190
+ * Only applicable if using PRECALCULATED as your tax type.
2191
+ */
2192
+ precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
2193
+ /**
2194
+ * Only applicable if using STRIPE as your payment gate type.
2195
+ */
2196
+ stripe_config?: PaymentGateConfig.StripeConfig;
2197
+ /**
2198
+ * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2199
+ * not wish Metronome to calculate tax on your behalf. Leaving this field blank
2200
+ * will default to NONE.
2201
+ */
2202
+ tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
2203
+ }
2204
+ namespace PaymentGateConfig {
2205
+ /**
2206
+ * Only applicable if using PRECALCULATED as your tax type.
2207
+ */
2208
+ interface PrecalculatedTaxConfig {
2209
+ /**
2210
+ * Amount of tax to be applied. This should be in the same currency and
2211
+ * denomination as the commit's invoice schedule
2212
+ */
2213
+ tax_amount: number;
2214
+ /**
2215
+ * Name of the tax to be applied. This may be used in an invoice line item
2216
+ * description.
2217
+ */
2218
+ tax_name?: string;
2219
+ }
2220
+ /**
2221
+ * Only applicable if using STRIPE as your payment gate type.
2222
+ */
2223
+ interface StripeConfig {
2224
+ /**
2225
+ * If left blank, will default to INVOICE
2226
+ */
2227
+ payment_type: 'INVOICE' | 'PAYMENT_INTENT';
2228
+ /**
2229
+ * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2230
+ * your payment type.
2231
+ */
2232
+ invoice_metadata?: {
2233
+ [key: string]: string;
2234
+ };
2235
+ /**
2236
+ * If true, the payment will be made assuming the customer is present (i.e. on
2237
+ * session).
2238
+ *
2239
+ * If false, the payment will be made assuming the customer is not present (i.e.
2240
+ * off session). For cardholders from a country with an e-mandate requirement (e.g.
2241
+ * India), the payment may be declined.
2242
+ *
2243
+ * If left blank, will default to false.
2244
+ */
2245
+ on_session_payment?: boolean;
2246
+ }
2247
+ }
2248
+ }
2249
+ interface Credit {
2250
+ /**
2251
+ * Schedule for distributing the credit to the customer.
2252
+ */
2253
+ access_schedule: Credit.AccessSchedule;
2254
+ product_id: string;
2255
+ /**
2256
+ * Which products the credit applies to. If both applicable_product_ids and
2257
+ * applicable_product_tags are not provided, the credit applies to all products.
2258
+ */
2259
+ applicable_product_ids?: Array<string>;
2260
+ /**
2261
+ * Which tags the credit applies to. If both applicable_product_ids and
2262
+ * applicable_product_tags are not provided, the credit applies to all products.
2263
+ */
2264
+ applicable_product_tags?: Array<string>;
2265
+ /**
2266
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2267
+ */
2268
+ custom_fields?: {
2269
+ [key: string]: string;
2270
+ };
2271
+ /**
2272
+ * Used only in UI/API. It is not exposed to end customers.
2273
+ */
2274
+ description?: string;
2275
+ /**
2276
+ * Optional configuration for credit hierarchy access control
2277
+ */
2278
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2279
+ /**
2280
+ * displayed on invoices
2281
+ */
2282
+ name?: string;
2283
+ /**
2284
+ * This field's availability is dependent on your client's configuration.
2285
+ */
2286
+ netsuite_sales_order_id?: string;
2287
+ /**
2288
+ * If multiple credits are applicable, the one with the lower priority will apply
2289
+ * first.
2290
+ */
2291
+ priority?: number;
2292
+ rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
2293
+ /**
2294
+ * List of filters that determine what kind of customer usage draws down a commit
2295
+ * or credit. A customer's usage needs to meet the condition of at least one of the
2296
+ * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2297
+ * be used together with `applicable_product_ids` or `applicable_product_tags`.
2298
+ */
2299
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2300
+ }
2301
+ namespace Credit {
2302
+ /**
2303
+ * Schedule for distributing the credit to the customer.
2304
+ */
2305
+ interface AccessSchedule {
2306
+ schedule_items: Array<AccessSchedule.ScheduleItem>;
2307
+ /**
2308
+ * Defaults to USD (cents) if not passed
2309
+ */
2310
+ credit_type_id?: string;
2311
+ }
2312
+ namespace AccessSchedule {
2313
+ interface ScheduleItem {
2314
+ amount: number;
2315
+ /**
2316
+ * RFC 3339 timestamp (exclusive)
2317
+ */
2318
+ ending_before: string;
2319
+ /**
2320
+ * RFC 3339 timestamp (inclusive)
2321
+ */
2322
+ starting_at: string;
2323
+ }
2324
+ }
2325
+ }
2326
+ interface Discount {
2327
+ product_id: string;
2328
+ /**
2329
+ * Must provide either schedule_items or recurring_schedule.
2330
+ */
2331
+ schedule: Discount.Schedule;
2332
+ /**
2333
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2334
+ */
2335
+ custom_fields?: {
2336
+ [key: string]: string;
2337
+ };
2338
+ /**
2339
+ * displayed on invoices
2340
+ */
2341
+ name?: string;
2342
+ /**
2343
+ * This field's availability is dependent on your client's configuration.
2344
+ */
2345
+ netsuite_sales_order_id?: string;
2346
+ }
2347
+ namespace Discount {
2348
+ /**
2349
+ * Must provide either schedule_items or recurring_schedule.
2350
+ */
2351
+ interface Schedule {
2352
+ /**
2353
+ * Defaults to USD (cents) if not passed.
2354
+ */
2355
+ credit_type_id?: string;
2356
+ /**
2357
+ * This field is only applicable to commit invoice schedules. If true, this
2358
+ * schedule will not generate an invoice.
2359
+ */
2360
+ do_not_invoice?: boolean;
2361
+ /**
2362
+ * Enter the unit price and quantity for the charge or instead only send the
2363
+ * amount. If amount is sent, the unit price is assumed to be the amount and
2364
+ * quantity is inferred to be 1.
2365
+ */
2366
+ recurring_schedule?: Schedule.RecurringSchedule;
2367
+ /**
2368
+ * Either provide amount or provide both unit_price and quantity.
2369
+ */
2370
+ schedule_items?: Array<Schedule.ScheduleItem>;
2371
+ }
2372
+ namespace Schedule {
2373
+ /**
2374
+ * Enter the unit price and quantity for the charge or instead only send the
2375
+ * amount. If amount is sent, the unit price is assumed to be the amount and
2376
+ * quantity is inferred to be 1.
2377
+ */
2378
+ interface RecurringSchedule {
2379
+ amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
2380
+ /**
2381
+ * RFC 3339 timestamp (exclusive).
2382
+ */
2383
+ ending_before: string;
2384
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
2385
+ /**
2386
+ * RFC 3339 timestamp (inclusive).
2387
+ */
2388
+ starting_at: string;
2389
+ /**
2390
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
2391
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
2392
+ * inferred to be 1.
2393
+ */
2394
+ amount?: number;
2395
+ /**
2396
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2397
+ * amount and must be specified with unit_price. If specified amount cannot be
2398
+ * provided.
2399
+ */
2400
+ quantity?: number;
2401
+ /**
2402
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2403
+ * amount and must be specified with quantity. If specified amount cannot be
2404
+ * provided.
2405
+ */
2406
+ unit_price?: number;
2407
+ }
2408
+ interface ScheduleItem {
2409
+ /**
2410
+ * timestamp of the scheduled event
2411
+ */
2412
+ timestamp: string;
2413
+ /**
2414
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
2415
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
2416
+ * inferred to be 1.
2417
+ */
2418
+ amount?: number;
2419
+ /**
2420
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2421
+ * amount and must be specified with unit_price. If specified amount cannot be
2422
+ * provided.
2423
+ */
2424
+ quantity?: number;
2425
+ /**
2426
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2427
+ * amount and must be specified with quantity. If specified amount cannot be
2428
+ * provided.
2429
+ */
2430
+ unit_price?: number;
2431
+ }
2432
+ }
2433
+ }
2434
+ interface Override {
2435
+ /**
2436
+ * RFC 3339 timestamp indicating when the override will start applying (inclusive)
2437
+ */
2438
+ starting_at: string;
2439
+ /**
2440
+ * tags identifying products whose rates are being overridden. Cannot be used in
2441
+ * conjunction with override_specifiers.
2442
+ */
2443
+ applicable_product_tags?: Array<string>;
2444
+ /**
2445
+ * RFC 3339 timestamp indicating when the override will stop applying (exclusive)
2446
+ */
2447
+ ending_before?: string;
2448
+ entitled?: boolean;
2449
+ /**
2450
+ * Indicates whether the override should only apply to commits. Defaults to
2451
+ * `false`. If `true`, you can specify relevant commits in `override_specifiers` by
2452
+ * passing `commit_ids`. if you do not specify `commit_ids`, then the override will
2453
+ * apply when consuming any prepaid or postpaid commit.
2454
+ */
2455
+ is_commit_specific?: boolean;
2456
+ /**
2457
+ * Required for MULTIPLIER type. Must be >=0.
2458
+ */
2459
+ multiplier?: number;
2460
+ /**
2461
+ * Cannot be used in conjunction with product_id or applicable_product_tags. If
2462
+ * provided, the override will apply to all products with the specified specifiers.
2463
+ */
2464
+ override_specifiers?: Array<Override.OverrideSpecifier>;
2465
+ /**
2466
+ * Required for OVERWRITE type.
2467
+ */
2468
+ overwrite_rate?: Override.OverwriteRate;
2469
+ /**
2470
+ * Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides.
2471
+ * Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered
2472
+ * and multiplier overrides are prioritized by their priority value (lowest first).
2473
+ * Must be > 0.
2474
+ */
2475
+ priority?: number;
2476
+ /**
2477
+ * ID of the product whose rate is being overridden. Cannot be used in conjunction
2478
+ * with override_specifiers.
2479
+ */
2480
+ product_id?: string;
2481
+ /**
2482
+ * Indicates whether the override applies to commit rates or list rates. Can only
2483
+ * be used for overrides that have `is_commit_specific` set to `true`. Defaults to
2484
+ * `"LIST_RATE"`.
2485
+ */
2486
+ target?: 'COMMIT_RATE' | 'LIST_RATE';
2487
+ /**
2488
+ * Required for TIERED type. Must have at least one tier.
2489
+ */
2490
+ tiers?: Array<Override.Tier>;
2491
+ /**
2492
+ * Overwrites are prioritized over multipliers and tiered overrides.
2493
+ */
2494
+ type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
2495
+ }
2496
+ namespace Override {
2497
+ interface OverrideSpecifier {
2498
+ billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2499
+ /**
2500
+ * Can only be used for commit specific overrides. Must be used in conjunction with
2501
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
2502
+ * `presentation_group_values`. If provided, the override will only apply to the
2503
+ * specified commits. If not provided, the override will apply to all commits.
2504
+ */
2505
+ commit_ids?: Array<string>;
2506
+ /**
2507
+ * A map of group names to values. The override will only apply to line items with
2508
+ * the specified presentation group values.
2509
+ */
2510
+ presentation_group_values?: {
2511
+ [key: string]: string;
2512
+ };
2513
+ /**
2514
+ * A map of pricing group names to values. The override will only apply to products
2515
+ * with the specified pricing group values.
2516
+ */
2517
+ pricing_group_values?: {
2518
+ [key: string]: string;
2519
+ };
2520
+ /**
2521
+ * If provided, the override will only apply to the product with the specified ID.
2522
+ */
2523
+ product_id?: string;
2524
+ /**
2525
+ * If provided, the override will only apply to products with all the specified
2526
+ * tags.
2527
+ */
2528
+ product_tags?: Array<string>;
2529
+ /**
2530
+ * Can only be used for commit specific overrides. Must be used in conjunction with
2531
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
2532
+ * `presentation_group_values`. If provided, the override will only apply to
2533
+ * commits created by the specified recurring commit ids.
2534
+ */
2535
+ recurring_commit_ids?: Array<string>;
2536
+ /**
2537
+ * Can only be used for commit specific overrides. Must be used in conjunction with
2538
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
2539
+ * `presentation_group_values`. If provided, the override will only apply to
2540
+ * credits created by the specified recurring credit ids.
2541
+ */
2542
+ recurring_credit_ids?: Array<string>;
2543
+ }
2544
+ /**
2545
+ * Required for OVERWRITE type.
2546
+ */
2547
+ interface OverwriteRate {
2548
+ rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
2549
+ credit_type_id?: string;
2550
+ /**
2551
+ * Only set for CUSTOM rate_type. This field is interpreted by custom rate
2552
+ * processors.
2553
+ */
2554
+ custom_rate?: {
2555
+ [key: string]: unknown;
2556
+ };
2557
+ /**
2558
+ * Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
2559
+ * set to true.
2560
+ */
2561
+ is_prorated?: boolean;
2562
+ /**
2563
+ * Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
2564
+ * this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
2565
+ */
2566
+ price?: number;
2567
+ /**
2568
+ * Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
2569
+ */
2570
+ quantity?: number;
2571
+ /**
2572
+ * Only set for TIERED rate_type.
2573
+ */
2574
+ tiers?: Array<Shared.Tier>;
2575
+ }
2576
+ interface Tier {
2577
+ multiplier: number;
2578
+ size?: number;
2579
+ }
2580
+ }
2581
+ interface ProfessionalService {
2582
+ /**
2583
+ * Maximum amount for the term.
2584
+ */
2585
+ max_amount: number;
2586
+ product_id: string;
2587
+ /**
2588
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2589
+ * amount.
2590
+ */
2591
+ quantity: number;
2592
+ /**
2593
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2594
+ * amount and must be specified.
2595
+ */
2596
+ unit_price: number;
2597
+ /**
2598
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2599
+ */
2600
+ custom_fields?: {
2601
+ [key: string]: string;
2602
+ };
2603
+ description?: string;
2604
+ /**
2605
+ * This field's availability is dependent on your client's configuration.
2606
+ */
2607
+ netsuite_sales_order_id?: string;
2608
+ }
2609
+ interface ResellerRoyalty {
2610
+ reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
2611
+ /**
2612
+ * Must provide at least one of applicable_product_ids or applicable_product_tags.
2613
+ */
2614
+ applicable_product_ids?: Array<string>;
2615
+ /**
2616
+ * Must provide at least one of applicable_product_ids or applicable_product_tags.
2617
+ */
2618
+ applicable_product_tags?: Array<string>;
2619
+ aws_options?: ResellerRoyalty.AwsOptions;
2620
+ /**
2621
+ * Use null to indicate that the existing end timestamp should be removed.
2622
+ */
2623
+ ending_before?: string | null;
2624
+ fraction?: number;
2625
+ gcp_options?: ResellerRoyalty.GcpOptions;
2626
+ netsuite_reseller_id?: string;
2627
+ reseller_contract_value?: number;
2628
+ starting_at?: string;
2629
+ }
2630
+ namespace ResellerRoyalty {
2631
+ interface AwsOptions {
2632
+ aws_account_number?: string;
2633
+ aws_offer_id?: string;
2634
+ aws_payer_reference_id?: string;
2635
+ }
2636
+ interface GcpOptions {
2637
+ gcp_account_id?: string;
2638
+ gcp_offer_id?: string;
2639
+ }
2640
+ }
2641
+ interface ScheduledCharge {
2642
+ product_id: string;
2643
+ /**
2644
+ * Must provide either schedule_items or recurring_schedule.
2645
+ */
2646
+ schedule: ScheduledCharge.Schedule;
2647
+ /**
2648
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2649
+ */
2650
+ custom_fields?: {
2651
+ [key: string]: string;
2652
+ };
2653
+ /**
2654
+ * displayed on invoices
2655
+ */
2656
+ name?: string;
2657
+ /**
2658
+ * This field's availability is dependent on your client's configuration.
2659
+ */
2660
+ netsuite_sales_order_id?: string;
2661
+ }
2662
+ namespace ScheduledCharge {
2663
+ /**
2664
+ * Must provide either schedule_items or recurring_schedule.
2665
+ */
2666
+ interface Schedule {
2667
+ /**
2668
+ * Defaults to USD (cents) if not passed.
2669
+ */
2670
+ credit_type_id?: string;
2671
+ /**
2672
+ * This field is only applicable to commit invoice schedules. If true, this
2673
+ * schedule will not generate an invoice.
2674
+ */
2675
+ do_not_invoice?: boolean;
2676
+ /**
2677
+ * Enter the unit price and quantity for the charge or instead only send the
2678
+ * amount. If amount is sent, the unit price is assumed to be the amount and
2679
+ * quantity is inferred to be 1.
2680
+ */
2681
+ recurring_schedule?: Schedule.RecurringSchedule;
2682
+ /**
2683
+ * Either provide amount or provide both unit_price and quantity.
2684
+ */
2685
+ schedule_items?: Array<Schedule.ScheduleItem>;
2686
+ }
2687
+ namespace Schedule {
2688
+ /**
2689
+ * Enter the unit price and quantity for the charge or instead only send the
2690
+ * amount. If amount is sent, the unit price is assumed to be the amount and
2691
+ * quantity is inferred to be 1.
2692
+ */
2693
+ interface RecurringSchedule {
2694
+ amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
2695
+ /**
2696
+ * RFC 3339 timestamp (exclusive).
2697
+ */
2698
+ ending_before: string;
2699
+ frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
2700
+ /**
2701
+ * RFC 3339 timestamp (inclusive).
2702
+ */
2703
+ starting_at: string;
2704
+ /**
2705
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
2706
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
2707
+ * inferred to be 1.
2708
+ */
2709
+ amount?: number;
2710
+ /**
2711
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2712
+ * amount and must be specified with unit_price. If specified amount cannot be
2713
+ * provided.
2714
+ */
2715
+ quantity?: number;
2716
+ /**
2717
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2718
+ * amount and must be specified with quantity. If specified amount cannot be
2719
+ * provided.
2720
+ */
2721
+ unit_price?: number;
2722
+ }
2723
+ interface ScheduleItem {
2724
+ /**
2725
+ * timestamp of the scheduled event
2726
+ */
2727
+ timestamp: string;
2728
+ /**
2729
+ * Amount for the charge. Can be provided instead of unit_price and quantity. If
2730
+ * amount is sent, the unit_price is assumed to be the amount and quantity is
2731
+ * inferred to be 1.
2732
+ */
2733
+ amount?: number;
2734
+ /**
2735
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2736
+ * amount and must be specified with unit_price. If specified amount cannot be
2737
+ * provided.
2738
+ */
2739
+ quantity?: number;
2740
+ /**
2741
+ * Unit price for the charge. Will be multiplied by quantity to determine the
2742
+ * amount and must be specified with quantity. If specified amount cannot be
2743
+ * provided.
2744
+ */
2745
+ unit_price?: number;
2746
+ }
2747
+ }
2748
+ }
2749
+ }
2750
+ export interface ContractArchiveParams {
2751
+ /**
2752
+ * ID of the contract to archive
2753
+ */
2754
+ contract_id: string;
2755
+ /**
2756
+ * ID of the customer whose contract is to be archived
2757
+ */
2758
+ customer_id: string;
2759
+ /**
2760
+ * If false, the existing finalized invoices will remain after the contract is
2761
+ * archived.
2762
+ */
2763
+ void_invoices: boolean;
2764
+ }
2765
+ export interface ContractCreateHistoricalInvoicesParams {
2766
+ invoices: Array<ContractCreateHistoricalInvoicesParams.Invoice>;
2767
+ preview: boolean;
2768
+ }
2769
+ export declare namespace ContractCreateHistoricalInvoicesParams {
2770
+ interface Invoice {
2771
+ contract_id: string;
2772
+ credit_type_id: string;
2773
+ customer_id: string;
2774
+ exclusive_end_date: string;
2775
+ inclusive_start_date: string;
2776
+ issue_date: string;
2777
+ usage_line_items: Array<Invoice.UsageLineItem>;
2778
+ /**
2779
+ * This field's availability is dependent on your client's configuration.
2780
+ */
2781
+ billable_status?: 'billable' | 'unbillable';
2782
+ breakdown_granularity?: 'HOUR' | 'DAY';
2783
+ /**
2784
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2785
+ */
2786
+ custom_fields?: {
2787
+ [key: string]: string;
2788
+ };
2789
+ }
2790
+ namespace Invoice {
2791
+ interface UsageLineItem {
2792
+ exclusive_end_date: string;
2793
+ inclusive_start_date: string;
2794
+ product_id: string;
2795
+ presentation_group_values?: {
2796
+ [key: string]: string;
2797
+ };
2798
+ pricing_group_values?: {
2799
+ [key: string]: string;
2800
+ };
2801
+ quantity?: number;
2802
+ subtotals_with_quantity?: Array<UsageLineItem.SubtotalsWithQuantity>;
2803
+ }
2804
+ namespace UsageLineItem {
2805
+ interface SubtotalsWithQuantity {
2806
+ exclusive_end_date: string;
2807
+ inclusive_start_date: string;
2808
+ quantity: number;
2809
+ }
2810
+ }
2811
+ }
2812
+ }
2813
+ export interface ContractListBalancesParams extends BodyCursorPageParams {
2814
+ customer_id: string;
2815
+ id?: string;
2816
+ /**
2817
+ * Return only balances that have access schedules that "cover" the provided date
2818
+ */
2819
+ covering_date?: string;
2820
+ /**
2821
+ * Include only balances that have any access before the provided date (exclusive)
2822
+ */
2823
+ effective_before?: string;
2824
+ /**
2825
+ * Include archived credits and credits from archived contracts.
2826
+ */
2827
+ include_archived?: boolean;
2828
+ /**
2829
+ * Include the balance of credits and commits in the response. Setting this flag
2830
+ * may cause the query to be slower.
2831
+ */
2832
+ include_balance?: boolean;
2833
+ /**
2834
+ * Include balances on the contract level.
2835
+ */
2836
+ include_contract_balances?: boolean;
2837
+ /**
2838
+ * Include ledgers in the response. Setting this flag may cause the query to be
2839
+ * slower.
2840
+ */
2841
+ include_ledgers?: boolean;
2842
+ /**
2843
+ * Include only balances that have any access on or after the provided date
2844
+ */
2845
+ starting_at?: string;
2846
+ }
2847
+ export interface ContractRetrieveRateScheduleParams {
2848
+ /**
2849
+ * Body param: ID of the contract to get the rate schedule for.
2850
+ */
2851
+ contract_id: string;
2852
+ /**
2853
+ * Body param: ID of the customer for whose contract to get the rate schedule for.
2854
+ */
2855
+ customer_id: string;
2856
+ /**
2857
+ * Query param: Max number of results that should be returned
2858
+ */
2859
+ limit?: number;
2860
+ /**
2861
+ * Query param: Cursor that indicates where the next page of results should start.
2862
+ */
2863
+ next_page?: string;
2864
+ /**
2865
+ * Body param: optional timestamp which overlaps with the returned rate schedule
2866
+ * segments. When not specified, the current timestamp will be used.
2867
+ */
2868
+ at?: string;
2869
+ /**
2870
+ * Body param: List of rate selectors, rates matching ANY of the selectors will be
2871
+ * included in the response. Passing no selectors will result in all rates being
2872
+ * returned.
2873
+ */
2874
+ selectors?: Array<ContractRetrieveRateScheduleParams.Selector>;
2875
+ }
2876
+ export declare namespace ContractRetrieveRateScheduleParams {
2877
+ interface Selector {
2878
+ /**
2879
+ * Subscription rates matching the billing frequency will be included in the
2880
+ * response.
2881
+ */
2882
+ billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2883
+ /**
2884
+ * List of pricing group key value pairs, rates containing the matching key / value
2885
+ * pairs will be included in the response.
2886
+ */
2887
+ partial_pricing_group_values?: {
2888
+ [key: string]: string;
2889
+ };
2890
+ /**
2891
+ * List of pricing group key value pairs, rates matching all of the key / value
2892
+ * pairs will be included in the response.
2893
+ */
2894
+ pricing_group_values?: {
2895
+ [key: string]: string;
2896
+ };
2897
+ /**
2898
+ * Rates matching the product id will be included in the response.
2899
+ */
2900
+ product_id?: string;
2901
+ /**
2902
+ * List of product tags, rates matching any of the tags will be included in the
2903
+ * response.
2904
+ */
2905
+ product_tags?: Array<string>;
2906
+ }
2907
+ }
2908
+ export interface ContractRetrieveSubscriptionQuantityHistoryParams {
2909
+ contract_id: string;
2910
+ customer_id: string;
2911
+ subscription_id: string;
2912
+ }
2913
+ export interface ContractScheduleProServicesInvoiceParams {
2914
+ contract_id: string;
2915
+ customer_id: string;
2916
+ /**
2917
+ * The date the invoice is issued
2918
+ */
2919
+ issued_at: string;
2920
+ /**
2921
+ * Each line requires an amount or both unit_price and quantity.
2922
+ */
2923
+ line_items: Array<ContractScheduleProServicesInvoiceParams.LineItem>;
2924
+ /**
2925
+ * The end date of the invoice header in Netsuite
2926
+ */
2927
+ netsuite_invoice_header_end?: string;
2928
+ /**
2929
+ * The start date of the invoice header in Netsuite
2930
+ */
2931
+ netsuite_invoice_header_start?: string;
2932
+ }
2933
+ export declare namespace ContractScheduleProServicesInvoiceParams {
2934
+ /**
2935
+ * Describes the line item for a professional service charge on an invoice.
2936
+ */
2937
+ interface LineItem {
2938
+ professional_service_id: string;
2939
+ /**
2940
+ * If the professional_service_id was added on an amendment, this is required.
2941
+ */
2942
+ amendment_id?: string;
2943
+ /**
2944
+ * Amount for the term on the new invoice.
2945
+ */
2946
+ amount?: number;
2947
+ /**
2948
+ * For client use.
2949
+ */
2950
+ metadata?: string;
2951
+ /**
2952
+ * The end date for the billing period on the invoice.
2953
+ */
2954
+ netsuite_invoice_billing_end?: string;
2955
+ /**
2956
+ * The start date for the billing period on the invoice.
2957
+ */
2958
+ netsuite_invoice_billing_start?: string;
2959
+ /**
2960
+ * Quantity for the charge. Will be multiplied by unit_price to determine the
2961
+ * amount.
2962
+ */
2963
+ quantity?: number;
2964
+ /**
2965
+ * If specified, this overrides the unit price on the pro service term. Must also
2966
+ * provide quantity (but not amount) if providing unit_price.
2967
+ */
2968
+ unit_price?: number;
2969
+ }
2970
+ }
2971
+ export interface ContractSetUsageFilterParams {
2972
+ contract_id: string;
2973
+ customer_id: string;
2974
+ group_key: string;
2975
+ group_values: Array<string>;
2976
+ starting_at: string;
2977
+ }
2978
+ export interface ContractUpdateEndDateParams {
2979
+ /**
2980
+ * ID of the contract to update
2981
+ */
2982
+ contract_id: string;
2983
+ /**
2984
+ * ID of the customer whose contract is to be updated
2985
+ */
2986
+ customer_id: string;
2987
+ /**
2988
+ * If true, allows setting the contract end date earlier than the end_timestamp of
2989
+ * existing finalized invoices. Finalized invoices will be unchanged; if you want
2990
+ * to incorporate the new end date, you can void and regenerate finalized usage
2991
+ * invoices. Defaults to true.
2992
+ */
2993
+ allow_ending_before_finalized_invoice?: boolean;
2994
+ /**
2995
+ * RFC 3339 timestamp indicating when the contract will end (exclusive). If not
2996
+ * provided, the contract will be updated to be open-ended.
2997
+ */
2998
+ ending_before?: string;
2999
+ }
3000
+ export declare namespace Contracts {
3001
+ export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
3002
+ export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
3003
+ export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, type RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
3004
+ export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };
3005
+ }
3006
+ //# sourceMappingURL=contracts.d.mts.map