orb-billing 4.32.0 → 4.47.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 (252) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/LICENSE +1 -1
  3. package/README.md +12 -3
  4. package/core.d.ts +4 -5
  5. package/core.d.ts.map +1 -1
  6. package/core.js +16 -11
  7. package/core.js.map +1 -1
  8. package/core.mjs +16 -11
  9. package/core.mjs.map +1 -1
  10. package/error.d.ts +30 -36
  11. package/error.d.ts.map +1 -1
  12. package/error.js +24 -43
  13. package/error.js.map +1 -1
  14. package/error.mjs +24 -43
  15. package/error.mjs.map +1 -1
  16. package/index.d.mts +43 -109
  17. package/index.d.ts +43 -109
  18. package/index.d.ts.map +1 -1
  19. package/index.js +71 -33
  20. package/index.js.map +1 -1
  21. package/index.mjs +43 -32
  22. package/index.mjs.map +1 -1
  23. package/package.json +2 -2
  24. package/resources/alerts.d.ts +58 -19
  25. package/resources/alerts.d.ts.map +1 -1
  26. package/resources/alerts.js +19 -37
  27. package/resources/alerts.js.map +1 -1
  28. package/resources/alerts.mjs +19 -14
  29. package/resources/alerts.mjs.map +1 -1
  30. package/resources/coupons/coupons.d.ts +3 -7
  31. package/resources/coupons/coupons.d.ts.map +1 -1
  32. package/resources/coupons/coupons.js +3 -5
  33. package/resources/coupons/coupons.js.map +1 -1
  34. package/resources/coupons/coupons.mjs +3 -5
  35. package/resources/coupons/coupons.mjs.map +1 -1
  36. package/resources/coupons/index.d.ts +2 -2
  37. package/resources/coupons/index.d.ts.map +1 -1
  38. package/resources/coupons/index.js.map +1 -1
  39. package/resources/coupons/index.mjs.map +1 -1
  40. package/resources/coupons/subscriptions.d.ts +1 -2
  41. package/resources/coupons/subscriptions.d.ts.map +1 -1
  42. package/resources/coupons/subscriptions.js +0 -2
  43. package/resources/coupons/subscriptions.js.map +1 -1
  44. package/resources/coupons/subscriptions.mjs +0 -2
  45. package/resources/coupons/subscriptions.mjs.map +1 -1
  46. package/resources/credit-notes.d.ts +29 -4
  47. package/resources/credit-notes.d.ts.map +1 -1
  48. package/resources/credit-notes.js +8 -27
  49. package/resources/credit-notes.js.map +1 -1
  50. package/resources/credit-notes.mjs +8 -4
  51. package/resources/credit-notes.mjs.map +1 -1
  52. package/resources/customers/balance-transactions.d.ts +1 -6
  53. package/resources/customers/balance-transactions.d.ts.map +1 -1
  54. package/resources/customers/balance-transactions.js +1 -27
  55. package/resources/customers/balance-transactions.js.map +1 -1
  56. package/resources/customers/balance-transactions.mjs +1 -4
  57. package/resources/customers/balance-transactions.mjs.map +1 -1
  58. package/resources/customers/costs.d.ts +1 -5
  59. package/resources/customers/costs.d.ts.map +1 -1
  60. package/resources/customers/costs.js +0 -2
  61. package/resources/customers/costs.js.map +1 -1
  62. package/resources/customers/costs.mjs +0 -2
  63. package/resources/customers/costs.mjs.map +1 -1
  64. package/resources/customers/credits/credits.d.ts +15 -31
  65. package/resources/customers/credits/credits.d.ts.map +1 -1
  66. package/resources/customers/credits/credits.js +10 -11
  67. package/resources/customers/credits/credits.js.map +1 -1
  68. package/resources/customers/credits/credits.mjs +10 -11
  69. package/resources/customers/credits/credits.mjs.map +1 -1
  70. package/resources/customers/credits/index.d.ts +3 -3
  71. package/resources/customers/credits/index.d.ts.map +1 -1
  72. package/resources/customers/credits/index.js.map +1 -1
  73. package/resources/customers/credits/index.mjs.map +1 -1
  74. package/resources/customers/credits/ledger.d.ts +15 -23
  75. package/resources/customers/credits/ledger.d.ts.map +1 -1
  76. package/resources/customers/credits/ledger.js +12 -36
  77. package/resources/customers/credits/ledger.js.map +1 -1
  78. package/resources/customers/credits/ledger.mjs +12 -13
  79. package/resources/customers/credits/ledger.mjs.map +1 -1
  80. package/resources/customers/credits/top-ups.d.ts +1 -11
  81. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  82. package/resources/customers/credits/top-ups.js +2 -28
  83. package/resources/customers/credits/top-ups.js.map +1 -1
  84. package/resources/customers/credits/top-ups.mjs +2 -5
  85. package/resources/customers/credits/top-ups.mjs.map +1 -1
  86. package/resources/customers/customers.d.ts +9 -29
  87. package/resources/customers/customers.d.ts.map +1 -1
  88. package/resources/customers/customers.js +25 -18
  89. package/resources/customers/customers.js.map +1 -1
  90. package/resources/customers/customers.mjs +25 -18
  91. package/resources/customers/customers.mjs.map +1 -1
  92. package/resources/customers/index.d.ts +4 -4
  93. package/resources/customers/index.d.ts.map +1 -1
  94. package/resources/customers/index.js.map +1 -1
  95. package/resources/customers/index.mjs.map +1 -1
  96. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
  97. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
  98. package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
  99. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
  100. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
  101. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
  102. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
  103. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
  104. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
  105. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
  106. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
  107. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
  108. package/resources/dimensional-price-groups/index.d.ts +3 -0
  109. package/resources/dimensional-price-groups/index.d.ts.map +1 -0
  110. package/resources/dimensional-price-groups/index.js +9 -0
  111. package/resources/dimensional-price-groups/index.js.map +1 -0
  112. package/resources/dimensional-price-groups/index.mjs +4 -0
  113. package/resources/dimensional-price-groups/index.mjs.map +1 -0
  114. package/resources/events/backfills.d.ts +5 -11
  115. package/resources/events/backfills.d.ts.map +1 -1
  116. package/resources/events/backfills.js +5 -29
  117. package/resources/events/backfills.js.map +1 -1
  118. package/resources/events/backfills.mjs +5 -6
  119. package/resources/events/backfills.mjs.map +1 -1
  120. package/resources/events/events.d.ts +7 -22
  121. package/resources/events/events.d.ts.map +1 -1
  122. package/resources/events/events.js +7 -7
  123. package/resources/events/events.js.map +1 -1
  124. package/resources/events/events.mjs +7 -7
  125. package/resources/events/events.mjs.map +1 -1
  126. package/resources/events/index.d.ts +3 -3
  127. package/resources/events/index.d.ts.map +1 -1
  128. package/resources/events/index.js.map +1 -1
  129. package/resources/events/index.mjs.map +1 -1
  130. package/resources/events/volume.d.ts +9 -12
  131. package/resources/events/volume.d.ts.map +1 -1
  132. package/resources/events/volume.js +16 -7
  133. package/resources/events/volume.js.map +1 -1
  134. package/resources/events/volume.mjs +16 -7
  135. package/resources/events/volume.mjs.map +1 -1
  136. package/resources/index.d.ts +14 -13
  137. package/resources/index.d.ts.map +1 -1
  138. package/resources/index.js +10 -7
  139. package/resources/index.js.map +1 -1
  140. package/resources/index.mjs +8 -7
  141. package/resources/index.mjs.map +1 -1
  142. package/resources/invoice-line-items.d.ts +1 -3
  143. package/resources/invoice-line-items.d.ts.map +1 -1
  144. package/resources/invoice-line-items.js +0 -2
  145. package/resources/invoice-line-items.js.map +1 -1
  146. package/resources/invoice-line-items.mjs +0 -2
  147. package/resources/invoice-line-items.mjs.map +1 -1
  148. package/resources/invoices.d.ts +81 -18
  149. package/resources/invoices.d.ts.map +1 -1
  150. package/resources/invoices.js +22 -35
  151. package/resources/invoices.js.map +1 -1
  152. package/resources/invoices.mjs +22 -12
  153. package/resources/invoices.mjs.map +1 -1
  154. package/resources/items.d.ts +2 -8
  155. package/resources/items.d.ts.map +1 -1
  156. package/resources/items.js +5 -31
  157. package/resources/items.js.map +1 -1
  158. package/resources/items.mjs +5 -8
  159. package/resources/items.mjs.map +1 -1
  160. package/resources/metrics.d.ts +2 -8
  161. package/resources/metrics.d.ts.map +1 -1
  162. package/resources/metrics.js +7 -31
  163. package/resources/metrics.js.map +1 -1
  164. package/resources/metrics.mjs +7 -8
  165. package/resources/metrics.mjs.map +1 -1
  166. package/resources/plans/external-plan-id.d.ts +2 -4
  167. package/resources/plans/external-plan-id.d.ts.map +1 -1
  168. package/resources/plans/external-plan-id.js +7 -7
  169. package/resources/plans/external-plan-id.js.map +1 -1
  170. package/resources/plans/external-plan-id.mjs +7 -7
  171. package/resources/plans/external-plan-id.mjs.map +1 -1
  172. package/resources/plans/index.d.ts +2 -2
  173. package/resources/plans/index.d.ts.map +1 -1
  174. package/resources/plans/index.js.map +1 -1
  175. package/resources/plans/index.mjs +1 -1
  176. package/resources/plans/index.mjs.map +1 -1
  177. package/resources/plans/plans.d.ts +332 -11
  178. package/resources/plans/plans.d.ts.map +1 -1
  179. package/resources/plans/plans.js +10 -9
  180. package/resources/plans/plans.js.map +1 -1
  181. package/resources/plans/plans.mjs +10 -9
  182. package/resources/plans/plans.mjs.map +1 -1
  183. package/resources/prices/external-price-id.d.ts +2 -4
  184. package/resources/prices/external-price-id.d.ts.map +1 -1
  185. package/resources/prices/external-price-id.js +6 -7
  186. package/resources/prices/external-price-id.js.map +1 -1
  187. package/resources/prices/external-price-id.mjs +6 -7
  188. package/resources/prices/external-price-id.mjs.map +1 -1
  189. package/resources/prices/index.d.ts +2 -2
  190. package/resources/prices/index.d.ts.map +1 -1
  191. package/resources/prices/index.js +3 -3
  192. package/resources/prices/index.js.map +1 -1
  193. package/resources/prices/index.mjs +1 -1
  194. package/resources/prices/index.mjs.map +1 -1
  195. package/resources/prices/prices.d.ts +340 -15
  196. package/resources/prices/prices.d.ts.map +1 -1
  197. package/resources/prices/prices.js +9 -9
  198. package/resources/prices/prices.js.map +1 -1
  199. package/resources/prices/prices.mjs +9 -9
  200. package/resources/prices/prices.mjs.map +1 -1
  201. package/resources/subscriptions.d.ts +7636 -200
  202. package/resources/subscriptions.d.ts.map +1 -1
  203. package/resources/subscriptions.js +348 -47
  204. package/resources/subscriptions.js.map +1 -1
  205. package/resources/subscriptions.mjs +348 -24
  206. package/resources/subscriptions.mjs.map +1 -1
  207. package/resources/top-level.d.ts +1 -2
  208. package/resources/top-level.d.ts.map +1 -1
  209. package/resources/top-level.js +0 -2
  210. package/resources/top-level.js.map +1 -1
  211. package/resources/top-level.mjs +0 -2
  212. package/resources/top-level.mjs.map +1 -1
  213. package/src/core.ts +23 -19
  214. package/src/error.ts +82 -125
  215. package/src/index.ts +334 -130
  216. package/src/resources/alerts.ts +117 -24
  217. package/src/resources/coupons/coupons.ts +13 -8
  218. package/src/resources/coupons/index.ts +2 -2
  219. package/src/resources/coupons/subscriptions.ts +2 -3
  220. package/src/resources/credit-notes.ts +45 -5
  221. package/src/resources/customers/balance-transactions.ts +10 -7
  222. package/src/resources/customers/costs.ts +7 -6
  223. package/src/resources/customers/credits/credits.ts +82 -32
  224. package/src/resources/customers/credits/index.ts +20 -20
  225. package/src/resources/customers/credits/ledger.ts +30 -24
  226. package/src/resources/customers/credits/top-ups.ts +16 -12
  227. package/src/resources/customers/customers.ts +70 -46
  228. package/src/resources/customers/index.ts +17 -17
  229. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
  230. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
  231. package/src/resources/dimensional-price-groups/index.ts +10 -0
  232. package/src/resources/events/backfills.ts +17 -12
  233. package/src/resources/events/events.ts +42 -23
  234. package/src/resources/events/index.ts +15 -15
  235. package/src/resources/events/volume.ts +11 -22
  236. package/src/resources/index.ts +113 -67
  237. package/src/resources/invoice-line-items.ts +5 -4
  238. package/src/resources/invoices.ts +111 -34
  239. package/src/resources/items.ts +11 -17
  240. package/src/resources/metrics.ts +11 -17
  241. package/src/resources/plans/external-plan-id.ts +3 -14
  242. package/src/resources/plans/index.ts +9 -2
  243. package/src/resources/plans/plans.ts +425 -19
  244. package/src/resources/prices/external-price-id.ts +3 -14
  245. package/src/resources/prices/index.ts +8 -8
  246. package/src/resources/prices/prices.ts +471 -24
  247. package/src/resources/subscriptions.ts +9238 -440
  248. package/src/resources/top-level.ts +2 -3
  249. package/src/version.ts +1 -1
  250. package/version.d.ts +1 -1
  251. package/version.js +1 -1
  252. package/version.mjs +1 -1
@@ -1,6 +1,5 @@
1
1
  import { APIResource } from "../../resource.js";
2
2
  import * as Core from "../../core.js";
3
- import * as ExternalPriceIDAPI from "./external-price-id.js";
4
3
  import * as PricesAPI from "./prices.js";
5
4
  export declare class ExternalPriceID extends APIResource {
6
5
  /**
@@ -8,8 +7,7 @@ export declare class ExternalPriceID extends APIResource {
8
7
  * pass null for the metadata value, it will clear any existing metadata for that
9
8
  * price.
10
9
  */
11
- update(externalPriceId: string, body?: ExternalPriceIDUpdateParams, options?: Core.RequestOptions): Core.APIPromise<PricesAPI.Price>;
12
- update(externalPriceId: string, options?: Core.RequestOptions): Core.APIPromise<PricesAPI.Price>;
10
+ update(externalPriceId: string, body: ExternalPriceIDUpdateParams, options?: Core.RequestOptions): Core.APIPromise<PricesAPI.Price>;
13
11
  /**
14
12
  * This endpoint returns a price given an external price id. See the
15
13
  * [price creation API](../reference/create-price) for more information about
@@ -26,6 +24,6 @@ export interface ExternalPriceIDUpdateParams {
26
24
  metadata?: Record<string, string | null> | null;
27
25
  }
28
26
  export declare namespace ExternalPriceID {
29
- export import ExternalPriceIDUpdateParams = ExternalPriceIDAPI.ExternalPriceIDUpdateParams;
27
+ export { type ExternalPriceIDUpdateParams as ExternalPriceIDUpdateParams };
30
28
  }
31
29
  //# sourceMappingURL=external-price-id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"external-price-id.d.ts","sourceRoot":"","sources":["../../src/resources/prices/external-price-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,kBAAkB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AAEtC,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACH,MAAM,CACJ,eAAe,EAAE,MAAM,EACvB,IAAI,CAAC,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;IACnC,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;IAYhG;;;;OAIG;IACH,KAAK,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;CAGhG;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,yBAAiB,eAAe,CAAC;IAC/B,MAAM,QAAQ,2BAA2B,GAAG,kBAAkB,CAAC,2BAA2B,CAAC;CAC5F"}
1
+ {"version":3,"file":"external-price-id.d.ts","sourceRoot":"","sources":["../../src/resources/prices/external-price-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AAEtC,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACH,MAAM,CACJ,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;IAInC;;;;OAIG;IACH,KAAK,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;CAGhG;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
@@ -3,12 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ExternalPriceID = void 0;
5
5
  const resource_1 = require("../../resource.js");
6
- const core_1 = require("../../core.js");
7
6
  class ExternalPriceID extends resource_1.APIResource {
8
- update(externalPriceId, body = {}, options) {
9
- if ((0, core_1.isRequestOptions)(body)) {
10
- return this.update(externalPriceId, {}, body);
11
- }
7
+ /**
8
+ * This endpoint allows you to update the `metadata` property on a price. If you
9
+ * pass null for the metadata value, it will clear any existing metadata for that
10
+ * price.
11
+ */
12
+ update(externalPriceId, body, options) {
12
13
  return this._client.put(`/prices/external_price_id/${externalPriceId}`, { body, ...options });
13
14
  }
14
15
  /**
@@ -21,6 +22,4 @@ class ExternalPriceID extends resource_1.APIResource {
21
22
  }
22
23
  }
23
24
  exports.ExternalPriceID = ExternalPriceID;
24
- (function (ExternalPriceID) {
25
- })(ExternalPriceID = exports.ExternalPriceID || (exports.ExternalPriceID = {}));
26
25
  //# sourceMappingURL=external-price-id.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"external-price-id.js","sourceRoot":"","sources":["../../src/resources/prices/external-price-id.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAK9C,MAAa,eAAgB,SAAQ,sBAAW;IAY9C,MAAM,CACJ,eAAuB,EACvB,OAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAuB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AA/BD,0CA+BC;AAWD,WAAiB,eAAe;AAEhC,CAAC,EAFgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAE/B"}
1
+ {"version":3,"file":"external-price-id.js","sourceRoot":"","sources":["../../src/resources/prices/external-price-id.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAI7C,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;;;OAIG;IACH,MAAM,CACJ,eAAuB,EACvB,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAuB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AAtBD,0CAsBC"}
@@ -1,11 +1,12 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../resource.mjs";
3
- import { isRequestOptions } from "../../core.mjs";
4
3
  export class ExternalPriceID extends APIResource {
5
- update(externalPriceId, body = {}, options) {
6
- if (isRequestOptions(body)) {
7
- return this.update(externalPriceId, {}, body);
8
- }
4
+ /**
5
+ * This endpoint allows you to update the `metadata` property on a price. If you
6
+ * pass null for the metadata value, it will clear any existing metadata for that
7
+ * price.
8
+ */
9
+ update(externalPriceId, body, options) {
9
10
  return this._client.put(`/prices/external_price_id/${externalPriceId}`, { body, ...options });
10
11
  }
11
12
  /**
@@ -17,6 +18,4 @@ export class ExternalPriceID extends APIResource {
17
18
  return this._client.get(`/prices/external_price_id/${externalPriceId}`, options);
18
19
  }
19
20
  }
20
- (function (ExternalPriceID) {
21
- })(ExternalPriceID || (ExternalPriceID = {}));
22
21
  //# sourceMappingURL=external-price-id.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"external-price-id.mjs","sourceRoot":"","sources":["../../src/resources/prices/external-price-id.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAK3B,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAY9C,MAAM,CACJ,eAAuB,EACvB,OAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAuB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AAWD,WAAiB,eAAe;AAEhC,CAAC,EAFgB,eAAe,KAAf,eAAe,QAE/B"}
1
+ {"version":3,"file":"external-price-id.mjs","sourceRoot":"","sources":["../../src/resources/prices/external-price-id.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACH,MAAM,CACJ,eAAuB,EACvB,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAuB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
- export { EvaluatePriceGroup, Price, PriceEvaluateResponse, PriceCreateParams, PriceUpdateParams, PriceListParams, PriceEvaluateParams, PricesPage, Prices, } from "./prices.js";
2
- export { ExternalPriceIDUpdateParams, ExternalPriceID } from "./external-price-id.js";
1
+ export { ExternalPriceID, type ExternalPriceIDUpdateParams } from "./external-price-id.js";
2
+ export { PricesPage, Prices, type EvaluatePriceGroup, type Price, type PriceEvaluateResponse, type PriceCreateParams, type PriceUpdateParams, type PriceListParams, type PriceEvaluateParams, } from "./prices.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,MAAM,GACP,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,KAAK,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACL,UAAU,EACV,MAAM,EACN,KAAK,kBAAkB,EACvB,KAAK,KAAK,EACV,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,UAAU,CAAC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ExternalPriceID = exports.Prices = exports.PricesPage = void 0;
4
+ exports.Prices = exports.PricesPage = exports.ExternalPriceID = void 0;
5
+ var external_price_id_1 = require("./external-price-id.js");
6
+ Object.defineProperty(exports, "ExternalPriceID", { enumerable: true, get: function () { return external_price_id_1.ExternalPriceID; } });
5
7
  var prices_1 = require("./prices.js");
6
8
  Object.defineProperty(exports, "PricesPage", { enumerable: true, get: function () { return prices_1.PricesPage; } });
7
9
  Object.defineProperty(exports, "Prices", { enumerable: true, get: function () { return prices_1.Prices; } });
8
- var external_price_id_1 = require("./external-price-id.js");
9
- Object.defineProperty(exports, "ExternalPriceID", { enumerable: true, get: function () { return external_price_id_1.ExternalPriceID; } });
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAUkB;AAFhB,oGAAA,UAAU,OAAA;AACV,gGAAA,MAAM,OAAA;AAER,4DAAmF;AAA7C,oHAAA,eAAe,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAAwF;AAA/E,oHAAA,eAAe,OAAA;AACxB,sCAUkB;AAThB,oGAAA,UAAU,OAAA;AACV,gGAAA,MAAM,OAAA"}
@@ -1,4 +1,4 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { PricesPage, Prices, } from "./prices.mjs";
3
2
  export { ExternalPriceID } from "./external-price-id.mjs";
3
+ export { PricesPage, Prices, } from "./prices.mjs";
4
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAQL,UAAU,EACV,MAAM,GACP;OACM,EAA+B,eAAe,EAAE"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,eAAe,EAAoC;OACrD,EACL,UAAU,EACV,MAAM,GAQP"}
@@ -1,8 +1,8 @@
1
1
  import { APIResource } from "../../resource.js";
2
2
  import * as Core from "../../core.js";
3
- import * as PricesAPI from "./prices.js";
4
3
  import * as Shared from "../shared.js";
5
4
  import * as ExternalPriceIDAPI from "./external-price-id.js";
5
+ import { ExternalPriceID, ExternalPriceIDUpdateParams } from "./external-price-id.js";
6
6
  import { Page, type PageParams } from "../../pagination.js";
7
7
  export declare class Prices extends APIResource {
8
8
  externalPriceId: ExternalPriceIDAPI.ExternalPriceID;
@@ -24,8 +24,7 @@ export declare class Prices extends APIResource {
24
24
  * pass null for the metadata value, it will clear any existing metadata for that
25
25
  * price.
26
26
  */
27
- update(priceId: string, body?: PriceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Price>;
28
- update(priceId: string, options?: Core.RequestOptions): Core.APIPromise<Price>;
27
+ update(priceId: string, body: PriceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Price>;
29
28
  /**
30
29
  * This endpoint is used to list all add-on prices created using the
31
30
  * [price creation endpoint](../reference/create-price).
@@ -310,7 +309,7 @@ export interface EvaluatePriceGroup {
310
309
  * }
311
310
  * ```
312
311
  */
313
- export type Price = Price.UnitPrice | Price.PackagePrice | Price.MatrixPrice | Price.TieredPrice | Price.TieredBpsPrice | Price.BpsPrice | Price.BulkBpsPrice | Price.BulkPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.GroupedTieredPrice | Price.TieredWithMinimumPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.BulkWithProrationPrice;
312
+ export type Price = Price.UnitPrice | Price.PackagePrice | Price.MatrixPrice | Price.TieredPrice | Price.TieredBpsPrice | Price.BpsPrice | Price.BulkBpsPrice | Price.BulkPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.GroupedTieredPrice | Price.TieredWithMinimumPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.MatrixWithDisplayNamePrice | Price.BulkWithProrationPrice | Price.GroupedTieredPackagePrice;
314
313
  export declare namespace Price {
315
314
  interface UnitPrice {
316
315
  id: string;
@@ -2043,6 +2042,80 @@ export declare namespace Price {
2043
2042
  minimum_amount: string;
2044
2043
  }
2045
2044
  }
2045
+ interface MatrixWithDisplayNamePrice {
2046
+ id: string;
2047
+ billable_metric: MatrixWithDisplayNamePrice.BillableMetric | null;
2048
+ billing_cycle_configuration: MatrixWithDisplayNamePrice.BillingCycleConfiguration;
2049
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
2050
+ conversion_rate: number | null;
2051
+ created_at: string;
2052
+ credit_allocation: MatrixWithDisplayNamePrice.CreditAllocation | null;
2053
+ currency: string;
2054
+ discount: Shared.Discount | null;
2055
+ external_price_id: string | null;
2056
+ fixed_price_quantity: number | null;
2057
+ invoicing_cycle_configuration: MatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null;
2058
+ item: MatrixWithDisplayNamePrice.Item;
2059
+ matrix_with_display_name_config: Record<string, unknown>;
2060
+ maximum: MatrixWithDisplayNamePrice.Maximum | null;
2061
+ maximum_amount: string | null;
2062
+ /**
2063
+ * User specified key-value pairs for the resource. If not present, this defaults
2064
+ * to an empty dictionary. Individual keys can be removed by setting the value to
2065
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
2066
+ * `null`.
2067
+ */
2068
+ metadata: Record<string, string>;
2069
+ minimum: MatrixWithDisplayNamePrice.Minimum | null;
2070
+ minimum_amount: string | null;
2071
+ model_type: 'matrix_with_display_name';
2072
+ name: string;
2073
+ plan_phase_order: number | null;
2074
+ price_type: 'usage_price' | 'fixed_price';
2075
+ }
2076
+ namespace MatrixWithDisplayNamePrice {
2077
+ interface BillableMetric {
2078
+ id: string;
2079
+ }
2080
+ interface BillingCycleConfiguration {
2081
+ duration: number;
2082
+ duration_unit: 'day' | 'month';
2083
+ }
2084
+ interface CreditAllocation {
2085
+ allows_rollover: boolean;
2086
+ currency: string;
2087
+ }
2088
+ interface InvoicingCycleConfiguration {
2089
+ duration: number;
2090
+ duration_unit: 'day' | 'month';
2091
+ }
2092
+ interface Item {
2093
+ id: string;
2094
+ name: string;
2095
+ }
2096
+ interface Maximum {
2097
+ /**
2098
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
2099
+ * maximums, this can be a subset of prices.
2100
+ */
2101
+ applies_to_price_ids: Array<string>;
2102
+ /**
2103
+ * Maximum amount applied
2104
+ */
2105
+ maximum_amount: string;
2106
+ }
2107
+ interface Minimum {
2108
+ /**
2109
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
2110
+ * minimums, this can be a subset of prices.
2111
+ */
2112
+ applies_to_price_ids: Array<string>;
2113
+ /**
2114
+ * Minimum amount applied
2115
+ */
2116
+ minimum_amount: string;
2117
+ }
2118
+ }
2046
2119
  interface BulkWithProrationPrice {
2047
2120
  id: string;
2048
2121
  billable_metric: BulkWithProrationPrice.BillableMetric | null;
@@ -2117,11 +2190,85 @@ export declare namespace Price {
2117
2190
  minimum_amount: string;
2118
2191
  }
2119
2192
  }
2193
+ interface GroupedTieredPackagePrice {
2194
+ id: string;
2195
+ billable_metric: GroupedTieredPackagePrice.BillableMetric | null;
2196
+ billing_cycle_configuration: GroupedTieredPackagePrice.BillingCycleConfiguration;
2197
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
2198
+ conversion_rate: number | null;
2199
+ created_at: string;
2200
+ credit_allocation: GroupedTieredPackagePrice.CreditAllocation | null;
2201
+ currency: string;
2202
+ discount: Shared.Discount | null;
2203
+ external_price_id: string | null;
2204
+ fixed_price_quantity: number | null;
2205
+ grouped_tiered_package_config: Record<string, unknown>;
2206
+ invoicing_cycle_configuration: GroupedTieredPackagePrice.InvoicingCycleConfiguration | null;
2207
+ item: GroupedTieredPackagePrice.Item;
2208
+ maximum: GroupedTieredPackagePrice.Maximum | null;
2209
+ maximum_amount: string | null;
2210
+ /**
2211
+ * User specified key-value pairs for the resource. If not present, this defaults
2212
+ * to an empty dictionary. Individual keys can be removed by setting the value to
2213
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
2214
+ * `null`.
2215
+ */
2216
+ metadata: Record<string, string>;
2217
+ minimum: GroupedTieredPackagePrice.Minimum | null;
2218
+ minimum_amount: string | null;
2219
+ model_type: 'grouped_tiered_package';
2220
+ name: string;
2221
+ plan_phase_order: number | null;
2222
+ price_type: 'usage_price' | 'fixed_price';
2223
+ }
2224
+ namespace GroupedTieredPackagePrice {
2225
+ interface BillableMetric {
2226
+ id: string;
2227
+ }
2228
+ interface BillingCycleConfiguration {
2229
+ duration: number;
2230
+ duration_unit: 'day' | 'month';
2231
+ }
2232
+ interface CreditAllocation {
2233
+ allows_rollover: boolean;
2234
+ currency: string;
2235
+ }
2236
+ interface InvoicingCycleConfiguration {
2237
+ duration: number;
2238
+ duration_unit: 'day' | 'month';
2239
+ }
2240
+ interface Item {
2241
+ id: string;
2242
+ name: string;
2243
+ }
2244
+ interface Maximum {
2245
+ /**
2246
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
2247
+ * maximums, this can be a subset of prices.
2248
+ */
2249
+ applies_to_price_ids: Array<string>;
2250
+ /**
2251
+ * Maximum amount applied
2252
+ */
2253
+ maximum_amount: string;
2254
+ }
2255
+ interface Minimum {
2256
+ /**
2257
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
2258
+ * minimums, this can be a subset of prices.
2259
+ */
2260
+ applies_to_price_ids: Array<string>;
2261
+ /**
2262
+ * Minimum amount applied
2263
+ */
2264
+ minimum_amount: string;
2265
+ }
2266
+ }
2120
2267
  }
2121
2268
  export interface PriceEvaluateResponse {
2122
2269
  data: Array<EvaluatePriceGroup>;
2123
2270
  }
2124
- export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingTieredBpsPrice | PriceCreateParams.NewFloatingBpsPrice | PriceCreateParams.NewFloatingBulkBpsPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingBulkWithProrationPrice;
2271
+ export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingTieredBpsPrice | PriceCreateParams.NewFloatingBpsPrice | PriceCreateParams.NewFloatingBulkBpsPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingBulkWithProrationPrice | PriceCreateParams.NewFloatingGroupedTieredPackagePrice;
2125
2272
  export declare namespace PriceCreateParams {
2126
2273
  interface NewFloatingUnitPrice {
2127
2274
  /**
@@ -4253,6 +4400,99 @@ export declare namespace PriceCreateParams {
4253
4400
  duration_unit: 'day' | 'month';
4254
4401
  }
4255
4402
  }
4403
+ interface NewFloatingMatrixWithDisplayNamePrice {
4404
+ /**
4405
+ * The cadence to bill for this price on.
4406
+ */
4407
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4408
+ /**
4409
+ * An ISO 4217 currency string for which this price is billed in.
4410
+ */
4411
+ currency: string;
4412
+ /**
4413
+ * The id of the item the plan will be associated with.
4414
+ */
4415
+ item_id: string;
4416
+ matrix_with_display_name_config: Record<string, unknown>;
4417
+ model_type: 'matrix_with_display_name';
4418
+ /**
4419
+ * The name of the price.
4420
+ */
4421
+ name: string;
4422
+ /**
4423
+ * The id of the billable metric for the price. Only needed if the price is
4424
+ * usage-based.
4425
+ */
4426
+ billable_metric_id?: string | null;
4427
+ /**
4428
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4429
+ * this is true, and in-arrears if this is false.
4430
+ */
4431
+ billed_in_advance?: boolean | null;
4432
+ /**
4433
+ * For custom cadence: specifies the duration of the billing period in days or
4434
+ * months.
4435
+ */
4436
+ billing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.BillingCycleConfiguration | null;
4437
+ /**
4438
+ * The per unit conversion rate of the price currency to the invoicing currency.
4439
+ */
4440
+ conversion_rate?: number | null;
4441
+ /**
4442
+ * An alias for the price.
4443
+ */
4444
+ external_price_id?: string | null;
4445
+ /**
4446
+ * If the Price represents a fixed cost, this represents the quantity of units
4447
+ * applied.
4448
+ */
4449
+ fixed_price_quantity?: number | null;
4450
+ /**
4451
+ * The property used to group this price on an invoice
4452
+ */
4453
+ invoice_grouping_key?: string | null;
4454
+ /**
4455
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4456
+ * If unspecified, a single invoice is produced per billing cycle.
4457
+ */
4458
+ invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null;
4459
+ /**
4460
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4461
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4462
+ * by setting `metadata` to `null`.
4463
+ */
4464
+ metadata?: Record<string, string | null> | null;
4465
+ }
4466
+ namespace NewFloatingMatrixWithDisplayNamePrice {
4467
+ /**
4468
+ * For custom cadence: specifies the duration of the billing period in days or
4469
+ * months.
4470
+ */
4471
+ interface BillingCycleConfiguration {
4472
+ /**
4473
+ * The duration of the billing period.
4474
+ */
4475
+ duration: number;
4476
+ /**
4477
+ * The unit of billing period duration.
4478
+ */
4479
+ duration_unit: 'day' | 'month';
4480
+ }
4481
+ /**
4482
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4483
+ * If unspecified, a single invoice is produced per billing cycle.
4484
+ */
4485
+ interface InvoicingCycleConfiguration {
4486
+ /**
4487
+ * The duration of the billing period.
4488
+ */
4489
+ duration: number;
4490
+ /**
4491
+ * The unit of billing period duration.
4492
+ */
4493
+ duration_unit: 'day' | 'month';
4494
+ }
4495
+ }
4256
4496
  interface NewFloatingBulkWithProrationPrice {
4257
4497
  bulk_with_proration_config: Record<string, unknown>;
4258
4498
  /**
@@ -4346,6 +4586,99 @@ export declare namespace PriceCreateParams {
4346
4586
  duration_unit: 'day' | 'month';
4347
4587
  }
4348
4588
  }
4589
+ interface NewFloatingGroupedTieredPackagePrice {
4590
+ /**
4591
+ * The cadence to bill for this price on.
4592
+ */
4593
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4594
+ /**
4595
+ * An ISO 4217 currency string for which this price is billed in.
4596
+ */
4597
+ currency: string;
4598
+ grouped_tiered_package_config: Record<string, unknown>;
4599
+ /**
4600
+ * The id of the item the plan will be associated with.
4601
+ */
4602
+ item_id: string;
4603
+ model_type: 'grouped_tiered_package';
4604
+ /**
4605
+ * The name of the price.
4606
+ */
4607
+ name: string;
4608
+ /**
4609
+ * The id of the billable metric for the price. Only needed if the price is
4610
+ * usage-based.
4611
+ */
4612
+ billable_metric_id?: string | null;
4613
+ /**
4614
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4615
+ * this is true, and in-arrears if this is false.
4616
+ */
4617
+ billed_in_advance?: boolean | null;
4618
+ /**
4619
+ * For custom cadence: specifies the duration of the billing period in days or
4620
+ * months.
4621
+ */
4622
+ billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.BillingCycleConfiguration | null;
4623
+ /**
4624
+ * The per unit conversion rate of the price currency to the invoicing currency.
4625
+ */
4626
+ conversion_rate?: number | null;
4627
+ /**
4628
+ * An alias for the price.
4629
+ */
4630
+ external_price_id?: string | null;
4631
+ /**
4632
+ * If the Price represents a fixed cost, this represents the quantity of units
4633
+ * applied.
4634
+ */
4635
+ fixed_price_quantity?: number | null;
4636
+ /**
4637
+ * The property used to group this price on an invoice
4638
+ */
4639
+ invoice_grouping_key?: string | null;
4640
+ /**
4641
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4642
+ * If unspecified, a single invoice is produced per billing cycle.
4643
+ */
4644
+ invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.InvoicingCycleConfiguration | null;
4645
+ /**
4646
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4647
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4648
+ * by setting `metadata` to `null`.
4649
+ */
4650
+ metadata?: Record<string, string | null> | null;
4651
+ }
4652
+ namespace NewFloatingGroupedTieredPackagePrice {
4653
+ /**
4654
+ * For custom cadence: specifies the duration of the billing period in days or
4655
+ * months.
4656
+ */
4657
+ interface BillingCycleConfiguration {
4658
+ /**
4659
+ * The duration of the billing period.
4660
+ */
4661
+ duration: number;
4662
+ /**
4663
+ * The unit of billing period duration.
4664
+ */
4665
+ duration_unit: 'day' | 'month';
4666
+ }
4667
+ /**
4668
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4669
+ * If unspecified, a single invoice is produced per billing cycle.
4670
+ */
4671
+ interface InvoicingCycleConfiguration {
4672
+ /**
4673
+ * The duration of the billing period.
4674
+ */
4675
+ duration: number;
4676
+ /**
4677
+ * The unit of billing period duration.
4678
+ */
4679
+ duration_unit: 'day' | 'month';
4680
+ }
4681
+ }
4349
4682
  }
4350
4683
  export interface PriceUpdateParams {
4351
4684
  /**
@@ -4388,15 +4721,7 @@ export interface PriceEvaluateParams {
4388
4721
  grouping_keys?: Array<string>;
4389
4722
  }
4390
4723
  export declare namespace Prices {
4391
- export import EvaluatePriceGroup = PricesAPI.EvaluatePriceGroup;
4392
- export import Price = PricesAPI.Price;
4393
- export import PriceEvaluateResponse = PricesAPI.PriceEvaluateResponse;
4394
- export import PricesPage = PricesAPI.PricesPage;
4395
- export import PriceCreateParams = PricesAPI.PriceCreateParams;
4396
- export import PriceUpdateParams = PricesAPI.PriceUpdateParams;
4397
- export import PriceListParams = PricesAPI.PriceListParams;
4398
- export import PriceEvaluateParams = PricesAPI.PriceEvaluateParams;
4399
- export import ExternalPriceID = ExternalPriceIDAPI.ExternalPriceID;
4400
- export import ExternalPriceIDUpdateParams = ExternalPriceIDAPI.ExternalPriceIDUpdateParams;
4724
+ export { type EvaluatePriceGroup as EvaluatePriceGroup, type Price as Price, type PriceEvaluateResponse as PriceEvaluateResponse, PricesPage as PricesPage, type PriceCreateParams as PriceCreateParams, type PriceUpdateParams as PriceUpdateParams, type PriceListParams as PriceListParams, type PriceEvaluateParams as PriceEvaluateParams, };
4725
+ export { ExternalPriceID as ExternalPriceID, type ExternalPriceIDUpdateParams as ExternalPriceIDUpdateParams, };
4401
4726
  }
4402
4727
  //# sourceMappingURL=prices.d.ts.map