orb-billing 4.53.0 → 4.54.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 +13 -0
- package/package.json +1 -1
- package/resources/customers/credits/ledger.d.ts +2 -2
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/invoice-line-items.d.ts +169 -0
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +338 -0
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +189 -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 +530 -61
- 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/subscriptions.d.ts +187 -1
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/resources/customers/credits/ledger.ts +2 -2
- package/src/resources/invoice-line-items.ts +215 -0
- package/src/resources/invoices.ts +430 -0
- package/src/resources/plans/plans.ts +228 -0
- package/src/resources/prices/prices.ts +752 -88
- package/src/resources/subscriptions.ts +226 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -498,6 +498,8 @@ export interface PlanCreateParams {
|
|
|
498
498
|
| PlanCreateParams.NewPlanBulkWithProrationPrice
|
|
499
499
|
| PlanCreateParams.NewPlanGroupedTieredPackagePrice
|
|
500
500
|
| PlanCreateParams.NewPlanMaxGroupTieredPackagePrice
|
|
501
|
+
| PlanCreateParams.NewPlanScalableMatrixWithUnitPricingPrice
|
|
502
|
+
| PlanCreateParams.NewPlanScalableMatrixWithTieredPricingPrice
|
|
501
503
|
>;
|
|
502
504
|
|
|
503
505
|
/**
|
|
@@ -3185,6 +3187,232 @@ export namespace PlanCreateParams {
|
|
|
3185
3187
|
duration_unit: 'day' | 'month';
|
|
3186
3188
|
}
|
|
3187
3189
|
}
|
|
3190
|
+
|
|
3191
|
+
export interface NewPlanScalableMatrixWithUnitPricingPrice {
|
|
3192
|
+
/**
|
|
3193
|
+
* The cadence to bill for this price on.
|
|
3194
|
+
*/
|
|
3195
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
3196
|
+
|
|
3197
|
+
/**
|
|
3198
|
+
* The id of the item the plan will be associated with.
|
|
3199
|
+
*/
|
|
3200
|
+
item_id: string;
|
|
3201
|
+
|
|
3202
|
+
model_type: 'scalable_matrix_with_unit_pricing';
|
|
3203
|
+
|
|
3204
|
+
/**
|
|
3205
|
+
* The name of the price.
|
|
3206
|
+
*/
|
|
3207
|
+
name: string;
|
|
3208
|
+
|
|
3209
|
+
scalable_matrix_with_unit_pricing_config: Record<string, unknown>;
|
|
3210
|
+
|
|
3211
|
+
/**
|
|
3212
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3213
|
+
* usage-based.
|
|
3214
|
+
*/
|
|
3215
|
+
billable_metric_id?: string | null;
|
|
3216
|
+
|
|
3217
|
+
/**
|
|
3218
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3219
|
+
* this is true, and in-arrears if this is false.
|
|
3220
|
+
*/
|
|
3221
|
+
billed_in_advance?: boolean | null;
|
|
3222
|
+
|
|
3223
|
+
/**
|
|
3224
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
3225
|
+
* months.
|
|
3226
|
+
*/
|
|
3227
|
+
billing_cycle_configuration?: NewPlanScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration | null;
|
|
3228
|
+
|
|
3229
|
+
/**
|
|
3230
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3231
|
+
*/
|
|
3232
|
+
conversion_rate?: number | null;
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
3236
|
+
* price is billed.
|
|
3237
|
+
*/
|
|
3238
|
+
currency?: string | null;
|
|
3239
|
+
|
|
3240
|
+
/**
|
|
3241
|
+
* An alias for the price.
|
|
3242
|
+
*/
|
|
3243
|
+
external_price_id?: string | null;
|
|
3244
|
+
|
|
3245
|
+
/**
|
|
3246
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3247
|
+
* applied.
|
|
3248
|
+
*/
|
|
3249
|
+
fixed_price_quantity?: number | null;
|
|
3250
|
+
|
|
3251
|
+
/**
|
|
3252
|
+
* The property used to group this price on an invoice
|
|
3253
|
+
*/
|
|
3254
|
+
invoice_grouping_key?: string | null;
|
|
3255
|
+
|
|
3256
|
+
/**
|
|
3257
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
3258
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
3259
|
+
*/
|
|
3260
|
+
invoicing_cycle_configuration?: NewPlanScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | null;
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
3264
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
3265
|
+
* by setting `metadata` to `null`.
|
|
3266
|
+
*/
|
|
3267
|
+
metadata?: Record<string, string | null> | null;
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
export namespace NewPlanScalableMatrixWithUnitPricingPrice {
|
|
3271
|
+
/**
|
|
3272
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
3273
|
+
* months.
|
|
3274
|
+
*/
|
|
3275
|
+
export interface BillingCycleConfiguration {
|
|
3276
|
+
/**
|
|
3277
|
+
* The duration of the billing period.
|
|
3278
|
+
*/
|
|
3279
|
+
duration: number;
|
|
3280
|
+
|
|
3281
|
+
/**
|
|
3282
|
+
* The unit of billing period duration.
|
|
3283
|
+
*/
|
|
3284
|
+
duration_unit: 'day' | 'month';
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
/**
|
|
3288
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
3289
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
3290
|
+
*/
|
|
3291
|
+
export interface InvoicingCycleConfiguration {
|
|
3292
|
+
/**
|
|
3293
|
+
* The duration of the billing period.
|
|
3294
|
+
*/
|
|
3295
|
+
duration: number;
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* The unit of billing period duration.
|
|
3299
|
+
*/
|
|
3300
|
+
duration_unit: 'day' | 'month';
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
export interface NewPlanScalableMatrixWithTieredPricingPrice {
|
|
3305
|
+
/**
|
|
3306
|
+
* The cadence to bill for this price on.
|
|
3307
|
+
*/
|
|
3308
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
3309
|
+
|
|
3310
|
+
/**
|
|
3311
|
+
* The id of the item the plan will be associated with.
|
|
3312
|
+
*/
|
|
3313
|
+
item_id: string;
|
|
3314
|
+
|
|
3315
|
+
model_type: 'scalable_matrix_with_tiered_pricing';
|
|
3316
|
+
|
|
3317
|
+
/**
|
|
3318
|
+
* The name of the price.
|
|
3319
|
+
*/
|
|
3320
|
+
name: string;
|
|
3321
|
+
|
|
3322
|
+
scalable_matrix_with_tiered_pricing_config: Record<string, unknown>;
|
|
3323
|
+
|
|
3324
|
+
/**
|
|
3325
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3326
|
+
* usage-based.
|
|
3327
|
+
*/
|
|
3328
|
+
billable_metric_id?: string | null;
|
|
3329
|
+
|
|
3330
|
+
/**
|
|
3331
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3332
|
+
* this is true, and in-arrears if this is false.
|
|
3333
|
+
*/
|
|
3334
|
+
billed_in_advance?: boolean | null;
|
|
3335
|
+
|
|
3336
|
+
/**
|
|
3337
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
3338
|
+
* months.
|
|
3339
|
+
*/
|
|
3340
|
+
billing_cycle_configuration?: NewPlanScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration | null;
|
|
3341
|
+
|
|
3342
|
+
/**
|
|
3343
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3344
|
+
*/
|
|
3345
|
+
conversion_rate?: number | null;
|
|
3346
|
+
|
|
3347
|
+
/**
|
|
3348
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
3349
|
+
* price is billed.
|
|
3350
|
+
*/
|
|
3351
|
+
currency?: string | null;
|
|
3352
|
+
|
|
3353
|
+
/**
|
|
3354
|
+
* An alias for the price.
|
|
3355
|
+
*/
|
|
3356
|
+
external_price_id?: string | null;
|
|
3357
|
+
|
|
3358
|
+
/**
|
|
3359
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3360
|
+
* applied.
|
|
3361
|
+
*/
|
|
3362
|
+
fixed_price_quantity?: number | null;
|
|
3363
|
+
|
|
3364
|
+
/**
|
|
3365
|
+
* The property used to group this price on an invoice
|
|
3366
|
+
*/
|
|
3367
|
+
invoice_grouping_key?: string | null;
|
|
3368
|
+
|
|
3369
|
+
/**
|
|
3370
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
3371
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
3372
|
+
*/
|
|
3373
|
+
invoicing_cycle_configuration?: NewPlanScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | null;
|
|
3374
|
+
|
|
3375
|
+
/**
|
|
3376
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
3377
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
3378
|
+
* by setting `metadata` to `null`.
|
|
3379
|
+
*/
|
|
3380
|
+
metadata?: Record<string, string | null> | null;
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
export namespace NewPlanScalableMatrixWithTieredPricingPrice {
|
|
3384
|
+
/**
|
|
3385
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
3386
|
+
* months.
|
|
3387
|
+
*/
|
|
3388
|
+
export interface BillingCycleConfiguration {
|
|
3389
|
+
/**
|
|
3390
|
+
* The duration of the billing period.
|
|
3391
|
+
*/
|
|
3392
|
+
duration: number;
|
|
3393
|
+
|
|
3394
|
+
/**
|
|
3395
|
+
* The unit of billing period duration.
|
|
3396
|
+
*/
|
|
3397
|
+
duration_unit: 'day' | 'month';
|
|
3398
|
+
}
|
|
3399
|
+
|
|
3400
|
+
/**
|
|
3401
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
3402
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
3403
|
+
*/
|
|
3404
|
+
export interface InvoicingCycleConfiguration {
|
|
3405
|
+
/**
|
|
3406
|
+
* The duration of the billing period.
|
|
3407
|
+
*/
|
|
3408
|
+
duration: number;
|
|
3409
|
+
|
|
3410
|
+
/**
|
|
3411
|
+
* The unit of billing period duration.
|
|
3412
|
+
*/
|
|
3413
|
+
duration_unit: 'day' | 'month';
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3188
3416
|
}
|
|
3189
3417
|
|
|
3190
3418
|
export interface PlanUpdateParams {
|