orb-billing 5.76.0 → 6.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 (926) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +118 -45
  3. package/api-promise.d.mts +3 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +3 -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 +3 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/client.d.mts +474 -0
  12. package/client.d.mts.map +1 -0
  13. package/client.d.ts +474 -0
  14. package/client.d.ts.map +1 -0
  15. package/client.js +650 -0
  16. package/client.js.map +1 -0
  17. package/client.mjs +645 -0
  18. package/client.mjs.map +1 -0
  19. package/core/api-promise.d.mts +46 -0
  20. package/core/api-promise.d.mts.map +1 -0
  21. package/core/api-promise.d.ts +46 -0
  22. package/core/api-promise.d.ts.map +1 -0
  23. package/core/api-promise.js +74 -0
  24. package/core/api-promise.js.map +1 -0
  25. package/core/api-promise.mjs +70 -0
  26. package/core/api-promise.mjs.map +1 -0
  27. package/core/error.d.mts +131 -0
  28. package/core/error.d.mts.map +1 -0
  29. package/core/error.d.ts +131 -0
  30. package/core/error.d.ts.map +1 -0
  31. package/core/error.js +294 -0
  32. package/core/error.js.map +1 -0
  33. package/core/error.mjs +266 -0
  34. package/core/error.mjs.map +1 -0
  35. package/core/pagination.d.mts +67 -0
  36. package/core/pagination.d.mts.map +1 -0
  37. package/core/pagination.d.ts +67 -0
  38. package/core/pagination.d.ts.map +1 -0
  39. package/core/pagination.js +101 -0
  40. package/core/pagination.js.map +1 -0
  41. package/core/pagination.mjs +95 -0
  42. package/core/pagination.mjs.map +1 -0
  43. package/core/resource.d.mts +6 -0
  44. package/core/resource.d.mts.map +1 -0
  45. package/core/resource.d.ts +6 -0
  46. package/core/resource.d.ts.map +1 -0
  47. package/core/resource.js +11 -0
  48. package/core/resource.js.map +1 -0
  49. package/core/resource.mjs +7 -0
  50. package/core/resource.mjs.map +1 -0
  51. package/core/uploads.d.mts +3 -0
  52. package/core/uploads.d.mts.map +1 -0
  53. package/core/uploads.d.ts +3 -0
  54. package/core/uploads.d.ts.map +1 -0
  55. package/core/uploads.js +6 -0
  56. package/core/uploads.js.map +1 -0
  57. package/core/uploads.mjs +2 -0
  58. package/core/uploads.mjs.map +1 -0
  59. package/error.d.mts +3 -0
  60. package/error.d.mts.map +1 -0
  61. package/error.d.ts +2 -131
  62. package/error.d.ts.map +1 -1
  63. package/error.js +3 -291
  64. package/error.js.map +1 -1
  65. package/error.mjs +2 -265
  66. package/error.mjs.map +1 -1
  67. package/index.d.mts +7 -401
  68. package/index.d.mts.map +1 -0
  69. package/index.d.ts +6 -400
  70. package/index.d.ts.map +1 -1
  71. package/index.js +15 -286
  72. package/index.js.map +1 -1
  73. package/index.mjs +6 -259
  74. package/index.mjs.map +1 -1
  75. package/internal/builtin-types.d.mts +73 -0
  76. package/internal/builtin-types.d.mts.map +1 -0
  77. package/internal/builtin-types.d.ts +73 -0
  78. package/internal/builtin-types.d.ts.map +1 -0
  79. package/internal/builtin-types.js +4 -0
  80. package/internal/builtin-types.js.map +1 -0
  81. package/internal/builtin-types.mjs +3 -0
  82. package/internal/builtin-types.mjs.map +1 -0
  83. package/internal/detect-platform.d.mts +15 -0
  84. package/internal/detect-platform.d.mts.map +1 -0
  85. package/internal/detect-platform.d.ts +15 -0
  86. package/internal/detect-platform.d.ts.map +1 -0
  87. package/internal/detect-platform.js +162 -0
  88. package/internal/detect-platform.js.map +1 -0
  89. package/internal/detect-platform.mjs +157 -0
  90. package/internal/detect-platform.mjs.map +1 -0
  91. package/internal/errors.d.mts +3 -0
  92. package/internal/errors.d.mts.map +1 -0
  93. package/internal/errors.d.ts +3 -0
  94. package/internal/errors.d.ts.map +1 -0
  95. package/internal/errors.js +41 -0
  96. package/internal/errors.js.map +1 -0
  97. package/internal/errors.mjs +36 -0
  98. package/internal/errors.mjs.map +1 -0
  99. package/internal/headers.d.mts +20 -0
  100. package/internal/headers.d.mts.map +1 -0
  101. package/internal/headers.d.ts +20 -0
  102. package/internal/headers.d.ts.map +1 -0
  103. package/internal/headers.js +79 -0
  104. package/internal/headers.js.map +1 -0
  105. package/internal/headers.mjs +74 -0
  106. package/internal/headers.mjs.map +1 -0
  107. package/internal/parse.d.mts +12 -0
  108. package/internal/parse.d.mts.map +1 -0
  109. package/internal/parse.d.ts +12 -0
  110. package/internal/parse.d.ts.map +1 -0
  111. package/internal/parse.js +40 -0
  112. package/internal/parse.js.map +1 -0
  113. package/internal/parse.mjs +37 -0
  114. package/internal/parse.mjs.map +1 -0
  115. package/internal/qs/formats.d.mts +7 -0
  116. package/internal/qs/formats.d.mts.map +1 -0
  117. package/internal/qs/formats.d.ts +1 -0
  118. package/internal/qs/formats.d.ts.map +1 -1
  119. package/internal/qs/formats.js +4 -2
  120. package/internal/qs/formats.js.map +1 -1
  121. package/internal/qs/formats.mjs +2 -1
  122. package/internal/qs/formats.mjs.map +1 -1
  123. package/internal/qs/index.d.mts +10 -0
  124. package/internal/qs/index.d.mts.map +1 -0
  125. package/internal/qs/index.d.ts +2 -2
  126. package/internal/qs/index.d.ts.map +1 -1
  127. package/internal/qs/index.mjs.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 +26 -0
  162. package/internal/shims.d.mts.map +1 -0
  163. package/internal/shims.d.ts +26 -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 +87 -0
  224. package/internal/utils/log.js.map +1 -0
  225. package/internal/utils/log.mjs +81 -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/query.d.mts +2 -0
  236. package/internal/utils/query.d.mts.map +1 -0
  237. package/internal/utils/query.js +3 -26
  238. package/internal/utils/query.js.map +1 -1
  239. package/internal/utils/query.mjs.map +1 -1
  240. package/internal/utils/sleep.d.mts +2 -0
  241. package/internal/utils/sleep.d.mts.map +1 -0
  242. package/internal/utils/sleep.d.ts +2 -0
  243. package/internal/utils/sleep.d.ts.map +1 -0
  244. package/internal/utils/sleep.js +7 -0
  245. package/internal/utils/sleep.js.map +1 -0
  246. package/internal/utils/sleep.mjs +3 -0
  247. package/internal/utils/sleep.mjs.map +1 -0
  248. package/internal/utils/uuid.d.mts +5 -0
  249. package/internal/utils/uuid.d.mts.map +1 -0
  250. package/internal/utils/uuid.d.ts +5 -0
  251. package/internal/utils/uuid.d.ts.map +1 -0
  252. package/internal/utils/uuid.js +19 -0
  253. package/internal/utils/uuid.js.map +1 -0
  254. package/internal/utils/uuid.mjs +15 -0
  255. package/internal/utils/uuid.mjs.map +1 -0
  256. package/internal/utils/values.d.mts +18 -0
  257. package/internal/utils/values.d.mts.map +1 -0
  258. package/internal/utils/values.d.ts +18 -0
  259. package/internal/utils/values.d.ts.map +1 -0
  260. package/internal/utils/values.js +112 -0
  261. package/internal/utils/values.js.map +1 -0
  262. package/internal/utils/values.mjs +94 -0
  263. package/internal/utils/values.mjs.map +1 -0
  264. package/internal/utils.d.mts +8 -0
  265. package/internal/utils.d.mts.map +1 -0
  266. package/internal/utils.d.ts +8 -0
  267. package/internal/utils.d.ts.map +1 -0
  268. package/internal/utils.js +12 -0
  269. package/internal/utils.js.map +1 -0
  270. package/internal/utils.mjs +9 -0
  271. package/internal/utils.mjs.map +1 -0
  272. package/package.json +122 -65
  273. package/pagination.d.mts +3 -0
  274. package/pagination.d.mts.map +1 -0
  275. package/pagination.d.ts +2 -30
  276. package/pagination.d.ts.map +1 -1
  277. package/pagination.js +3 -37
  278. package/pagination.js.map +1 -1
  279. package/pagination.mjs +2 -35
  280. package/pagination.mjs.map +1 -1
  281. package/resource.d.mts +3 -0
  282. package/resource.d.mts.map +1 -0
  283. package/resource.d.ts +2 -5
  284. package/resource.d.ts.map +1 -1
  285. package/resource.js +3 -8
  286. package/resource.js.map +1 -1
  287. package/resource.mjs +2 -6
  288. package/resource.mjs.map +1 -1
  289. package/resources/alerts.d.mts +430 -0
  290. package/resources/alerts.d.mts.map +1 -0
  291. package/resources/alerts.d.ts +14 -17
  292. package/resources/alerts.d.ts.map +1 -1
  293. package/resources/alerts.js +37 -27
  294. package/resources/alerts.js.map +1 -1
  295. package/resources/alerts.mjs +36 -25
  296. package/resources/alerts.mjs.map +1 -1
  297. package/resources/beta/beta.d.mts +2826 -0
  298. package/resources/beta/beta.d.mts.map +1 -0
  299. package/resources/beta/beta.d.ts +13 -9
  300. package/resources/beta/beta.d.ts.map +1 -1
  301. package/resources/beta/beta.js +10 -30
  302. package/resources/beta/beta.js.map +1 -1
  303. package/resources/beta/beta.mjs +8 -6
  304. package/resources/beta/beta.mjs.map +1 -1
  305. package/resources/beta/external-plan-id.d.mts +2713 -0
  306. package/resources/beta/external-plan-id.d.mts.map +1 -0
  307. package/resources/beta/external-plan-id.d.ts +10 -6
  308. package/resources/beta/external-plan-id.d.ts.map +1 -1
  309. package/resources/beta/external-plan-id.js +7 -5
  310. package/resources/beta/external-plan-id.js.map +1 -1
  311. package/resources/beta/external-plan-id.mjs +7 -5
  312. package/resources/beta/external-plan-id.mjs.map +1 -1
  313. package/resources/beta/index.d.mts +3 -0
  314. package/resources/beta/index.d.mts.map +1 -0
  315. package/resources/beta/index.d.ts +2 -2
  316. package/resources/beta/index.d.ts.map +1 -1
  317. package/resources/beta/index.js.map +1 -1
  318. package/resources/beta/index.mjs.map +1 -1
  319. package/resources/beta.d.mts +2 -0
  320. package/resources/beta.d.mts.map +1 -0
  321. package/resources/beta.d.ts.map +1 -1
  322. package/resources/beta.js +2 -15
  323. package/resources/beta.js.map +1 -1
  324. package/resources/beta.mjs.map +1 -1
  325. package/resources/coupons/coupons.d.mts +148 -0
  326. package/resources/coupons/coupons.d.mts.map +1 -0
  327. package/resources/coupons/coupons.d.ts +10 -11
  328. package/resources/coupons/coupons.d.ts.map +1 -1
  329. package/resources/coupons/coupons.js +24 -38
  330. package/resources/coupons/coupons.js.map +1 -1
  331. package/resources/coupons/coupons.mjs +21 -12
  332. package/resources/coupons/coupons.mjs.map +1 -1
  333. package/resources/coupons/index.d.mts +3 -0
  334. package/resources/coupons/index.d.mts.map +1 -0
  335. package/resources/coupons/index.d.ts +1 -1
  336. package/resources/coupons/index.d.ts.map +1 -1
  337. package/resources/coupons/index.js +1 -2
  338. package/resources/coupons/index.js.map +1 -1
  339. package/resources/coupons/index.mjs +1 -1
  340. package/resources/coupons/index.mjs.map +1 -1
  341. package/resources/coupons/subscriptions.d.mts +34 -0
  342. package/resources/coupons/subscriptions.d.mts.map +1 -0
  343. package/resources/coupons/subscriptions.d.ts +5 -6
  344. package/resources/coupons/subscriptions.d.ts.map +1 -1
  345. package/resources/coupons/subscriptions.js +21 -12
  346. package/resources/coupons/subscriptions.js.map +1 -1
  347. package/resources/coupons/subscriptions.mjs +20 -11
  348. package/resources/coupons/subscriptions.mjs.map +1 -1
  349. package/resources/coupons.d.mts +2 -0
  350. package/resources/coupons.d.mts.map +1 -0
  351. package/resources/coupons.d.ts.map +1 -1
  352. package/resources/coupons.js +2 -15
  353. package/resources/coupons.js.map +1 -1
  354. package/resources/coupons.mjs.map +1 -1
  355. package/resources/credit-blocks.d.mts +275 -0
  356. package/resources/credit-blocks.d.mts.map +1 -0
  357. package/resources/credit-blocks.d.ts +6 -5
  358. package/resources/credit-blocks.d.ts.map +1 -1
  359. package/resources/credit-blocks.js +7 -5
  360. package/resources/credit-blocks.js.map +1 -1
  361. package/resources/credit-blocks.mjs +7 -5
  362. package/resources/credit-blocks.mjs.map +1 -1
  363. package/resources/credit-notes.d.mts +144 -0
  364. package/resources/credit-notes.d.mts.map +1 -0
  365. package/resources/credit-notes.d.ts +8 -8
  366. package/resources/credit-notes.d.ts.map +1 -1
  367. package/resources/credit-notes.js +19 -10
  368. package/resources/credit-notes.js.map +1 -1
  369. package/resources/credit-notes.mjs +18 -9
  370. package/resources/credit-notes.mjs.map +1 -1
  371. package/resources/customers/balance-transactions.d.mts +135 -0
  372. package/resources/customers/balance-transactions.d.mts.map +1 -0
  373. package/resources/customers/balance-transactions.d.ts +8 -9
  374. package/resources/customers/balance-transactions.d.ts.map +1 -1
  375. package/resources/customers/balance-transactions.js +29 -13
  376. package/resources/customers/balance-transactions.js.map +1 -1
  377. package/resources/customers/balance-transactions.mjs +28 -11
  378. package/resources/customers/balance-transactions.mjs.map +1 -1
  379. package/resources/customers/costs.d.mts +314 -0
  380. package/resources/customers/costs.d.mts.map +1 -0
  381. package/resources/customers/costs.d.ts +5 -6
  382. package/resources/customers/costs.d.ts.map +1 -1
  383. package/resources/customers/costs.js +243 -11
  384. package/resources/customers/costs.js.map +1 -1
  385. package/resources/customers/costs.mjs +243 -11
  386. package/resources/customers/costs.mjs.map +1 -1
  387. package/resources/customers/credits/credits.d.mts +287 -0
  388. package/resources/customers/credits/credits.d.mts.map +1 -0
  389. package/resources/customers/credits/credits.d.ts +11 -15
  390. package/resources/customers/credits/credits.d.ts.map +1 -1
  391. package/resources/customers/credits/credits.js +38 -50
  392. package/resources/customers/credits/credits.js.map +1 -1
  393. package/resources/customers/credits/credits.mjs +36 -24
  394. package/resources/customers/credits/credits.mjs.map +1 -1
  395. package/resources/customers/credits/index.d.mts +4 -0
  396. package/resources/customers/credits/index.d.mts.map +1 -0
  397. package/resources/customers/credits/index.d.ts +3 -3
  398. package/resources/customers/credits/index.d.ts.map +1 -1
  399. package/resources/customers/credits/index.js +1 -7
  400. package/resources/customers/credits/index.js.map +1 -1
  401. package/resources/customers/credits/index.mjs +3 -3
  402. package/resources/customers/credits/index.mjs.map +1 -1
  403. package/resources/customers/credits/ledger.d.mts +1202 -0
  404. package/resources/customers/credits/ledger.d.mts.map +1 -0
  405. package/resources/customers/credits/ledger.d.ts +11 -14
  406. package/resources/customers/credits/ledger.d.ts.map +1 -1
  407. package/resources/customers/credits/ledger.js +172 -27
  408. package/resources/customers/credits/ledger.js.map +1 -1
  409. package/resources/customers/credits/ledger.mjs +171 -24
  410. package/resources/customers/credits/ledger.mjs.map +1 -1
  411. package/resources/customers/credits/top-ups.d.mts +357 -0
  412. package/resources/customers/credits/top-ups.d.mts.map +1 -0
  413. package/resources/customers/credits/top-ups.d.ts +19 -16
  414. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  415. package/resources/customers/credits/top-ups.js +24 -29
  416. package/resources/customers/credits/top-ups.js.map +1 -1
  417. package/resources/customers/credits/top-ups.mjs +23 -26
  418. package/resources/customers/credits/top-ups.mjs.map +1 -1
  419. package/resources/customers/credits.d.mts +2 -0
  420. package/resources/customers/credits.d.mts.map +1 -0
  421. package/resources/customers/credits.d.ts.map +1 -1
  422. package/resources/customers/credits.js +2 -15
  423. package/resources/customers/credits.js.map +1 -1
  424. package/resources/customers/credits.mjs.map +1 -1
  425. package/resources/customers/customers.d.mts +1453 -0
  426. package/resources/customers/customers.d.mts.map +1 -0
  427. package/resources/customers/customers.d.ts +17 -18
  428. package/resources/customers/customers.d.ts.map +1 -1
  429. package/resources/customers/customers.js +30 -53
  430. package/resources/customers/customers.js.map +1 -1
  431. package/resources/customers/customers.mjs +27 -27
  432. package/resources/customers/customers.mjs.map +1 -1
  433. package/resources/customers/index.d.mts +5 -0
  434. package/resources/customers/index.d.mts.map +1 -0
  435. package/resources/customers/index.d.ts +3 -3
  436. package/resources/customers/index.d.ts.map +1 -1
  437. package/resources/customers/index.js +1 -5
  438. package/resources/customers/index.js.map +1 -1
  439. package/resources/customers/index.mjs +3 -3
  440. package/resources/customers/index.mjs.map +1 -1
  441. package/resources/customers.d.mts +2 -0
  442. package/resources/customers.d.mts.map +1 -0
  443. package/resources/customers.d.ts.map +1 -1
  444. package/resources/customers.js +2 -15
  445. package/resources/customers.js.map +1 -1
  446. package/resources/customers.mjs.map +1 -1
  447. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +150 -0
  448. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -0
  449. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -12
  450. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  451. package/resources/dimensional-price-groups/dimensional-price-groups.js +21 -39
  452. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
  453. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +18 -13
  454. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
  455. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +53 -0
  456. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -0
  457. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +7 -6
  458. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
  459. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +6 -5
  460. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
  461. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +6 -5
  462. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
  463. package/resources/dimensional-price-groups/index.d.mts +3 -0
  464. package/resources/dimensional-price-groups/index.d.mts.map +1 -0
  465. package/resources/dimensional-price-groups/index.d.ts +1 -1
  466. package/resources/dimensional-price-groups/index.d.ts.map +1 -1
  467. package/resources/dimensional-price-groups/index.js +1 -2
  468. package/resources/dimensional-price-groups/index.js.map +1 -1
  469. package/resources/dimensional-price-groups/index.mjs +1 -1
  470. package/resources/dimensional-price-groups/index.mjs.map +1 -1
  471. package/resources/dimensional-price-groups.d.mts +2 -0
  472. package/resources/dimensional-price-groups.d.mts.map +1 -0
  473. package/resources/dimensional-price-groups.d.ts.map +1 -1
  474. package/resources/dimensional-price-groups.js +2 -15
  475. package/resources/dimensional-price-groups.js.map +1 -1
  476. package/resources/dimensional-price-groups.mjs.map +1 -1
  477. package/resources/events/backfills.d.mts +389 -0
  478. package/resources/events/backfills.d.mts.map +1 -0
  479. package/resources/events/backfills.d.ts +11 -12
  480. package/resources/events/backfills.d.ts.map +1 -1
  481. package/resources/events/backfills.js +24 -15
  482. package/resources/events/backfills.js.map +1 -1
  483. package/resources/events/backfills.mjs +23 -13
  484. package/resources/events/backfills.mjs.map +1 -1
  485. package/resources/events/events.d.mts +536 -0
  486. package/resources/events/events.d.mts.map +1 -0
  487. package/resources/events/events.d.ts +10 -11
  488. package/resources/events/events.d.ts.map +1 -1
  489. package/resources/events/events.js +7 -29
  490. package/resources/events/events.js.map +1 -1
  491. package/resources/events/events.mjs +5 -5
  492. package/resources/events/events.mjs.map +1 -1
  493. package/resources/events/index.d.mts +4 -0
  494. package/resources/events/index.d.mts.map +1 -0
  495. package/resources/events/index.d.ts +1 -1
  496. package/resources/events/index.d.ts.map +1 -1
  497. package/resources/events/index.js +1 -2
  498. package/resources/events/index.js.map +1 -1
  499. package/resources/events/index.mjs +1 -1
  500. package/resources/events/index.mjs.map +1 -1
  501. package/resources/events/volume.d.mts +79 -0
  502. package/resources/events/volume.d.mts.map +1 -0
  503. package/resources/events/volume.d.ts +4 -3
  504. package/resources/events/volume.d.ts.map +1 -1
  505. package/resources/events/volume.js +1 -1
  506. package/resources/events/volume.js.map +1 -1
  507. package/resources/events/volume.mjs +1 -1
  508. package/resources/events/volume.mjs.map +1 -1
  509. package/resources/events.d.mts +2 -0
  510. package/resources/events.d.mts.map +1 -0
  511. package/resources/events.d.ts.map +1 -1
  512. package/resources/events.js +2 -15
  513. package/resources/events.js.map +1 -1
  514. package/resources/events.mjs.map +1 -1
  515. package/resources/index.d.mts +22 -0
  516. package/resources/index.d.mts.map +1 -0
  517. package/resources/index.d.ts +13 -13
  518. package/resources/index.d.ts.map +1 -1
  519. package/resources/index.js +7 -33
  520. package/resources/index.js.map +1 -1
  521. package/resources/index.mjs +12 -12
  522. package/resources/index.mjs.map +1 -1
  523. package/resources/invoice-line-items.d.mts +245 -0
  524. package/resources/invoice-line-items.d.mts.map +1 -0
  525. package/resources/invoice-line-items.d.ts +4 -3
  526. package/resources/invoice-line-items.d.ts.map +1 -1
  527. package/resources/invoice-line-items.js +1 -1
  528. package/resources/invoice-line-items.js.map +1 -1
  529. package/resources/invoice-line-items.mjs +1 -1
  530. package/resources/invoice-line-items.mjs.map +1 -1
  531. package/resources/invoices.d.mts +1795 -0
  532. package/resources/invoices.d.mts.map +1 -0
  533. package/resources/invoices.d.ts +25 -27
  534. package/resources/invoices.d.ts.map +1 -1
  535. package/resources/invoices.js +105 -38
  536. package/resources/invoices.js.map +1 -1
  537. package/resources/invoices.mjs +104 -36
  538. package/resources/invoices.mjs.map +1 -1
  539. package/resources/items.d.mts +163 -0
  540. package/resources/items.d.mts.map +1 -0
  541. package/resources/items.d.ts +11 -12
  542. package/resources/items.d.ts.map +1 -1
  543. package/resources/items.js +20 -15
  544. package/resources/items.js.map +1 -1
  545. package/resources/items.mjs +19 -13
  546. package/resources/items.mjs.map +1 -1
  547. package/resources/license-types.d.mts +112 -0
  548. package/resources/license-types.d.mts.map +1 -0
  549. package/resources/license-types.d.ts +9 -10
  550. package/resources/license-types.d.ts.map +1 -1
  551. package/resources/license-types.js +14 -13
  552. package/resources/license-types.js.map +1 -1
  553. package/resources/license-types.mjs +13 -11
  554. package/resources/license-types.mjs.map +1 -1
  555. package/resources/licenses/external-licenses.d.mts +127 -0
  556. package/resources/licenses/external-licenses.d.mts.map +1 -0
  557. package/resources/licenses/external-licenses.d.ts +4 -3
  558. package/resources/licenses/external-licenses.d.ts.map +1 -1
  559. package/resources/licenses/external-licenses.js +6 -2
  560. package/resources/licenses/external-licenses.js.map +1 -1
  561. package/resources/licenses/external-licenses.mjs +6 -2
  562. package/resources/licenses/external-licenses.mjs.map +1 -1
  563. package/resources/licenses/index.d.mts +4 -0
  564. package/resources/licenses/index.d.mts.map +1 -0
  565. package/resources/licenses/index.d.ts +1 -1
  566. package/resources/licenses/index.d.ts.map +1 -1
  567. package/resources/licenses/index.js +1 -2
  568. package/resources/licenses/index.js.map +1 -1
  569. package/resources/licenses/index.mjs +1 -1
  570. package/resources/licenses/index.mjs.map +1 -1
  571. package/resources/licenses/licenses.d.mts +177 -0
  572. package/resources/licenses/licenses.d.mts.map +1 -0
  573. package/resources/licenses/licenses.d.ts +12 -12
  574. package/resources/licenses/licenses.d.ts.map +1 -1
  575. package/resources/licenses/licenses.js +13 -38
  576. package/resources/licenses/licenses.js.map +1 -1
  577. package/resources/licenses/licenses.mjs +9 -11
  578. package/resources/licenses/licenses.mjs.map +1 -1
  579. package/resources/licenses/usage.d.mts +226 -0
  580. package/resources/licenses/usage.d.mts.map +1 -0
  581. package/resources/licenses/usage.d.ts +5 -5
  582. package/resources/licenses/usage.d.ts.map +1 -1
  583. package/resources/licenses/usage.js +15 -6
  584. package/resources/licenses/usage.js.map +1 -1
  585. package/resources/licenses/usage.mjs +15 -6
  586. package/resources/licenses/usage.mjs.map +1 -1
  587. package/resources/licenses.d.mts +2 -0
  588. package/resources/licenses.d.mts.map +1 -0
  589. package/resources/licenses.d.ts.map +1 -1
  590. package/resources/licenses.js +2 -15
  591. package/resources/licenses.js.map +1 -1
  592. package/resources/licenses.mjs.map +1 -1
  593. package/resources/metrics.d.mts +147 -0
  594. package/resources/metrics.d.mts.map +1 -0
  595. package/resources/metrics.d.ts +10 -11
  596. package/resources/metrics.d.ts.map +1 -1
  597. package/resources/metrics.js +19 -14
  598. package/resources/metrics.js.map +1 -1
  599. package/resources/metrics.mjs +18 -12
  600. package/resources/metrics.mjs.map +1 -1
  601. package/resources/plans/external-plan-id.d.mts +61 -0
  602. package/resources/plans/external-plan-id.d.mts.map +1 -0
  603. package/resources/plans/external-plan-id.d.ts +5 -4
  604. package/resources/plans/external-plan-id.d.ts.map +1 -1
  605. package/resources/plans/external-plan-id.js +4 -3
  606. package/resources/plans/external-plan-id.js.map +1 -1
  607. package/resources/plans/external-plan-id.mjs +4 -3
  608. package/resources/plans/external-plan-id.mjs.map +1 -1
  609. package/resources/plans/index.d.mts +4 -0
  610. package/resources/plans/index.d.mts.map +1 -0
  611. package/resources/plans/index.d.ts +2 -2
  612. package/resources/plans/index.d.ts.map +1 -1
  613. package/resources/plans/index.js +1 -3
  614. package/resources/plans/index.js.map +1 -1
  615. package/resources/plans/index.mjs +2 -2
  616. package/resources/plans/index.mjs.map +1 -1
  617. package/resources/plans/migrations.d.mts +99 -0
  618. package/resources/plans/migrations.d.mts.map +1 -0
  619. package/resources/plans/migrations.d.ts +15 -10
  620. package/resources/plans/migrations.d.ts.map +1 -1
  621. package/resources/plans/migrations.js +17 -16
  622. package/resources/plans/migrations.js.map +1 -1
  623. package/resources/plans/migrations.mjs +16 -14
  624. package/resources/plans/migrations.mjs.map +1 -1
  625. package/resources/plans/plans.d.mts +1682 -0
  626. package/resources/plans/plans.d.mts.map +1 -0
  627. package/resources/plans/plans.d.ts +13 -14
  628. package/resources/plans/plans.d.ts.map +1 -1
  629. package/resources/plans/plans.js +18 -41
  630. package/resources/plans/plans.js.map +1 -1
  631. package/resources/plans/plans.mjs +15 -15
  632. package/resources/plans/plans.mjs.map +1 -1
  633. package/resources/plans.d.mts +2 -0
  634. package/resources/plans.d.mts.map +1 -0
  635. package/resources/plans.d.ts.map +1 -1
  636. package/resources/plans.js +2 -15
  637. package/resources/plans.js.map +1 -1
  638. package/resources/plans.mjs.map +1 -1
  639. package/resources/prices/external-price-id.d.mts +55 -0
  640. package/resources/prices/external-price-id.d.mts.map +1 -0
  641. package/resources/prices/external-price-id.d.ts +7 -6
  642. package/resources/prices/external-price-id.d.ts.map +1 -1
  643. package/resources/prices/external-price-id.js +6 -5
  644. package/resources/prices/external-price-id.js.map +1 -1
  645. package/resources/prices/external-price-id.mjs +6 -5
  646. package/resources/prices/external-price-id.mjs.map +1 -1
  647. package/resources/prices/index.d.mts +3 -0
  648. package/resources/prices/index.d.mts.map +1 -0
  649. package/resources/prices/index.d.ts.map +1 -1
  650. package/resources/prices/index.mjs.map +1 -1
  651. package/resources/prices/prices.d.mts +5950 -0
  652. package/resources/prices/prices.d.mts.map +1 -0
  653. package/resources/prices/prices.d.ts +13 -13
  654. package/resources/prices/prices.d.ts.map +1 -1
  655. package/resources/prices/prices.js +23 -37
  656. package/resources/prices/prices.js.map +1 -1
  657. package/resources/prices/prices.mjs +20 -12
  658. package/resources/prices/prices.mjs.map +1 -1
  659. package/resources/prices.d.mts +2 -0
  660. package/resources/prices.d.mts.map +1 -0
  661. package/resources/prices.d.ts.map +1 -1
  662. package/resources/prices.js +2 -15
  663. package/resources/prices.js.map +1 -1
  664. package/resources/prices.mjs.map +1 -1
  665. package/resources/shared.d.mts +13354 -0
  666. package/resources/shared.d.mts.map +1 -0
  667. package/resources/shared.d.ts +4 -7
  668. package/resources/shared.d.ts.map +1 -1
  669. package/resources/shared.js +0 -11
  670. package/resources/shared.js.map +1 -1
  671. package/resources/shared.mjs +1 -7
  672. package/resources/shared.mjs.map +1 -1
  673. package/resources/subscription-changes.d.mts +434 -0
  674. package/resources/subscription-changes.d.mts.map +1 -0
  675. package/resources/subscription-changes.d.ts +10 -12
  676. package/resources/subscription-changes.d.ts.map +1 -1
  677. package/resources/subscription-changes.js +18 -18
  678. package/resources/subscription-changes.js.map +1 -1
  679. package/resources/subscription-changes.mjs +17 -16
  680. package/resources/subscription-changes.mjs.map +1 -1
  681. package/resources/subscriptions.d.mts +10821 -0
  682. package/resources/subscriptions.d.mts.map +1 -0
  683. package/resources/subscriptions.d.ts +24 -29
  684. package/resources/subscriptions.d.ts.map +1 -1
  685. package/resources/subscriptions.js +284 -40
  686. package/resources/subscriptions.js.map +1 -1
  687. package/resources/subscriptions.mjs +283 -37
  688. package/resources/subscriptions.mjs.map +1 -1
  689. package/resources/top-level.d.mts +21 -0
  690. package/resources/top-level.d.mts.map +1 -0
  691. package/resources/top-level.d.ts +4 -3
  692. package/resources/top-level.d.ts.map +1 -1
  693. package/resources/top-level.js +1 -1
  694. package/resources/top-level.js.map +1 -1
  695. package/resources/top-level.mjs +1 -1
  696. package/resources/top-level.mjs.map +1 -1
  697. package/resources/webhooks.d.mts +24 -0
  698. package/resources/webhooks.d.mts.map +1 -0
  699. package/resources/webhooks.d.ts +2 -2
  700. package/resources/webhooks.d.ts.map +1 -1
  701. package/resources/webhooks.js +18 -5
  702. package/resources/webhooks.js.map +1 -1
  703. package/resources/webhooks.mjs +16 -3
  704. package/resources/webhooks.mjs.map +1 -1
  705. package/resources.d.mts +2 -0
  706. package/resources.d.mts.map +1 -0
  707. package/resources.d.ts.map +1 -1
  708. package/resources.js +2 -15
  709. package/resources.js.map +1 -1
  710. package/resources.mjs.map +1 -1
  711. package/src/api-promise.ts +2 -0
  712. package/src/client.ts +1499 -0
  713. package/src/core/README.md +3 -0
  714. package/src/core/api-promise.ts +92 -0
  715. package/src/core/error.ts +456 -0
  716. package/src/core/pagination.ts +167 -0
  717. package/src/core/resource.ts +11 -0
  718. package/src/core/uploads.ts +2 -0
  719. package/src/error.ts +2 -456
  720. package/src/index.ts +6 -923
  721. package/src/internal/README.md +3 -0
  722. package/src/internal/builtin-types.ts +93 -0
  723. package/src/internal/detect-platform.ts +196 -0
  724. package/src/internal/errors.ts +33 -0
  725. package/src/internal/headers.ts +97 -0
  726. package/src/internal/parse.ts +56 -0
  727. package/src/internal/qs/formats.ts +2 -1
  728. package/src/internal/qs/stringify.ts +17 -20
  729. package/src/internal/qs/utils.ts +14 -14
  730. package/src/internal/request-options.ts +91 -0
  731. package/src/internal/shim-types.ts +26 -0
  732. package/src/internal/shims.ts +107 -0
  733. package/src/internal/to-file.ts +154 -0
  734. package/src/internal/types.ts +93 -0
  735. package/src/internal/uploads.ts +187 -0
  736. package/src/internal/utils/base64.ts +40 -0
  737. package/src/internal/utils/bytes.ts +32 -0
  738. package/src/internal/utils/env.ts +18 -0
  739. package/src/internal/utils/log.ts +128 -0
  740. package/src/internal/utils/path.ts +88 -0
  741. package/src/internal/utils/sleep.ts +3 -0
  742. package/src/internal/utils/uuid.ts +17 -0
  743. package/src/internal/utils/values.ts +105 -0
  744. package/src/internal/utils.ts +9 -0
  745. package/src/pagination.ts +2 -70
  746. package/src/resource.ts +2 -11
  747. package/src/resources/alerts.ts +34 -62
  748. package/src/resources/beta/beta.ts +23 -13
  749. package/src/resources/beta/external-plan-id.ts +20 -12
  750. package/src/resources/beta/index.ts +2 -0
  751. package/src/resources/coupons/coupons.ts +16 -21
  752. package/src/resources/coupons/index.ts +7 -1
  753. package/src/resources/coupons/subscriptions.ts +13 -24
  754. package/src/resources/credit-blocks.ts +12 -12
  755. package/src/resources/credit-notes.ts +13 -20
  756. package/src/resources/customers/balance-transactions.ts +15 -28
  757. package/src/resources/customers/costs.ts +13 -33
  758. package/src/resources/customers/credits/credits.ts +26 -52
  759. package/src/resources/customers/credits/index.ts +8 -6
  760. package/src/resources/customers/credits/ledger.ts +29 -55
  761. package/src/resources/customers/credits/top-ups.ts +48 -61
  762. package/src/resources/customers/customers.ts +37 -48
  763. package/src/resources/customers/index.ts +4 -4
  764. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +19 -30
  765. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +12 -10
  766. package/src/resources/dimensional-price-groups/index.ts +1 -1
  767. package/src/resources/events/backfills.ts +18 -27
  768. package/src/resources/events/events.ts +14 -15
  769. package/src/resources/events/index.ts +1 -1
  770. package/src/resources/events/volume.ts +4 -3
  771. package/src/resources/index.ts +29 -28
  772. package/src/resources/invoice-line-items.ts +5 -4
  773. package/src/resources/invoices.ts +53 -95
  774. package/src/resources/items.ts +18 -24
  775. package/src/resources/license-types.ts +14 -31
  776. package/src/resources/licenses/external-licenses.ts +10 -5
  777. package/src/resources/licenses/index.ts +1 -1
  778. package/src/resources/licenses/licenses.ts +21 -20
  779. package/src/resources/licenses/usage.ts +9 -20
  780. package/src/resources/metrics.ts +16 -29
  781. package/src/resources/plans/external-plan-id.ts +9 -7
  782. package/src/resources/plans/index.ts +4 -2
  783. package/src/resources/plans/migrations.ts +30 -31
  784. package/src/resources/plans/plans.ts +22 -24
  785. package/src/resources/prices/external-price-id.ts +11 -9
  786. package/src/resources/prices/prices.ts +23 -31
  787. package/src/resources/shared.ts +4 -4
  788. package/src/resources/subscription-changes.ts +21 -44
  789. package/src/resources/subscriptions.ts +66 -106
  790. package/src/resources/top-level.ts +4 -3
  791. package/src/resources/webhooks.ts +17 -3
  792. package/src/tsconfig.json +2 -2
  793. package/src/uploads.ts +2 -255
  794. package/src/version.ts +1 -1
  795. package/uploads.d.mts +3 -0
  796. package/uploads.d.mts.map +1 -0
  797. package/uploads.d.ts +2 -74
  798. package/uploads.d.ts.map +1 -1
  799. package/uploads.js +3 -168
  800. package/uploads.js.map +1 -1
  801. package/uploads.mjs +2 -157
  802. package/uploads.mjs.map +1 -1
  803. package/version.d.mts +2 -0
  804. package/version.d.mts.map +1 -0
  805. package/version.d.ts +1 -1
  806. package/version.d.ts.map +1 -1
  807. package/version.js +1 -1
  808. package/version.js.map +1 -1
  809. package/version.mjs +1 -1
  810. package/version.mjs.map +1 -1
  811. package/_shims/MultipartBody.d.ts +0 -9
  812. package/_shims/MultipartBody.d.ts.map +0 -1
  813. package/_shims/MultipartBody.js +0 -16
  814. package/_shims/MultipartBody.js.map +0 -1
  815. package/_shims/MultipartBody.mjs +0 -12
  816. package/_shims/MultipartBody.mjs.map +0 -1
  817. package/_shims/README.md +0 -46
  818. package/_shims/auto/runtime-bun.d.ts +0 -5
  819. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  820. package/_shims/auto/runtime-bun.js +0 -21
  821. package/_shims/auto/runtime-bun.js.map +0 -1
  822. package/_shims/auto/runtime-bun.mjs +0 -2
  823. package/_shims/auto/runtime-bun.mjs.map +0 -1
  824. package/_shims/auto/runtime-node.d.ts +0 -5
  825. package/_shims/auto/runtime-node.d.ts.map +0 -1
  826. package/_shims/auto/runtime-node.js +0 -21
  827. package/_shims/auto/runtime-node.js.map +0 -1
  828. package/_shims/auto/runtime-node.mjs +0 -2
  829. package/_shims/auto/runtime-node.mjs.map +0 -1
  830. package/_shims/auto/runtime.d.ts +0 -5
  831. package/_shims/auto/runtime.d.ts.map +0 -1
  832. package/_shims/auto/runtime.js +0 -21
  833. package/_shims/auto/runtime.js.map +0 -1
  834. package/_shims/auto/runtime.mjs +0 -2
  835. package/_shims/auto/runtime.mjs.map +0 -1
  836. package/_shims/auto/types-node.d.ts +0 -5
  837. package/_shims/auto/types-node.d.ts.map +0 -1
  838. package/_shims/auto/types-node.js +0 -21
  839. package/_shims/auto/types-node.js.map +0 -1
  840. package/_shims/auto/types-node.mjs +0 -2
  841. package/_shims/auto/types-node.mjs.map +0 -1
  842. package/_shims/auto/types.d.ts +0 -101
  843. package/_shims/auto/types.js +0 -3
  844. package/_shims/auto/types.mjs +0 -3
  845. package/_shims/bun-runtime.d.ts +0 -6
  846. package/_shims/bun-runtime.d.ts.map +0 -1
  847. package/_shims/bun-runtime.js +0 -14
  848. package/_shims/bun-runtime.js.map +0 -1
  849. package/_shims/bun-runtime.mjs +0 -10
  850. package/_shims/bun-runtime.mjs.map +0 -1
  851. package/_shims/index.d.ts +0 -83
  852. package/_shims/index.js +0 -17
  853. package/_shims/index.mjs +0 -11
  854. package/_shims/manual-types.d.ts +0 -12
  855. package/_shims/manual-types.js +0 -3
  856. package/_shims/manual-types.mjs +0 -3
  857. package/_shims/node-runtime.d.ts +0 -3
  858. package/_shims/node-runtime.d.ts.map +0 -1
  859. package/_shims/node-runtime.js +0 -89
  860. package/_shims/node-runtime.js.map +0 -1
  861. package/_shims/node-runtime.mjs +0 -56
  862. package/_shims/node-runtime.mjs.map +0 -1
  863. package/_shims/node-types.d.ts +0 -42
  864. package/_shims/node-types.js +0 -3
  865. package/_shims/node-types.mjs +0 -3
  866. package/_shims/registry.d.ts +0 -37
  867. package/_shims/registry.d.ts.map +0 -1
  868. package/_shims/registry.js +0 -41
  869. package/_shims/registry.js.map +0 -1
  870. package/_shims/registry.mjs +0 -37
  871. package/_shims/registry.mjs.map +0 -1
  872. package/_shims/web-runtime.d.ts +0 -5
  873. package/_shims/web-runtime.d.ts.map +0 -1
  874. package/_shims/web-runtime.js +0 -78
  875. package/_shims/web-runtime.js.map +0 -1
  876. package/_shims/web-runtime.mjs +0 -71
  877. package/_shims/web-runtime.mjs.map +0 -1
  878. package/_shims/web-types.d.ts +0 -83
  879. package/_shims/web-types.js +0 -3
  880. package/_shims/web-types.mjs +0 -3
  881. package/core.d.ts +0 -255
  882. package/core.d.ts.map +0 -1
  883. package/core.js +0 -920
  884. package/core.js.map +0 -1
  885. package/core.mjs +0 -888
  886. package/core.mjs.map +0 -1
  887. package/shims/node.d.ts +0 -30
  888. package/shims/node.d.ts.map +0 -1
  889. package/shims/node.js +0 -31
  890. package/shims/node.js.map +0 -1
  891. package/shims/node.mjs +0 -5
  892. package/shims/node.mjs.map +0 -1
  893. package/shims/web.d.ts +0 -26
  894. package/shims/web.d.ts.map +0 -1
  895. package/shims/web.js +0 -31
  896. package/shims/web.js.map +0 -1
  897. package/shims/web.mjs +0 -5
  898. package/shims/web.mjs.map +0 -1
  899. package/src/_shims/MultipartBody.ts +0 -9
  900. package/src/_shims/README.md +0 -46
  901. package/src/_shims/auto/runtime-bun.ts +0 -4
  902. package/src/_shims/auto/runtime-node.ts +0 -4
  903. package/src/_shims/auto/runtime.ts +0 -4
  904. package/src/_shims/auto/types-node.ts +0 -4
  905. package/src/_shims/auto/types.d.ts +0 -101
  906. package/src/_shims/auto/types.js +0 -3
  907. package/src/_shims/auto/types.mjs +0 -3
  908. package/src/_shims/bun-runtime.ts +0 -14
  909. package/src/_shims/index.d.ts +0 -83
  910. package/src/_shims/index.js +0 -17
  911. package/src/_shims/index.mjs +0 -11
  912. package/src/_shims/manual-types.d.ts +0 -12
  913. package/src/_shims/manual-types.js +0 -3
  914. package/src/_shims/manual-types.mjs +0 -3
  915. package/src/_shims/node-runtime.ts +0 -81
  916. package/src/_shims/node-types.d.ts +0 -42
  917. package/src/_shims/node-types.js +0 -3
  918. package/src/_shims/node-types.mjs +0 -3
  919. package/src/_shims/registry.ts +0 -67
  920. package/src/_shims/web-runtime.ts +0 -103
  921. package/src/_shims/web-types.d.ts +0 -83
  922. package/src/_shims/web-types.js +0 -3
  923. package/src/_shims/web-types.mjs +0 -3
  924. package/src/core.ts +0 -1231
  925. package/src/shims/node.ts +0 -50
  926. package/src/shims/web.ts +0 -50
@@ -0,0 +1,2826 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as Shared from "../shared.mjs";
3
+ import * as ExternalPlanIDAPI from "./external-plan-id.mjs";
4
+ import { ExternalPlanID, ExternalPlanIDCreatePlanVersionParams, ExternalPlanIDFetchPlanVersionParams, ExternalPlanIDSetDefaultPlanVersionParams } from "./external-plan-id.mjs";
5
+ import * as PlansAPI from "../plans/plans.mjs";
6
+ import { APIPromise } from "../../core/api-promise.mjs";
7
+ import { RequestOptions } from "../../internal/request-options.mjs";
8
+ /**
9
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
10
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
11
+ * in the [Price resource](/reference/price).
12
+ */
13
+ export declare class Beta extends APIResource {
14
+ externalPlanID: ExternalPlanIDAPI.ExternalPlanID;
15
+ /**
16
+ * This endpoint allows the creation of a new plan version for an existing plan.
17
+ */
18
+ createPlanVersion(planId: string, body: BetaCreatePlanVersionParams, options?: RequestOptions): APIPromise<PlanVersion>;
19
+ /**
20
+ * This endpoint is used to fetch a plan version. It returns the phases, prices,
21
+ * and adjustments present on this version of the plan.
22
+ */
23
+ fetchPlanVersion(version: string, params: BetaFetchPlanVersionParams, options?: RequestOptions): APIPromise<PlanVersion>;
24
+ /**
25
+ * This endpoint allows setting the default version of a plan.
26
+ */
27
+ setDefaultPlanVersion(planId: string, body: BetaSetDefaultPlanVersionParams, options?: RequestOptions): APIPromise<PlansAPI.Plan>;
28
+ }
29
+ /**
30
+ * The PlanVersion resource represents the prices and adjustments present on a
31
+ * specific version of a plan.
32
+ */
33
+ export interface PlanVersion {
34
+ /**
35
+ * Adjustments for this plan. If the plan has phases, this includes adjustments
36
+ * across all phases of the plan.
37
+ */
38
+ adjustments: Array<Shared.PlanPhaseUsageDiscountAdjustment | Shared.PlanPhaseAmountDiscountAdjustment | Shared.PlanPhasePercentageDiscountAdjustment | PlanVersion.PlanPhaseTieredPercentageDiscountAdjustment | Shared.PlanPhaseMinimumAdjustment | Shared.PlanPhaseMaximumAdjustment>;
39
+ created_at: string;
40
+ plan_phases: Array<PlanVersionPhase> | null;
41
+ /**
42
+ * Prices for this plan. If the plan has phases, this includes prices across all
43
+ * phases of the plan.
44
+ */
45
+ prices: Array<Shared.Price>;
46
+ version: number;
47
+ }
48
+ export declare namespace PlanVersion {
49
+ interface PlanPhaseTieredPercentageDiscountAdjustment {
50
+ id: string;
51
+ adjustment_type: 'tiered_percentage_discount';
52
+ /**
53
+ * @deprecated The price IDs that this adjustment applies to.
54
+ */
55
+ applies_to_price_ids: Array<string>;
56
+ /**
57
+ * The filters that determine which prices to apply this adjustment to.
58
+ */
59
+ filters: Array<PlanPhaseTieredPercentageDiscountAdjustment.Filter>;
60
+ /**
61
+ * True for adjustments that apply to an entire invoice, false for adjustments that
62
+ * apply to only one price.
63
+ */
64
+ is_invoice_level: boolean;
65
+ /**
66
+ * The plan phase in which this adjustment is active.
67
+ */
68
+ plan_phase_order: number | null;
69
+ /**
70
+ * The reason for the adjustment.
71
+ */
72
+ reason: string | null;
73
+ /**
74
+ * The adjustment id this adjustment replaces. This adjustment will take the place
75
+ * of the replaced adjustment in plan version migrations.
76
+ */
77
+ replaces_adjustment_id: string | null;
78
+ /**
79
+ * The ordered, contiguous bands of cumulative eligible spend, each discounted at
80
+ * its own percentage (progressive fill-a-tier), applied to the prices this
81
+ * adjustment covers in a given billing period.
82
+ */
83
+ tiers: Array<PlanPhaseTieredPercentageDiscountAdjustment.Tier>;
84
+ }
85
+ namespace PlanPhaseTieredPercentageDiscountAdjustment {
86
+ interface Filter {
87
+ /**
88
+ * The property of the price to filter on.
89
+ */
90
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
91
+ /**
92
+ * Should prices that match the filter be included or excluded.
93
+ */
94
+ operator: 'includes' | 'excludes';
95
+ /**
96
+ * The IDs or values that match this filter.
97
+ */
98
+ values: Array<string>;
99
+ }
100
+ /**
101
+ * One band of a tiered percentage discount. Bounds are denominated in the
102
+ * discount's currency. `lower_bound` is the exclusive start of the band and
103
+ * `upper_bound` is the inclusive end; `upper_bound` is null only for the
104
+ * open-ended final tier.
105
+ */
106
+ interface Tier {
107
+ /**
108
+ * Exclusive lower bound of cumulative spend for this tier.
109
+ */
110
+ lower_bound: number;
111
+ /**
112
+ * The percentage (between 0 and 1) discounted from spend that falls within this
113
+ * tier.
114
+ */
115
+ percentage: number;
116
+ /**
117
+ * Inclusive upper bound of cumulative spend for this tier; null for the final
118
+ * open-ended tier.
119
+ */
120
+ upper_bound?: number | null;
121
+ }
122
+ }
123
+ }
124
+ export interface PlanVersionPhase {
125
+ id: string;
126
+ description: string | null;
127
+ /**
128
+ * How many terms of length `duration_unit` this phase is active for. If null, this
129
+ * phase is evergreen and active indefinitely
130
+ */
131
+ duration: number | null;
132
+ duration_unit: 'daily' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | null;
133
+ name: string;
134
+ /**
135
+ * Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
136
+ */
137
+ order: number;
138
+ }
139
+ export interface BetaCreatePlanVersionParams {
140
+ /**
141
+ * New version number.
142
+ */
143
+ version: number;
144
+ /**
145
+ * Additional adjustments to be added to the plan.
146
+ */
147
+ add_adjustments?: Array<BetaCreatePlanVersionParams.AddAdjustment> | null;
148
+ /**
149
+ * Additional prices to be added to the plan.
150
+ */
151
+ add_prices?: Array<BetaCreatePlanVersionParams.AddPrice> | null;
152
+ /**
153
+ * Adjustments to be removed from the plan.
154
+ */
155
+ remove_adjustments?: Array<BetaCreatePlanVersionParams.RemoveAdjustment> | null;
156
+ /**
157
+ * Prices to be removed from the plan.
158
+ */
159
+ remove_prices?: Array<BetaCreatePlanVersionParams.RemovePrice> | null;
160
+ /**
161
+ * Adjustments to be replaced with additional adjustments on the plan.
162
+ */
163
+ replace_adjustments?: Array<BetaCreatePlanVersionParams.ReplaceAdjustment> | null;
164
+ /**
165
+ * Prices to be replaced with additional prices on the plan.
166
+ */
167
+ replace_prices?: Array<BetaCreatePlanVersionParams.ReplacePrice> | null;
168
+ /**
169
+ * Set this new plan version as the default
170
+ */
171
+ set_as_default?: boolean | null;
172
+ }
173
+ export declare namespace BetaCreatePlanVersionParams {
174
+ interface AddAdjustment {
175
+ /**
176
+ * The definition of a new adjustment to create and add to the plan.
177
+ */
178
+ adjustment: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum | AddAdjustment.NewTieredPercentageDiscount;
179
+ /**
180
+ * The phase to add this adjustment to.
181
+ */
182
+ plan_phase_order?: number | null;
183
+ }
184
+ namespace AddAdjustment {
185
+ interface NewTieredPercentageDiscount {
186
+ adjustment_type: 'tiered_percentage_discount';
187
+ tiers: Array<NewTieredPercentageDiscount.Tier>;
188
+ /**
189
+ * If set, the adjustment will apply to every price on the subscription.
190
+ */
191
+ applies_to_all?: true | null;
192
+ /**
193
+ * The set of item IDs to which this adjustment applies.
194
+ */
195
+ applies_to_item_ids?: Array<string> | null;
196
+ /**
197
+ * The set of price IDs to which this adjustment applies.
198
+ */
199
+ applies_to_price_ids?: Array<string> | null;
200
+ /**
201
+ * If set, only prices in the specified currency will have the adjustment applied.
202
+ */
203
+ currency?: string | null;
204
+ /**
205
+ * A list of filters that determine which prices this adjustment will apply to.
206
+ */
207
+ filters?: Array<NewTieredPercentageDiscount.Filter> | null;
208
+ /**
209
+ * When false, this adjustment will be applied to a single price. Otherwise, it
210
+ * will be applied at the invoice level, possibly to multiple prices.
211
+ */
212
+ is_invoice_level?: boolean;
213
+ /**
214
+ * If set, only prices of the specified type will have the adjustment applied.
215
+ */
216
+ price_type?: 'usage' | 'fixed_in_advance' | 'fixed_in_arrears' | 'fixed' | 'in_arrears' | null;
217
+ }
218
+ namespace NewTieredPercentageDiscount {
219
+ interface Tier {
220
+ /**
221
+ * Exclusive lower bound of cumulative spend for this tier.
222
+ */
223
+ lower_bound: number;
224
+ /**
225
+ * The percentage (0-1) discounted from spend in this tier.
226
+ */
227
+ percentage: number;
228
+ /**
229
+ * Inclusive upper bound of cumulative spend; null for the final open-ended tier.
230
+ */
231
+ upper_bound?: number | null;
232
+ }
233
+ interface Filter {
234
+ /**
235
+ * The property of the price to filter on.
236
+ */
237
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
238
+ /**
239
+ * Should prices that match the filter be included or excluded.
240
+ */
241
+ operator: 'includes' | 'excludes';
242
+ /**
243
+ * The IDs or values that match this filter.
244
+ */
245
+ values: Array<string>;
246
+ }
247
+ }
248
+ }
249
+ interface AddPrice {
250
+ /**
251
+ * The allocation price to add to the plan.
252
+ */
253
+ allocation_price?: Shared.NewAllocationPrice | null;
254
+ /**
255
+ * The license allocation price to add to the plan.
256
+ */
257
+ license_allocation_price?: AddPrice.LicenseAllocationPrice | null;
258
+ /**
259
+ * The phase to add this price to.
260
+ */
261
+ plan_phase_order?: number | null;
262
+ /**
263
+ * New plan price request body params.
264
+ */
265
+ price?: Shared.NewPlanUnitPrice | Shared.NewPlanTieredPrice | Shared.NewPlanBulkPrice | AddPrice.NewPlanBulkWithFiltersPrice | Shared.NewPlanPackagePrice | Shared.NewPlanMatrixPrice | Shared.NewPlanThresholdTotalAmountPrice | Shared.NewPlanTieredPackagePrice | Shared.NewPlanTieredWithMinimumPrice | Shared.NewPlanGroupedTieredPrice | Shared.NewPlanTieredPackageWithMinimumPrice | Shared.NewPlanPackageWithAllocationPrice | Shared.NewPlanUnitWithPercentPrice | Shared.NewPlanMatrixWithAllocationPrice | AddPrice.NewPlanMatrixWithThresholdDiscountsPrice | AddPrice.NewPlanTieredWithProrationPrice | Shared.NewPlanUnitWithProrationPrice | Shared.NewPlanGroupedAllocationPrice | Shared.NewPlanBulkWithProrationPrice | Shared.NewPlanGroupedWithProratedMinimumPrice | Shared.NewPlanGroupedWithMeteredMinimumPrice | AddPrice.NewPlanGroupedWithMinMaxThresholdsPrice | Shared.NewPlanMatrixWithDisplayNamePrice | Shared.NewPlanGroupedTieredPackagePrice | Shared.NewPlanMaxGroupTieredPackagePrice | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice | AddPrice.NewPlanCumulativeGroupedAllocationPrice | AddPrice.NewPlanDailyCreditAllowancePrice | AddPrice.NewPlanMeteredAllowancePrice | Shared.NewPlanMinimumCompositePrice | AddPrice.NewPlanPercentCompositePrice | AddPrice.NewPlanEventOutputPrice | null;
266
+ }
267
+ namespace AddPrice {
268
+ /**
269
+ * The license allocation price to add to the plan.
270
+ */
271
+ interface LicenseAllocationPrice {
272
+ /**
273
+ * The cadence to bill for this price on.
274
+ */
275
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
276
+ /**
277
+ * The id of the item the price will be associated with.
278
+ */
279
+ item_id: string;
280
+ /**
281
+ * License allocations to associate with this price. Each entry defines a
282
+ * per-license credit pool granted each cadence. Requires license_type_id or
283
+ * license_type_configuration to be set.
284
+ */
285
+ license_allocations: Array<LicenseAllocationPrice.LicenseAllocation>;
286
+ /**
287
+ * The pricing model type
288
+ */
289
+ model_type: 'unit';
290
+ /**
291
+ * The name of the price.
292
+ */
293
+ name: string;
294
+ /**
295
+ * Configuration for unit pricing
296
+ */
297
+ unit_config: Shared.UnitConfig;
298
+ /**
299
+ * The id of the billable metric for the price. Only needed if the price is
300
+ * usage-based.
301
+ */
302
+ billable_metric_id?: string | null;
303
+ /**
304
+ * If the Price represents a fixed cost, the price will be billed in-advance if
305
+ * this is true, and in-arrears if this is false.
306
+ */
307
+ billed_in_advance?: boolean | null;
308
+ /**
309
+ * For custom cadence: specifies the duration of the billing period in days or
310
+ * months.
311
+ */
312
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
313
+ /**
314
+ * The per unit conversion rate of the price currency to the invoicing currency.
315
+ */
316
+ conversion_rate?: number | null;
317
+ /**
318
+ * The configuration for the rate of the price currency to the invoicing currency.
319
+ */
320
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
321
+ /**
322
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
323
+ * price is billed.
324
+ */
325
+ currency?: string | null;
326
+ /**
327
+ * For dimensional price: specifies a price group and dimension values
328
+ */
329
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
330
+ /**
331
+ * An alias for the price.
332
+ */
333
+ external_price_id?: string | null;
334
+ /**
335
+ * If the Price represents a fixed cost, this represents the quantity of units
336
+ * applied.
337
+ */
338
+ fixed_price_quantity?: number | null;
339
+ /**
340
+ * The property used to group this price on an invoice
341
+ */
342
+ invoice_grouping_key?: string | null;
343
+ /**
344
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
345
+ * If unspecified, a single invoice is produced per billing cycle.
346
+ */
347
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
348
+ /**
349
+ * The ID of the license type to associate with this price.
350
+ */
351
+ license_type_id?: string | null;
352
+ /**
353
+ * User-specified key/value pairs for the resource. Individual keys can be removed
354
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
355
+ * by setting `metadata` to `null`.
356
+ */
357
+ metadata?: {
358
+ [key: string]: string | null;
359
+ } | null;
360
+ /**
361
+ * A transient ID that can be used to reference this price when adding adjustments
362
+ * in the same API call.
363
+ */
364
+ reference_id?: string | null;
365
+ }
366
+ namespace LicenseAllocationPrice {
367
+ interface LicenseAllocation {
368
+ /**
369
+ * The amount of credits granted per active license per cadence.
370
+ */
371
+ amount: string;
372
+ /**
373
+ * The currency of the license allocation.
374
+ */
375
+ currency: string;
376
+ /**
377
+ * When True, overage beyond the allocation is written off.
378
+ */
379
+ write_off_overage?: boolean | null;
380
+ }
381
+ }
382
+ interface NewPlanBulkWithFiltersPrice {
383
+ /**
384
+ * Configuration for bulk_with_filters pricing
385
+ */
386
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
387
+ /**
388
+ * The cadence to bill for this price on.
389
+ */
390
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
391
+ /**
392
+ * The id of the item the price will be associated with.
393
+ */
394
+ item_id: string;
395
+ /**
396
+ * The pricing model type
397
+ */
398
+ model_type: 'bulk_with_filters';
399
+ /**
400
+ * The name of the price.
401
+ */
402
+ name: string;
403
+ /**
404
+ * The id of the billable metric for the price. Only needed if the price is
405
+ * usage-based.
406
+ */
407
+ billable_metric_id?: string | null;
408
+ /**
409
+ * If the Price represents a fixed cost, the price will be billed in-advance if
410
+ * this is true, and in-arrears if this is false.
411
+ */
412
+ billed_in_advance?: boolean | null;
413
+ /**
414
+ * For custom cadence: specifies the duration of the billing period in days or
415
+ * months.
416
+ */
417
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
418
+ /**
419
+ * The per unit conversion rate of the price currency to the invoicing currency.
420
+ */
421
+ conversion_rate?: number | null;
422
+ /**
423
+ * The configuration for the rate of the price currency to the invoicing currency.
424
+ */
425
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
426
+ /**
427
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
428
+ * price is billed.
429
+ */
430
+ currency?: string | null;
431
+ /**
432
+ * For dimensional price: specifies a price group and dimension values
433
+ */
434
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
435
+ /**
436
+ * An alias for the price.
437
+ */
438
+ external_price_id?: string | null;
439
+ /**
440
+ * If the Price represents a fixed cost, this represents the quantity of units
441
+ * applied.
442
+ */
443
+ fixed_price_quantity?: number | null;
444
+ /**
445
+ * The property used to group this price on an invoice
446
+ */
447
+ invoice_grouping_key?: string | null;
448
+ /**
449
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
450
+ * If unspecified, a single invoice is produced per billing cycle.
451
+ */
452
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
453
+ /**
454
+ * The ID of the license type to associate with this price.
455
+ */
456
+ license_type_id?: string | null;
457
+ /**
458
+ * User-specified key/value pairs for the resource. Individual keys can be removed
459
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
460
+ * by setting `metadata` to `null`.
461
+ */
462
+ metadata?: {
463
+ [key: string]: string | null;
464
+ } | null;
465
+ /**
466
+ * A transient ID that can be used to reference this price when adding adjustments
467
+ * in the same API call.
468
+ */
469
+ reference_id?: string | null;
470
+ }
471
+ namespace NewPlanBulkWithFiltersPrice {
472
+ /**
473
+ * Configuration for bulk_with_filters pricing
474
+ */
475
+ interface BulkWithFiltersConfig {
476
+ /**
477
+ * Property filters to apply (all must match)
478
+ */
479
+ filters: Array<BulkWithFiltersConfig.Filter>;
480
+ /**
481
+ * Bulk tiers for rating based on total usage volume
482
+ */
483
+ tiers: Array<BulkWithFiltersConfig.Tier>;
484
+ }
485
+ namespace BulkWithFiltersConfig {
486
+ /**
487
+ * Configuration for a single property filter
488
+ */
489
+ interface Filter {
490
+ /**
491
+ * Event property key to filter on
492
+ */
493
+ property_key: string;
494
+ /**
495
+ * Event property value to match
496
+ */
497
+ property_value: string;
498
+ }
499
+ /**
500
+ * Configuration for a single bulk pricing tier
501
+ */
502
+ interface Tier {
503
+ /**
504
+ * Amount per unit
505
+ */
506
+ unit_amount: string;
507
+ /**
508
+ * The lower bound for this tier
509
+ */
510
+ tier_lower_bound?: string | null;
511
+ }
512
+ }
513
+ }
514
+ interface NewPlanMatrixWithThresholdDiscountsPrice {
515
+ /**
516
+ * The cadence to bill for this price on.
517
+ */
518
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
519
+ /**
520
+ * The id of the item the price will be associated with.
521
+ */
522
+ item_id: string;
523
+ /**
524
+ * Configuration for matrix_with_threshold_discounts pricing
525
+ */
526
+ matrix_with_threshold_discounts_config: NewPlanMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
527
+ /**
528
+ * The pricing model type
529
+ */
530
+ model_type: 'matrix_with_threshold_discounts';
531
+ /**
532
+ * The name of the price.
533
+ */
534
+ name: string;
535
+ /**
536
+ * The id of the billable metric for the price. Only needed if the price is
537
+ * usage-based.
538
+ */
539
+ billable_metric_id?: string | null;
540
+ /**
541
+ * If the Price represents a fixed cost, the price will be billed in-advance if
542
+ * this is true, and in-arrears if this is false.
543
+ */
544
+ billed_in_advance?: boolean | null;
545
+ /**
546
+ * For custom cadence: specifies the duration of the billing period in days or
547
+ * months.
548
+ */
549
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
550
+ /**
551
+ * The per unit conversion rate of the price currency to the invoicing currency.
552
+ */
553
+ conversion_rate?: number | null;
554
+ /**
555
+ * The configuration for the rate of the price currency to the invoicing currency.
556
+ */
557
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
558
+ /**
559
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
560
+ * price is billed.
561
+ */
562
+ currency?: string | null;
563
+ /**
564
+ * For dimensional price: specifies a price group and dimension values
565
+ */
566
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
567
+ /**
568
+ * An alias for the price.
569
+ */
570
+ external_price_id?: string | null;
571
+ /**
572
+ * If the Price represents a fixed cost, this represents the quantity of units
573
+ * applied.
574
+ */
575
+ fixed_price_quantity?: number | null;
576
+ /**
577
+ * The property used to group this price on an invoice
578
+ */
579
+ invoice_grouping_key?: string | null;
580
+ /**
581
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
582
+ * If unspecified, a single invoice is produced per billing cycle.
583
+ */
584
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
585
+ /**
586
+ * The ID of the license type to associate with this price.
587
+ */
588
+ license_type_id?: string | null;
589
+ /**
590
+ * User-specified key/value pairs for the resource. Individual keys can be removed
591
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
592
+ * by setting `metadata` to `null`.
593
+ */
594
+ metadata?: {
595
+ [key: string]: string | null;
596
+ } | null;
597
+ /**
598
+ * A transient ID that can be used to reference this price when adding adjustments
599
+ * in the same API call.
600
+ */
601
+ reference_id?: string | null;
602
+ }
603
+ namespace NewPlanMatrixWithThresholdDiscountsPrice {
604
+ /**
605
+ * Configuration for matrix_with_threshold_discounts pricing
606
+ */
607
+ interface MatrixWithThresholdDiscountsConfig {
608
+ /**
609
+ * Unit price used for usage that does not match any defined matrix cell.
610
+ */
611
+ default_unit_amount: string;
612
+ /**
613
+ * First matrix dimension key.
614
+ */
615
+ first_dimension: string;
616
+ /**
617
+ * Per-cell unit prices.
618
+ */
619
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
620
+ /**
621
+ * Optional second matrix dimension key.
622
+ */
623
+ second_dimension?: string | null;
624
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
625
+ }
626
+ namespace MatrixWithThresholdDiscountsConfig {
627
+ interface MatrixValue {
628
+ first_dimension_value: string;
629
+ unit_amount: string;
630
+ second_dimension_value?: string | null;
631
+ }
632
+ interface ThresholdDiscountGroup {
633
+ /**
634
+ * Discount rate applied to spend above the threshold.
635
+ */
636
+ above_threshold_discount_percentage: string;
637
+ /**
638
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
639
+ * baseline discount.
640
+ */
641
+ below_threshold_discount_percentage: string;
642
+ /**
643
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
644
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
645
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
646
+ */
647
+ cell_coordinates: string;
648
+ threshold_amount: string;
649
+ description?: string | null;
650
+ }
651
+ }
652
+ }
653
+ interface NewPlanTieredWithProrationPrice {
654
+ /**
655
+ * The cadence to bill for this price on.
656
+ */
657
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
658
+ /**
659
+ * The id of the item the price will be associated with.
660
+ */
661
+ item_id: string;
662
+ /**
663
+ * The pricing model type
664
+ */
665
+ model_type: 'tiered_with_proration';
666
+ /**
667
+ * The name of the price.
668
+ */
669
+ name: string;
670
+ /**
671
+ * Configuration for tiered_with_proration pricing
672
+ */
673
+ tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
674
+ /**
675
+ * The id of the billable metric for the price. Only needed if the price is
676
+ * usage-based.
677
+ */
678
+ billable_metric_id?: string | null;
679
+ /**
680
+ * If the Price represents a fixed cost, the price will be billed in-advance if
681
+ * this is true, and in-arrears if this is false.
682
+ */
683
+ billed_in_advance?: boolean | null;
684
+ /**
685
+ * For custom cadence: specifies the duration of the billing period in days or
686
+ * months.
687
+ */
688
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
689
+ /**
690
+ * The per unit conversion rate of the price currency to the invoicing currency.
691
+ */
692
+ conversion_rate?: number | null;
693
+ /**
694
+ * The configuration for the rate of the price currency to the invoicing currency.
695
+ */
696
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
697
+ /**
698
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
699
+ * price is billed.
700
+ */
701
+ currency?: string | null;
702
+ /**
703
+ * For dimensional price: specifies a price group and dimension values
704
+ */
705
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
706
+ /**
707
+ * An alias for the price.
708
+ */
709
+ external_price_id?: string | null;
710
+ /**
711
+ * If the Price represents a fixed cost, this represents the quantity of units
712
+ * applied.
713
+ */
714
+ fixed_price_quantity?: number | null;
715
+ /**
716
+ * The property used to group this price on an invoice
717
+ */
718
+ invoice_grouping_key?: string | null;
719
+ /**
720
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
721
+ * If unspecified, a single invoice is produced per billing cycle.
722
+ */
723
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
724
+ /**
725
+ * The ID of the license type to associate with this price.
726
+ */
727
+ license_type_id?: string | null;
728
+ /**
729
+ * User-specified key/value pairs for the resource. Individual keys can be removed
730
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
731
+ * by setting `metadata` to `null`.
732
+ */
733
+ metadata?: {
734
+ [key: string]: string | null;
735
+ } | null;
736
+ /**
737
+ * A transient ID that can be used to reference this price when adding adjustments
738
+ * in the same API call.
739
+ */
740
+ reference_id?: string | null;
741
+ }
742
+ namespace NewPlanTieredWithProrationPrice {
743
+ /**
744
+ * Configuration for tiered_with_proration pricing
745
+ */
746
+ interface TieredWithProrationConfig {
747
+ /**
748
+ * Tiers for rating based on total usage quantities into the specified tier with
749
+ * proration
750
+ */
751
+ tiers: Array<TieredWithProrationConfig.Tier>;
752
+ }
753
+ namespace TieredWithProrationConfig {
754
+ /**
755
+ * Configuration for a single tiered with proration tier
756
+ */
757
+ interface Tier {
758
+ /**
759
+ * Inclusive tier starting value
760
+ */
761
+ tier_lower_bound: string;
762
+ /**
763
+ * Amount per unit
764
+ */
765
+ unit_amount: string;
766
+ }
767
+ }
768
+ }
769
+ interface NewPlanGroupedWithMinMaxThresholdsPrice {
770
+ /**
771
+ * The cadence to bill for this price on.
772
+ */
773
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
774
+ /**
775
+ * Configuration for grouped_with_min_max_thresholds pricing
776
+ */
777
+ grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
778
+ /**
779
+ * The id of the item the price will be associated with.
780
+ */
781
+ item_id: string;
782
+ /**
783
+ * The pricing model type
784
+ */
785
+ model_type: 'grouped_with_min_max_thresholds';
786
+ /**
787
+ * The name of the price.
788
+ */
789
+ name: string;
790
+ /**
791
+ * The id of the billable metric for the price. Only needed if the price is
792
+ * usage-based.
793
+ */
794
+ billable_metric_id?: string | null;
795
+ /**
796
+ * If the Price represents a fixed cost, the price will be billed in-advance if
797
+ * this is true, and in-arrears if this is false.
798
+ */
799
+ billed_in_advance?: boolean | null;
800
+ /**
801
+ * For custom cadence: specifies the duration of the billing period in days or
802
+ * months.
803
+ */
804
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
805
+ /**
806
+ * The per unit conversion rate of the price currency to the invoicing currency.
807
+ */
808
+ conversion_rate?: number | null;
809
+ /**
810
+ * The configuration for the rate of the price currency to the invoicing currency.
811
+ */
812
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
813
+ /**
814
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
815
+ * price is billed.
816
+ */
817
+ currency?: string | null;
818
+ /**
819
+ * For dimensional price: specifies a price group and dimension values
820
+ */
821
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
822
+ /**
823
+ * An alias for the price.
824
+ */
825
+ external_price_id?: string | null;
826
+ /**
827
+ * If the Price represents a fixed cost, this represents the quantity of units
828
+ * applied.
829
+ */
830
+ fixed_price_quantity?: number | null;
831
+ /**
832
+ * The property used to group this price on an invoice
833
+ */
834
+ invoice_grouping_key?: string | null;
835
+ /**
836
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
837
+ * If unspecified, a single invoice is produced per billing cycle.
838
+ */
839
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
840
+ /**
841
+ * The ID of the license type to associate with this price.
842
+ */
843
+ license_type_id?: string | null;
844
+ /**
845
+ * User-specified key/value pairs for the resource. Individual keys can be removed
846
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
847
+ * by setting `metadata` to `null`.
848
+ */
849
+ metadata?: {
850
+ [key: string]: string | null;
851
+ } | null;
852
+ /**
853
+ * A transient ID that can be used to reference this price when adding adjustments
854
+ * in the same API call.
855
+ */
856
+ reference_id?: string | null;
857
+ }
858
+ namespace NewPlanGroupedWithMinMaxThresholdsPrice {
859
+ /**
860
+ * Configuration for grouped_with_min_max_thresholds pricing
861
+ */
862
+ interface GroupedWithMinMaxThresholdsConfig {
863
+ /**
864
+ * The event property used to group before applying thresholds
865
+ */
866
+ grouping_key: string;
867
+ /**
868
+ * The maximum amount to charge each group
869
+ */
870
+ maximum_charge: string;
871
+ /**
872
+ * The minimum amount to charge each group, regardless of usage
873
+ */
874
+ minimum_charge: string;
875
+ /**
876
+ * The base price charged per group
877
+ */
878
+ per_unit_rate: string;
879
+ }
880
+ }
881
+ interface NewPlanCumulativeGroupedAllocationPrice {
882
+ /**
883
+ * The cadence to bill for this price on.
884
+ */
885
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
886
+ /**
887
+ * Configuration for cumulative_grouped_allocation pricing
888
+ */
889
+ cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
890
+ /**
891
+ * The id of the item the price will be associated with.
892
+ */
893
+ item_id: string;
894
+ /**
895
+ * The pricing model type
896
+ */
897
+ model_type: 'cumulative_grouped_allocation';
898
+ /**
899
+ * The name of the price.
900
+ */
901
+ name: string;
902
+ /**
903
+ * The id of the billable metric for the price. Only needed if the price is
904
+ * usage-based.
905
+ */
906
+ billable_metric_id?: string | null;
907
+ /**
908
+ * If the Price represents a fixed cost, the price will be billed in-advance if
909
+ * this is true, and in-arrears if this is false.
910
+ */
911
+ billed_in_advance?: boolean | null;
912
+ /**
913
+ * For custom cadence: specifies the duration of the billing period in days or
914
+ * months.
915
+ */
916
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
917
+ /**
918
+ * The per unit conversion rate of the price currency to the invoicing currency.
919
+ */
920
+ conversion_rate?: number | null;
921
+ /**
922
+ * The configuration for the rate of the price currency to the invoicing currency.
923
+ */
924
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
925
+ /**
926
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
927
+ * price is billed.
928
+ */
929
+ currency?: string | null;
930
+ /**
931
+ * For dimensional price: specifies a price group and dimension values
932
+ */
933
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
934
+ /**
935
+ * An alias for the price.
936
+ */
937
+ external_price_id?: string | null;
938
+ /**
939
+ * If the Price represents a fixed cost, this represents the quantity of units
940
+ * applied.
941
+ */
942
+ fixed_price_quantity?: number | null;
943
+ /**
944
+ * The property used to group this price on an invoice
945
+ */
946
+ invoice_grouping_key?: string | null;
947
+ /**
948
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
949
+ * If unspecified, a single invoice is produced per billing cycle.
950
+ */
951
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
952
+ /**
953
+ * The ID of the license type to associate with this price.
954
+ */
955
+ license_type_id?: string | null;
956
+ /**
957
+ * User-specified key/value pairs for the resource. Individual keys can be removed
958
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
959
+ * by setting `metadata` to `null`.
960
+ */
961
+ metadata?: {
962
+ [key: string]: string | null;
963
+ } | null;
964
+ /**
965
+ * A transient ID that can be used to reference this price when adding adjustments
966
+ * in the same API call.
967
+ */
968
+ reference_id?: string | null;
969
+ }
970
+ namespace NewPlanCumulativeGroupedAllocationPrice {
971
+ /**
972
+ * Configuration for cumulative_grouped_allocation pricing
973
+ */
974
+ interface CumulativeGroupedAllocationConfig {
975
+ /**
976
+ * The overall allocation across all groups
977
+ */
978
+ cumulative_allocation: string;
979
+ /**
980
+ * The allocation per individual group
981
+ */
982
+ group_allocation: string;
983
+ /**
984
+ * The event property used to group usage before applying allocations
985
+ */
986
+ grouping_key: string;
987
+ /**
988
+ * The amount to charge for each unit outside of the allocation
989
+ */
990
+ unit_amount: string;
991
+ }
992
+ }
993
+ interface NewPlanDailyCreditAllowancePrice {
994
+ /**
995
+ * The cadence to bill for this price on.
996
+ */
997
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
998
+ /**
999
+ * Configuration for daily_credit_allowance pricing
1000
+ */
1001
+ daily_credit_allowance_config: NewPlanDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
1002
+ /**
1003
+ * The id of the item the price will be associated with.
1004
+ */
1005
+ item_id: string;
1006
+ /**
1007
+ * The pricing model type
1008
+ */
1009
+ model_type: 'daily_credit_allowance';
1010
+ /**
1011
+ * The name of the price.
1012
+ */
1013
+ name: string;
1014
+ /**
1015
+ * The id of the billable metric for the price. Only needed if the price is
1016
+ * usage-based.
1017
+ */
1018
+ billable_metric_id?: string | null;
1019
+ /**
1020
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1021
+ * this is true, and in-arrears if this is false.
1022
+ */
1023
+ billed_in_advance?: boolean | null;
1024
+ /**
1025
+ * For custom cadence: specifies the duration of the billing period in days or
1026
+ * months.
1027
+ */
1028
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1029
+ /**
1030
+ * The per unit conversion rate of the price currency to the invoicing currency.
1031
+ */
1032
+ conversion_rate?: number | null;
1033
+ /**
1034
+ * The configuration for the rate of the price currency to the invoicing currency.
1035
+ */
1036
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1037
+ /**
1038
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1039
+ * price is billed.
1040
+ */
1041
+ currency?: string | null;
1042
+ /**
1043
+ * For dimensional price: specifies a price group and dimension values
1044
+ */
1045
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1046
+ /**
1047
+ * An alias for the price.
1048
+ */
1049
+ external_price_id?: string | null;
1050
+ /**
1051
+ * If the Price represents a fixed cost, this represents the quantity of units
1052
+ * applied.
1053
+ */
1054
+ fixed_price_quantity?: number | null;
1055
+ /**
1056
+ * The property used to group this price on an invoice
1057
+ */
1058
+ invoice_grouping_key?: string | null;
1059
+ /**
1060
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1061
+ * If unspecified, a single invoice is produced per billing cycle.
1062
+ */
1063
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1064
+ /**
1065
+ * The ID of the license type to associate with this price.
1066
+ */
1067
+ license_type_id?: string | null;
1068
+ /**
1069
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1070
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1071
+ * by setting `metadata` to `null`.
1072
+ */
1073
+ metadata?: {
1074
+ [key: string]: string | null;
1075
+ } | null;
1076
+ /**
1077
+ * A transient ID that can be used to reference this price when adding adjustments
1078
+ * in the same API call.
1079
+ */
1080
+ reference_id?: string | null;
1081
+ }
1082
+ namespace NewPlanDailyCreditAllowancePrice {
1083
+ /**
1084
+ * Configuration for daily_credit_allowance pricing
1085
+ */
1086
+ interface DailyCreditAllowanceConfig {
1087
+ /**
1088
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
1089
+ */
1090
+ daily_allowance: string;
1091
+ /**
1092
+ * Default per-unit credit rate for any usage not bucketed into a specified
1093
+ * matrix_value
1094
+ */
1095
+ default_unit_amount: string;
1096
+ /**
1097
+ * One or two event property values to evaluate matrix groups by
1098
+ */
1099
+ dimensions: Array<string | null>;
1100
+ /**
1101
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
1102
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
1103
+ * resets per distinct value of this property.
1104
+ */
1105
+ event_day_property: string;
1106
+ /**
1107
+ * Per-dimension credit rates
1108
+ */
1109
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
1110
+ }
1111
+ namespace DailyCreditAllowanceConfig {
1112
+ /**
1113
+ * Per-dimension credit price for the daily credit allowance model.
1114
+ */
1115
+ interface MatrixValue {
1116
+ /**
1117
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
1118
+ * could be used to apply a different credit rate to each AI model.
1119
+ */
1120
+ dimension_values: Array<string | null>;
1121
+ /**
1122
+ * Credits charged per unit of usage matching the specified dimension_values
1123
+ */
1124
+ unit_amount: string;
1125
+ }
1126
+ }
1127
+ }
1128
+ interface NewPlanMeteredAllowancePrice {
1129
+ /**
1130
+ * The cadence to bill for this price on.
1131
+ */
1132
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1133
+ /**
1134
+ * The id of the item the price will be associated with.
1135
+ */
1136
+ item_id: string;
1137
+ /**
1138
+ * Configuration for metered_allowance pricing
1139
+ */
1140
+ metered_allowance_config: NewPlanMeteredAllowancePrice.MeteredAllowanceConfig;
1141
+ /**
1142
+ * The pricing model type
1143
+ */
1144
+ model_type: 'metered_allowance';
1145
+ /**
1146
+ * The name of the price.
1147
+ */
1148
+ name: string;
1149
+ /**
1150
+ * The id of the billable metric for the price. Only needed if the price is
1151
+ * usage-based.
1152
+ */
1153
+ billable_metric_id?: string | null;
1154
+ /**
1155
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1156
+ * this is true, and in-arrears if this is false.
1157
+ */
1158
+ billed_in_advance?: boolean | null;
1159
+ /**
1160
+ * For custom cadence: specifies the duration of the billing period in days or
1161
+ * months.
1162
+ */
1163
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1164
+ /**
1165
+ * The per unit conversion rate of the price currency to the invoicing currency.
1166
+ */
1167
+ conversion_rate?: number | null;
1168
+ /**
1169
+ * The configuration for the rate of the price currency to the invoicing currency.
1170
+ */
1171
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1172
+ /**
1173
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1174
+ * price is billed.
1175
+ */
1176
+ currency?: string | null;
1177
+ /**
1178
+ * For dimensional price: specifies a price group and dimension values
1179
+ */
1180
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1181
+ /**
1182
+ * An alias for the price.
1183
+ */
1184
+ external_price_id?: string | null;
1185
+ /**
1186
+ * If the Price represents a fixed cost, this represents the quantity of units
1187
+ * applied.
1188
+ */
1189
+ fixed_price_quantity?: number | null;
1190
+ /**
1191
+ * The property used to group this price on an invoice
1192
+ */
1193
+ invoice_grouping_key?: string | null;
1194
+ /**
1195
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1196
+ * If unspecified, a single invoice is produced per billing cycle.
1197
+ */
1198
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1199
+ /**
1200
+ * The ID of the license type to associate with this price.
1201
+ */
1202
+ license_type_id?: string | null;
1203
+ /**
1204
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1205
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1206
+ * by setting `metadata` to `null`.
1207
+ */
1208
+ metadata?: {
1209
+ [key: string]: string | null;
1210
+ } | null;
1211
+ /**
1212
+ * A transient ID that can be used to reference this price when adding adjustments
1213
+ * in the same API call.
1214
+ */
1215
+ reference_id?: string | null;
1216
+ }
1217
+ namespace NewPlanMeteredAllowancePrice {
1218
+ /**
1219
+ * Configuration for metered_allowance pricing
1220
+ */
1221
+ interface MeteredAllowanceConfig {
1222
+ /**
1223
+ * The grouping_key value whose summed quantity represents the allowance for this
1224
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
1225
+ * — credit can never exceed actual usage.
1226
+ */
1227
+ allowance_grouping_value: string;
1228
+ /**
1229
+ * The grouping_key value whose summed quantity represents consumption (e.g.
1230
+ * 'download'). Charged at unit_amount.
1231
+ */
1232
+ consumption_grouping_value: string;
1233
+ /**
1234
+ * Event property used to partition the metric into consumption and allowance
1235
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
1236
+ * values below select which partition is which.
1237
+ */
1238
+ grouping_key: string;
1239
+ /**
1240
+ * Per-unit price applied to gross consumption and to the allowance credit.
1241
+ */
1242
+ unit_amount: string;
1243
+ /**
1244
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1245
+ */
1246
+ allowance_display_name?: string;
1247
+ /**
1248
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1249
+ */
1250
+ consumption_display_name?: string;
1251
+ }
1252
+ }
1253
+ interface NewPlanPercentCompositePrice {
1254
+ /**
1255
+ * The cadence to bill for this price on.
1256
+ */
1257
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1258
+ /**
1259
+ * The id of the item the price will be associated with.
1260
+ */
1261
+ item_id: string;
1262
+ /**
1263
+ * The pricing model type
1264
+ */
1265
+ model_type: 'percent';
1266
+ /**
1267
+ * The name of the price.
1268
+ */
1269
+ name: string;
1270
+ /**
1271
+ * Configuration for percent pricing
1272
+ */
1273
+ percent_config: NewPlanPercentCompositePrice.PercentConfig;
1274
+ /**
1275
+ * The id of the billable metric for the price. Only needed if the price is
1276
+ * usage-based.
1277
+ */
1278
+ billable_metric_id?: string | null;
1279
+ /**
1280
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1281
+ * this is true, and in-arrears if this is false.
1282
+ */
1283
+ billed_in_advance?: boolean | null;
1284
+ /**
1285
+ * For custom cadence: specifies the duration of the billing period in days or
1286
+ * months.
1287
+ */
1288
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1289
+ /**
1290
+ * The per unit conversion rate of the price currency to the invoicing currency.
1291
+ */
1292
+ conversion_rate?: number | null;
1293
+ /**
1294
+ * The configuration for the rate of the price currency to the invoicing currency.
1295
+ */
1296
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1297
+ /**
1298
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1299
+ * price is billed.
1300
+ */
1301
+ currency?: string | null;
1302
+ /**
1303
+ * For dimensional price: specifies a price group and dimension values
1304
+ */
1305
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1306
+ /**
1307
+ * An alias for the price.
1308
+ */
1309
+ external_price_id?: string | null;
1310
+ /**
1311
+ * If the Price represents a fixed cost, this represents the quantity of units
1312
+ * applied.
1313
+ */
1314
+ fixed_price_quantity?: number | null;
1315
+ /**
1316
+ * The property used to group this price on an invoice
1317
+ */
1318
+ invoice_grouping_key?: string | null;
1319
+ /**
1320
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1321
+ * If unspecified, a single invoice is produced per billing cycle.
1322
+ */
1323
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1324
+ /**
1325
+ * The ID of the license type to associate with this price.
1326
+ */
1327
+ license_type_id?: string | null;
1328
+ /**
1329
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1330
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1331
+ * by setting `metadata` to `null`.
1332
+ */
1333
+ metadata?: {
1334
+ [key: string]: string | null;
1335
+ } | null;
1336
+ /**
1337
+ * A transient ID that can be used to reference this price when adding adjustments
1338
+ * in the same API call.
1339
+ */
1340
+ reference_id?: string | null;
1341
+ }
1342
+ namespace NewPlanPercentCompositePrice {
1343
+ /**
1344
+ * Configuration for percent pricing
1345
+ */
1346
+ interface PercentConfig {
1347
+ /**
1348
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
1349
+ */
1350
+ percent: number;
1351
+ /**
1352
+ * Maximum amount to charge. If unset, the fee has no upper bound.
1353
+ */
1354
+ maximum_amount?: string | null;
1355
+ /**
1356
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
1357
+ */
1358
+ minimum_amount?: string | null;
1359
+ /**
1360
+ * If true, the minimum_amount is prorated based on the service period. The
1361
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
1362
+ * upstream subtotals is never prorated either.
1363
+ */
1364
+ prorated?: boolean;
1365
+ }
1366
+ }
1367
+ interface NewPlanEventOutputPrice {
1368
+ /**
1369
+ * The cadence to bill for this price on.
1370
+ */
1371
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1372
+ /**
1373
+ * Configuration for event_output pricing
1374
+ */
1375
+ event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
1376
+ /**
1377
+ * The id of the item the price will be associated with.
1378
+ */
1379
+ item_id: string;
1380
+ /**
1381
+ * The pricing model type
1382
+ */
1383
+ model_type: 'event_output';
1384
+ /**
1385
+ * The name of the price.
1386
+ */
1387
+ name: string;
1388
+ /**
1389
+ * The id of the billable metric for the price. Only needed if the price is
1390
+ * usage-based.
1391
+ */
1392
+ billable_metric_id?: string | null;
1393
+ /**
1394
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1395
+ * this is true, and in-arrears if this is false.
1396
+ */
1397
+ billed_in_advance?: boolean | null;
1398
+ /**
1399
+ * For custom cadence: specifies the duration of the billing period in days or
1400
+ * months.
1401
+ */
1402
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1403
+ /**
1404
+ * The per unit conversion rate of the price currency to the invoicing currency.
1405
+ */
1406
+ conversion_rate?: number | null;
1407
+ /**
1408
+ * The configuration for the rate of the price currency to the invoicing currency.
1409
+ */
1410
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1411
+ /**
1412
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1413
+ * price is billed.
1414
+ */
1415
+ currency?: string | null;
1416
+ /**
1417
+ * For dimensional price: specifies a price group and dimension values
1418
+ */
1419
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1420
+ /**
1421
+ * An alias for the price.
1422
+ */
1423
+ external_price_id?: string | null;
1424
+ /**
1425
+ * If the Price represents a fixed cost, this represents the quantity of units
1426
+ * applied.
1427
+ */
1428
+ fixed_price_quantity?: number | null;
1429
+ /**
1430
+ * The property used to group this price on an invoice
1431
+ */
1432
+ invoice_grouping_key?: string | null;
1433
+ /**
1434
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1435
+ * If unspecified, a single invoice is produced per billing cycle.
1436
+ */
1437
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1438
+ /**
1439
+ * The ID of the license type to associate with this price.
1440
+ */
1441
+ license_type_id?: string | null;
1442
+ /**
1443
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1444
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1445
+ * by setting `metadata` to `null`.
1446
+ */
1447
+ metadata?: {
1448
+ [key: string]: string | null;
1449
+ } | null;
1450
+ /**
1451
+ * A transient ID that can be used to reference this price when adding adjustments
1452
+ * in the same API call.
1453
+ */
1454
+ reference_id?: string | null;
1455
+ }
1456
+ namespace NewPlanEventOutputPrice {
1457
+ /**
1458
+ * Configuration for event_output pricing
1459
+ */
1460
+ interface EventOutputConfig {
1461
+ /**
1462
+ * The key in the event data to extract the unit rate from.
1463
+ */
1464
+ unit_rating_key: string;
1465
+ /**
1466
+ * If provided, this amount will be used as the unit rate when an event does not
1467
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
1468
+ * rate will be ignored.
1469
+ */
1470
+ default_unit_rate?: string | null;
1471
+ /**
1472
+ * An optional key in the event data to group by (e.g., event ID). All events will
1473
+ * also be grouped by their unit rate.
1474
+ */
1475
+ grouping_key?: string | null;
1476
+ }
1477
+ }
1478
+ }
1479
+ interface RemoveAdjustment {
1480
+ /**
1481
+ * The id of the adjustment to remove from on the plan.
1482
+ */
1483
+ adjustment_id: string;
1484
+ /**
1485
+ * The phase to remove this adjustment from.
1486
+ */
1487
+ plan_phase_order?: number | null;
1488
+ }
1489
+ interface RemovePrice {
1490
+ /**
1491
+ * The id of the price to remove from the plan.
1492
+ */
1493
+ price_id: string;
1494
+ /**
1495
+ * The phase to remove this price from.
1496
+ */
1497
+ plan_phase_order?: number | null;
1498
+ }
1499
+ interface ReplaceAdjustment {
1500
+ /**
1501
+ * The definition of a new adjustment to create and add to the plan.
1502
+ */
1503
+ adjustment: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum | ReplaceAdjustment.NewTieredPercentageDiscount;
1504
+ /**
1505
+ * The id of the adjustment on the plan to replace in the plan.
1506
+ */
1507
+ replaces_adjustment_id: string;
1508
+ /**
1509
+ * The phase to replace this adjustment from.
1510
+ */
1511
+ plan_phase_order?: number | null;
1512
+ }
1513
+ namespace ReplaceAdjustment {
1514
+ interface NewTieredPercentageDiscount {
1515
+ adjustment_type: 'tiered_percentage_discount';
1516
+ tiers: Array<NewTieredPercentageDiscount.Tier>;
1517
+ /**
1518
+ * If set, the adjustment will apply to every price on the subscription.
1519
+ */
1520
+ applies_to_all?: true | null;
1521
+ /**
1522
+ * The set of item IDs to which this adjustment applies.
1523
+ */
1524
+ applies_to_item_ids?: Array<string> | null;
1525
+ /**
1526
+ * The set of price IDs to which this adjustment applies.
1527
+ */
1528
+ applies_to_price_ids?: Array<string> | null;
1529
+ /**
1530
+ * If set, only prices in the specified currency will have the adjustment applied.
1531
+ */
1532
+ currency?: string | null;
1533
+ /**
1534
+ * A list of filters that determine which prices this adjustment will apply to.
1535
+ */
1536
+ filters?: Array<NewTieredPercentageDiscount.Filter> | null;
1537
+ /**
1538
+ * When false, this adjustment will be applied to a single price. Otherwise, it
1539
+ * will be applied at the invoice level, possibly to multiple prices.
1540
+ */
1541
+ is_invoice_level?: boolean;
1542
+ /**
1543
+ * If set, only prices of the specified type will have the adjustment applied.
1544
+ */
1545
+ price_type?: 'usage' | 'fixed_in_advance' | 'fixed_in_arrears' | 'fixed' | 'in_arrears' | null;
1546
+ }
1547
+ namespace NewTieredPercentageDiscount {
1548
+ interface Tier {
1549
+ /**
1550
+ * Exclusive lower bound of cumulative spend for this tier.
1551
+ */
1552
+ lower_bound: number;
1553
+ /**
1554
+ * The percentage (0-1) discounted from spend in this tier.
1555
+ */
1556
+ percentage: number;
1557
+ /**
1558
+ * Inclusive upper bound of cumulative spend; null for the final open-ended tier.
1559
+ */
1560
+ upper_bound?: number | null;
1561
+ }
1562
+ interface Filter {
1563
+ /**
1564
+ * The property of the price to filter on.
1565
+ */
1566
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
1567
+ /**
1568
+ * Should prices that match the filter be included or excluded.
1569
+ */
1570
+ operator: 'includes' | 'excludes';
1571
+ /**
1572
+ * The IDs or values that match this filter.
1573
+ */
1574
+ values: Array<string>;
1575
+ }
1576
+ }
1577
+ }
1578
+ interface ReplacePrice {
1579
+ /**
1580
+ * The id of the price on the plan to replace in the plan.
1581
+ */
1582
+ replaces_price_id: string;
1583
+ /**
1584
+ * The allocation price to add to the plan.
1585
+ */
1586
+ allocation_price?: Shared.NewAllocationPrice | null;
1587
+ /**
1588
+ * The license allocation price to add to the plan.
1589
+ */
1590
+ license_allocation_price?: ReplacePrice.LicenseAllocationPrice | null;
1591
+ /**
1592
+ * The phase to replace this price from.
1593
+ */
1594
+ plan_phase_order?: number | null;
1595
+ /**
1596
+ * New plan price request body params.
1597
+ */
1598
+ price?: Shared.NewPlanUnitPrice | Shared.NewPlanTieredPrice | Shared.NewPlanBulkPrice | ReplacePrice.NewPlanBulkWithFiltersPrice | Shared.NewPlanPackagePrice | Shared.NewPlanMatrixPrice | Shared.NewPlanThresholdTotalAmountPrice | Shared.NewPlanTieredPackagePrice | Shared.NewPlanTieredWithMinimumPrice | Shared.NewPlanGroupedTieredPrice | Shared.NewPlanTieredPackageWithMinimumPrice | Shared.NewPlanPackageWithAllocationPrice | Shared.NewPlanUnitWithPercentPrice | Shared.NewPlanMatrixWithAllocationPrice | ReplacePrice.NewPlanMatrixWithThresholdDiscountsPrice | ReplacePrice.NewPlanTieredWithProrationPrice | Shared.NewPlanUnitWithProrationPrice | Shared.NewPlanGroupedAllocationPrice | Shared.NewPlanBulkWithProrationPrice | Shared.NewPlanGroupedWithProratedMinimumPrice | Shared.NewPlanGroupedWithMeteredMinimumPrice | ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice | Shared.NewPlanMatrixWithDisplayNamePrice | Shared.NewPlanGroupedTieredPackagePrice | Shared.NewPlanMaxGroupTieredPackagePrice | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice | ReplacePrice.NewPlanDailyCreditAllowancePrice | ReplacePrice.NewPlanMeteredAllowancePrice | Shared.NewPlanMinimumCompositePrice | ReplacePrice.NewPlanPercentCompositePrice | ReplacePrice.NewPlanEventOutputPrice | null;
1599
+ }
1600
+ namespace ReplacePrice {
1601
+ /**
1602
+ * The license allocation price to add to the plan.
1603
+ */
1604
+ interface LicenseAllocationPrice {
1605
+ /**
1606
+ * The cadence to bill for this price on.
1607
+ */
1608
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1609
+ /**
1610
+ * The id of the item the price will be associated with.
1611
+ */
1612
+ item_id: string;
1613
+ /**
1614
+ * License allocations to associate with this price. Each entry defines a
1615
+ * per-license credit pool granted each cadence. Requires license_type_id or
1616
+ * license_type_configuration to be set.
1617
+ */
1618
+ license_allocations: Array<LicenseAllocationPrice.LicenseAllocation>;
1619
+ /**
1620
+ * The pricing model type
1621
+ */
1622
+ model_type: 'unit';
1623
+ /**
1624
+ * The name of the price.
1625
+ */
1626
+ name: string;
1627
+ /**
1628
+ * Configuration for unit pricing
1629
+ */
1630
+ unit_config: Shared.UnitConfig;
1631
+ /**
1632
+ * The id of the billable metric for the price. Only needed if the price is
1633
+ * usage-based.
1634
+ */
1635
+ billable_metric_id?: string | null;
1636
+ /**
1637
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1638
+ * this is true, and in-arrears if this is false.
1639
+ */
1640
+ billed_in_advance?: boolean | null;
1641
+ /**
1642
+ * For custom cadence: specifies the duration of the billing period in days or
1643
+ * months.
1644
+ */
1645
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1646
+ /**
1647
+ * The per unit conversion rate of the price currency to the invoicing currency.
1648
+ */
1649
+ conversion_rate?: number | null;
1650
+ /**
1651
+ * The configuration for the rate of the price currency to the invoicing currency.
1652
+ */
1653
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1654
+ /**
1655
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1656
+ * price is billed.
1657
+ */
1658
+ currency?: string | null;
1659
+ /**
1660
+ * For dimensional price: specifies a price group and dimension values
1661
+ */
1662
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1663
+ /**
1664
+ * An alias for the price.
1665
+ */
1666
+ external_price_id?: string | null;
1667
+ /**
1668
+ * If the Price represents a fixed cost, this represents the quantity of units
1669
+ * applied.
1670
+ */
1671
+ fixed_price_quantity?: number | null;
1672
+ /**
1673
+ * The property used to group this price on an invoice
1674
+ */
1675
+ invoice_grouping_key?: string | null;
1676
+ /**
1677
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1678
+ * If unspecified, a single invoice is produced per billing cycle.
1679
+ */
1680
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1681
+ /**
1682
+ * The ID of the license type to associate with this price.
1683
+ */
1684
+ license_type_id?: string | null;
1685
+ /**
1686
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1687
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1688
+ * by setting `metadata` to `null`.
1689
+ */
1690
+ metadata?: {
1691
+ [key: string]: string | null;
1692
+ } | null;
1693
+ /**
1694
+ * A transient ID that can be used to reference this price when adding adjustments
1695
+ * in the same API call.
1696
+ */
1697
+ reference_id?: string | null;
1698
+ }
1699
+ namespace LicenseAllocationPrice {
1700
+ interface LicenseAllocation {
1701
+ /**
1702
+ * The amount of credits granted per active license per cadence.
1703
+ */
1704
+ amount: string;
1705
+ /**
1706
+ * The currency of the license allocation.
1707
+ */
1708
+ currency: string;
1709
+ /**
1710
+ * When True, overage beyond the allocation is written off.
1711
+ */
1712
+ write_off_overage?: boolean | null;
1713
+ }
1714
+ }
1715
+ interface NewPlanBulkWithFiltersPrice {
1716
+ /**
1717
+ * Configuration for bulk_with_filters pricing
1718
+ */
1719
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
1720
+ /**
1721
+ * The cadence to bill for this price on.
1722
+ */
1723
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1724
+ /**
1725
+ * The id of the item the price will be associated with.
1726
+ */
1727
+ item_id: string;
1728
+ /**
1729
+ * The pricing model type
1730
+ */
1731
+ model_type: 'bulk_with_filters';
1732
+ /**
1733
+ * The name of the price.
1734
+ */
1735
+ name: string;
1736
+ /**
1737
+ * The id of the billable metric for the price. Only needed if the price is
1738
+ * usage-based.
1739
+ */
1740
+ billable_metric_id?: string | null;
1741
+ /**
1742
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1743
+ * this is true, and in-arrears if this is false.
1744
+ */
1745
+ billed_in_advance?: boolean | null;
1746
+ /**
1747
+ * For custom cadence: specifies the duration of the billing period in days or
1748
+ * months.
1749
+ */
1750
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1751
+ /**
1752
+ * The per unit conversion rate of the price currency to the invoicing currency.
1753
+ */
1754
+ conversion_rate?: number | null;
1755
+ /**
1756
+ * The configuration for the rate of the price currency to the invoicing currency.
1757
+ */
1758
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1759
+ /**
1760
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1761
+ * price is billed.
1762
+ */
1763
+ currency?: string | null;
1764
+ /**
1765
+ * For dimensional price: specifies a price group and dimension values
1766
+ */
1767
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1768
+ /**
1769
+ * An alias for the price.
1770
+ */
1771
+ external_price_id?: string | null;
1772
+ /**
1773
+ * If the Price represents a fixed cost, this represents the quantity of units
1774
+ * applied.
1775
+ */
1776
+ fixed_price_quantity?: number | null;
1777
+ /**
1778
+ * The property used to group this price on an invoice
1779
+ */
1780
+ invoice_grouping_key?: string | null;
1781
+ /**
1782
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1783
+ * If unspecified, a single invoice is produced per billing cycle.
1784
+ */
1785
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1786
+ /**
1787
+ * The ID of the license type to associate with this price.
1788
+ */
1789
+ license_type_id?: string | null;
1790
+ /**
1791
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1792
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1793
+ * by setting `metadata` to `null`.
1794
+ */
1795
+ metadata?: {
1796
+ [key: string]: string | null;
1797
+ } | null;
1798
+ /**
1799
+ * A transient ID that can be used to reference this price when adding adjustments
1800
+ * in the same API call.
1801
+ */
1802
+ reference_id?: string | null;
1803
+ }
1804
+ namespace NewPlanBulkWithFiltersPrice {
1805
+ /**
1806
+ * Configuration for bulk_with_filters pricing
1807
+ */
1808
+ interface BulkWithFiltersConfig {
1809
+ /**
1810
+ * Property filters to apply (all must match)
1811
+ */
1812
+ filters: Array<BulkWithFiltersConfig.Filter>;
1813
+ /**
1814
+ * Bulk tiers for rating based on total usage volume
1815
+ */
1816
+ tiers: Array<BulkWithFiltersConfig.Tier>;
1817
+ }
1818
+ namespace BulkWithFiltersConfig {
1819
+ /**
1820
+ * Configuration for a single property filter
1821
+ */
1822
+ interface Filter {
1823
+ /**
1824
+ * Event property key to filter on
1825
+ */
1826
+ property_key: string;
1827
+ /**
1828
+ * Event property value to match
1829
+ */
1830
+ property_value: string;
1831
+ }
1832
+ /**
1833
+ * Configuration for a single bulk pricing tier
1834
+ */
1835
+ interface Tier {
1836
+ /**
1837
+ * Amount per unit
1838
+ */
1839
+ unit_amount: string;
1840
+ /**
1841
+ * The lower bound for this tier
1842
+ */
1843
+ tier_lower_bound?: string | null;
1844
+ }
1845
+ }
1846
+ }
1847
+ interface NewPlanMatrixWithThresholdDiscountsPrice {
1848
+ /**
1849
+ * The cadence to bill for this price on.
1850
+ */
1851
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1852
+ /**
1853
+ * The id of the item the price will be associated with.
1854
+ */
1855
+ item_id: string;
1856
+ /**
1857
+ * Configuration for matrix_with_threshold_discounts pricing
1858
+ */
1859
+ matrix_with_threshold_discounts_config: NewPlanMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
1860
+ /**
1861
+ * The pricing model type
1862
+ */
1863
+ model_type: 'matrix_with_threshold_discounts';
1864
+ /**
1865
+ * The name of the price.
1866
+ */
1867
+ name: string;
1868
+ /**
1869
+ * The id of the billable metric for the price. Only needed if the price is
1870
+ * usage-based.
1871
+ */
1872
+ billable_metric_id?: string | null;
1873
+ /**
1874
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1875
+ * this is true, and in-arrears if this is false.
1876
+ */
1877
+ billed_in_advance?: boolean | null;
1878
+ /**
1879
+ * For custom cadence: specifies the duration of the billing period in days or
1880
+ * months.
1881
+ */
1882
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1883
+ /**
1884
+ * The per unit conversion rate of the price currency to the invoicing currency.
1885
+ */
1886
+ conversion_rate?: number | null;
1887
+ /**
1888
+ * The configuration for the rate of the price currency to the invoicing currency.
1889
+ */
1890
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1891
+ /**
1892
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1893
+ * price is billed.
1894
+ */
1895
+ currency?: string | null;
1896
+ /**
1897
+ * For dimensional price: specifies a price group and dimension values
1898
+ */
1899
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1900
+ /**
1901
+ * An alias for the price.
1902
+ */
1903
+ external_price_id?: string | null;
1904
+ /**
1905
+ * If the Price represents a fixed cost, this represents the quantity of units
1906
+ * applied.
1907
+ */
1908
+ fixed_price_quantity?: number | null;
1909
+ /**
1910
+ * The property used to group this price on an invoice
1911
+ */
1912
+ invoice_grouping_key?: string | null;
1913
+ /**
1914
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1915
+ * If unspecified, a single invoice is produced per billing cycle.
1916
+ */
1917
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1918
+ /**
1919
+ * The ID of the license type to associate with this price.
1920
+ */
1921
+ license_type_id?: string | null;
1922
+ /**
1923
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1924
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1925
+ * by setting `metadata` to `null`.
1926
+ */
1927
+ metadata?: {
1928
+ [key: string]: string | null;
1929
+ } | null;
1930
+ /**
1931
+ * A transient ID that can be used to reference this price when adding adjustments
1932
+ * in the same API call.
1933
+ */
1934
+ reference_id?: string | null;
1935
+ }
1936
+ namespace NewPlanMatrixWithThresholdDiscountsPrice {
1937
+ /**
1938
+ * Configuration for matrix_with_threshold_discounts pricing
1939
+ */
1940
+ interface MatrixWithThresholdDiscountsConfig {
1941
+ /**
1942
+ * Unit price used for usage that does not match any defined matrix cell.
1943
+ */
1944
+ default_unit_amount: string;
1945
+ /**
1946
+ * First matrix dimension key.
1947
+ */
1948
+ first_dimension: string;
1949
+ /**
1950
+ * Per-cell unit prices.
1951
+ */
1952
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
1953
+ /**
1954
+ * Optional second matrix dimension key.
1955
+ */
1956
+ second_dimension?: string | null;
1957
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
1958
+ }
1959
+ namespace MatrixWithThresholdDiscountsConfig {
1960
+ interface MatrixValue {
1961
+ first_dimension_value: string;
1962
+ unit_amount: string;
1963
+ second_dimension_value?: string | null;
1964
+ }
1965
+ interface ThresholdDiscountGroup {
1966
+ /**
1967
+ * Discount rate applied to spend above the threshold.
1968
+ */
1969
+ above_threshold_discount_percentage: string;
1970
+ /**
1971
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
1972
+ * baseline discount.
1973
+ */
1974
+ below_threshold_discount_percentage: string;
1975
+ /**
1976
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1977
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
1978
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
1979
+ */
1980
+ cell_coordinates: string;
1981
+ threshold_amount: string;
1982
+ description?: string | null;
1983
+ }
1984
+ }
1985
+ }
1986
+ interface NewPlanTieredWithProrationPrice {
1987
+ /**
1988
+ * The cadence to bill for this price on.
1989
+ */
1990
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1991
+ /**
1992
+ * The id of the item the price will be associated with.
1993
+ */
1994
+ item_id: string;
1995
+ /**
1996
+ * The pricing model type
1997
+ */
1998
+ model_type: 'tiered_with_proration';
1999
+ /**
2000
+ * The name of the price.
2001
+ */
2002
+ name: string;
2003
+ /**
2004
+ * Configuration for tiered_with_proration pricing
2005
+ */
2006
+ tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
2007
+ /**
2008
+ * The id of the billable metric for the price. Only needed if the price is
2009
+ * usage-based.
2010
+ */
2011
+ billable_metric_id?: string | null;
2012
+ /**
2013
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2014
+ * this is true, and in-arrears if this is false.
2015
+ */
2016
+ billed_in_advance?: boolean | null;
2017
+ /**
2018
+ * For custom cadence: specifies the duration of the billing period in days or
2019
+ * months.
2020
+ */
2021
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2022
+ /**
2023
+ * The per unit conversion rate of the price currency to the invoicing currency.
2024
+ */
2025
+ conversion_rate?: number | null;
2026
+ /**
2027
+ * The configuration for the rate of the price currency to the invoicing currency.
2028
+ */
2029
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2030
+ /**
2031
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2032
+ * price is billed.
2033
+ */
2034
+ currency?: string | null;
2035
+ /**
2036
+ * For dimensional price: specifies a price group and dimension values
2037
+ */
2038
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2039
+ /**
2040
+ * An alias for the price.
2041
+ */
2042
+ external_price_id?: string | null;
2043
+ /**
2044
+ * If the Price represents a fixed cost, this represents the quantity of units
2045
+ * applied.
2046
+ */
2047
+ fixed_price_quantity?: number | null;
2048
+ /**
2049
+ * The property used to group this price on an invoice
2050
+ */
2051
+ invoice_grouping_key?: string | null;
2052
+ /**
2053
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2054
+ * If unspecified, a single invoice is produced per billing cycle.
2055
+ */
2056
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2057
+ /**
2058
+ * The ID of the license type to associate with this price.
2059
+ */
2060
+ license_type_id?: string | null;
2061
+ /**
2062
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2063
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2064
+ * by setting `metadata` to `null`.
2065
+ */
2066
+ metadata?: {
2067
+ [key: string]: string | null;
2068
+ } | null;
2069
+ /**
2070
+ * A transient ID that can be used to reference this price when adding adjustments
2071
+ * in the same API call.
2072
+ */
2073
+ reference_id?: string | null;
2074
+ }
2075
+ namespace NewPlanTieredWithProrationPrice {
2076
+ /**
2077
+ * Configuration for tiered_with_proration pricing
2078
+ */
2079
+ interface TieredWithProrationConfig {
2080
+ /**
2081
+ * Tiers for rating based on total usage quantities into the specified tier with
2082
+ * proration
2083
+ */
2084
+ tiers: Array<TieredWithProrationConfig.Tier>;
2085
+ }
2086
+ namespace TieredWithProrationConfig {
2087
+ /**
2088
+ * Configuration for a single tiered with proration tier
2089
+ */
2090
+ interface Tier {
2091
+ /**
2092
+ * Inclusive tier starting value
2093
+ */
2094
+ tier_lower_bound: string;
2095
+ /**
2096
+ * Amount per unit
2097
+ */
2098
+ unit_amount: string;
2099
+ }
2100
+ }
2101
+ }
2102
+ interface NewPlanGroupedWithMinMaxThresholdsPrice {
2103
+ /**
2104
+ * The cadence to bill for this price on.
2105
+ */
2106
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2107
+ /**
2108
+ * Configuration for grouped_with_min_max_thresholds pricing
2109
+ */
2110
+ grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2111
+ /**
2112
+ * The id of the item the price will be associated with.
2113
+ */
2114
+ item_id: string;
2115
+ /**
2116
+ * The pricing model type
2117
+ */
2118
+ model_type: 'grouped_with_min_max_thresholds';
2119
+ /**
2120
+ * The name of the price.
2121
+ */
2122
+ name: string;
2123
+ /**
2124
+ * The id of the billable metric for the price. Only needed if the price is
2125
+ * usage-based.
2126
+ */
2127
+ billable_metric_id?: string | null;
2128
+ /**
2129
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2130
+ * this is true, and in-arrears if this is false.
2131
+ */
2132
+ billed_in_advance?: boolean | null;
2133
+ /**
2134
+ * For custom cadence: specifies the duration of the billing period in days or
2135
+ * months.
2136
+ */
2137
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2138
+ /**
2139
+ * The per unit conversion rate of the price currency to the invoicing currency.
2140
+ */
2141
+ conversion_rate?: number | null;
2142
+ /**
2143
+ * The configuration for the rate of the price currency to the invoicing currency.
2144
+ */
2145
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2146
+ /**
2147
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2148
+ * price is billed.
2149
+ */
2150
+ currency?: string | null;
2151
+ /**
2152
+ * For dimensional price: specifies a price group and dimension values
2153
+ */
2154
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2155
+ /**
2156
+ * An alias for the price.
2157
+ */
2158
+ external_price_id?: string | null;
2159
+ /**
2160
+ * If the Price represents a fixed cost, this represents the quantity of units
2161
+ * applied.
2162
+ */
2163
+ fixed_price_quantity?: number | null;
2164
+ /**
2165
+ * The property used to group this price on an invoice
2166
+ */
2167
+ invoice_grouping_key?: string | null;
2168
+ /**
2169
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2170
+ * If unspecified, a single invoice is produced per billing cycle.
2171
+ */
2172
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2173
+ /**
2174
+ * The ID of the license type to associate with this price.
2175
+ */
2176
+ license_type_id?: string | null;
2177
+ /**
2178
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2179
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2180
+ * by setting `metadata` to `null`.
2181
+ */
2182
+ metadata?: {
2183
+ [key: string]: string | null;
2184
+ } | null;
2185
+ /**
2186
+ * A transient ID that can be used to reference this price when adding adjustments
2187
+ * in the same API call.
2188
+ */
2189
+ reference_id?: string | null;
2190
+ }
2191
+ namespace NewPlanGroupedWithMinMaxThresholdsPrice {
2192
+ /**
2193
+ * Configuration for grouped_with_min_max_thresholds pricing
2194
+ */
2195
+ interface GroupedWithMinMaxThresholdsConfig {
2196
+ /**
2197
+ * The event property used to group before applying thresholds
2198
+ */
2199
+ grouping_key: string;
2200
+ /**
2201
+ * The maximum amount to charge each group
2202
+ */
2203
+ maximum_charge: string;
2204
+ /**
2205
+ * The minimum amount to charge each group, regardless of usage
2206
+ */
2207
+ minimum_charge: string;
2208
+ /**
2209
+ * The base price charged per group
2210
+ */
2211
+ per_unit_rate: string;
2212
+ }
2213
+ }
2214
+ interface NewPlanCumulativeGroupedAllocationPrice {
2215
+ /**
2216
+ * The cadence to bill for this price on.
2217
+ */
2218
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2219
+ /**
2220
+ * Configuration for cumulative_grouped_allocation pricing
2221
+ */
2222
+ cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
2223
+ /**
2224
+ * The id of the item the price will be associated with.
2225
+ */
2226
+ item_id: string;
2227
+ /**
2228
+ * The pricing model type
2229
+ */
2230
+ model_type: 'cumulative_grouped_allocation';
2231
+ /**
2232
+ * The name of the price.
2233
+ */
2234
+ name: string;
2235
+ /**
2236
+ * The id of the billable metric for the price. Only needed if the price is
2237
+ * usage-based.
2238
+ */
2239
+ billable_metric_id?: string | null;
2240
+ /**
2241
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2242
+ * this is true, and in-arrears if this is false.
2243
+ */
2244
+ billed_in_advance?: boolean | null;
2245
+ /**
2246
+ * For custom cadence: specifies the duration of the billing period in days or
2247
+ * months.
2248
+ */
2249
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2250
+ /**
2251
+ * The per unit conversion rate of the price currency to the invoicing currency.
2252
+ */
2253
+ conversion_rate?: number | null;
2254
+ /**
2255
+ * The configuration for the rate of the price currency to the invoicing currency.
2256
+ */
2257
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2258
+ /**
2259
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2260
+ * price is billed.
2261
+ */
2262
+ currency?: string | null;
2263
+ /**
2264
+ * For dimensional price: specifies a price group and dimension values
2265
+ */
2266
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2267
+ /**
2268
+ * An alias for the price.
2269
+ */
2270
+ external_price_id?: string | null;
2271
+ /**
2272
+ * If the Price represents a fixed cost, this represents the quantity of units
2273
+ * applied.
2274
+ */
2275
+ fixed_price_quantity?: number | null;
2276
+ /**
2277
+ * The property used to group this price on an invoice
2278
+ */
2279
+ invoice_grouping_key?: string | null;
2280
+ /**
2281
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2282
+ * If unspecified, a single invoice is produced per billing cycle.
2283
+ */
2284
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2285
+ /**
2286
+ * The ID of the license type to associate with this price.
2287
+ */
2288
+ license_type_id?: string | null;
2289
+ /**
2290
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2291
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2292
+ * by setting `metadata` to `null`.
2293
+ */
2294
+ metadata?: {
2295
+ [key: string]: string | null;
2296
+ } | null;
2297
+ /**
2298
+ * A transient ID that can be used to reference this price when adding adjustments
2299
+ * in the same API call.
2300
+ */
2301
+ reference_id?: string | null;
2302
+ }
2303
+ namespace NewPlanCumulativeGroupedAllocationPrice {
2304
+ /**
2305
+ * Configuration for cumulative_grouped_allocation pricing
2306
+ */
2307
+ interface CumulativeGroupedAllocationConfig {
2308
+ /**
2309
+ * The overall allocation across all groups
2310
+ */
2311
+ cumulative_allocation: string;
2312
+ /**
2313
+ * The allocation per individual group
2314
+ */
2315
+ group_allocation: string;
2316
+ /**
2317
+ * The event property used to group usage before applying allocations
2318
+ */
2319
+ grouping_key: string;
2320
+ /**
2321
+ * The amount to charge for each unit outside of the allocation
2322
+ */
2323
+ unit_amount: string;
2324
+ }
2325
+ }
2326
+ interface NewPlanDailyCreditAllowancePrice {
2327
+ /**
2328
+ * The cadence to bill for this price on.
2329
+ */
2330
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2331
+ /**
2332
+ * Configuration for daily_credit_allowance pricing
2333
+ */
2334
+ daily_credit_allowance_config: NewPlanDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
2335
+ /**
2336
+ * The id of the item the price will be associated with.
2337
+ */
2338
+ item_id: string;
2339
+ /**
2340
+ * The pricing model type
2341
+ */
2342
+ model_type: 'daily_credit_allowance';
2343
+ /**
2344
+ * The name of the price.
2345
+ */
2346
+ name: string;
2347
+ /**
2348
+ * The id of the billable metric for the price. Only needed if the price is
2349
+ * usage-based.
2350
+ */
2351
+ billable_metric_id?: string | null;
2352
+ /**
2353
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2354
+ * this is true, and in-arrears if this is false.
2355
+ */
2356
+ billed_in_advance?: boolean | null;
2357
+ /**
2358
+ * For custom cadence: specifies the duration of the billing period in days or
2359
+ * months.
2360
+ */
2361
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2362
+ /**
2363
+ * The per unit conversion rate of the price currency to the invoicing currency.
2364
+ */
2365
+ conversion_rate?: number | null;
2366
+ /**
2367
+ * The configuration for the rate of the price currency to the invoicing currency.
2368
+ */
2369
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2370
+ /**
2371
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2372
+ * price is billed.
2373
+ */
2374
+ currency?: string | null;
2375
+ /**
2376
+ * For dimensional price: specifies a price group and dimension values
2377
+ */
2378
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2379
+ /**
2380
+ * An alias for the price.
2381
+ */
2382
+ external_price_id?: string | null;
2383
+ /**
2384
+ * If the Price represents a fixed cost, this represents the quantity of units
2385
+ * applied.
2386
+ */
2387
+ fixed_price_quantity?: number | null;
2388
+ /**
2389
+ * The property used to group this price on an invoice
2390
+ */
2391
+ invoice_grouping_key?: string | null;
2392
+ /**
2393
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2394
+ * If unspecified, a single invoice is produced per billing cycle.
2395
+ */
2396
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2397
+ /**
2398
+ * The ID of the license type to associate with this price.
2399
+ */
2400
+ license_type_id?: string | null;
2401
+ /**
2402
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2403
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2404
+ * by setting `metadata` to `null`.
2405
+ */
2406
+ metadata?: {
2407
+ [key: string]: string | null;
2408
+ } | null;
2409
+ /**
2410
+ * A transient ID that can be used to reference this price when adding adjustments
2411
+ * in the same API call.
2412
+ */
2413
+ reference_id?: string | null;
2414
+ }
2415
+ namespace NewPlanDailyCreditAllowancePrice {
2416
+ /**
2417
+ * Configuration for daily_credit_allowance pricing
2418
+ */
2419
+ interface DailyCreditAllowanceConfig {
2420
+ /**
2421
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
2422
+ */
2423
+ daily_allowance: string;
2424
+ /**
2425
+ * Default per-unit credit rate for any usage not bucketed into a specified
2426
+ * matrix_value
2427
+ */
2428
+ default_unit_amount: string;
2429
+ /**
2430
+ * One or two event property values to evaluate matrix groups by
2431
+ */
2432
+ dimensions: Array<string | null>;
2433
+ /**
2434
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
2435
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
2436
+ * resets per distinct value of this property.
2437
+ */
2438
+ event_day_property: string;
2439
+ /**
2440
+ * Per-dimension credit rates
2441
+ */
2442
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
2443
+ }
2444
+ namespace DailyCreditAllowanceConfig {
2445
+ /**
2446
+ * Per-dimension credit price for the daily credit allowance model.
2447
+ */
2448
+ interface MatrixValue {
2449
+ /**
2450
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
2451
+ * could be used to apply a different credit rate to each AI model.
2452
+ */
2453
+ dimension_values: Array<string | null>;
2454
+ /**
2455
+ * Credits charged per unit of usage matching the specified dimension_values
2456
+ */
2457
+ unit_amount: string;
2458
+ }
2459
+ }
2460
+ }
2461
+ interface NewPlanMeteredAllowancePrice {
2462
+ /**
2463
+ * The cadence to bill for this price on.
2464
+ */
2465
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2466
+ /**
2467
+ * The id of the item the price will be associated with.
2468
+ */
2469
+ item_id: string;
2470
+ /**
2471
+ * Configuration for metered_allowance pricing
2472
+ */
2473
+ metered_allowance_config: NewPlanMeteredAllowancePrice.MeteredAllowanceConfig;
2474
+ /**
2475
+ * The pricing model type
2476
+ */
2477
+ model_type: 'metered_allowance';
2478
+ /**
2479
+ * The name of the price.
2480
+ */
2481
+ name: string;
2482
+ /**
2483
+ * The id of the billable metric for the price. Only needed if the price is
2484
+ * usage-based.
2485
+ */
2486
+ billable_metric_id?: string | null;
2487
+ /**
2488
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2489
+ * this is true, and in-arrears if this is false.
2490
+ */
2491
+ billed_in_advance?: boolean | null;
2492
+ /**
2493
+ * For custom cadence: specifies the duration of the billing period in days or
2494
+ * months.
2495
+ */
2496
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2497
+ /**
2498
+ * The per unit conversion rate of the price currency to the invoicing currency.
2499
+ */
2500
+ conversion_rate?: number | null;
2501
+ /**
2502
+ * The configuration for the rate of the price currency to the invoicing currency.
2503
+ */
2504
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2505
+ /**
2506
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2507
+ * price is billed.
2508
+ */
2509
+ currency?: string | null;
2510
+ /**
2511
+ * For dimensional price: specifies a price group and dimension values
2512
+ */
2513
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2514
+ /**
2515
+ * An alias for the price.
2516
+ */
2517
+ external_price_id?: string | null;
2518
+ /**
2519
+ * If the Price represents a fixed cost, this represents the quantity of units
2520
+ * applied.
2521
+ */
2522
+ fixed_price_quantity?: number | null;
2523
+ /**
2524
+ * The property used to group this price on an invoice
2525
+ */
2526
+ invoice_grouping_key?: string | null;
2527
+ /**
2528
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2529
+ * If unspecified, a single invoice is produced per billing cycle.
2530
+ */
2531
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2532
+ /**
2533
+ * The ID of the license type to associate with this price.
2534
+ */
2535
+ license_type_id?: string | null;
2536
+ /**
2537
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2538
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2539
+ * by setting `metadata` to `null`.
2540
+ */
2541
+ metadata?: {
2542
+ [key: string]: string | null;
2543
+ } | null;
2544
+ /**
2545
+ * A transient ID that can be used to reference this price when adding adjustments
2546
+ * in the same API call.
2547
+ */
2548
+ reference_id?: string | null;
2549
+ }
2550
+ namespace NewPlanMeteredAllowancePrice {
2551
+ /**
2552
+ * Configuration for metered_allowance pricing
2553
+ */
2554
+ interface MeteredAllowanceConfig {
2555
+ /**
2556
+ * The grouping_key value whose summed quantity represents the allowance for this
2557
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
2558
+ * — credit can never exceed actual usage.
2559
+ */
2560
+ allowance_grouping_value: string;
2561
+ /**
2562
+ * The grouping_key value whose summed quantity represents consumption (e.g.
2563
+ * 'download'). Charged at unit_amount.
2564
+ */
2565
+ consumption_grouping_value: string;
2566
+ /**
2567
+ * Event property used to partition the metric into consumption and allowance
2568
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
2569
+ * values below select which partition is which.
2570
+ */
2571
+ grouping_key: string;
2572
+ /**
2573
+ * Per-unit price applied to gross consumption and to the allowance credit.
2574
+ */
2575
+ unit_amount: string;
2576
+ /**
2577
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
2578
+ */
2579
+ allowance_display_name?: string;
2580
+ /**
2581
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2582
+ */
2583
+ consumption_display_name?: string;
2584
+ }
2585
+ }
2586
+ interface NewPlanPercentCompositePrice {
2587
+ /**
2588
+ * The cadence to bill for this price on.
2589
+ */
2590
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2591
+ /**
2592
+ * The id of the item the price will be associated with.
2593
+ */
2594
+ item_id: string;
2595
+ /**
2596
+ * The pricing model type
2597
+ */
2598
+ model_type: 'percent';
2599
+ /**
2600
+ * The name of the price.
2601
+ */
2602
+ name: string;
2603
+ /**
2604
+ * Configuration for percent pricing
2605
+ */
2606
+ percent_config: NewPlanPercentCompositePrice.PercentConfig;
2607
+ /**
2608
+ * The id of the billable metric for the price. Only needed if the price is
2609
+ * usage-based.
2610
+ */
2611
+ billable_metric_id?: string | null;
2612
+ /**
2613
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2614
+ * this is true, and in-arrears if this is false.
2615
+ */
2616
+ billed_in_advance?: boolean | null;
2617
+ /**
2618
+ * For custom cadence: specifies the duration of the billing period in days or
2619
+ * months.
2620
+ */
2621
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2622
+ /**
2623
+ * The per unit conversion rate of the price currency to the invoicing currency.
2624
+ */
2625
+ conversion_rate?: number | null;
2626
+ /**
2627
+ * The configuration for the rate of the price currency to the invoicing currency.
2628
+ */
2629
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2630
+ /**
2631
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2632
+ * price is billed.
2633
+ */
2634
+ currency?: string | null;
2635
+ /**
2636
+ * For dimensional price: specifies a price group and dimension values
2637
+ */
2638
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2639
+ /**
2640
+ * An alias for the price.
2641
+ */
2642
+ external_price_id?: string | null;
2643
+ /**
2644
+ * If the Price represents a fixed cost, this represents the quantity of units
2645
+ * applied.
2646
+ */
2647
+ fixed_price_quantity?: number | null;
2648
+ /**
2649
+ * The property used to group this price on an invoice
2650
+ */
2651
+ invoice_grouping_key?: string | null;
2652
+ /**
2653
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2654
+ * If unspecified, a single invoice is produced per billing cycle.
2655
+ */
2656
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2657
+ /**
2658
+ * The ID of the license type to associate with this price.
2659
+ */
2660
+ license_type_id?: string | null;
2661
+ /**
2662
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2663
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2664
+ * by setting `metadata` to `null`.
2665
+ */
2666
+ metadata?: {
2667
+ [key: string]: string | null;
2668
+ } | null;
2669
+ /**
2670
+ * A transient ID that can be used to reference this price when adding adjustments
2671
+ * in the same API call.
2672
+ */
2673
+ reference_id?: string | null;
2674
+ }
2675
+ namespace NewPlanPercentCompositePrice {
2676
+ /**
2677
+ * Configuration for percent pricing
2678
+ */
2679
+ interface PercentConfig {
2680
+ /**
2681
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
2682
+ */
2683
+ percent: number;
2684
+ /**
2685
+ * Maximum amount to charge. If unset, the fee has no upper bound.
2686
+ */
2687
+ maximum_amount?: string | null;
2688
+ /**
2689
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
2690
+ */
2691
+ minimum_amount?: string | null;
2692
+ /**
2693
+ * If true, the minimum_amount is prorated based on the service period. The
2694
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
2695
+ * upstream subtotals is never prorated either.
2696
+ */
2697
+ prorated?: boolean;
2698
+ }
2699
+ }
2700
+ interface NewPlanEventOutputPrice {
2701
+ /**
2702
+ * The cadence to bill for this price on.
2703
+ */
2704
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2705
+ /**
2706
+ * Configuration for event_output pricing
2707
+ */
2708
+ event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
2709
+ /**
2710
+ * The id of the item the price will be associated with.
2711
+ */
2712
+ item_id: string;
2713
+ /**
2714
+ * The pricing model type
2715
+ */
2716
+ model_type: 'event_output';
2717
+ /**
2718
+ * The name of the price.
2719
+ */
2720
+ name: string;
2721
+ /**
2722
+ * The id of the billable metric for the price. Only needed if the price is
2723
+ * usage-based.
2724
+ */
2725
+ billable_metric_id?: string | null;
2726
+ /**
2727
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2728
+ * this is true, and in-arrears if this is false.
2729
+ */
2730
+ billed_in_advance?: boolean | null;
2731
+ /**
2732
+ * For custom cadence: specifies the duration of the billing period in days or
2733
+ * months.
2734
+ */
2735
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2736
+ /**
2737
+ * The per unit conversion rate of the price currency to the invoicing currency.
2738
+ */
2739
+ conversion_rate?: number | null;
2740
+ /**
2741
+ * The configuration for the rate of the price currency to the invoicing currency.
2742
+ */
2743
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2744
+ /**
2745
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2746
+ * price is billed.
2747
+ */
2748
+ currency?: string | null;
2749
+ /**
2750
+ * For dimensional price: specifies a price group and dimension values
2751
+ */
2752
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2753
+ /**
2754
+ * An alias for the price.
2755
+ */
2756
+ external_price_id?: string | null;
2757
+ /**
2758
+ * If the Price represents a fixed cost, this represents the quantity of units
2759
+ * applied.
2760
+ */
2761
+ fixed_price_quantity?: number | null;
2762
+ /**
2763
+ * The property used to group this price on an invoice
2764
+ */
2765
+ invoice_grouping_key?: string | null;
2766
+ /**
2767
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2768
+ * If unspecified, a single invoice is produced per billing cycle.
2769
+ */
2770
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2771
+ /**
2772
+ * The ID of the license type to associate with this price.
2773
+ */
2774
+ license_type_id?: string | null;
2775
+ /**
2776
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2777
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2778
+ * by setting `metadata` to `null`.
2779
+ */
2780
+ metadata?: {
2781
+ [key: string]: string | null;
2782
+ } | null;
2783
+ /**
2784
+ * A transient ID that can be used to reference this price when adding adjustments
2785
+ * in the same API call.
2786
+ */
2787
+ reference_id?: string | null;
2788
+ }
2789
+ namespace NewPlanEventOutputPrice {
2790
+ /**
2791
+ * Configuration for event_output pricing
2792
+ */
2793
+ interface EventOutputConfig {
2794
+ /**
2795
+ * The key in the event data to extract the unit rate from.
2796
+ */
2797
+ unit_rating_key: string;
2798
+ /**
2799
+ * If provided, this amount will be used as the unit rate when an event does not
2800
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
2801
+ * rate will be ignored.
2802
+ */
2803
+ default_unit_rate?: string | null;
2804
+ /**
2805
+ * An optional key in the event data to group by (e.g., event ID). All events will
2806
+ * also be grouped by their unit rate.
2807
+ */
2808
+ grouping_key?: string | null;
2809
+ }
2810
+ }
2811
+ }
2812
+ }
2813
+ export interface BetaFetchPlanVersionParams {
2814
+ plan_id: string;
2815
+ }
2816
+ export interface BetaSetDefaultPlanVersionParams {
2817
+ /**
2818
+ * Plan version to set as the default.
2819
+ */
2820
+ version: number;
2821
+ }
2822
+ export declare namespace Beta {
2823
+ export { type PlanVersion as PlanVersion, type PlanVersionPhase as PlanVersionPhase, type BetaCreatePlanVersionParams as BetaCreatePlanVersionParams, type BetaFetchPlanVersionParams as BetaFetchPlanVersionParams, type BetaSetDefaultPlanVersionParams as BetaSetDefaultPlanVersionParams, };
2824
+ export { ExternalPlanID as ExternalPlanID, type ExternalPlanIDCreatePlanVersionParams as ExternalPlanIDCreatePlanVersionParams, type ExternalPlanIDFetchPlanVersionParams as ExternalPlanIDFetchPlanVersionParams, type ExternalPlanIDSetDefaultPlanVersionParams as ExternalPlanIDSetDefaultPlanVersionParams, };
2825
+ }
2826
+ //# sourceMappingURL=beta.d.mts.map