orb-billing 5.5.1 → 5.6.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 +14 -0
- package/index.d.mts +4 -13
- package/index.d.ts +4 -13
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +4 -1
- package/resources/alerts.d.ts +1 -1
- package/resources/beta/beta.d.ts +168 -2
- 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 +168 -2
- package/resources/beta/external-plan-id.d.ts.map +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/customers/credits/ledger.d.ts +22 -8
- 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/customers.d.ts +27 -0
- 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/dimensional-price-groups/dimensional-price-groups.d.ts +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +1 -1
- package/resources/events/backfills.d.ts +2 -2
- package/resources/events/backfills.js +2 -2
- package/resources/events/backfills.mjs +2 -2
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -1
- package/resources/invoices.d.ts +36 -11
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +4 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +4 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +84 -1
- 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/prices.d.ts +262 -166
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +216 -615
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscriptions.d.ts +460 -192
- 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 +5 -17
- package/src/resources/alerts.ts +1 -1
- package/src/resources/beta/beta.ts +198 -6
- package/src/resources/beta/external-plan-id.ts +198 -6
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/customers/credits/ledger.ts +24 -8
- package/src/resources/customers/customers.ts +31 -0
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
- package/src/resources/events/backfills.ts +2 -2
- package/src/resources/index.ts +1 -3
- package/src/resources/invoice-line-items.ts +1 -1
- package/src/resources/invoices.ts +41 -11
- package/src/resources/plans/plans.ts +99 -3
- package/src/resources/prices/prices.ts +283 -179
- package/src/resources/shared.ts +260 -747
- package/src/resources/subscriptions.ts +540 -238
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -188,9 +188,6 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
188
188
|
| Shared.NewPlanPackagePrice
|
|
189
189
|
| Shared.NewPlanMatrixPrice
|
|
190
190
|
| Shared.NewPlanTieredPrice
|
|
191
|
-
| Shared.NewPlanTieredBPSPrice
|
|
192
|
-
| Shared.NewPlanBPSPrice
|
|
193
|
-
| Shared.NewPlanBulkBPSPrice
|
|
194
191
|
| Shared.NewPlanBulkPrice
|
|
195
192
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
196
193
|
| Shared.NewPlanTieredPackagePrice
|
|
@@ -202,6 +199,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
202
199
|
| Shared.NewPlanGroupedAllocationPrice
|
|
203
200
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
204
201
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
202
|
+
| AddPrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
205
203
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
206
204
|
| Shared.NewPlanBulkWithProrationPrice
|
|
207
205
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
@@ -212,9 +210,107 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
212
210
|
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
213
211
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
214
212
|
| Shared.NewPlanGroupedTieredPrice
|
|
213
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
215
214
|
| null;
|
|
216
215
|
}
|
|
217
216
|
|
|
217
|
+
export namespace AddPrice {
|
|
218
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
219
|
+
/**
|
|
220
|
+
* The cadence to bill for this price on.
|
|
221
|
+
*/
|
|
222
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
223
|
+
|
|
224
|
+
grouped_with_min_max_thresholds_config: { [key: string]: unknown };
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The id of the item the price will be associated with.
|
|
228
|
+
*/
|
|
229
|
+
item_id: string;
|
|
230
|
+
|
|
231
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The name of the price.
|
|
235
|
+
*/
|
|
236
|
+
name: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
240
|
+
* usage-based.
|
|
241
|
+
*/
|
|
242
|
+
billable_metric_id?: string | null;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
246
|
+
* this is true, and in-arrears if this is false.
|
|
247
|
+
*/
|
|
248
|
+
billed_in_advance?: boolean | null;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
252
|
+
* months.
|
|
253
|
+
*/
|
|
254
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
258
|
+
*/
|
|
259
|
+
conversion_rate?: number | null;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
263
|
+
*/
|
|
264
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
268
|
+
* price is billed.
|
|
269
|
+
*/
|
|
270
|
+
currency?: string | null;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* For dimensional price: specifies a price group and dimension values
|
|
274
|
+
*/
|
|
275
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* An alias for the price.
|
|
279
|
+
*/
|
|
280
|
+
external_price_id?: string | null;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
284
|
+
* applied.
|
|
285
|
+
*/
|
|
286
|
+
fixed_price_quantity?: number | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The property used to group this price on an invoice
|
|
290
|
+
*/
|
|
291
|
+
invoice_grouping_key?: string | null;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
295
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
296
|
+
*/
|
|
297
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
301
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
302
|
+
* by setting `metadata` to `null`.
|
|
303
|
+
*/
|
|
304
|
+
metadata?: { [key: string]: string | null } | null;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
308
|
+
* in the same API call.
|
|
309
|
+
*/
|
|
310
|
+
reference_id?: string | null;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
218
314
|
export interface RemoveAdjustment {
|
|
219
315
|
/**
|
|
220
316
|
* The id of the adjustment to remove from on the plan.
|
|
@@ -285,9 +381,6 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
285
381
|
| Shared.NewPlanPackagePrice
|
|
286
382
|
| Shared.NewPlanMatrixPrice
|
|
287
383
|
| Shared.NewPlanTieredPrice
|
|
288
|
-
| Shared.NewPlanTieredBPSPrice
|
|
289
|
-
| Shared.NewPlanBPSPrice
|
|
290
|
-
| Shared.NewPlanBulkBPSPrice
|
|
291
384
|
| Shared.NewPlanBulkPrice
|
|
292
385
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
293
386
|
| Shared.NewPlanTieredPackagePrice
|
|
@@ -299,6 +392,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
299
392
|
| Shared.NewPlanGroupedAllocationPrice
|
|
300
393
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
301
394
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
395
|
+
| ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
302
396
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
303
397
|
| Shared.NewPlanBulkWithProrationPrice
|
|
304
398
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
@@ -309,8 +403,106 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
309
403
|
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
310
404
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
311
405
|
| Shared.NewPlanGroupedTieredPrice
|
|
406
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
312
407
|
| null;
|
|
313
408
|
}
|
|
409
|
+
|
|
410
|
+
export namespace ReplacePrice {
|
|
411
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
412
|
+
/**
|
|
413
|
+
* The cadence to bill for this price on.
|
|
414
|
+
*/
|
|
415
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
416
|
+
|
|
417
|
+
grouped_with_min_max_thresholds_config: { [key: string]: unknown };
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* The id of the item the price will be associated with.
|
|
421
|
+
*/
|
|
422
|
+
item_id: string;
|
|
423
|
+
|
|
424
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The name of the price.
|
|
428
|
+
*/
|
|
429
|
+
name: string;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
433
|
+
* usage-based.
|
|
434
|
+
*/
|
|
435
|
+
billable_metric_id?: string | null;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
439
|
+
* this is true, and in-arrears if this is false.
|
|
440
|
+
*/
|
|
441
|
+
billed_in_advance?: boolean | null;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
445
|
+
* months.
|
|
446
|
+
*/
|
|
447
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
451
|
+
*/
|
|
452
|
+
conversion_rate?: number | null;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
456
|
+
*/
|
|
457
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
461
|
+
* price is billed.
|
|
462
|
+
*/
|
|
463
|
+
currency?: string | null;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* For dimensional price: specifies a price group and dimension values
|
|
467
|
+
*/
|
|
468
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* An alias for the price.
|
|
472
|
+
*/
|
|
473
|
+
external_price_id?: string | null;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
477
|
+
* applied.
|
|
478
|
+
*/
|
|
479
|
+
fixed_price_quantity?: number | null;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* The property used to group this price on an invoice
|
|
483
|
+
*/
|
|
484
|
+
invoice_grouping_key?: string | null;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
488
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
489
|
+
*/
|
|
490
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
494
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
495
|
+
* by setting `metadata` to `null`.
|
|
496
|
+
*/
|
|
497
|
+
metadata?: { [key: string]: string | null } | null;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
501
|
+
* in the same API call.
|
|
502
|
+
*/
|
|
503
|
+
reference_id?: string | null;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
314
506
|
}
|
|
315
507
|
|
|
316
508
|
export interface BetaSetDefaultPlanVersionParams {
|
|
@@ -133,9 +133,6 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
133
133
|
| Shared.NewPlanPackagePrice
|
|
134
134
|
| Shared.NewPlanMatrixPrice
|
|
135
135
|
| Shared.NewPlanTieredPrice
|
|
136
|
-
| Shared.NewPlanTieredBPSPrice
|
|
137
|
-
| Shared.NewPlanBPSPrice
|
|
138
|
-
| Shared.NewPlanBulkBPSPrice
|
|
139
136
|
| Shared.NewPlanBulkPrice
|
|
140
137
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
141
138
|
| Shared.NewPlanTieredPackagePrice
|
|
@@ -147,6 +144,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
147
144
|
| Shared.NewPlanGroupedAllocationPrice
|
|
148
145
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
149
146
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
147
|
+
| AddPrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
150
148
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
151
149
|
| Shared.NewPlanBulkWithProrationPrice
|
|
152
150
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
@@ -157,9 +155,107 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
157
155
|
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
158
156
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
159
157
|
| Shared.NewPlanGroupedTieredPrice
|
|
158
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
160
159
|
| null;
|
|
161
160
|
}
|
|
162
161
|
|
|
162
|
+
export namespace AddPrice {
|
|
163
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
164
|
+
/**
|
|
165
|
+
* The cadence to bill for this price on.
|
|
166
|
+
*/
|
|
167
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
168
|
+
|
|
169
|
+
grouped_with_min_max_thresholds_config: { [key: string]: unknown };
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The id of the item the price will be associated with.
|
|
173
|
+
*/
|
|
174
|
+
item_id: string;
|
|
175
|
+
|
|
176
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The name of the price.
|
|
180
|
+
*/
|
|
181
|
+
name: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
185
|
+
* usage-based.
|
|
186
|
+
*/
|
|
187
|
+
billable_metric_id?: string | null;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
191
|
+
* this is true, and in-arrears if this is false.
|
|
192
|
+
*/
|
|
193
|
+
billed_in_advance?: boolean | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
197
|
+
* months.
|
|
198
|
+
*/
|
|
199
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
203
|
+
*/
|
|
204
|
+
conversion_rate?: number | null;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
208
|
+
*/
|
|
209
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
213
|
+
* price is billed.
|
|
214
|
+
*/
|
|
215
|
+
currency?: string | null;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* For dimensional price: specifies a price group and dimension values
|
|
219
|
+
*/
|
|
220
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* An alias for the price.
|
|
224
|
+
*/
|
|
225
|
+
external_price_id?: string | null;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
229
|
+
* applied.
|
|
230
|
+
*/
|
|
231
|
+
fixed_price_quantity?: number | null;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The property used to group this price on an invoice
|
|
235
|
+
*/
|
|
236
|
+
invoice_grouping_key?: string | null;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
240
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
241
|
+
*/
|
|
242
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
246
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
247
|
+
* by setting `metadata` to `null`.
|
|
248
|
+
*/
|
|
249
|
+
metadata?: { [key: string]: string | null } | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
253
|
+
* in the same API call.
|
|
254
|
+
*/
|
|
255
|
+
reference_id?: string | null;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
163
259
|
export interface RemoveAdjustment {
|
|
164
260
|
/**
|
|
165
261
|
* The id of the adjustment to remove from on the plan.
|
|
@@ -230,9 +326,6 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
230
326
|
| Shared.NewPlanPackagePrice
|
|
231
327
|
| Shared.NewPlanMatrixPrice
|
|
232
328
|
| Shared.NewPlanTieredPrice
|
|
233
|
-
| Shared.NewPlanTieredBPSPrice
|
|
234
|
-
| Shared.NewPlanBPSPrice
|
|
235
|
-
| Shared.NewPlanBulkBPSPrice
|
|
236
329
|
| Shared.NewPlanBulkPrice
|
|
237
330
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
238
331
|
| Shared.NewPlanTieredPackagePrice
|
|
@@ -244,6 +337,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
244
337
|
| Shared.NewPlanGroupedAllocationPrice
|
|
245
338
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
246
339
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
340
|
+
| ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
247
341
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
248
342
|
| Shared.NewPlanBulkWithProrationPrice
|
|
249
343
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
@@ -254,8 +348,106 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
254
348
|
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
255
349
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
256
350
|
| Shared.NewPlanGroupedTieredPrice
|
|
351
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
257
352
|
| null;
|
|
258
353
|
}
|
|
354
|
+
|
|
355
|
+
export namespace ReplacePrice {
|
|
356
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
357
|
+
/**
|
|
358
|
+
* The cadence to bill for this price on.
|
|
359
|
+
*/
|
|
360
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
361
|
+
|
|
362
|
+
grouped_with_min_max_thresholds_config: { [key: string]: unknown };
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* The id of the item the price will be associated with.
|
|
366
|
+
*/
|
|
367
|
+
item_id: string;
|
|
368
|
+
|
|
369
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* The name of the price.
|
|
373
|
+
*/
|
|
374
|
+
name: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
378
|
+
* usage-based.
|
|
379
|
+
*/
|
|
380
|
+
billable_metric_id?: string | null;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
384
|
+
* this is true, and in-arrears if this is false.
|
|
385
|
+
*/
|
|
386
|
+
billed_in_advance?: boolean | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
390
|
+
* months.
|
|
391
|
+
*/
|
|
392
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
396
|
+
*/
|
|
397
|
+
conversion_rate?: number | null;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
401
|
+
*/
|
|
402
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
406
|
+
* price is billed.
|
|
407
|
+
*/
|
|
408
|
+
currency?: string | null;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* For dimensional price: specifies a price group and dimension values
|
|
412
|
+
*/
|
|
413
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* An alias for the price.
|
|
417
|
+
*/
|
|
418
|
+
external_price_id?: string | null;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
422
|
+
* applied.
|
|
423
|
+
*/
|
|
424
|
+
fixed_price_quantity?: number | null;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The property used to group this price on an invoice
|
|
428
|
+
*/
|
|
429
|
+
invoice_grouping_key?: string | null;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
433
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
434
|
+
*/
|
|
435
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
439
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
440
|
+
* by setting `metadata` to `null`.
|
|
441
|
+
*/
|
|
442
|
+
metadata?: { [key: string]: string | null } | null;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
446
|
+
* in the same API call.
|
|
447
|
+
*/
|
|
448
|
+
reference_id?: string | null;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
259
451
|
}
|
|
260
452
|
|
|
261
453
|
export interface ExternalPlanIDSetDefaultPlanVersionParams {
|
|
@@ -84,7 +84,8 @@ export interface BalanceTransactionCreateResponse {
|
|
|
84
84
|
| 'credit_note_applied'
|
|
85
85
|
| 'credit_note_voided'
|
|
86
86
|
| 'overpayment_refund'
|
|
87
|
-
| 'external_payment'
|
|
87
|
+
| 'external_payment'
|
|
88
|
+
| 'small_invoice_carryover';
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
91
|
* The value of the amount changed in the transaction.
|
|
@@ -135,7 +136,8 @@ export interface BalanceTransactionListResponse {
|
|
|
135
136
|
| 'credit_note_applied'
|
|
136
137
|
| 'credit_note_voided'
|
|
137
138
|
| 'overpayment_refund'
|
|
138
|
-
| 'external_payment'
|
|
139
|
+
| 'external_payment'
|
|
140
|
+
| 'small_invoice_carryover';
|
|
139
141
|
|
|
140
142
|
/**
|
|
141
143
|
* The value of the amount changed in the transaction.
|
|
@@ -65,7 +65,7 @@ export class Ledger extends APIResource {
|
|
|
65
65
|
* Note that for this entry type, `starting_balance` will equal `ending_balance`,
|
|
66
66
|
* and the `amount` represents the balance transferred. The credit block linked to
|
|
67
67
|
* the ledger entry is the source credit block from which there was an expiration
|
|
68
|
-
* change
|
|
68
|
+
* change.
|
|
69
69
|
*
|
|
70
70
|
* ## Credits expiry
|
|
71
71
|
*
|
|
@@ -414,7 +414,7 @@ export class Ledger extends APIResource {
|
|
|
414
414
|
* Note that for this entry type, `starting_balance` will equal `ending_balance`,
|
|
415
415
|
* and the `amount` represents the balance transferred. The credit block linked to
|
|
416
416
|
* the ledger entry is the source credit block from which there was an expiration
|
|
417
|
-
* change
|
|
417
|
+
* change.
|
|
418
418
|
*
|
|
419
419
|
* ## Credits expiry
|
|
420
420
|
*
|
|
@@ -896,12 +896,20 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
896
896
|
auto_collection: boolean;
|
|
897
897
|
|
|
898
898
|
/**
|
|
899
|
-
* The net terms determines the
|
|
900
|
-
*
|
|
901
|
-
*
|
|
899
|
+
* The net terms determines the due date of the invoice. Due date is calculated
|
|
900
|
+
* based on the invoice or issuance date, depending on the account's configured due
|
|
901
|
+
* date calculation method. A value of '0' here represents that the invoice is due
|
|
902
|
+
* on issue, whereas a value of '30' represents that the customer has 30 days to
|
|
903
|
+
* pay the invoice. Do not set this field if you want to set a custom due date.
|
|
902
904
|
*/
|
|
903
905
|
net_terms: number | null;
|
|
904
906
|
|
|
907
|
+
/**
|
|
908
|
+
* An optional custom due date for the invoice. If not set, the due date will be
|
|
909
|
+
* calculated based on the `net_terms` value.
|
|
910
|
+
*/
|
|
911
|
+
custom_due_date?: (string & {}) | (string & {}) | null;
|
|
912
|
+
|
|
905
913
|
/**
|
|
906
914
|
* An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
907
915
|
* customer's timezone. If not provided, the invoice date will default to the
|
|
@@ -1154,12 +1162,20 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1154
1162
|
auto_collection: boolean;
|
|
1155
1163
|
|
|
1156
1164
|
/**
|
|
1157
|
-
* The net terms determines the
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1165
|
+
* The net terms determines the due date of the invoice. Due date is calculated
|
|
1166
|
+
* based on the invoice or issuance date, depending on the account's configured due
|
|
1167
|
+
* date calculation method. A value of '0' here represents that the invoice is due
|
|
1168
|
+
* on issue, whereas a value of '30' represents that the customer has 30 days to
|
|
1169
|
+
* pay the invoice. Do not set this field if you want to set a custom due date.
|
|
1160
1170
|
*/
|
|
1161
1171
|
net_terms: number | null;
|
|
1162
1172
|
|
|
1173
|
+
/**
|
|
1174
|
+
* An optional custom due date for the invoice. If not set, the due date will be
|
|
1175
|
+
* calculated based on the `net_terms` value.
|
|
1176
|
+
*/
|
|
1177
|
+
custom_due_date?: (string & {}) | (string & {}) | null;
|
|
1178
|
+
|
|
1163
1179
|
/**
|
|
1164
1180
|
* An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
1165
1181
|
* customer's timezone. If not provided, the invoice date will default to the
|
|
@@ -233,6 +233,13 @@ export interface Customer {
|
|
|
233
233
|
|
|
234
234
|
auto_collection: boolean;
|
|
235
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Whether invoices for this customer should be automatically issued. If true,
|
|
238
|
+
* invoices will be automatically issued. If false, invoices will require manual
|
|
239
|
+
* approval. If null, inherits the account-level setting.
|
|
240
|
+
*/
|
|
241
|
+
auto_issuance: boolean | null;
|
|
242
|
+
|
|
236
243
|
/**
|
|
237
244
|
* The customer's current balance in their currency.
|
|
238
245
|
*/
|
|
@@ -558,6 +565,14 @@ export interface CustomerCreateParams {
|
|
|
558
565
|
*/
|
|
559
566
|
auto_collection?: boolean | null;
|
|
560
567
|
|
|
568
|
+
/**
|
|
569
|
+
* Used to determine if invoices for this customer will be automatically issued. If
|
|
570
|
+
* true, invoices will be automatically issued. If false, invoices will require
|
|
571
|
+
* manual approval. If `null` is specified, the customer's auto issuance setting
|
|
572
|
+
* will be inherited from the account-level setting.
|
|
573
|
+
*/
|
|
574
|
+
auto_issuance?: boolean | null;
|
|
575
|
+
|
|
561
576
|
billing_address?: AddressInput | null;
|
|
562
577
|
|
|
563
578
|
/**
|
|
@@ -778,6 +793,14 @@ export interface CustomerUpdateParams {
|
|
|
778
793
|
*/
|
|
779
794
|
auto_collection?: boolean | null;
|
|
780
795
|
|
|
796
|
+
/**
|
|
797
|
+
* Used to determine if invoices for this customer will be automatically issued. If
|
|
798
|
+
* true, invoices will be automatically issued. If false, invoices will require
|
|
799
|
+
* manual approval.If `null` is specified, the customer's auto issuance setting
|
|
800
|
+
* will be inherited from the account-level setting.
|
|
801
|
+
*/
|
|
802
|
+
auto_issuance?: boolean | null;
|
|
803
|
+
|
|
781
804
|
billing_address?: AddressInput | null;
|
|
782
805
|
|
|
783
806
|
/**
|
|
@@ -1017,6 +1040,14 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1017
1040
|
*/
|
|
1018
1041
|
auto_collection?: boolean | null;
|
|
1019
1042
|
|
|
1043
|
+
/**
|
|
1044
|
+
* Used to determine if invoices for this customer will be automatically issued. If
|
|
1045
|
+
* true, invoices will be automatically issued. If false, invoices will require
|
|
1046
|
+
* manual approval.If `null` is specified, the customer's auto issuance setting
|
|
1047
|
+
* will be inherited from the account-level setting.
|
|
1048
|
+
*/
|
|
1049
|
+
auto_issuance?: boolean | null;
|
|
1050
|
+
|
|
1020
1051
|
billing_address?: AddressInput | null;
|
|
1021
1052
|
|
|
1022
1053
|
/**
|
|
@@ -17,7 +17,7 @@ export class DimensionalPriceGroups extends APIResource {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* A dimensional price group is used to partition the result of a billable metric
|
|
20
|
-
* by a set of dimensions. Prices in a price group must specify the
|
|
20
|
+
* by a set of dimensions. Prices in a price group must specify the partition used
|
|
21
21
|
* to derive their usage.
|
|
22
22
|
*
|
|
23
23
|
* For example, suppose we have a billable metric that measures the number of
|
|
@@ -39,8 +39,8 @@ export class Backfills extends APIResource {
|
|
|
39
39
|
*
|
|
40
40
|
* When `replace_existing_events` is `true`, this indicates that existing events in
|
|
41
41
|
* the timeframe should no longer be counted towards invoiced usage. In this
|
|
42
|
-
* scenario, the parameter `
|
|
43
|
-
* using
|
|
42
|
+
* scenario, the parameter `deprecation_filter` can be optionally added which
|
|
43
|
+
* enables filtering using
|
|
44
44
|
* [computed properties](/extensibility/advanced-metrics#computed-properties). The
|
|
45
45
|
* expressiveness of computed properties allows you to deprecate existing events
|
|
46
46
|
* based on both a period of time and specific property values.
|
package/src/resources/index.ts
CHANGED
|
@@ -129,8 +129,6 @@ export {
|
|
|
129
129
|
SubscriptionFetchScheduleResponsesPage,
|
|
130
130
|
Subscriptions,
|
|
131
131
|
type DiscountOverride,
|
|
132
|
-
type NewSubscriptionBPSPrice,
|
|
133
|
-
type NewSubscriptionBulkBPSPrice,
|
|
134
132
|
type NewSubscriptionBulkPrice,
|
|
135
133
|
type NewSubscriptionBulkWithProrationPrice,
|
|
136
134
|
type NewSubscriptionCumulativeGroupedBulkPrice,
|
|
@@ -143,13 +141,13 @@ export {
|
|
|
143
141
|
type NewSubscriptionMatrixWithAllocationPrice,
|
|
144
142
|
type NewSubscriptionMatrixWithDisplayNamePrice,
|
|
145
143
|
type NewSubscriptionMaxGroupTieredPackagePrice,
|
|
144
|
+
type NewSubscriptionMinimumCompositePrice,
|
|
146
145
|
type NewSubscriptionPackagePrice,
|
|
147
146
|
type NewSubscriptionPackageWithAllocationPrice,
|
|
148
147
|
type NewSubscriptionScalableMatrixWithTieredPricingPrice,
|
|
149
148
|
type NewSubscriptionScalableMatrixWithUnitPricingPrice,
|
|
150
149
|
type NewSubscriptionThresholdTotalAmountPrice,
|
|
151
150
|
type NewSubscriptionTierWithProrationPrice,
|
|
152
|
-
type NewSubscriptionTieredBPSPrice,
|
|
153
151
|
type NewSubscriptionTieredPackagePrice,
|
|
154
152
|
type NewSubscriptionTieredPackageWithMinimumPrice,
|
|
155
153
|
type NewSubscriptionTieredPrice,
|