orb-billing 5.5.1 → 5.7.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 +33 -0
- package/core.js +3 -3
- package/core.js.map +1 -1
- package/core.mjs +3 -3
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -15
- package/index.d.ts +4 -15
- 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 +448 -4
- 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 +448 -4
- 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 +54 -6
- 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 +39 -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 +224 -2
- 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 +1089 -192
- 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 +2656 -925
- 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 +1831 -370
- 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/core.ts +3 -3
- package/src/index.ts +5 -21
- package/src/resources/alerts.ts +1 -1
- package/src/resources/beta/beta.ts +544 -24
- package/src/resources/beta/external-plan-id.ts +544 -24
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/customers/credits/ledger.ts +24 -8
- package/src/resources/customers/customers.ts +79 -6
- 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 -4
- package/src/resources/invoice-line-items.ts +1 -1
- package/src/resources/invoices.ts +44 -11
- package/src/resources/plans/plans.ts +272 -12
- package/src/resources/prices/prices.ts +1255 -206
- package/src/resources/shared.ts +3057 -1046
- package/src/resources/subscriptions.ts +2401 -694
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -126,40 +126,300 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
126
126
|
plan_phase_order?: number | null;
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* New plan price request body params.
|
|
130
130
|
*/
|
|
131
131
|
price?:
|
|
132
132
|
| Shared.NewPlanUnitPrice
|
|
133
|
-
| Shared.NewPlanPackagePrice
|
|
134
|
-
| Shared.NewPlanMatrixPrice
|
|
135
133
|
| Shared.NewPlanTieredPrice
|
|
136
|
-
| Shared.NewPlanTieredBPSPrice
|
|
137
|
-
| Shared.NewPlanBPSPrice
|
|
138
|
-
| Shared.NewPlanBulkBPSPrice
|
|
139
134
|
| Shared.NewPlanBulkPrice
|
|
135
|
+
| Shared.NewPlanPackagePrice
|
|
136
|
+
| Shared.NewPlanMatrixPrice
|
|
140
137
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
141
138
|
| Shared.NewPlanTieredPackagePrice
|
|
142
139
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
143
|
-
| Shared.
|
|
140
|
+
| Shared.NewPlanGroupedTieredPrice
|
|
141
|
+
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
144
142
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
145
|
-
| Shared.
|
|
143
|
+
| Shared.NewPlanUnitWithPercentPrice
|
|
144
|
+
| Shared.NewPlanMatrixWithAllocationPrice
|
|
145
|
+
| AddPrice.NewPlanTieredWithProrationPrice
|
|
146
146
|
| Shared.NewPlanUnitWithProrationPrice
|
|
147
147
|
| Shared.NewPlanGroupedAllocationPrice
|
|
148
|
+
| Shared.NewPlanBulkWithProrationPrice
|
|
148
149
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
149
150
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
151
|
+
| AddPrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
150
152
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
151
|
-
| Shared.NewPlanBulkWithProrationPrice
|
|
152
153
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
153
154
|
| Shared.NewPlanMaxGroupTieredPackagePrice
|
|
154
155
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
155
156
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
156
157
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
157
|
-
| Shared.
|
|
158
|
-
| Shared.NewPlanMatrixWithAllocationPrice
|
|
159
|
-
| Shared.NewPlanGroupedTieredPrice
|
|
158
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
160
159
|
| null;
|
|
161
160
|
}
|
|
162
161
|
|
|
162
|
+
export namespace AddPrice {
|
|
163
|
+
export interface NewPlanTieredWithProrationPrice {
|
|
164
|
+
/**
|
|
165
|
+
* The cadence to bill for this price on.
|
|
166
|
+
*/
|
|
167
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The id of the item the price will be associated with.
|
|
171
|
+
*/
|
|
172
|
+
item_id: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The pricing model type
|
|
176
|
+
*/
|
|
177
|
+
model_type: 'tiered_with_proration';
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The name of the price.
|
|
181
|
+
*/
|
|
182
|
+
name: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Configuration for tiered_with_proration pricing
|
|
186
|
+
*/
|
|
187
|
+
tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
191
|
+
* usage-based.
|
|
192
|
+
*/
|
|
193
|
+
billable_metric_id?: string | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
197
|
+
* this is true, and in-arrears if this is false.
|
|
198
|
+
*/
|
|
199
|
+
billed_in_advance?: boolean | null;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
203
|
+
* months.
|
|
204
|
+
*/
|
|
205
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
209
|
+
*/
|
|
210
|
+
conversion_rate?: number | null;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
214
|
+
*/
|
|
215
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
219
|
+
* price is billed.
|
|
220
|
+
*/
|
|
221
|
+
currency?: string | null;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* For dimensional price: specifies a price group and dimension values
|
|
225
|
+
*/
|
|
226
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* An alias for the price.
|
|
230
|
+
*/
|
|
231
|
+
external_price_id?: string | null;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
235
|
+
* applied.
|
|
236
|
+
*/
|
|
237
|
+
fixed_price_quantity?: number | null;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The property used to group this price on an invoice
|
|
241
|
+
*/
|
|
242
|
+
invoice_grouping_key?: string | null;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
246
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
247
|
+
*/
|
|
248
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
252
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
253
|
+
* by setting `metadata` to `null`.
|
|
254
|
+
*/
|
|
255
|
+
metadata?: { [key: string]: string | null } | null;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
259
|
+
* in the same API call.
|
|
260
|
+
*/
|
|
261
|
+
reference_id?: string | null;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export namespace NewPlanTieredWithProrationPrice {
|
|
265
|
+
/**
|
|
266
|
+
* Configuration for tiered_with_proration pricing
|
|
267
|
+
*/
|
|
268
|
+
export interface TieredWithProrationConfig {
|
|
269
|
+
/**
|
|
270
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
271
|
+
* proration
|
|
272
|
+
*/
|
|
273
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export namespace TieredWithProrationConfig {
|
|
277
|
+
/**
|
|
278
|
+
* Configuration for a single tiered with proration tier
|
|
279
|
+
*/
|
|
280
|
+
export interface Tier {
|
|
281
|
+
/**
|
|
282
|
+
* Inclusive tier starting value
|
|
283
|
+
*/
|
|
284
|
+
tier_lower_bound: string;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Amount per unit
|
|
288
|
+
*/
|
|
289
|
+
unit_amount: string;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
295
|
+
/**
|
|
296
|
+
* The cadence to bill for this price on.
|
|
297
|
+
*/
|
|
298
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
302
|
+
*/
|
|
303
|
+
grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* The id of the item the price will be associated with.
|
|
307
|
+
*/
|
|
308
|
+
item_id: string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* The pricing model type
|
|
312
|
+
*/
|
|
313
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* The name of the price.
|
|
317
|
+
*/
|
|
318
|
+
name: string;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
322
|
+
* usage-based.
|
|
323
|
+
*/
|
|
324
|
+
billable_metric_id?: string | null;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
328
|
+
* this is true, and in-arrears if this is false.
|
|
329
|
+
*/
|
|
330
|
+
billed_in_advance?: boolean | null;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
334
|
+
* months.
|
|
335
|
+
*/
|
|
336
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
340
|
+
*/
|
|
341
|
+
conversion_rate?: number | null;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
345
|
+
*/
|
|
346
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
350
|
+
* price is billed.
|
|
351
|
+
*/
|
|
352
|
+
currency?: string | null;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* For dimensional price: specifies a price group and dimension values
|
|
356
|
+
*/
|
|
357
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* An alias for the price.
|
|
361
|
+
*/
|
|
362
|
+
external_price_id?: string | null;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
366
|
+
* applied.
|
|
367
|
+
*/
|
|
368
|
+
fixed_price_quantity?: number | null;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* The property used to group this price on an invoice
|
|
372
|
+
*/
|
|
373
|
+
invoice_grouping_key?: string | null;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
377
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
378
|
+
*/
|
|
379
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
383
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
384
|
+
* by setting `metadata` to `null`.
|
|
385
|
+
*/
|
|
386
|
+
metadata?: { [key: string]: string | null } | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
390
|
+
* in the same API call.
|
|
391
|
+
*/
|
|
392
|
+
reference_id?: string | null;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
396
|
+
/**
|
|
397
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
398
|
+
*/
|
|
399
|
+
export interface GroupedWithMinMaxThresholdsConfig {
|
|
400
|
+
/**
|
|
401
|
+
* The event property used to group before applying thresholds
|
|
402
|
+
*/
|
|
403
|
+
grouping_key: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* The maximum amount to charge each group
|
|
407
|
+
*/
|
|
408
|
+
maximum_charge: string;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* The minimum amount to charge each group, regardless of usage
|
|
412
|
+
*/
|
|
413
|
+
minimum_charge: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* The base price charged per group
|
|
417
|
+
*/
|
|
418
|
+
per_unit_rate: string;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
163
423
|
export interface RemoveAdjustment {
|
|
164
424
|
/**
|
|
165
425
|
* The id of the adjustment to remove from on the plan.
|
|
@@ -223,39 +483,299 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
223
483
|
plan_phase_order?: number | null;
|
|
224
484
|
|
|
225
485
|
/**
|
|
226
|
-
*
|
|
486
|
+
* New plan price request body params.
|
|
227
487
|
*/
|
|
228
488
|
price?:
|
|
229
489
|
| Shared.NewPlanUnitPrice
|
|
230
|
-
| Shared.NewPlanPackagePrice
|
|
231
|
-
| Shared.NewPlanMatrixPrice
|
|
232
490
|
| Shared.NewPlanTieredPrice
|
|
233
|
-
| Shared.NewPlanTieredBPSPrice
|
|
234
|
-
| Shared.NewPlanBPSPrice
|
|
235
|
-
| Shared.NewPlanBulkBPSPrice
|
|
236
491
|
| Shared.NewPlanBulkPrice
|
|
492
|
+
| Shared.NewPlanPackagePrice
|
|
493
|
+
| Shared.NewPlanMatrixPrice
|
|
237
494
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
238
495
|
| Shared.NewPlanTieredPackagePrice
|
|
239
496
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
240
|
-
| Shared.
|
|
497
|
+
| Shared.NewPlanGroupedTieredPrice
|
|
498
|
+
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
241
499
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
242
|
-
| Shared.
|
|
500
|
+
| Shared.NewPlanUnitWithPercentPrice
|
|
501
|
+
| Shared.NewPlanMatrixWithAllocationPrice
|
|
502
|
+
| ReplacePrice.NewPlanTieredWithProrationPrice
|
|
243
503
|
| Shared.NewPlanUnitWithProrationPrice
|
|
244
504
|
| Shared.NewPlanGroupedAllocationPrice
|
|
505
|
+
| Shared.NewPlanBulkWithProrationPrice
|
|
245
506
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
246
507
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
508
|
+
| ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
247
509
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
248
|
-
| Shared.NewPlanBulkWithProrationPrice
|
|
249
510
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
250
511
|
| Shared.NewPlanMaxGroupTieredPackagePrice
|
|
251
512
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
252
513
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
253
514
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
254
|
-
| Shared.
|
|
255
|
-
| Shared.NewPlanMatrixWithAllocationPrice
|
|
256
|
-
| Shared.NewPlanGroupedTieredPrice
|
|
515
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
257
516
|
| null;
|
|
258
517
|
}
|
|
518
|
+
|
|
519
|
+
export namespace ReplacePrice {
|
|
520
|
+
export interface NewPlanTieredWithProrationPrice {
|
|
521
|
+
/**
|
|
522
|
+
* The cadence to bill for this price on.
|
|
523
|
+
*/
|
|
524
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* The id of the item the price will be associated with.
|
|
528
|
+
*/
|
|
529
|
+
item_id: string;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The pricing model type
|
|
533
|
+
*/
|
|
534
|
+
model_type: 'tiered_with_proration';
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* The name of the price.
|
|
538
|
+
*/
|
|
539
|
+
name: string;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Configuration for tiered_with_proration pricing
|
|
543
|
+
*/
|
|
544
|
+
tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
548
|
+
* usage-based.
|
|
549
|
+
*/
|
|
550
|
+
billable_metric_id?: string | null;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
554
|
+
* this is true, and in-arrears if this is false.
|
|
555
|
+
*/
|
|
556
|
+
billed_in_advance?: boolean | null;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
560
|
+
* months.
|
|
561
|
+
*/
|
|
562
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
566
|
+
*/
|
|
567
|
+
conversion_rate?: number | null;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
571
|
+
*/
|
|
572
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
576
|
+
* price is billed.
|
|
577
|
+
*/
|
|
578
|
+
currency?: string | null;
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* For dimensional price: specifies a price group and dimension values
|
|
582
|
+
*/
|
|
583
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* An alias for the price.
|
|
587
|
+
*/
|
|
588
|
+
external_price_id?: string | null;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
592
|
+
* applied.
|
|
593
|
+
*/
|
|
594
|
+
fixed_price_quantity?: number | null;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* The property used to group this price on an invoice
|
|
598
|
+
*/
|
|
599
|
+
invoice_grouping_key?: string | null;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
603
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
604
|
+
*/
|
|
605
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
609
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
610
|
+
* by setting `metadata` to `null`.
|
|
611
|
+
*/
|
|
612
|
+
metadata?: { [key: string]: string | null } | null;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
616
|
+
* in the same API call.
|
|
617
|
+
*/
|
|
618
|
+
reference_id?: string | null;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export namespace NewPlanTieredWithProrationPrice {
|
|
622
|
+
/**
|
|
623
|
+
* Configuration for tiered_with_proration pricing
|
|
624
|
+
*/
|
|
625
|
+
export interface TieredWithProrationConfig {
|
|
626
|
+
/**
|
|
627
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
628
|
+
* proration
|
|
629
|
+
*/
|
|
630
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export namespace TieredWithProrationConfig {
|
|
634
|
+
/**
|
|
635
|
+
* Configuration for a single tiered with proration tier
|
|
636
|
+
*/
|
|
637
|
+
export interface Tier {
|
|
638
|
+
/**
|
|
639
|
+
* Inclusive tier starting value
|
|
640
|
+
*/
|
|
641
|
+
tier_lower_bound: string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Amount per unit
|
|
645
|
+
*/
|
|
646
|
+
unit_amount: string;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
652
|
+
/**
|
|
653
|
+
* The cadence to bill for this price on.
|
|
654
|
+
*/
|
|
655
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
659
|
+
*/
|
|
660
|
+
grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* The id of the item the price will be associated with.
|
|
664
|
+
*/
|
|
665
|
+
item_id: string;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* The pricing model type
|
|
669
|
+
*/
|
|
670
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* The name of the price.
|
|
674
|
+
*/
|
|
675
|
+
name: string;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
679
|
+
* usage-based.
|
|
680
|
+
*/
|
|
681
|
+
billable_metric_id?: string | null;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
685
|
+
* this is true, and in-arrears if this is false.
|
|
686
|
+
*/
|
|
687
|
+
billed_in_advance?: boolean | null;
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
691
|
+
* months.
|
|
692
|
+
*/
|
|
693
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
697
|
+
*/
|
|
698
|
+
conversion_rate?: number | null;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
702
|
+
*/
|
|
703
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
707
|
+
* price is billed.
|
|
708
|
+
*/
|
|
709
|
+
currency?: string | null;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* For dimensional price: specifies a price group and dimension values
|
|
713
|
+
*/
|
|
714
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* An alias for the price.
|
|
718
|
+
*/
|
|
719
|
+
external_price_id?: string | null;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
723
|
+
* applied.
|
|
724
|
+
*/
|
|
725
|
+
fixed_price_quantity?: number | null;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* The property used to group this price on an invoice
|
|
729
|
+
*/
|
|
730
|
+
invoice_grouping_key?: string | null;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
734
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
735
|
+
*/
|
|
736
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
740
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
741
|
+
* by setting `metadata` to `null`.
|
|
742
|
+
*/
|
|
743
|
+
metadata?: { [key: string]: string | null } | null;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
747
|
+
* in the same API call.
|
|
748
|
+
*/
|
|
749
|
+
reference_id?: string | null;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
753
|
+
/**
|
|
754
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
755
|
+
*/
|
|
756
|
+
export interface GroupedWithMinMaxThresholdsConfig {
|
|
757
|
+
/**
|
|
758
|
+
* The event property used to group before applying thresholds
|
|
759
|
+
*/
|
|
760
|
+
grouping_key: string;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* The maximum amount to charge each group
|
|
764
|
+
*/
|
|
765
|
+
maximum_charge: string;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* The minimum amount to charge each group, regardless of usage
|
|
769
|
+
*/
|
|
770
|
+
minimum_charge: string;
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* The base price charged per group
|
|
774
|
+
*/
|
|
775
|
+
per_unit_rate: string;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
259
779
|
}
|
|
260
780
|
|
|
261
781
|
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
|