orb-billing 4.74.0 → 5.1.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 (166) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/core.d.ts +7 -4
  3. package/core.d.ts.map +1 -1
  4. package/core.js +16 -9
  5. package/core.js.map +1 -1
  6. package/core.mjs +16 -9
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +151 -14
  9. package/index.d.ts +151 -14
  10. package/index.d.ts.map +1 -1
  11. package/index.js +6 -5
  12. package/index.js.map +1 -1
  13. package/index.mjs +9 -8
  14. package/index.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/resource.d.ts +1 -1
  17. package/resource.d.ts.map +1 -1
  18. package/resource.js.map +1 -1
  19. package/resource.mjs.map +1 -1
  20. package/resources/alerts.d.ts +20 -88
  21. package/resources/alerts.d.ts.map +1 -1
  22. package/resources/alerts.js.map +1 -1
  23. package/resources/alerts.mjs.map +1 -1
  24. package/resources/beta/beta.d.ts +9 -7313
  25. package/resources/beta/beta.d.ts.map +1 -1
  26. package/resources/beta/beta.js.map +1 -1
  27. package/resources/beta/beta.mjs.map +1 -1
  28. package/resources/beta/external-plan-id.d.ts +7 -7074
  29. package/resources/beta/external-plan-id.d.ts.map +1 -1
  30. package/resources/beta/external-plan-id.js.map +1 -1
  31. package/resources/beta/external-plan-id.mjs.map +1 -1
  32. package/resources/credit-notes.d.ts +64 -164
  33. package/resources/credit-notes.d.ts.map +1 -1
  34. package/resources/credit-notes.js +28 -6
  35. package/resources/credit-notes.js.map +1 -1
  36. package/resources/credit-notes.mjs +27 -4
  37. package/resources/credit-notes.mjs.map +1 -1
  38. package/resources/customers/balance-transactions.d.ts +5 -32
  39. package/resources/customers/balance-transactions.d.ts.map +1 -1
  40. package/resources/customers/balance-transactions.js.map +1 -1
  41. package/resources/customers/balance-transactions.mjs.map +1 -1
  42. package/resources/customers/costs.d.ts +19 -97
  43. package/resources/customers/costs.d.ts.map +1 -1
  44. package/resources/customers/credits/credits.d.ts +4 -4
  45. package/resources/customers/credits/credits.d.ts.map +1 -1
  46. package/resources/customers/credits/credits.js.map +1 -1
  47. package/resources/customers/credits/credits.mjs.map +1 -1
  48. package/resources/customers/credits/index.d.ts +2 -2
  49. package/resources/customers/credits/index.d.ts.map +1 -1
  50. package/resources/customers/credits/index.js.map +1 -1
  51. package/resources/customers/credits/index.mjs.map +1 -1
  52. package/resources/customers/credits/ledger.d.ts +239 -984
  53. package/resources/customers/credits/ledger.d.ts.map +1 -1
  54. package/resources/customers/credits/ledger.js.map +1 -1
  55. package/resources/customers/credits/ledger.mjs.map +1 -1
  56. package/resources/customers/credits/top-ups.d.ts +29 -121
  57. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  58. package/resources/customers/credits/top-ups.js.map +1 -1
  59. package/resources/customers/credits/top-ups.mjs.map +1 -1
  60. package/resources/customers/customers.d.ts +84 -682
  61. package/resources/customers/customers.d.ts.map +1 -1
  62. package/resources/customers/customers.js.map +1 -1
  63. package/resources/customers/customers.mjs.map +1 -1
  64. package/resources/customers/index.d.ts +1 -1
  65. package/resources/customers/index.d.ts.map +1 -1
  66. package/resources/customers/index.js.map +1 -1
  67. package/resources/customers/index.mjs.map +1 -1
  68. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +6 -2
  69. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  70. package/resources/events/backfills.d.ts +2 -2
  71. package/resources/events/events.d.ts +9 -3
  72. package/resources/events/events.d.ts.map +1 -1
  73. package/resources/index.d.ts +7 -7
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -4
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +3 -3
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/invoice-line-items.d.ts +9 -395
  80. package/resources/invoice-line-items.d.ts.map +1 -1
  81. package/resources/invoice-line-items.js.map +1 -1
  82. package/resources/invoice-line-items.mjs.map +1 -1
  83. package/resources/invoices.d.ts +43 -1704
  84. package/resources/invoices.d.ts.map +1 -1
  85. package/resources/invoices.js +4 -7
  86. package/resources/invoices.js.map +1 -1
  87. package/resources/invoices.mjs +3 -5
  88. package/resources/invoices.mjs.map +1 -1
  89. package/resources/items.d.ts +9 -3
  90. package/resources/items.d.ts.map +1 -1
  91. package/resources/metrics.d.ts +9 -3
  92. package/resources/metrics.d.ts.map +1 -1
  93. package/resources/plans/external-plan-id.d.ts +3 -1
  94. package/resources/plans/external-plan-id.d.ts.map +1 -1
  95. package/resources/plans/plans.d.ts +47 -3783
  96. package/resources/plans/plans.d.ts.map +1 -1
  97. package/resources/plans/plans.js.map +1 -1
  98. package/resources/plans/plans.mjs.map +1 -1
  99. package/resources/prices/external-price-id.d.ts +6 -4
  100. package/resources/prices/external-price-id.d.ts.map +1 -1
  101. package/resources/prices/index.d.ts +1 -1
  102. package/resources/prices/index.d.ts.map +1 -1
  103. package/resources/prices/index.js +1 -2
  104. package/resources/prices/index.js.map +1 -1
  105. package/resources/prices/index.mjs +1 -1
  106. package/resources/prices/index.mjs.map +1 -1
  107. package/resources/prices/prices.d.ts +505 -9417
  108. package/resources/prices/prices.d.ts.map +1 -1
  109. package/resources/prices/prices.js +39 -20
  110. package/resources/prices/prices.js.map +1 -1
  111. package/resources/prices/prices.mjs +38 -18
  112. package/resources/prices/prices.mjs.map +1 -1
  113. package/resources/shared.d.ts +7894 -9
  114. package/resources/shared.d.ts.map +1 -1
  115. package/resources/shared.js +11 -0
  116. package/resources/shared.js.map +1 -1
  117. package/resources/shared.mjs +7 -1
  118. package/resources/shared.mjs.map +1 -1
  119. package/resources/subscription-changes.d.ts +140 -2158
  120. package/resources/subscription-changes.d.ts.map +1 -1
  121. package/resources/subscription-changes.js.map +1 -1
  122. package/resources/subscription-changes.mjs.map +1 -1
  123. package/resources/subscriptions.d.ts +2646 -27141
  124. package/resources/subscriptions.d.ts.map +1 -1
  125. package/resources/subscriptions.js +2 -2
  126. package/resources/subscriptions.js.map +1 -1
  127. package/resources/subscriptions.mjs +2 -2
  128. package/resources/subscriptions.mjs.map +1 -1
  129. package/src/core.ts +17 -8
  130. package/src/index.ts +229 -42
  131. package/src/resource.ts +1 -1
  132. package/src/resources/alerts.ts +20 -94
  133. package/src/resources/beta/beta.ts +124 -8892
  134. package/src/resources/beta/external-plan-id.ts +118 -8593
  135. package/src/resources/credit-notes.ts +67 -216
  136. package/src/resources/customers/balance-transactions.ts +5 -36
  137. package/src/resources/customers/costs.ts +19 -117
  138. package/src/resources/customers/credits/credits.ts +18 -0
  139. package/src/resources/customers/credits/index.ts +9 -0
  140. package/src/resources/customers/credits/ledger.ts +259 -1468
  141. package/src/resources/customers/credits/top-ups.ts +33 -136
  142. package/src/resources/customers/customers.ts +165 -1457
  143. package/src/resources/customers/index.ts +8 -0
  144. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +2 -2
  145. package/src/resources/events/backfills.ts +2 -2
  146. package/src/resources/events/events.ts +3 -3
  147. package/src/resources/index.ts +42 -22
  148. package/src/resources/invoice-line-items.ts +13 -501
  149. package/src/resources/invoices.ts +65 -2396
  150. package/src/resources/items.ts +3 -3
  151. package/src/resources/metrics.ts +3 -3
  152. package/src/resources/plans/external-plan-id.ts +1 -1
  153. package/src/resources/plans/plans.ts +81 -4563
  154. package/src/resources/prices/external-price-id.ts +4 -4
  155. package/src/resources/prices/index.ts +2 -2
  156. package/src/resources/prices/prices.ts +561 -11851
  157. package/src/resources/shared.ts +9991 -22
  158. package/src/resources/subscription-changes.ts +171 -2670
  159. package/src/resources/subscriptions.ts +3246 -32984
  160. package/src/version.ts +1 -1
  161. package/version.d.ts +1 -1
  162. package/version.d.ts.map +1 -1
  163. package/version.js +1 -1
  164. package/version.js.map +1 -1
  165. package/version.mjs +1 -1
  166. package/version.mjs.map +1 -1
@@ -3,7 +3,6 @@
3
3
  import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
5
  import * as Shared from './shared';
6
- import * as PricesAPI from './prices/prices';
7
6
 
8
7
  export class InvoiceLineItems extends APIResource {
9
8
  /**
@@ -36,11 +35,11 @@ export interface InvoiceLineItemCreateResponse {
36
35
  * discounts -> minimums -> maximums).
37
36
  */
38
37
  adjustments: Array<
39
- | InvoiceLineItemCreateResponse.MonetaryUsageDiscountAdjustment
40
- | InvoiceLineItemCreateResponse.MonetaryAmountDiscountAdjustment
41
- | InvoiceLineItemCreateResponse.MonetaryPercentageDiscountAdjustment
42
- | InvoiceLineItemCreateResponse.MonetaryMinimumAdjustment
43
- | InvoiceLineItemCreateResponse.MonetaryMaximumAdjustment
38
+ | Shared.MonetaryUsageDiscountAdjustment
39
+ | Shared.MonetaryAmountDiscountAdjustment
40
+ | Shared.MonetaryPercentageDiscountAdjustment
41
+ | Shared.MonetaryMinimumAdjustment
42
+ | Shared.MonetaryMaximumAdjustment
44
43
  >;
45
44
 
46
45
  /**
@@ -54,6 +53,9 @@ export interface InvoiceLineItemCreateResponse {
54
53
  */
55
54
  credits_applied: string;
56
55
 
56
+ /**
57
+ * @deprecated This field is deprecated in favor of `adjustments`
58
+ */
57
59
  discount: Shared.Discount | null;
58
60
 
59
61
  /**
@@ -76,7 +78,7 @@ export interface InvoiceLineItemCreateResponse {
76
78
  /**
77
79
  * @deprecated This field is deprecated in favor of `adjustments`.
78
80
  */
79
- maximum: InvoiceLineItemCreateResponse.Maximum | null;
81
+ maximum: Shared.Maximum | null;
80
82
 
81
83
  /**
82
84
  * @deprecated This field is deprecated in favor of `adjustments`.
@@ -86,7 +88,7 @@ export interface InvoiceLineItemCreateResponse {
86
88
  /**
87
89
  * @deprecated This field is deprecated in favor of `adjustments`.
88
90
  */
89
- minimum: InvoiceLineItemCreateResponse.Minimum | null;
91
+ minimum: Shared.Minimum | null;
90
92
 
91
93
  /**
92
94
  * @deprecated This field is deprecated in favor of `adjustments`.
@@ -115,7 +117,7 @@ export interface InvoiceLineItemCreateResponse {
115
117
  * For more on the types of prices, see
116
118
  * [the core concepts documentation](/core-concepts#plan-and-price)
117
119
  */
118
- price: PricesAPI.Price;
120
+ price: Shared.Price;
119
121
 
120
122
  /**
121
123
  * Either the fixed fee quantity or the usage during the service period.
@@ -131,11 +133,7 @@ export interface InvoiceLineItemCreateResponse {
131
133
  * For complex pricing structures, the line item can be broken down further in
132
134
  * `sub_line_items`.
133
135
  */
134
- sub_line_items: Array<
135
- | InvoiceLineItemCreateResponse.MatrixSubLineItem
136
- | InvoiceLineItemCreateResponse.TierSubLineItem
137
- | InvoiceLineItemCreateResponse.OtherSubLineItem
138
- >;
136
+ sub_line_items: Array<Shared.MatrixSubLineItem | Shared.TierSubLineItem | Shared.OtherSubLineItem>;
139
137
 
140
138
  /**
141
139
  * The line amount before before any adjustments.
@@ -146,7 +144,7 @@ export interface InvoiceLineItemCreateResponse {
146
144
  * An array of tax rates and their incurred tax amounts. Empty if no tax
147
145
  * integration is configured.
148
146
  */
149
- tax_amounts: Array<InvoiceLineItemCreateResponse.TaxAmount>;
147
+ tax_amounts: Array<Shared.TaxAmount>;
150
148
 
151
149
  /**
152
150
  * A list of customer ids that were used to calculate the usage for this line item.
@@ -154,492 +152,6 @@ export interface InvoiceLineItemCreateResponse {
154
152
  usage_customer_ids: Array<string> | null;
155
153
  }
156
154
 
157
- export namespace InvoiceLineItemCreateResponse {
158
- export interface MonetaryUsageDiscountAdjustment {
159
- id: string;
160
-
161
- adjustment_type: 'usage_discount';
162
-
163
- /**
164
- * The value applied by an adjustment.
165
- */
166
- amount: string;
167
-
168
- /**
169
- * @deprecated The price IDs that this adjustment applies to.
170
- */
171
- applies_to_price_ids: Array<string>;
172
-
173
- /**
174
- * The filters that determine which prices to apply this adjustment to.
175
- */
176
- filters: Array<MonetaryUsageDiscountAdjustment.Filter>;
177
-
178
- /**
179
- * True for adjustments that apply to an entire invocice, false for adjustments
180
- * that apply to only one price.
181
- */
182
- is_invoice_level: boolean;
183
-
184
- /**
185
- * The reason for the adjustment.
186
- */
187
- reason: string | null;
188
-
189
- /**
190
- * The number of usage units by which to discount the price this adjustment applies
191
- * to in a given billing period.
192
- */
193
- usage_discount: number;
194
- }
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
-
215
- export interface MonetaryAmountDiscountAdjustment {
216
- id: string;
217
-
218
- adjustment_type: 'amount_discount';
219
-
220
- /**
221
- * The value applied by an adjustment.
222
- */
223
- amount: string;
224
-
225
- /**
226
- * The amount by which to discount the prices this adjustment applies to in a given
227
- * billing period.
228
- */
229
- amount_discount: string;
230
-
231
- /**
232
- * @deprecated The price IDs that this adjustment applies to.
233
- */
234
- applies_to_price_ids: Array<string>;
235
-
236
- /**
237
- * The filters that determine which prices to apply this adjustment to.
238
- */
239
- filters: Array<MonetaryAmountDiscountAdjustment.Filter>;
240
-
241
- /**
242
- * True for adjustments that apply to an entire invocice, false for adjustments
243
- * that apply to only one price.
244
- */
245
- is_invoice_level: boolean;
246
-
247
- /**
248
- * The reason for the adjustment.
249
- */
250
- reason: string | null;
251
- }
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
-
272
- export interface MonetaryPercentageDiscountAdjustment {
273
- id: string;
274
-
275
- adjustment_type: 'percentage_discount';
276
-
277
- /**
278
- * The value applied by an adjustment.
279
- */
280
- amount: string;
281
-
282
- /**
283
- * @deprecated The price IDs that this adjustment applies to.
284
- */
285
- applies_to_price_ids: Array<string>;
286
-
287
- /**
288
- * The filters that determine which prices to apply this adjustment to.
289
- */
290
- filters: Array<MonetaryPercentageDiscountAdjustment.Filter>;
291
-
292
- /**
293
- * True for adjustments that apply to an entire invocice, false for adjustments
294
- * that apply to only one price.
295
- */
296
- is_invoice_level: boolean;
297
-
298
- /**
299
- * The percentage (as a value between 0 and 1) by which to discount the price
300
- * intervals this adjustment applies to in a given billing period.
301
- */
302
- percentage_discount: number;
303
-
304
- /**
305
- * The reason for the adjustment.
306
- */
307
- reason: string | null;
308
- }
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
-
329
- export interface MonetaryMinimumAdjustment {
330
- id: string;
331
-
332
- adjustment_type: 'minimum';
333
-
334
- /**
335
- * The value applied by an adjustment.
336
- */
337
- amount: string;
338
-
339
- /**
340
- * @deprecated The price IDs that this adjustment applies to.
341
- */
342
- applies_to_price_ids: Array<string>;
343
-
344
- /**
345
- * The filters that determine which prices to apply this adjustment to.
346
- */
347
- filters: Array<MonetaryMinimumAdjustment.Filter>;
348
-
349
- /**
350
- * True for adjustments that apply to an entire invocice, false for adjustments
351
- * that apply to only one price.
352
- */
353
- is_invoice_level: boolean;
354
-
355
- /**
356
- * The item ID that revenue from this minimum will be attributed to.
357
- */
358
- item_id: string;
359
-
360
- /**
361
- * The minimum amount to charge in a given billing period for the prices this
362
- * adjustment applies to.
363
- */
364
- minimum_amount: string;
365
-
366
- /**
367
- * The reason for the adjustment.
368
- */
369
- reason: string | null;
370
- }
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
-
391
- export interface MonetaryMaximumAdjustment {
392
- id: string;
393
-
394
- adjustment_type: 'maximum';
395
-
396
- /**
397
- * The value applied by an adjustment.
398
- */
399
- amount: string;
400
-
401
- /**
402
- * @deprecated The price IDs that this adjustment applies to.
403
- */
404
- applies_to_price_ids: Array<string>;
405
-
406
- /**
407
- * The filters that determine which prices to apply this adjustment to.
408
- */
409
- filters: Array<MonetaryMaximumAdjustment.Filter>;
410
-
411
- /**
412
- * True for adjustments that apply to an entire invocice, false for adjustments
413
- * that apply to only one price.
414
- */
415
- is_invoice_level: boolean;
416
-
417
- /**
418
- * The maximum amount to charge in a given billing period for the prices this
419
- * adjustment applies to.
420
- */
421
- maximum_amount: string;
422
-
423
- /**
424
- * The reason for the adjustment.
425
- */
426
- reason: string | null;
427
- }
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
-
448
- /**
449
- * @deprecated This field is deprecated in favor of `adjustments`.
450
- */
451
- export interface Maximum {
452
- /**
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.
455
- */
456
- applies_to_price_ids: Array<string>;
457
-
458
- /**
459
- * The filters that determine which prices to apply this maximum to.
460
- */
461
- filters: Array<Maximum.Filter>;
462
-
463
- /**
464
- * Maximum amount applied
465
- */
466
- maximum_amount: string;
467
- }
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
-
488
- /**
489
- * @deprecated This field is deprecated in favor of `adjustments`.
490
- */
491
- export interface Minimum {
492
- /**
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.
495
- */
496
- applies_to_price_ids: Array<string>;
497
-
498
- /**
499
- * The filters that determine which prices to apply this minimum to.
500
- */
501
- filters: Array<Minimum.Filter>;
502
-
503
- /**
504
- * Minimum amount applied
505
- */
506
- minimum_amount: string;
507
- }
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
-
528
- export interface MatrixSubLineItem {
529
- /**
530
- * The total amount for this sub line item.
531
- */
532
- amount: string;
533
-
534
- grouping: MatrixSubLineItem.Grouping | null;
535
-
536
- matrix_config: MatrixSubLineItem.MatrixConfig;
537
-
538
- name: string;
539
-
540
- quantity: number;
541
-
542
- type: 'matrix';
543
- }
544
-
545
- export namespace MatrixSubLineItem {
546
- export interface Grouping {
547
- key: string;
548
-
549
- /**
550
- * No value indicates the default group
551
- */
552
- value: string | null;
553
- }
554
-
555
- export interface MatrixConfig {
556
- /**
557
- * The ordered dimension values for this line item.
558
- */
559
- dimension_values: Array<string | null>;
560
- }
561
- }
562
-
563
- export interface TierSubLineItem {
564
- /**
565
- * The total amount for this sub line item.
566
- */
567
- amount: string;
568
-
569
- grouping: TierSubLineItem.Grouping | null;
570
-
571
- name: string;
572
-
573
- quantity: number;
574
-
575
- tier_config: TierSubLineItem.TierConfig;
576
-
577
- type: 'tier';
578
- }
579
-
580
- export namespace TierSubLineItem {
581
- export interface Grouping {
582
- key: string;
583
-
584
- /**
585
- * No value indicates the default group
586
- */
587
- value: string | null;
588
- }
589
-
590
- export interface TierConfig {
591
- first_unit: number;
592
-
593
- last_unit: number | null;
594
-
595
- unit_amount: string;
596
- }
597
- }
598
-
599
- export interface OtherSubLineItem {
600
- /**
601
- * The total amount for this sub line item.
602
- */
603
- amount: string;
604
-
605
- grouping: OtherSubLineItem.Grouping | null;
606
-
607
- name: string;
608
-
609
- quantity: number;
610
-
611
- type: "'null'";
612
- }
613
-
614
- export namespace OtherSubLineItem {
615
- export interface Grouping {
616
- key: string;
617
-
618
- /**
619
- * No value indicates the default group
620
- */
621
- value: string | null;
622
- }
623
- }
624
-
625
- export interface TaxAmount {
626
- /**
627
- * The amount of additional tax incurred by this tax rate.
628
- */
629
- amount: string;
630
-
631
- /**
632
- * The human-readable description of the applied tax rate.
633
- */
634
- tax_rate_description: string;
635
-
636
- /**
637
- * The tax rate percentage, out of 100.
638
- */
639
- tax_rate_percentage: string | null;
640
- }
641
- }
642
-
643
155
  export interface InvoiceLineItemCreateParams {
644
156
  /**
645
157
  * The total amount in the invoice's currency to add to the line item.