orb-billing 4.54.0 → 4.56.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.
- package/CHANGELOG.md +17 -0
- package/core.d.ts.map +1 -1
- package/core.js +12 -6
- package/core.js.map +1 -1
- package/core.mjs +12 -6
- package/core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/events/backfills.d.ts +30 -0
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +49 -45
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +100 -92
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +24 -24
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +374 -268
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +14 -6
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/events/backfills.ts +35 -0
- package/src/resources/invoice-line-items.ts +57 -53
- package/src/resources/invoices.ts +118 -108
- package/src/resources/plans/plans.ts +31 -31
- package/src/resources/subscriptions.ts +472 -346
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -15,20 +15,21 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
15
15
|
*/
|
|
16
16
|
id: string;
|
|
17
17
|
/**
|
|
18
|
-
* The line amount after any adjustments
|
|
18
|
+
* The line amount after any adjustments and before overage conversion, credits and
|
|
19
19
|
* partial invoicing.
|
|
20
20
|
*/
|
|
21
21
|
adjusted_subtotal: string;
|
|
22
22
|
/**
|
|
23
|
-
* All adjustments applied to the line item.
|
|
23
|
+
* All adjustments (ie. maximums, minimums, discounts) applied to the line item.
|
|
24
24
|
*/
|
|
25
|
-
adjustments: Array<InvoiceLineItemCreateResponse.
|
|
25
|
+
adjustments: Array<InvoiceLineItemCreateResponse.MonetaryUsageDiscountAdjustment | InvoiceLineItemCreateResponse.MonetaryAmountDiscountAdjustment | InvoiceLineItemCreateResponse.MonetaryPercentageDiscountAdjustment | InvoiceLineItemCreateResponse.MonetaryMinimumAdjustment | InvoiceLineItemCreateResponse.MonetaryMaximumAdjustment>;
|
|
26
26
|
/**
|
|
27
|
-
* The final amount after
|
|
27
|
+
* The final amount for a line item after all adjustments and pre paid credits have
|
|
28
|
+
* been applied.
|
|
28
29
|
*/
|
|
29
30
|
amount: string;
|
|
30
31
|
/**
|
|
31
|
-
* The number of credits
|
|
32
|
+
* The number of prepaid credits applied.
|
|
32
33
|
*/
|
|
33
34
|
credits_applied: string;
|
|
34
35
|
discount: Shared.Discount | null;
|
|
@@ -79,6 +80,9 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
79
80
|
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
80
81
|
*/
|
|
81
82
|
price: PricesAPI.Price | null;
|
|
83
|
+
/**
|
|
84
|
+
* Either the fixed fee quantity or the usage during the service period.
|
|
85
|
+
*/
|
|
82
86
|
quantity: number;
|
|
83
87
|
/**
|
|
84
88
|
* The start date of the range of time applied for this line item's price.
|
|
@@ -90,7 +94,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
90
94
|
*/
|
|
91
95
|
sub_line_items: Array<InvoiceLineItemCreateResponse.MatrixSubLineItem | InvoiceLineItemCreateResponse.TierSubLineItem | InvoiceLineItemCreateResponse.OtherSubLineItem>;
|
|
92
96
|
/**
|
|
93
|
-
* The line amount before any
|
|
97
|
+
* The line amount before before any adjustments.
|
|
94
98
|
*/
|
|
95
99
|
subtotal: string;
|
|
96
100
|
/**
|
|
@@ -100,14 +104,13 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
100
104
|
tax_amounts: Array<InvoiceLineItemCreateResponse.TaxAmount>;
|
|
101
105
|
}
|
|
102
106
|
export declare namespace InvoiceLineItemCreateResponse {
|
|
103
|
-
interface
|
|
107
|
+
interface MonetaryUsageDiscountAdjustment {
|
|
104
108
|
id: string;
|
|
105
|
-
adjustment_type: '
|
|
109
|
+
adjustment_type: 'usage_discount';
|
|
106
110
|
/**
|
|
107
|
-
* The
|
|
108
|
-
* billing period.
|
|
111
|
+
* The value applied by an adjustment.
|
|
109
112
|
*/
|
|
110
|
-
|
|
113
|
+
amount: string;
|
|
111
114
|
/**
|
|
112
115
|
* The price IDs that this adjustment applies to.
|
|
113
116
|
*/
|
|
@@ -117,18 +120,28 @@ export declare namespace InvoiceLineItemCreateResponse {
|
|
|
117
120
|
* that apply to only one price.
|
|
118
121
|
*/
|
|
119
122
|
is_invoice_level: boolean;
|
|
120
|
-
/**
|
|
121
|
-
* The plan phase in which this adjustment is active.
|
|
122
|
-
*/
|
|
123
|
-
plan_phase_order: number | null;
|
|
124
123
|
/**
|
|
125
124
|
* The reason for the adjustment.
|
|
126
125
|
*/
|
|
127
126
|
reason: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* The number of usage units by which to discount the price this adjustment applies
|
|
129
|
+
* to in a given billing period.
|
|
130
|
+
*/
|
|
131
|
+
usage_discount: number;
|
|
128
132
|
}
|
|
129
|
-
interface
|
|
133
|
+
interface MonetaryAmountDiscountAdjustment {
|
|
130
134
|
id: string;
|
|
131
|
-
adjustment_type: '
|
|
135
|
+
adjustment_type: 'amount_discount';
|
|
136
|
+
/**
|
|
137
|
+
* The value applied by an adjustment.
|
|
138
|
+
*/
|
|
139
|
+
amount: string;
|
|
140
|
+
/**
|
|
141
|
+
* The amount by which to discount the prices this adjustment applies to in a given
|
|
142
|
+
* billing period.
|
|
143
|
+
*/
|
|
144
|
+
amount_discount: string;
|
|
132
145
|
/**
|
|
133
146
|
* The price IDs that this adjustment applies to.
|
|
134
147
|
*/
|
|
@@ -138,23 +151,18 @@ export declare namespace InvoiceLineItemCreateResponse {
|
|
|
138
151
|
* that apply to only one price.
|
|
139
152
|
*/
|
|
140
153
|
is_invoice_level: boolean;
|
|
141
|
-
/**
|
|
142
|
-
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
143
|
-
* intervals this adjustment applies to in a given billing period.
|
|
144
|
-
*/
|
|
145
|
-
percentage_discount: number;
|
|
146
|
-
/**
|
|
147
|
-
* The plan phase in which this adjustment is active.
|
|
148
|
-
*/
|
|
149
|
-
plan_phase_order: number | null;
|
|
150
154
|
/**
|
|
151
155
|
* The reason for the adjustment.
|
|
152
156
|
*/
|
|
153
157
|
reason: string | null;
|
|
154
158
|
}
|
|
155
|
-
interface
|
|
159
|
+
interface MonetaryPercentageDiscountAdjustment {
|
|
156
160
|
id: string;
|
|
157
|
-
adjustment_type: '
|
|
161
|
+
adjustment_type: 'percentage_discount';
|
|
162
|
+
/**
|
|
163
|
+
* The value applied by an adjustment.
|
|
164
|
+
*/
|
|
165
|
+
amount: string;
|
|
158
166
|
/**
|
|
159
167
|
* The price IDs that this adjustment applies to.
|
|
160
168
|
*/
|
|
@@ -165,22 +173,22 @@ export declare namespace InvoiceLineItemCreateResponse {
|
|
|
165
173
|
*/
|
|
166
174
|
is_invoice_level: boolean;
|
|
167
175
|
/**
|
|
168
|
-
* The
|
|
176
|
+
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
177
|
+
* intervals this adjustment applies to in a given billing period.
|
|
169
178
|
*/
|
|
170
|
-
|
|
179
|
+
percentage_discount: number;
|
|
171
180
|
/**
|
|
172
181
|
* The reason for the adjustment.
|
|
173
182
|
*/
|
|
174
183
|
reason: string | null;
|
|
175
|
-
/**
|
|
176
|
-
* The number of usage units by which to discount the price this adjustment applies
|
|
177
|
-
* to in a given billing period.
|
|
178
|
-
*/
|
|
179
|
-
usage_discount: number;
|
|
180
184
|
}
|
|
181
|
-
interface
|
|
185
|
+
interface MonetaryMinimumAdjustment {
|
|
182
186
|
id: string;
|
|
183
187
|
adjustment_type: 'minimum';
|
|
188
|
+
/**
|
|
189
|
+
* The value applied by an adjustment.
|
|
190
|
+
*/
|
|
191
|
+
amount: string;
|
|
184
192
|
/**
|
|
185
193
|
* The price IDs that this adjustment applies to.
|
|
186
194
|
*/
|
|
@@ -199,18 +207,18 @@ export declare namespace InvoiceLineItemCreateResponse {
|
|
|
199
207
|
* adjustment applies to.
|
|
200
208
|
*/
|
|
201
209
|
minimum_amount: string;
|
|
202
|
-
/**
|
|
203
|
-
* The plan phase in which this adjustment is active.
|
|
204
|
-
*/
|
|
205
|
-
plan_phase_order: number | null;
|
|
206
210
|
/**
|
|
207
211
|
* The reason for the adjustment.
|
|
208
212
|
*/
|
|
209
213
|
reason: string | null;
|
|
210
214
|
}
|
|
211
|
-
interface
|
|
215
|
+
interface MonetaryMaximumAdjustment {
|
|
212
216
|
id: string;
|
|
213
217
|
adjustment_type: 'maximum';
|
|
218
|
+
/**
|
|
219
|
+
* The value applied by an adjustment.
|
|
220
|
+
*/
|
|
221
|
+
amount: string;
|
|
214
222
|
/**
|
|
215
223
|
* The price IDs that this adjustment applies to.
|
|
216
224
|
*/
|
|
@@ -225,10 +233,6 @@ export declare namespace InvoiceLineItemCreateResponse {
|
|
|
225
233
|
* adjustment applies to.
|
|
226
234
|
*/
|
|
227
235
|
maximum_amount: string;
|
|
228
|
-
/**
|
|
229
|
-
* The plan phase in which this adjustment is active.
|
|
230
|
-
*/
|
|
231
|
-
plan_phase_order: number | null;
|
|
232
236
|
/**
|
|
233
237
|
* The reason for the adjustment.
|
|
234
238
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice-line-items.d.ts","sourceRoot":"","sources":["../src/resources/invoice-line-items.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C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ACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
package/resources/invoices.d.ts
CHANGED
|
@@ -394,7 +394,7 @@ export declare namespace Invoice {
|
|
|
394
394
|
* A unique id for this transaction.
|
|
395
395
|
*/
|
|
396
396
|
id: string;
|
|
397
|
-
action: 'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund';
|
|
397
|
+
action: 'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund' | 'external_payment';
|
|
398
398
|
/**
|
|
399
399
|
* The value of the amount changed in the transaction.
|
|
400
400
|
*/
|
|
@@ -553,20 +553,21 @@ export declare namespace Invoice {
|
|
|
553
553
|
*/
|
|
554
554
|
id: string;
|
|
555
555
|
/**
|
|
556
|
-
* The line amount after any adjustments
|
|
556
|
+
* The line amount after any adjustments and before overage conversion, credits and
|
|
557
557
|
* partial invoicing.
|
|
558
558
|
*/
|
|
559
559
|
adjusted_subtotal: string;
|
|
560
560
|
/**
|
|
561
|
-
* All adjustments applied to the line item.
|
|
561
|
+
* All adjustments (ie. maximums, minimums, discounts) applied to the line item.
|
|
562
562
|
*/
|
|
563
|
-
adjustments: Array<LineItem.
|
|
563
|
+
adjustments: Array<LineItem.MonetaryUsageDiscountAdjustment | LineItem.MonetaryAmountDiscountAdjustment | LineItem.MonetaryPercentageDiscountAdjustment | LineItem.MonetaryMinimumAdjustment | LineItem.MonetaryMaximumAdjustment>;
|
|
564
564
|
/**
|
|
565
|
-
* The final amount after
|
|
565
|
+
* The final amount for a line item after all adjustments and pre paid credits have
|
|
566
|
+
* been applied.
|
|
566
567
|
*/
|
|
567
568
|
amount: string;
|
|
568
569
|
/**
|
|
569
|
-
* The number of credits
|
|
570
|
+
* The number of prepaid credits applied.
|
|
570
571
|
*/
|
|
571
572
|
credits_applied: string;
|
|
572
573
|
discount: Shared.Discount | null;
|
|
@@ -617,6 +618,9 @@ export declare namespace Invoice {
|
|
|
617
618
|
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
618
619
|
*/
|
|
619
620
|
price: PricesAPI.Price | null;
|
|
621
|
+
/**
|
|
622
|
+
* Either the fixed fee quantity or the usage during the service period.
|
|
623
|
+
*/
|
|
620
624
|
quantity: number;
|
|
621
625
|
/**
|
|
622
626
|
* The start date of the range of time applied for this line item's price.
|
|
@@ -628,7 +632,7 @@ export declare namespace Invoice {
|
|
|
628
632
|
*/
|
|
629
633
|
sub_line_items: Array<LineItem.MatrixSubLineItem | LineItem.TierSubLineItem | LineItem.OtherSubLineItem>;
|
|
630
634
|
/**
|
|
631
|
-
* The line amount before any
|
|
635
|
+
* The line amount before before any adjustments.
|
|
632
636
|
*/
|
|
633
637
|
subtotal: string;
|
|
634
638
|
/**
|
|
@@ -638,14 +642,13 @@ export declare namespace Invoice {
|
|
|
638
642
|
tax_amounts: Array<LineItem.TaxAmount>;
|
|
639
643
|
}
|
|
640
644
|
namespace LineItem {
|
|
641
|
-
interface
|
|
645
|
+
interface MonetaryUsageDiscountAdjustment {
|
|
642
646
|
id: string;
|
|
643
|
-
adjustment_type: '
|
|
647
|
+
adjustment_type: 'usage_discount';
|
|
644
648
|
/**
|
|
645
|
-
* The
|
|
646
|
-
* billing period.
|
|
649
|
+
* The value applied by an adjustment.
|
|
647
650
|
*/
|
|
648
|
-
|
|
651
|
+
amount: string;
|
|
649
652
|
/**
|
|
650
653
|
* The price IDs that this adjustment applies to.
|
|
651
654
|
*/
|
|
@@ -655,18 +658,28 @@ export declare namespace Invoice {
|
|
|
655
658
|
* that apply to only one price.
|
|
656
659
|
*/
|
|
657
660
|
is_invoice_level: boolean;
|
|
658
|
-
/**
|
|
659
|
-
* The plan phase in which this adjustment is active.
|
|
660
|
-
*/
|
|
661
|
-
plan_phase_order: number | null;
|
|
662
661
|
/**
|
|
663
662
|
* The reason for the adjustment.
|
|
664
663
|
*/
|
|
665
664
|
reason: string | null;
|
|
665
|
+
/**
|
|
666
|
+
* The number of usage units by which to discount the price this adjustment applies
|
|
667
|
+
* to in a given billing period.
|
|
668
|
+
*/
|
|
669
|
+
usage_discount: number;
|
|
666
670
|
}
|
|
667
|
-
interface
|
|
671
|
+
interface MonetaryAmountDiscountAdjustment {
|
|
668
672
|
id: string;
|
|
669
|
-
adjustment_type: '
|
|
673
|
+
adjustment_type: 'amount_discount';
|
|
674
|
+
/**
|
|
675
|
+
* The value applied by an adjustment.
|
|
676
|
+
*/
|
|
677
|
+
amount: string;
|
|
678
|
+
/**
|
|
679
|
+
* The amount by which to discount the prices this adjustment applies to in a given
|
|
680
|
+
* billing period.
|
|
681
|
+
*/
|
|
682
|
+
amount_discount: string;
|
|
670
683
|
/**
|
|
671
684
|
* The price IDs that this adjustment applies to.
|
|
672
685
|
*/
|
|
@@ -676,23 +689,18 @@ export declare namespace Invoice {
|
|
|
676
689
|
* that apply to only one price.
|
|
677
690
|
*/
|
|
678
691
|
is_invoice_level: boolean;
|
|
679
|
-
/**
|
|
680
|
-
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
681
|
-
* intervals this adjustment applies to in a given billing period.
|
|
682
|
-
*/
|
|
683
|
-
percentage_discount: number;
|
|
684
|
-
/**
|
|
685
|
-
* The plan phase in which this adjustment is active.
|
|
686
|
-
*/
|
|
687
|
-
plan_phase_order: number | null;
|
|
688
692
|
/**
|
|
689
693
|
* The reason for the adjustment.
|
|
690
694
|
*/
|
|
691
695
|
reason: string | null;
|
|
692
696
|
}
|
|
693
|
-
interface
|
|
697
|
+
interface MonetaryPercentageDiscountAdjustment {
|
|
694
698
|
id: string;
|
|
695
|
-
adjustment_type: '
|
|
699
|
+
adjustment_type: 'percentage_discount';
|
|
700
|
+
/**
|
|
701
|
+
* The value applied by an adjustment.
|
|
702
|
+
*/
|
|
703
|
+
amount: string;
|
|
696
704
|
/**
|
|
697
705
|
* The price IDs that this adjustment applies to.
|
|
698
706
|
*/
|
|
@@ -703,22 +711,22 @@ export declare namespace Invoice {
|
|
|
703
711
|
*/
|
|
704
712
|
is_invoice_level: boolean;
|
|
705
713
|
/**
|
|
706
|
-
* The
|
|
714
|
+
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
715
|
+
* intervals this adjustment applies to in a given billing period.
|
|
707
716
|
*/
|
|
708
|
-
|
|
717
|
+
percentage_discount: number;
|
|
709
718
|
/**
|
|
710
719
|
* The reason for the adjustment.
|
|
711
720
|
*/
|
|
712
721
|
reason: string | null;
|
|
713
|
-
/**
|
|
714
|
-
* The number of usage units by which to discount the price this adjustment applies
|
|
715
|
-
* to in a given billing period.
|
|
716
|
-
*/
|
|
717
|
-
usage_discount: number;
|
|
718
722
|
}
|
|
719
|
-
interface
|
|
723
|
+
interface MonetaryMinimumAdjustment {
|
|
720
724
|
id: string;
|
|
721
725
|
adjustment_type: 'minimum';
|
|
726
|
+
/**
|
|
727
|
+
* The value applied by an adjustment.
|
|
728
|
+
*/
|
|
729
|
+
amount: string;
|
|
722
730
|
/**
|
|
723
731
|
* The price IDs that this adjustment applies to.
|
|
724
732
|
*/
|
|
@@ -737,18 +745,18 @@ export declare namespace Invoice {
|
|
|
737
745
|
* adjustment applies to.
|
|
738
746
|
*/
|
|
739
747
|
minimum_amount: string;
|
|
740
|
-
/**
|
|
741
|
-
* The plan phase in which this adjustment is active.
|
|
742
|
-
*/
|
|
743
|
-
plan_phase_order: number | null;
|
|
744
748
|
/**
|
|
745
749
|
* The reason for the adjustment.
|
|
746
750
|
*/
|
|
747
751
|
reason: string | null;
|
|
748
752
|
}
|
|
749
|
-
interface
|
|
753
|
+
interface MonetaryMaximumAdjustment {
|
|
750
754
|
id: string;
|
|
751
755
|
adjustment_type: 'maximum';
|
|
756
|
+
/**
|
|
757
|
+
* The value applied by an adjustment.
|
|
758
|
+
*/
|
|
759
|
+
amount: string;
|
|
752
760
|
/**
|
|
753
761
|
* The price IDs that this adjustment applies to.
|
|
754
762
|
*/
|
|
@@ -763,10 +771,6 @@ export declare namespace Invoice {
|
|
|
763
771
|
* adjustment applies to.
|
|
764
772
|
*/
|
|
765
773
|
maximum_amount: string;
|
|
766
|
-
/**
|
|
767
|
-
* The plan phase in which this adjustment is active.
|
|
768
|
-
*/
|
|
769
|
-
plan_phase_order: number | null;
|
|
770
774
|
/**
|
|
771
775
|
* The reason for the adjustment.
|
|
772
776
|
*/
|
|
@@ -1255,7 +1259,7 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1255
1259
|
* A unique id for this transaction.
|
|
1256
1260
|
*/
|
|
1257
1261
|
id: string;
|
|
1258
|
-
action: 'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund';
|
|
1262
|
+
action: 'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund' | 'external_payment';
|
|
1259
1263
|
/**
|
|
1260
1264
|
* The value of the amount changed in the transaction.
|
|
1261
1265
|
*/
|
|
@@ -1414,20 +1418,21 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1414
1418
|
*/
|
|
1415
1419
|
id: string;
|
|
1416
1420
|
/**
|
|
1417
|
-
* The line amount after any adjustments
|
|
1421
|
+
* The line amount after any adjustments and before overage conversion, credits and
|
|
1418
1422
|
* partial invoicing.
|
|
1419
1423
|
*/
|
|
1420
1424
|
adjusted_subtotal: string;
|
|
1421
1425
|
/**
|
|
1422
|
-
* All adjustments applied to the line item.
|
|
1426
|
+
* All adjustments (ie. maximums, minimums, discounts) applied to the line item.
|
|
1423
1427
|
*/
|
|
1424
|
-
adjustments: Array<LineItem.
|
|
1428
|
+
adjustments: Array<LineItem.MonetaryUsageDiscountAdjustment | LineItem.MonetaryAmountDiscountAdjustment | LineItem.MonetaryPercentageDiscountAdjustment | LineItem.MonetaryMinimumAdjustment | LineItem.MonetaryMaximumAdjustment>;
|
|
1425
1429
|
/**
|
|
1426
|
-
* The final amount after
|
|
1430
|
+
* The final amount for a line item after all adjustments and pre paid credits have
|
|
1431
|
+
* been applied.
|
|
1427
1432
|
*/
|
|
1428
1433
|
amount: string;
|
|
1429
1434
|
/**
|
|
1430
|
-
* The number of credits
|
|
1435
|
+
* The number of prepaid credits applied.
|
|
1431
1436
|
*/
|
|
1432
1437
|
credits_applied: string;
|
|
1433
1438
|
discount: Shared.Discount | null;
|
|
@@ -1478,6 +1483,9 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1478
1483
|
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
1479
1484
|
*/
|
|
1480
1485
|
price: PricesAPI.Price | null;
|
|
1486
|
+
/**
|
|
1487
|
+
* Either the fixed fee quantity or the usage during the service period.
|
|
1488
|
+
*/
|
|
1481
1489
|
quantity: number;
|
|
1482
1490
|
/**
|
|
1483
1491
|
* The start date of the range of time applied for this line item's price.
|
|
@@ -1489,7 +1497,7 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1489
1497
|
*/
|
|
1490
1498
|
sub_line_items: Array<LineItem.MatrixSubLineItem | LineItem.TierSubLineItem | LineItem.OtherSubLineItem>;
|
|
1491
1499
|
/**
|
|
1492
|
-
* The line amount before any
|
|
1500
|
+
* The line amount before before any adjustments.
|
|
1493
1501
|
*/
|
|
1494
1502
|
subtotal: string;
|
|
1495
1503
|
/**
|
|
@@ -1499,14 +1507,13 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1499
1507
|
tax_amounts: Array<LineItem.TaxAmount>;
|
|
1500
1508
|
}
|
|
1501
1509
|
namespace LineItem {
|
|
1502
|
-
interface
|
|
1510
|
+
interface MonetaryUsageDiscountAdjustment {
|
|
1503
1511
|
id: string;
|
|
1504
|
-
adjustment_type: '
|
|
1512
|
+
adjustment_type: 'usage_discount';
|
|
1505
1513
|
/**
|
|
1506
|
-
* The
|
|
1507
|
-
* billing period.
|
|
1514
|
+
* The value applied by an adjustment.
|
|
1508
1515
|
*/
|
|
1509
|
-
|
|
1516
|
+
amount: string;
|
|
1510
1517
|
/**
|
|
1511
1518
|
* The price IDs that this adjustment applies to.
|
|
1512
1519
|
*/
|
|
@@ -1516,18 +1523,28 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1516
1523
|
* that apply to only one price.
|
|
1517
1524
|
*/
|
|
1518
1525
|
is_invoice_level: boolean;
|
|
1519
|
-
/**
|
|
1520
|
-
* The plan phase in which this adjustment is active.
|
|
1521
|
-
*/
|
|
1522
|
-
plan_phase_order: number | null;
|
|
1523
1526
|
/**
|
|
1524
1527
|
* The reason for the adjustment.
|
|
1525
1528
|
*/
|
|
1526
1529
|
reason: string | null;
|
|
1530
|
+
/**
|
|
1531
|
+
* The number of usage units by which to discount the price this adjustment applies
|
|
1532
|
+
* to in a given billing period.
|
|
1533
|
+
*/
|
|
1534
|
+
usage_discount: number;
|
|
1527
1535
|
}
|
|
1528
|
-
interface
|
|
1536
|
+
interface MonetaryAmountDiscountAdjustment {
|
|
1529
1537
|
id: string;
|
|
1530
|
-
adjustment_type: '
|
|
1538
|
+
adjustment_type: 'amount_discount';
|
|
1539
|
+
/**
|
|
1540
|
+
* The value applied by an adjustment.
|
|
1541
|
+
*/
|
|
1542
|
+
amount: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* The amount by which to discount the prices this adjustment applies to in a given
|
|
1545
|
+
* billing period.
|
|
1546
|
+
*/
|
|
1547
|
+
amount_discount: string;
|
|
1531
1548
|
/**
|
|
1532
1549
|
* The price IDs that this adjustment applies to.
|
|
1533
1550
|
*/
|
|
@@ -1537,23 +1554,18 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1537
1554
|
* that apply to only one price.
|
|
1538
1555
|
*/
|
|
1539
1556
|
is_invoice_level: boolean;
|
|
1540
|
-
/**
|
|
1541
|
-
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
1542
|
-
* intervals this adjustment applies to in a given billing period.
|
|
1543
|
-
*/
|
|
1544
|
-
percentage_discount: number;
|
|
1545
|
-
/**
|
|
1546
|
-
* The plan phase in which this adjustment is active.
|
|
1547
|
-
*/
|
|
1548
|
-
plan_phase_order: number | null;
|
|
1549
1557
|
/**
|
|
1550
1558
|
* The reason for the adjustment.
|
|
1551
1559
|
*/
|
|
1552
1560
|
reason: string | null;
|
|
1553
1561
|
}
|
|
1554
|
-
interface
|
|
1562
|
+
interface MonetaryPercentageDiscountAdjustment {
|
|
1555
1563
|
id: string;
|
|
1556
|
-
adjustment_type: '
|
|
1564
|
+
adjustment_type: 'percentage_discount';
|
|
1565
|
+
/**
|
|
1566
|
+
* The value applied by an adjustment.
|
|
1567
|
+
*/
|
|
1568
|
+
amount: string;
|
|
1557
1569
|
/**
|
|
1558
1570
|
* The price IDs that this adjustment applies to.
|
|
1559
1571
|
*/
|
|
@@ -1564,22 +1576,22 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1564
1576
|
*/
|
|
1565
1577
|
is_invoice_level: boolean;
|
|
1566
1578
|
/**
|
|
1567
|
-
* The
|
|
1579
|
+
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
1580
|
+
* intervals this adjustment applies to in a given billing period.
|
|
1568
1581
|
*/
|
|
1569
|
-
|
|
1582
|
+
percentage_discount: number;
|
|
1570
1583
|
/**
|
|
1571
1584
|
* The reason for the adjustment.
|
|
1572
1585
|
*/
|
|
1573
1586
|
reason: string | null;
|
|
1574
|
-
/**
|
|
1575
|
-
* The number of usage units by which to discount the price this adjustment applies
|
|
1576
|
-
* to in a given billing period.
|
|
1577
|
-
*/
|
|
1578
|
-
usage_discount: number;
|
|
1579
1587
|
}
|
|
1580
|
-
interface
|
|
1588
|
+
interface MonetaryMinimumAdjustment {
|
|
1581
1589
|
id: string;
|
|
1582
1590
|
adjustment_type: 'minimum';
|
|
1591
|
+
/**
|
|
1592
|
+
* The value applied by an adjustment.
|
|
1593
|
+
*/
|
|
1594
|
+
amount: string;
|
|
1583
1595
|
/**
|
|
1584
1596
|
* The price IDs that this adjustment applies to.
|
|
1585
1597
|
*/
|
|
@@ -1598,18 +1610,18 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1598
1610
|
* adjustment applies to.
|
|
1599
1611
|
*/
|
|
1600
1612
|
minimum_amount: string;
|
|
1601
|
-
/**
|
|
1602
|
-
* The plan phase in which this adjustment is active.
|
|
1603
|
-
*/
|
|
1604
|
-
plan_phase_order: number | null;
|
|
1605
1613
|
/**
|
|
1606
1614
|
* The reason for the adjustment.
|
|
1607
1615
|
*/
|
|
1608
1616
|
reason: string | null;
|
|
1609
1617
|
}
|
|
1610
|
-
interface
|
|
1618
|
+
interface MonetaryMaximumAdjustment {
|
|
1611
1619
|
id: string;
|
|
1612
1620
|
adjustment_type: 'maximum';
|
|
1621
|
+
/**
|
|
1622
|
+
* The value applied by an adjustment.
|
|
1623
|
+
*/
|
|
1624
|
+
amount: string;
|
|
1613
1625
|
/**
|
|
1614
1626
|
* The price IDs that this adjustment applies to.
|
|
1615
1627
|
*/
|
|
@@ -1624,10 +1636,6 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1624
1636
|
* adjustment applies to.
|
|
1625
1637
|
*/
|
|
1626
1638
|
maximum_amount: string;
|
|
1627
|
-
/**
|
|
1628
|
-
* The plan phase in which this adjustment is active.
|
|
1629
|
-
*/
|
|
1630
|
-
plan_phase_order: number | null;
|
|
1631
1639
|
/**
|
|
1632
1640
|
* The reason for the adjustment.
|
|
1633
1641
|
*/
|