orb-billing 4.74.0 → 5.0.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 +23 -0
- package/index.d.mts +148 -14
- package/index.d.ts +148 -14
- package/index.d.ts.map +1 -1
- package/index.js +0 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -6
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +20 -88
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.ts +9 -7313
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +7 -7074
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/credit-notes.d.ts +9 -163
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +3 -6
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +2 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +5 -32
- 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/customers/costs.d.ts +3 -81
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/credits/credits.d.ts +4 -4
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +2 -2
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +171 -962
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +29 -121
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +72 -678
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -3
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +6 -395
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +30 -1700
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +3 -6
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +2 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +7 -3801
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +3 -3
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +1 -2
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +346 -9372
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +39 -20
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +38 -18
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +7269 -9
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +11 -0
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +7 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscription-changes.d.ts +138 -2158
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscription-changes.js.map +1 -1
- package/resources/subscription-changes.mjs.map +1 -1
- package/resources/subscriptions.d.ts +2639 -27234
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/index.ts +219 -42
- package/src/resources/alerts.ts +20 -94
- package/src/resources/beta/beta.ts +124 -8892
- package/src/resources/beta/external-plan-id.ts +118 -8593
- package/src/resources/credit-notes.ts +10 -217
- package/src/resources/customers/balance-transactions.ts +5 -36
- package/src/resources/customers/costs.ts +3 -101
- package/src/resources/customers/credits/credits.ts +18 -0
- package/src/resources/customers/credits/index.ts +9 -0
- package/src/resources/customers/credits/ledger.ts +212 -1435
- package/src/resources/customers/credits/top-ups.ts +33 -136
- package/src/resources/customers/customers.ts +162 -1454
- package/src/resources/customers/index.ts +8 -0
- package/src/resources/index.ts +42 -22
- package/src/resources/invoice-line-items.ts +10 -501
- package/src/resources/invoices.ts +60 -2394
- package/src/resources/plans/plans.ts +38 -4588
- package/src/resources/prices/external-price-id.ts +3 -3
- package/src/resources/prices/index.ts +2 -2
- package/src/resources/prices/prices.ts +500 -11810
- package/src/resources/shared.ts +9582 -22
- package/src/resources/subscription-changes.ts +171 -2670
- package/src/resources/subscriptions.ts +3162 -32900
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -27,7 +27,15 @@ export {
|
|
|
27
27
|
export {
|
|
28
28
|
CustomersPage,
|
|
29
29
|
Customers,
|
|
30
|
+
type AccountingProviderConfig,
|
|
31
|
+
type AddressInput,
|
|
30
32
|
type Customer,
|
|
33
|
+
type CustomerHierarchyConfig,
|
|
34
|
+
type NewAccountingSyncConfiguration,
|
|
35
|
+
type NewAvalaraTaxConfiguration,
|
|
36
|
+
type NewReportingConfiguration,
|
|
37
|
+
type NewSphereConfiguration,
|
|
38
|
+
type NewTaxJarConfiguration,
|
|
31
39
|
type CustomerCreateParams,
|
|
32
40
|
type CustomerUpdateParams,
|
|
33
41
|
type CustomerListParams,
|
package/src/resources/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export {
|
|
|
5
5
|
AlertsPage,
|
|
6
6
|
Alerts,
|
|
7
7
|
type Alert,
|
|
8
|
+
type Threshold,
|
|
8
9
|
type AlertUpdateParams,
|
|
9
10
|
type AlertListParams,
|
|
10
11
|
type AlertCreateForCustomerParams,
|
|
@@ -35,17 +36,19 @@ export {
|
|
|
35
36
|
type CouponCreateParams,
|
|
36
37
|
type CouponListParams,
|
|
37
38
|
} from './coupons/coupons';
|
|
38
|
-
export {
|
|
39
|
-
CreditNotesPage,
|
|
40
|
-
CreditNotes,
|
|
41
|
-
type CreditNote,
|
|
42
|
-
type CreditNoteCreateParams,
|
|
43
|
-
type CreditNoteListParams,
|
|
44
|
-
} from './credit-notes';
|
|
39
|
+
export { CreditNotes, type CreditNoteCreateParams, type CreditNoteListParams } from './credit-notes';
|
|
45
40
|
export {
|
|
46
41
|
CustomersPage,
|
|
47
42
|
Customers,
|
|
43
|
+
type AccountingProviderConfig,
|
|
44
|
+
type AddressInput,
|
|
48
45
|
type Customer,
|
|
46
|
+
type CustomerHierarchyConfig,
|
|
47
|
+
type NewAccountingSyncConfiguration,
|
|
48
|
+
type NewAvalaraTaxConfiguration,
|
|
49
|
+
type NewReportingConfiguration,
|
|
50
|
+
type NewSphereConfiguration,
|
|
51
|
+
type NewTaxJarConfiguration,
|
|
49
52
|
type CustomerCreateParams,
|
|
50
53
|
type CustomerUpdateParams,
|
|
51
54
|
type CustomerListParams,
|
|
@@ -74,9 +77,7 @@ export {
|
|
|
74
77
|
type InvoiceLineItemCreateParams,
|
|
75
78
|
} from './invoice-line-items';
|
|
76
79
|
export {
|
|
77
|
-
InvoicesPage,
|
|
78
80
|
Invoices,
|
|
79
|
-
type Invoice,
|
|
80
81
|
type InvoiceFetchUpcomingResponse,
|
|
81
82
|
type InvoiceCreateParams,
|
|
82
83
|
type InvoiceUpdateParams,
|
|
@@ -102,20 +103,21 @@ export {
|
|
|
102
103
|
type PlanListParams,
|
|
103
104
|
} from './plans/plans';
|
|
104
105
|
export {
|
|
105
|
-
PricesPage,
|
|
106
106
|
Prices,
|
|
107
107
|
type EvaluatePriceGroup,
|
|
108
|
-
type Price,
|
|
109
108
|
type PriceEvaluateResponse,
|
|
110
109
|
type PriceEvaluateMultipleResponse,
|
|
110
|
+
type PriceEvaluatePreviewEventsResponse,
|
|
111
111
|
type PriceCreateParams,
|
|
112
112
|
type PriceUpdateParams,
|
|
113
113
|
type PriceListParams,
|
|
114
114
|
type PriceEvaluateParams,
|
|
115
115
|
type PriceEvaluateMultipleParams,
|
|
116
|
+
type PriceEvaluatePreviewEventsParams,
|
|
116
117
|
} from './prices/prices';
|
|
117
118
|
export {
|
|
118
119
|
SubscriptionChanges,
|
|
120
|
+
type MutatedSubscription,
|
|
119
121
|
type SubscriptionChangeRetrieveResponse,
|
|
120
122
|
type SubscriptionChangeApplyResponse,
|
|
121
123
|
type SubscriptionChangeCancelResponse,
|
|
@@ -125,21 +127,39 @@ export {
|
|
|
125
127
|
SubscriptionsPage,
|
|
126
128
|
SubscriptionFetchScheduleResponsesPage,
|
|
127
129
|
Subscriptions,
|
|
130
|
+
type DiscountOverride,
|
|
131
|
+
type NewSubscriptionBPSPrice,
|
|
132
|
+
type NewSubscriptionBulkBPSPrice,
|
|
133
|
+
type NewSubscriptionBulkPrice,
|
|
134
|
+
type NewSubscriptionBulkWithProrationPrice,
|
|
135
|
+
type NewSubscriptionCumulativeGroupedBulkPrice,
|
|
136
|
+
type NewSubscriptionGroupedAllocationPrice,
|
|
137
|
+
type NewSubscriptionGroupedTieredPackagePrice,
|
|
138
|
+
type NewSubscriptionGroupedTieredPrice,
|
|
139
|
+
type NewSubscriptionGroupedWithMeteredMinimumPrice,
|
|
140
|
+
type NewSubscriptionGroupedWithProratedMinimumPrice,
|
|
141
|
+
type NewSubscriptionMatrixPrice,
|
|
142
|
+
type NewSubscriptionMatrixWithAllocationPrice,
|
|
143
|
+
type NewSubscriptionMatrixWithDisplayNamePrice,
|
|
144
|
+
type NewSubscriptionMaxGroupTieredPackagePrice,
|
|
145
|
+
type NewSubscriptionPackagePrice,
|
|
146
|
+
type NewSubscriptionPackageWithAllocationPrice,
|
|
147
|
+
type NewSubscriptionScalableMatrixWithTieredPricingPrice,
|
|
148
|
+
type NewSubscriptionScalableMatrixWithUnitPricingPrice,
|
|
149
|
+
type NewSubscriptionThresholdTotalAmountPrice,
|
|
150
|
+
type NewSubscriptionTierWithProrationPrice,
|
|
151
|
+
type NewSubscriptionTieredBPSPrice,
|
|
152
|
+
type NewSubscriptionTieredPackagePrice,
|
|
153
|
+
type NewSubscriptionTieredPackageWithMinimumPrice,
|
|
154
|
+
type NewSubscriptionTieredPrice,
|
|
155
|
+
type NewSubscriptionTieredWithMinimumPrice,
|
|
156
|
+
type NewSubscriptionUnitPrice,
|
|
157
|
+
type NewSubscriptionUnitWithPercentPrice,
|
|
158
|
+
type NewSubscriptionUnitWithProrationPrice,
|
|
128
159
|
type Subscription,
|
|
129
160
|
type SubscriptionUsage,
|
|
130
|
-
type SubscriptionCreateResponse,
|
|
131
|
-
type SubscriptionCancelResponse,
|
|
132
161
|
type SubscriptionFetchCostsResponse,
|
|
133
162
|
type SubscriptionFetchScheduleResponse,
|
|
134
|
-
type SubscriptionPriceIntervalsResponse,
|
|
135
|
-
type SubscriptionRedeemCouponResponse,
|
|
136
|
-
type SubscriptionSchedulePlanChangeResponse,
|
|
137
|
-
type SubscriptionTriggerPhaseResponse,
|
|
138
|
-
type SubscriptionUnscheduleCancellationResponse,
|
|
139
|
-
type SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
|
|
140
|
-
type SubscriptionUnschedulePendingPlanChangesResponse,
|
|
141
|
-
type SubscriptionUpdateFixedFeeQuantityResponse,
|
|
142
|
-
type SubscriptionUpdateTrialResponse,
|
|
143
163
|
type SubscriptionCreateParams,
|
|
144
164
|
type SubscriptionUpdateParams,
|
|
145
165
|
type SubscriptionListParams,
|
|
@@ -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
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
38
|
+
| Shared.MonetaryUsageDiscountAdjustment
|
|
39
|
+
| Shared.MonetaryAmountDiscountAdjustment
|
|
40
|
+
| Shared.MonetaryPercentageDiscountAdjustment
|
|
41
|
+
| Shared.MonetaryMinimumAdjustment
|
|
42
|
+
| Shared.MonetaryMaximumAdjustment
|
|
44
43
|
>;
|
|
45
44
|
|
|
46
45
|
/**
|
|
@@ -76,7 +75,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
76
75
|
/**
|
|
77
76
|
* @deprecated This field is deprecated in favor of `adjustments`.
|
|
78
77
|
*/
|
|
79
|
-
maximum:
|
|
78
|
+
maximum: Shared.Maximum | null;
|
|
80
79
|
|
|
81
80
|
/**
|
|
82
81
|
* @deprecated This field is deprecated in favor of `adjustments`.
|
|
@@ -86,7 +85,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
86
85
|
/**
|
|
87
86
|
* @deprecated This field is deprecated in favor of `adjustments`.
|
|
88
87
|
*/
|
|
89
|
-
minimum:
|
|
88
|
+
minimum: Shared.Minimum | null;
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
91
|
* @deprecated This field is deprecated in favor of `adjustments`.
|
|
@@ -115,7 +114,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
115
114
|
* For more on the types of prices, see
|
|
116
115
|
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
117
116
|
*/
|
|
118
|
-
price:
|
|
117
|
+
price: Shared.Price;
|
|
119
118
|
|
|
120
119
|
/**
|
|
121
120
|
* Either the fixed fee quantity or the usage during the service period.
|
|
@@ -131,11 +130,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
131
130
|
* For complex pricing structures, the line item can be broken down further in
|
|
132
131
|
* `sub_line_items`.
|
|
133
132
|
*/
|
|
134
|
-
sub_line_items: Array<
|
|
135
|
-
| InvoiceLineItemCreateResponse.MatrixSubLineItem
|
|
136
|
-
| InvoiceLineItemCreateResponse.TierSubLineItem
|
|
137
|
-
| InvoiceLineItemCreateResponse.OtherSubLineItem
|
|
138
|
-
>;
|
|
133
|
+
sub_line_items: Array<Shared.MatrixSubLineItem | Shared.TierSubLineItem | Shared.OtherSubLineItem>;
|
|
139
134
|
|
|
140
135
|
/**
|
|
141
136
|
* The line amount before before any adjustments.
|
|
@@ -146,7 +141,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
146
141
|
* An array of tax rates and their incurred tax amounts. Empty if no tax
|
|
147
142
|
* integration is configured.
|
|
148
143
|
*/
|
|
149
|
-
tax_amounts: Array<
|
|
144
|
+
tax_amounts: Array<Shared.TaxAmount>;
|
|
150
145
|
|
|
151
146
|
/**
|
|
152
147
|
* A list of customer ids that were used to calculate the usage for this line item.
|
|
@@ -154,492 +149,6 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
154
149
|
usage_customer_ids: Array<string> | null;
|
|
155
150
|
}
|
|
156
151
|
|
|
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
152
|
export interface InvoiceLineItemCreateParams {
|
|
644
153
|
/**
|
|
645
154
|
* The total amount in the invoice's currency to add to the line item.
|