orb-billing 5.76.0 → 6.0.1

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