orb-billing 4.72.2 → 4.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/index.d.mts +5 -2
  4. package/index.d.ts +5 -2
  5. package/index.d.ts.map +1 -1
  6. package/index.js +3 -0
  7. package/index.js.map +1 -1
  8. package/index.mjs +3 -0
  9. package/index.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/alerts.d.ts +18 -0
  12. package/resources/alerts.d.ts.map +1 -1
  13. package/resources/alerts.js.map +1 -1
  14. package/resources/alerts.mjs.map +1 -1
  15. package/resources/beta/beta.d.ts +7492 -0
  16. package/resources/beta/beta.d.ts.map +1 -0
  17. package/resources/beta/beta.js +67 -0
  18. package/resources/beta/beta.js.map +1 -0
  19. package/resources/beta/beta.mjs +40 -0
  20. package/resources/beta/beta.mjs.map +1 -0
  21. package/resources/beta/external-plan-id.d.ts +7218 -0
  22. package/resources/beta/external-plan-id.d.ts.map +1 -0
  23. package/resources/beta/external-plan-id.js +40 -0
  24. package/resources/beta/external-plan-id.js.map +1 -0
  25. package/resources/beta/external-plan-id.mjs +36 -0
  26. package/resources/beta/external-plan-id.mjs.map +1 -0
  27. package/resources/beta/index.d.ts +3 -0
  28. package/resources/beta/index.d.ts.map +1 -0
  29. package/resources/beta/index.js +9 -0
  30. package/resources/beta/index.js.map +1 -0
  31. package/resources/beta/index.mjs +4 -0
  32. package/resources/beta/index.mjs.map +1 -0
  33. package/resources/beta.d.ts +2 -0
  34. package/resources/beta.d.ts.map +1 -0
  35. package/resources/beta.js +19 -0
  36. package/resources/beta.js.map +1 -0
  37. package/resources/beta.mjs +3 -0
  38. package/resources/beta.mjs.map +1 -0
  39. package/resources/credit-notes.d.ts +4 -4
  40. package/resources/credit-notes.d.ts.map +1 -1
  41. package/resources/customers/balance-transactions.d.ts +0 -7
  42. package/resources/customers/balance-transactions.d.ts.map +1 -1
  43. package/resources/customers/balance-transactions.js.map +1 -1
  44. package/resources/customers/balance-transactions.mjs.map +1 -1
  45. package/resources/customers/credits/ledger.d.ts +17 -0
  46. package/resources/customers/credits/ledger.d.ts.map +1 -1
  47. package/resources/customers/credits/ledger.js.map +1 -1
  48. package/resources/customers/credits/ledger.mjs.map +1 -1
  49. package/resources/customers/credits/top-ups.d.ts +2 -2
  50. package/resources/customers/customers.d.ts +16 -7
  51. package/resources/customers/customers.d.ts.map +1 -1
  52. package/resources/customers/customers.js +1 -4
  53. package/resources/customers/customers.js.map +1 -1
  54. package/resources/customers/customers.mjs +1 -4
  55. package/resources/customers/customers.mjs.map +1 -1
  56. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +1 -1
  57. package/resources/dimensional-price-groups/dimensional-price-groups.js +1 -1
  58. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +1 -1
  59. package/resources/index.d.ts +2 -1
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +3 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +1 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/invoice-line-items.d.ts +149 -9
  66. package/resources/invoice-line-items.d.ts.map +1 -1
  67. package/resources/invoices.d.ts +386 -26
  68. package/resources/invoices.d.ts.map +1 -1
  69. package/resources/invoices.js.map +1 -1
  70. package/resources/invoices.mjs.map +1 -1
  71. package/resources/items.d.ts +23 -0
  72. package/resources/items.d.ts.map +1 -1
  73. package/resources/items.js +6 -0
  74. package/resources/items.js.map +1 -1
  75. package/resources/items.mjs +6 -0
  76. package/resources/items.mjs.map +1 -1
  77. package/resources/plans/external-plan-id.d.ts +1 -1
  78. package/resources/plans/external-plan-id.js +1 -1
  79. package/resources/plans/external-plan-id.mjs +1 -1
  80. package/resources/plans/plans.d.ts +1153 -22
  81. package/resources/plans/plans.d.ts.map +1 -1
  82. package/resources/plans/plans.js +1 -1
  83. package/resources/plans/plans.js.map +1 -1
  84. package/resources/plans/plans.mjs +1 -1
  85. package/resources/plans/plans.mjs.map +1 -1
  86. package/resources/prices/index.d.ts +1 -1
  87. package/resources/prices/index.d.ts.map +1 -1
  88. package/resources/prices/index.js.map +1 -1
  89. package/resources/prices/index.mjs.map +1 -1
  90. package/resources/prices/prices.d.ts +6180 -123
  91. package/resources/prices/prices.d.ts.map +1 -1
  92. package/resources/prices/prices.js +40 -1
  93. package/resources/prices/prices.js.map +1 -1
  94. package/resources/prices/prices.mjs +40 -1
  95. package/resources/prices/prices.mjs.map +1 -1
  96. package/resources/shared.d.ts +14 -14
  97. package/resources/shared.d.ts.map +1 -1
  98. package/resources/subscription-changes.d.ts +648 -87
  99. package/resources/subscription-changes.d.ts.map +1 -1
  100. package/resources/subscriptions.d.ts +9527 -2978
  101. package/resources/subscriptions.d.ts.map +1 -1
  102. package/resources/subscriptions.js.map +1 -1
  103. package/resources/subscriptions.mjs.map +1 -1
  104. package/src/index.ts +21 -0
  105. package/src/resources/alerts.ts +21 -0
  106. package/src/resources/beta/beta.ts +9106 -0
  107. package/src/resources/beta/external-plan-id.ts +8748 -0
  108. package/src/resources/beta/index.ts +14 -0
  109. package/src/resources/beta.ts +3 -0
  110. package/src/resources/credit-notes.ts +4 -4
  111. package/src/resources/customers/balance-transactions.ts +0 -7
  112. package/src/resources/customers/credits/ledger.ts +21 -0
  113. package/src/resources/customers/credits/top-ups.ts +2 -2
  114. package/src/resources/customers/customers.ts +22 -4
  115. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
  116. package/src/resources/index.ts +9 -0
  117. package/src/resources/invoice-line-items.ts +177 -9
  118. package/src/resources/invoices.ts +458 -26
  119. package/src/resources/items.ts +29 -0
  120. package/src/resources/plans/external-plan-id.ts +1 -1
  121. package/src/resources/plans/plans.ts +1375 -30
  122. package/src/resources/prices/index.ts +2 -0
  123. package/src/resources/prices/prices.ts +7345 -135
  124. package/src/resources/shared.ts +18 -18
  125. package/src/resources/subscription-changes.ts +771 -102
  126. package/src/resources/subscriptions.ts +11189 -3391
  127. package/src/version.ts +1 -1
  128. package/version.d.ts +1 -1
  129. package/version.js +1 -1
  130. package/version.mjs +1 -1
@@ -0,0 +1,14 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Beta,
5
+ type PlanVersion,
6
+ type PlanVersionPhase,
7
+ type BetaCreatePlanVersionParams,
8
+ type BetaSetDefaultPlanVersionParams,
9
+ } from './beta';
10
+ export {
11
+ ExternalPlanID,
12
+ type ExternalPlanIDCreatePlanVersionParams,
13
+ type ExternalPlanIDSetDefaultPlanVersionParams,
14
+ } from './external-plan-id';
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './beta/index';
@@ -254,14 +254,14 @@ export interface CreditNoteCreateParams {
254
254
  line_items: Array<CreditNoteCreateParams.LineItem>;
255
255
 
256
256
  /**
257
- * An optional memo to attach to the credit note.
257
+ * An optional reason for the credit note.
258
258
  */
259
- memo?: string | null;
259
+ reason: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory';
260
260
 
261
261
  /**
262
- * An optional reason for the credit note.
262
+ * An optional memo to attach to the credit note.
263
263
  */
264
- reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' | null;
264
+ memo?: string | null;
265
265
  }
266
266
 
267
267
  export namespace CreditNoteCreateParams {
@@ -40,13 +40,6 @@ export class BalanceTransactions extends APIResource {
40
40
  * This endpoint retrieves all customer balance transactions in reverse
41
41
  * chronological order for a single customer, providing a complete audit trail of
42
42
  * all adjustments and invoice applications.
43
- *
44
- * ## Eligibility
45
- *
46
- * The customer balance can only be applied to invoices or adjusted manually if
47
- * invoices are not synced to a separate invoicing provider. If a payment gateway
48
- * such as Stripe is used, the balance will be applied to the invoice before
49
- * forwarding payment to the gateway.
50
43
  */
51
44
  list(
52
45
  customerId: string,
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../../../resource';
4
4
  import { isRequestOptions } from '../../../core';
5
5
  import * as Core from '../../../core';
6
+ import * as InvoicesAPI from '../../invoices';
6
7
  import { Page, type PageParams } from '../../../pagination';
7
8
 
8
9
  export class Ledger extends APIResource {
@@ -513,6 +514,11 @@ export namespace LedgerListResponse {
513
514
  metadata: Record<string, string>;
514
515
 
515
516
  starting_balance: number;
517
+
518
+ /**
519
+ * If the increment resulted in invoice creation, the list of created invoices
520
+ */
521
+ created_invoices?: Array<InvoicesAPI.Invoice> | null;
516
522
  }
517
523
 
518
524
  export namespace IncrementLedgerEntry {
@@ -896,6 +902,11 @@ export namespace LedgerCreateEntryResponse {
896
902
  metadata: Record<string, string>;
897
903
 
898
904
  starting_balance: number;
905
+
906
+ /**
907
+ * If the increment resulted in invoice creation, the list of created invoices
908
+ */
909
+ created_invoices?: Array<InvoicesAPI.Invoice> | null;
899
910
  }
900
911
 
901
912
  export namespace IncrementLedgerEntry {
@@ -1279,6 +1290,11 @@ export namespace LedgerCreateEntryByExternalIDResponse {
1279
1290
  metadata: Record<string, string>;
1280
1291
 
1281
1292
  starting_balance: number;
1293
+
1294
+ /**
1295
+ * If the increment resulted in invoice creation, the list of created invoices
1296
+ */
1297
+ created_invoices?: Array<InvoicesAPI.Invoice> | null;
1282
1298
  }
1283
1299
 
1284
1300
  export namespace IncrementLedgerEntry {
@@ -1662,6 +1678,11 @@ export namespace LedgerListByExternalIDResponse {
1662
1678
  metadata: Record<string, string>;
1663
1679
 
1664
1680
  starting_balance: number;
1681
+
1682
+ /**
1683
+ * If the increment resulted in invoice creation, the list of created invoices
1684
+ */
1685
+ created_invoices?: Array<InvoicesAPI.Invoice> | null;
1665
1686
  }
1666
1687
 
1667
1688
  export namespace IncrementLedgerEntry {
@@ -449,7 +449,7 @@ export interface TopUpCreateParams {
449
449
 
450
450
  /**
451
451
  * The date from which the top-up is active. If unspecified, the top-up is active
452
- * immediately.
452
+ * immediately. This should not be more than 10 days in the past.
453
453
  */
454
454
  active_from?: string | null;
455
455
 
@@ -528,7 +528,7 @@ export interface TopUpCreateByExternalIDParams {
528
528
 
529
529
  /**
530
530
  * The date from which the top-up is active. If unspecified, the top-up is active
531
- * immediately.
531
+ * immediately. This should not be more than 10 days in the past.
532
532
  */
533
533
  active_from?: string | null;
534
534
 
@@ -103,10 +103,7 @@ export class Customers extends APIResource {
103
103
  * **Note**: This operation happens asynchronously and can be expected to take a
104
104
  * few minutes to propagate to related resources. However, querying for the
105
105
  * customer on subsequent GET requests while deletion is in process will reflect
106
- * its deletion with a `deleted: true` property. Once the customer deletion has
107
- * been fully processed, the customer will not be returned in the API.
108
- *
109
- * On successful processing, this returns an empty dictionary (`{}`) in the API.
106
+ * its deletion.
110
107
  */
111
108
  delete(customerId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
112
109
  return this._client.delete(`/customers/${customerId}`, {
@@ -812,6 +809,7 @@ export interface CustomerCreateParams {
812
809
  tax_configuration?:
813
810
  | CustomerCreateParams.NewAvalaraTaxConfiguration
814
811
  | CustomerCreateParams.NewTaxJarConfiguration
812
+ | CustomerCreateParams.NewSphereConfiguration
815
813
  | null;
816
814
 
817
815
  /**
@@ -1009,6 +1007,12 @@ export namespace CustomerCreateParams {
1009
1007
  tax_provider: 'taxjar';
1010
1008
  }
1011
1009
 
1010
+ export interface NewSphereConfiguration {
1011
+ tax_exempt: boolean;
1012
+
1013
+ tax_provider: 'sphere';
1014
+ }
1015
+
1012
1016
  /**
1013
1017
  * Tax IDs are commonly required to be displayed on customer invoices, which are
1014
1018
  * added to the headers of invoices.
@@ -1352,6 +1356,7 @@ export interface CustomerUpdateParams {
1352
1356
  tax_configuration?:
1353
1357
  | CustomerUpdateParams.NewAvalaraTaxConfiguration
1354
1358
  | CustomerUpdateParams.NewTaxJarConfiguration
1359
+ | CustomerUpdateParams.NewSphereConfiguration
1355
1360
  | null;
1356
1361
 
1357
1362
  /**
@@ -1542,6 +1547,12 @@ export namespace CustomerUpdateParams {
1542
1547
  tax_provider: 'taxjar';
1543
1548
  }
1544
1549
 
1550
+ export interface NewSphereConfiguration {
1551
+ tax_exempt: boolean;
1552
+
1553
+ tax_provider: 'sphere';
1554
+ }
1555
+
1545
1556
  /**
1546
1557
  * Tax IDs are commonly required to be displayed on customer invoices, which are
1547
1558
  * added to the headers of invoices.
@@ -1895,6 +1906,7 @@ export interface CustomerUpdateByExternalIDParams {
1895
1906
  tax_configuration?:
1896
1907
  | CustomerUpdateByExternalIDParams.NewAvalaraTaxConfiguration
1897
1908
  | CustomerUpdateByExternalIDParams.NewTaxJarConfiguration
1909
+ | CustomerUpdateByExternalIDParams.NewSphereConfiguration
1898
1910
  | null;
1899
1911
 
1900
1912
  /**
@@ -2085,6 +2097,12 @@ export namespace CustomerUpdateByExternalIDParams {
2085
2097
  tax_provider: 'taxjar';
2086
2098
  }
2087
2099
 
2100
+ export interface NewSphereConfiguration {
2101
+ tax_exempt: boolean;
2102
+
2103
+ tax_provider: 'sphere';
2104
+ }
2105
+
2088
2106
  /**
2089
2107
  * Tax IDs are commonly required to be displayed on customer invoices, which are
2090
2108
  * added to the headers of invoices.
@@ -20,7 +20,7 @@ export class DimensionalPriceGroups extends APIResource {
20
20
  * For example, suppose we have a billable metric that measures the number of
21
21
  * widgets used and we want to charge differently depending on the color of the
22
22
  * widget. We can create a price group with a dimension "color" and two prices: one
23
- * that charges $10 per red widget and one that charges $20 per blue widget.
23
+ * that charges \$10 per red widget and one that charges \$20 per blue widget.
24
24
  */
25
25
  create(
26
26
  body: DimensionalPriceGroupCreateParams,
@@ -13,6 +13,13 @@ export {
13
13
  type AlertDisableParams,
14
14
  type AlertEnableParams,
15
15
  } from './alerts';
16
+ export {
17
+ Beta,
18
+ type PlanVersion,
19
+ type PlanVersionPhase,
20
+ type BetaCreatePlanVersionParams,
21
+ type BetaSetDefaultPlanVersionParams,
22
+ } from './beta/beta';
16
23
  export {
17
24
  BillableMetricsPage,
18
25
  Metrics,
@@ -100,10 +107,12 @@ export {
100
107
  type EvaluatePriceGroup,
101
108
  type Price,
102
109
  type PriceEvaluateResponse,
110
+ type PriceEvaluateMultipleResponse,
103
111
  type PriceCreateParams,
104
112
  type PriceUpdateParams,
105
113
  type PriceListParams,
106
114
  type PriceEvaluateParams,
115
+ type PriceEvaluateMultipleParams,
107
116
  } from './prices/prices';
108
117
  export {
109
118
  SubscriptionChanges,
@@ -166,10 +166,15 @@ export namespace InvoiceLineItemCreateResponse {
166
166
  amount: string;
167
167
 
168
168
  /**
169
- * The price IDs that this adjustment applies to.
169
+ * @deprecated The price IDs that this adjustment applies to.
170
170
  */
171
171
  applies_to_price_ids: Array<string>;
172
172
 
173
+ /**
174
+ * The filters that determine which prices to apply this adjustment to.
175
+ */
176
+ filters: Array<MonetaryUsageDiscountAdjustment.Filter>;
177
+
173
178
  /**
174
179
  * True for adjustments that apply to an entire invocice, false for adjustments
175
180
  * that apply to only one price.
@@ -188,6 +193,25 @@ export namespace InvoiceLineItemCreateResponse {
188
193
  usage_discount: number;
189
194
  }
190
195
 
196
+ export namespace MonetaryUsageDiscountAdjustment {
197
+ export interface Filter {
198
+ /**
199
+ * The property of the price to filter on.
200
+ */
201
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
202
+
203
+ /**
204
+ * Should prices that match the filter be included or excluded.
205
+ */
206
+ operator: 'includes' | 'excludes';
207
+
208
+ /**
209
+ * The IDs or values that match this filter.
210
+ */
211
+ values: Array<string>;
212
+ }
213
+ }
214
+
191
215
  export interface MonetaryAmountDiscountAdjustment {
192
216
  id: string;
193
217
 
@@ -205,10 +229,15 @@ export namespace InvoiceLineItemCreateResponse {
205
229
  amount_discount: string;
206
230
 
207
231
  /**
208
- * The price IDs that this adjustment applies to.
232
+ * @deprecated The price IDs that this adjustment applies to.
209
233
  */
210
234
  applies_to_price_ids: Array<string>;
211
235
 
236
+ /**
237
+ * The filters that determine which prices to apply this adjustment to.
238
+ */
239
+ filters: Array<MonetaryAmountDiscountAdjustment.Filter>;
240
+
212
241
  /**
213
242
  * True for adjustments that apply to an entire invocice, false for adjustments
214
243
  * that apply to only one price.
@@ -221,6 +250,25 @@ export namespace InvoiceLineItemCreateResponse {
221
250
  reason: string | null;
222
251
  }
223
252
 
253
+ export namespace MonetaryAmountDiscountAdjustment {
254
+ export interface Filter {
255
+ /**
256
+ * The property of the price to filter on.
257
+ */
258
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
259
+
260
+ /**
261
+ * Should prices that match the filter be included or excluded.
262
+ */
263
+ operator: 'includes' | 'excludes';
264
+
265
+ /**
266
+ * The IDs or values that match this filter.
267
+ */
268
+ values: Array<string>;
269
+ }
270
+ }
271
+
224
272
  export interface MonetaryPercentageDiscountAdjustment {
225
273
  id: string;
226
274
 
@@ -232,10 +280,15 @@ export namespace InvoiceLineItemCreateResponse {
232
280
  amount: string;
233
281
 
234
282
  /**
235
- * The price IDs that this adjustment applies to.
283
+ * @deprecated The price IDs that this adjustment applies to.
236
284
  */
237
285
  applies_to_price_ids: Array<string>;
238
286
 
287
+ /**
288
+ * The filters that determine which prices to apply this adjustment to.
289
+ */
290
+ filters: Array<MonetaryPercentageDiscountAdjustment.Filter>;
291
+
239
292
  /**
240
293
  * True for adjustments that apply to an entire invocice, false for adjustments
241
294
  * that apply to only one price.
@@ -254,6 +307,25 @@ export namespace InvoiceLineItemCreateResponse {
254
307
  reason: string | null;
255
308
  }
256
309
 
310
+ export namespace MonetaryPercentageDiscountAdjustment {
311
+ export interface Filter {
312
+ /**
313
+ * The property of the price to filter on.
314
+ */
315
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
316
+
317
+ /**
318
+ * Should prices that match the filter be included or excluded.
319
+ */
320
+ operator: 'includes' | 'excludes';
321
+
322
+ /**
323
+ * The IDs or values that match this filter.
324
+ */
325
+ values: Array<string>;
326
+ }
327
+ }
328
+
257
329
  export interface MonetaryMinimumAdjustment {
258
330
  id: string;
259
331
 
@@ -265,10 +337,15 @@ export namespace InvoiceLineItemCreateResponse {
265
337
  amount: string;
266
338
 
267
339
  /**
268
- * The price IDs that this adjustment applies to.
340
+ * @deprecated The price IDs that this adjustment applies to.
269
341
  */
270
342
  applies_to_price_ids: Array<string>;
271
343
 
344
+ /**
345
+ * The filters that determine which prices to apply this adjustment to.
346
+ */
347
+ filters: Array<MonetaryMinimumAdjustment.Filter>;
348
+
272
349
  /**
273
350
  * True for adjustments that apply to an entire invocice, false for adjustments
274
351
  * that apply to only one price.
@@ -292,6 +369,25 @@ export namespace InvoiceLineItemCreateResponse {
292
369
  reason: string | null;
293
370
  }
294
371
 
372
+ export namespace MonetaryMinimumAdjustment {
373
+ export interface Filter {
374
+ /**
375
+ * The property of the price to filter on.
376
+ */
377
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
378
+
379
+ /**
380
+ * Should prices that match the filter be included or excluded.
381
+ */
382
+ operator: 'includes' | 'excludes';
383
+
384
+ /**
385
+ * The IDs or values that match this filter.
386
+ */
387
+ values: Array<string>;
388
+ }
389
+ }
390
+
295
391
  export interface MonetaryMaximumAdjustment {
296
392
  id: string;
297
393
 
@@ -303,10 +399,15 @@ export namespace InvoiceLineItemCreateResponse {
303
399
  amount: string;
304
400
 
305
401
  /**
306
- * The price IDs that this adjustment applies to.
402
+ * @deprecated The price IDs that this adjustment applies to.
307
403
  */
308
404
  applies_to_price_ids: Array<string>;
309
405
 
406
+ /**
407
+ * The filters that determine which prices to apply this adjustment to.
408
+ */
409
+ filters: Array<MonetaryMaximumAdjustment.Filter>;
410
+
310
411
  /**
311
412
  * True for adjustments that apply to an entire invocice, false for adjustments
312
413
  * that apply to only one price.
@@ -325,38 +426,105 @@ export namespace InvoiceLineItemCreateResponse {
325
426
  reason: string | null;
326
427
  }
327
428
 
429
+ export namespace MonetaryMaximumAdjustment {
430
+ export interface Filter {
431
+ /**
432
+ * The property of the price to filter on.
433
+ */
434
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
435
+
436
+ /**
437
+ * Should prices that match the filter be included or excluded.
438
+ */
439
+ operator: 'includes' | 'excludes';
440
+
441
+ /**
442
+ * The IDs or values that match this filter.
443
+ */
444
+ values: Array<string>;
445
+ }
446
+ }
447
+
328
448
  /**
329
449
  * @deprecated This field is deprecated in favor of `adjustments`.
330
450
  */
331
451
  export interface Maximum {
332
452
  /**
333
- * List of price_ids that this maximum amount applies to. For plan/plan phase
334
- * maximums, this can be a subset of prices.
453
+ * @deprecated List of price_ids that this maximum amount applies to. For plan/plan
454
+ * phase maximums, this can be a subset of prices.
335
455
  */
336
456
  applies_to_price_ids: Array<string>;
337
457
 
458
+ /**
459
+ * The filters that determine which prices to apply this maximum to.
460
+ */
461
+ filters: Array<Maximum.Filter>;
462
+
338
463
  /**
339
464
  * Maximum amount applied
340
465
  */
341
466
  maximum_amount: string;
342
467
  }
343
468
 
469
+ export namespace Maximum {
470
+ export interface Filter {
471
+ /**
472
+ * The property of the price to filter on.
473
+ */
474
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
475
+
476
+ /**
477
+ * Should prices that match the filter be included or excluded.
478
+ */
479
+ operator: 'includes' | 'excludes';
480
+
481
+ /**
482
+ * The IDs or values that match this filter.
483
+ */
484
+ values: Array<string>;
485
+ }
486
+ }
487
+
344
488
  /**
345
489
  * @deprecated This field is deprecated in favor of `adjustments`.
346
490
  */
347
491
  export interface Minimum {
348
492
  /**
349
- * List of price_ids that this minimum amount applies to. For plan/plan phase
350
- * minimums, this can be a subset of prices.
493
+ * @deprecated List of price_ids that this minimum amount applies to. For plan/plan
494
+ * phase minimums, this can be a subset of prices.
351
495
  */
352
496
  applies_to_price_ids: Array<string>;
353
497
 
498
+ /**
499
+ * The filters that determine which prices to apply this minimum to.
500
+ */
501
+ filters: Array<Minimum.Filter>;
502
+
354
503
  /**
355
504
  * Minimum amount applied
356
505
  */
357
506
  minimum_amount: string;
358
507
  }
359
508
 
509
+ export namespace Minimum {
510
+ export interface Filter {
511
+ /**
512
+ * The property of the price to filter on.
513
+ */
514
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
515
+
516
+ /**
517
+ * Should prices that match the filter be included or excluded.
518
+ */
519
+ operator: 'includes' | 'excludes';
520
+
521
+ /**
522
+ * The IDs or values that match this filter.
523
+ */
524
+ values: Array<string>;
525
+ }
526
+ }
527
+
360
528
  export interface MatrixSubLineItem {
361
529
  /**
362
530
  * The total amount for this sub line item.