orb-billing 4.33.0 → 4.47.2

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 (255) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/LICENSE +1 -1
  3. package/README.md +10 -1
  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 +1 -1
  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 +7 -25
  87. package/resources/customers/customers.d.ts.map +1 -1
  88. package/resources/customers/customers.js +10 -10
  89. package/resources/customers/customers.js.map +1 -1
  90. package/resources/customers/customers.mjs +10 -10
  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 +1 -3
  131. package/resources/events/volume.d.ts.map +1 -1
  132. package/resources/events/volume.js +0 -2
  133. package/resources/events/volume.js.map +1 -1
  134. package/resources/events/volume.mjs +0 -2
  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 +78 -13
  149. package/resources/invoices.d.ts.map +1 -1
  150. package/resources/invoices.js +8 -27
  151. package/resources/invoices.js.map +1 -1
  152. package/resources/invoices.mjs +8 -4
  153. package/resources/invoices.mjs.map +1 -1
  154. package/resources/items.d.ts +1 -6
  155. package/resources/items.d.ts.map +1 -1
  156. package/resources/items.js +1 -27
  157. package/resources/items.js.map +1 -1
  158. package/resources/items.mjs +1 -4
  159. package/resources/items.mjs.map +1 -1
  160. package/resources/metrics.d.ts +1 -6
  161. package/resources/metrics.d.ts.map +1 -1
  162. package/resources/metrics.js +1 -27
  163. package/resources/metrics.js.map +1 -1
  164. package/resources/metrics.mjs +1 -4
  165. package/resources/metrics.mjs.map +1 -1
  166. package/resources/plans/external-plan-id.d.ts +1 -2
  167. package/resources/plans/external-plan-id.d.ts.map +1 -1
  168. package/resources/plans/external-plan-id.js +0 -2
  169. package/resources/plans/external-plan-id.js.map +1 -1
  170. package/resources/plans/external-plan-id.mjs +0 -2
  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 +331 -9
  178. package/resources/plans/plans.d.ts.map +1 -1
  179. package/resources/plans/plans.js +3 -5
  180. package/resources/plans/plans.js.map +1 -1
  181. package/resources/plans/plans.mjs +3 -5
  182. package/resources/plans/plans.mjs.map +1 -1
  183. package/resources/prices/external-price-id.d.ts +1 -2
  184. package/resources/prices/external-price-id.d.ts.map +1 -1
  185. package/resources/prices/external-price-id.js +0 -2
  186. package/resources/prices/external-price-id.js.map +1 -1
  187. package/resources/prices/external-price-id.mjs +0 -2
  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 +339 -13
  196. package/resources/prices/prices.d.ts.map +1 -1
  197. package/resources/prices/prices.js +3 -5
  198. package/resources/prices/prices.js.map +1 -1
  199. package/resources/prices/prices.mjs +3 -5
  200. package/resources/prices/prices.mjs.map +1 -1
  201. package/resources/shared.d.ts +14 -16
  202. package/resources/shared.d.ts.map +1 -1
  203. package/resources/subscriptions.d.ts +7629 -191
  204. package/resources/subscriptions.d.ts.map +1 -1
  205. package/resources/subscriptions.js +2 -29
  206. package/resources/subscriptions.js.map +1 -1
  207. package/resources/subscriptions.mjs +2 -6
  208. package/resources/subscriptions.mjs.map +1 -1
  209. package/resources/top-level.d.ts +1 -2
  210. package/resources/top-level.d.ts.map +1 -1
  211. package/resources/top-level.js +0 -2
  212. package/resources/top-level.js.map +1 -1
  213. package/resources/top-level.mjs +0 -2
  214. package/resources/top-level.mjs.map +1 -1
  215. package/src/core.ts +23 -19
  216. package/src/error.ts +82 -125
  217. package/src/index.ts +334 -130
  218. package/src/resources/alerts.ts +117 -24
  219. package/src/resources/coupons/coupons.ts +13 -8
  220. package/src/resources/coupons/index.ts +2 -2
  221. package/src/resources/coupons/subscriptions.ts +2 -3
  222. package/src/resources/credit-notes.ts +45 -5
  223. package/src/resources/customers/balance-transactions.ts +10 -7
  224. package/src/resources/customers/costs.ts +7 -6
  225. package/src/resources/customers/credits/credits.ts +82 -32
  226. package/src/resources/customers/credits/index.ts +20 -20
  227. package/src/resources/customers/credits/ledger.ts +32 -26
  228. package/src/resources/customers/credits/top-ups.ts +16 -12
  229. package/src/resources/customers/customers.ts +68 -26
  230. package/src/resources/customers/index.ts +17 -17
  231. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
  232. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
  233. package/src/resources/dimensional-price-groups/index.ts +10 -0
  234. package/src/resources/events/backfills.ts +17 -12
  235. package/src/resources/events/events.ts +42 -23
  236. package/src/resources/events/index.ts +15 -15
  237. package/src/resources/events/volume.ts +2 -4
  238. package/src/resources/index.ts +113 -67
  239. package/src/resources/invoice-line-items.ts +5 -4
  240. package/src/resources/invoices.ts +108 -14
  241. package/src/resources/items.ts +10 -7
  242. package/src/resources/metrics.ts +10 -7
  243. package/src/resources/plans/external-plan-id.ts +2 -3
  244. package/src/resources/plans/index.ts +9 -2
  245. package/src/resources/plans/plans.ts +424 -9
  246. package/src/resources/prices/external-price-id.ts +2 -3
  247. package/src/resources/prices/index.ts +8 -8
  248. package/src/resources/prices/prices.ts +471 -15
  249. package/src/resources/shared.ts +18 -20
  250. package/src/resources/subscriptions.ts +9231 -400
  251. package/src/resources/top-level.ts +2 -3
  252. package/src/version.ts +1 -1
  253. package/version.d.ts +1 -1
  254. package/version.js +1 -1
  255. package/version.mjs +1 -1
@@ -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;
@@ -309,7 +309,7 @@ export interface EvaluatePriceGroup {
309
309
  * }
310
310
  * ```
311
311
  */
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.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;
313
313
  export declare namespace Price {
314
314
  interface UnitPrice {
315
315
  id: string;
@@ -2042,6 +2042,80 @@ export declare namespace Price {
2042
2042
  minimum_amount: string;
2043
2043
  }
2044
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
+ }
2045
2119
  interface BulkWithProrationPrice {
2046
2120
  id: string;
2047
2121
  billable_metric: BulkWithProrationPrice.BillableMetric | null;
@@ -2116,11 +2190,85 @@ export declare namespace Price {
2116
2190
  minimum_amount: string;
2117
2191
  }
2118
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
+ }
2119
2267
  }
2120
2268
  export interface PriceEvaluateResponse {
2121
2269
  data: Array<EvaluatePriceGroup>;
2122
2270
  }
2123
- 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;
2124
2272
  export declare namespace PriceCreateParams {
2125
2273
  interface NewFloatingUnitPrice {
2126
2274
  /**
@@ -4252,6 +4400,99 @@ export declare namespace PriceCreateParams {
4252
4400
  duration_unit: 'day' | 'month';
4253
4401
  }
4254
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
+ }
4255
4496
  interface NewFloatingBulkWithProrationPrice {
4256
4497
  bulk_with_proration_config: Record<string, unknown>;
4257
4498
  /**
@@ -4345,6 +4586,99 @@ export declare namespace PriceCreateParams {
4345
4586
  duration_unit: 'day' | 'month';
4346
4587
  }
4347
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
+ }
4348
4682
  }
4349
4683
  export interface PriceUpdateParams {
4350
4684
  /**
@@ -4387,15 +4721,7 @@ export interface PriceEvaluateParams {
4387
4721
  grouping_keys?: Array<string>;
4388
4722
  }
4389
4723
  export declare namespace Prices {
4390
- export import EvaluatePriceGroup = PricesAPI.EvaluatePriceGroup;
4391
- export import Price = PricesAPI.Price;
4392
- export import PriceEvaluateResponse = PricesAPI.PriceEvaluateResponse;
4393
- export import PricesPage = PricesAPI.PricesPage;
4394
- export import PriceCreateParams = PricesAPI.PriceCreateParams;
4395
- export import PriceUpdateParams = PricesAPI.PriceUpdateParams;
4396
- export import PriceListParams = PricesAPI.PriceListParams;
4397
- export import PriceEvaluateParams = PricesAPI.PriceEvaluateParams;
4398
- export import ExternalPriceID = ExternalPriceIDAPI.ExternalPriceID;
4399
- 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, };
4400
4726
  }
4401
4727
  //# sourceMappingURL=prices.d.ts.map