orb-billing 4.13.0 → 4.15.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 +16 -0
- package/package.json +1 -1
- package/resources/plans/plans.d.ts +95 -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 +169 -2
- 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 +263 -4
- 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/plans/plans.ts +114 -0
- package/src/resources/prices/prices.ts +224 -0
- package/src/resources/subscriptions.ts +315 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -372,6 +372,7 @@ export type Price =
|
|
|
372
372
|
| Price.TieredWithProrationPrice
|
|
373
373
|
| Price.UnitWithProrationPrice
|
|
374
374
|
| Price.GroupedAllocationPrice
|
|
375
|
+
| Price.GroupedWithProratedMinimumPrice
|
|
375
376
|
| Price.BulkWithProrationPrice;
|
|
376
377
|
|
|
377
378
|
export namespace Price {
|
|
@@ -2674,6 +2675,116 @@ export namespace Price {
|
|
|
2674
2675
|
}
|
|
2675
2676
|
}
|
|
2676
2677
|
|
|
2678
|
+
export interface GroupedWithProratedMinimumPrice {
|
|
2679
|
+
id: string;
|
|
2680
|
+
|
|
2681
|
+
billable_metric: GroupedWithProratedMinimumPrice.BillableMetric | null;
|
|
2682
|
+
|
|
2683
|
+
billing_cycle_configuration: GroupedWithProratedMinimumPrice.BillingCycleConfiguration;
|
|
2684
|
+
|
|
2685
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
2686
|
+
|
|
2687
|
+
conversion_rate: number | null;
|
|
2688
|
+
|
|
2689
|
+
created_at: string;
|
|
2690
|
+
|
|
2691
|
+
credit_allocation: GroupedWithProratedMinimumPrice.CreditAllocation | null;
|
|
2692
|
+
|
|
2693
|
+
currency: string;
|
|
2694
|
+
|
|
2695
|
+
discount: Shared.Discount | null;
|
|
2696
|
+
|
|
2697
|
+
external_price_id: string | null;
|
|
2698
|
+
|
|
2699
|
+
fixed_price_quantity: number | null;
|
|
2700
|
+
|
|
2701
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
2702
|
+
|
|
2703
|
+
invoicing_cycle_configuration: GroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
|
|
2704
|
+
|
|
2705
|
+
item: GroupedWithProratedMinimumPrice.Item;
|
|
2706
|
+
|
|
2707
|
+
maximum: GroupedWithProratedMinimumPrice.Maximum | null;
|
|
2708
|
+
|
|
2709
|
+
maximum_amount: string | null;
|
|
2710
|
+
|
|
2711
|
+
/**
|
|
2712
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
2713
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
2714
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
2715
|
+
* `null`.
|
|
2716
|
+
*/
|
|
2717
|
+
metadata: Record<string, string>;
|
|
2718
|
+
|
|
2719
|
+
minimum: GroupedWithProratedMinimumPrice.Minimum | null;
|
|
2720
|
+
|
|
2721
|
+
minimum_amount: string | null;
|
|
2722
|
+
|
|
2723
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
2724
|
+
|
|
2725
|
+
name: string;
|
|
2726
|
+
|
|
2727
|
+
plan_phase_order: number | null;
|
|
2728
|
+
|
|
2729
|
+
price_type: 'usage_price' | 'fixed_price';
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
export namespace GroupedWithProratedMinimumPrice {
|
|
2733
|
+
export interface BillableMetric {
|
|
2734
|
+
id: string;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
export interface BillingCycleConfiguration {
|
|
2738
|
+
duration: number;
|
|
2739
|
+
|
|
2740
|
+
duration_unit: 'day' | 'month';
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
export interface CreditAllocation {
|
|
2744
|
+
allows_rollover: boolean;
|
|
2745
|
+
|
|
2746
|
+
currency: string;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
export interface InvoicingCycleConfiguration {
|
|
2750
|
+
duration: number;
|
|
2751
|
+
|
|
2752
|
+
duration_unit: 'day' | 'month';
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
export interface Item {
|
|
2756
|
+
id: string;
|
|
2757
|
+
|
|
2758
|
+
name: string;
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2761
|
+
export interface Maximum {
|
|
2762
|
+
/**
|
|
2763
|
+
* List of price_ids that this maximum amount applies to. For plan/plan phase
|
|
2764
|
+
* maximums, this can be a subset of prices.
|
|
2765
|
+
*/
|
|
2766
|
+
applies_to_price_ids: Array<string>;
|
|
2767
|
+
|
|
2768
|
+
/**
|
|
2769
|
+
* Maximum amount applied
|
|
2770
|
+
*/
|
|
2771
|
+
maximum_amount: string;
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
export interface Minimum {
|
|
2775
|
+
/**
|
|
2776
|
+
* List of price_ids that this minimum amount applies to. For plan/plan phase
|
|
2777
|
+
* minimums, this can be a subset of prices.
|
|
2778
|
+
*/
|
|
2779
|
+
applies_to_price_ids: Array<string>;
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* Minimum amount applied
|
|
2783
|
+
*/
|
|
2784
|
+
minimum_amount: string;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2677
2788
|
export interface BulkWithProrationPrice {
|
|
2678
2789
|
id: string;
|
|
2679
2790
|
|
|
@@ -2809,6 +2920,7 @@ export type PriceCreateParams =
|
|
|
2809
2920
|
| PriceCreateParams.NewFloatingTieredWithProrationPrice
|
|
2810
2921
|
| PriceCreateParams.NewFloatingUnitWithProrationPrice
|
|
2811
2922
|
| PriceCreateParams.NewFloatingGroupedAllocationPrice
|
|
2923
|
+
| PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice
|
|
2812
2924
|
| PriceCreateParams.NewFloatingBulkWithProrationPrice;
|
|
2813
2925
|
|
|
2814
2926
|
export namespace PriceCreateParams {
|
|
@@ -5149,6 +5261,118 @@ export namespace PriceCreateParams {
|
|
|
5149
5261
|
}
|
|
5150
5262
|
}
|
|
5151
5263
|
|
|
5264
|
+
export interface NewFloatingGroupedWithProratedMinimumPrice {
|
|
5265
|
+
/**
|
|
5266
|
+
* The cadence to bill for this price on.
|
|
5267
|
+
*/
|
|
5268
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5269
|
+
|
|
5270
|
+
/**
|
|
5271
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
5272
|
+
*/
|
|
5273
|
+
currency: string;
|
|
5274
|
+
|
|
5275
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
5276
|
+
|
|
5277
|
+
/**
|
|
5278
|
+
* The id of the item the plan will be associated with.
|
|
5279
|
+
*/
|
|
5280
|
+
item_id: string;
|
|
5281
|
+
|
|
5282
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
5283
|
+
|
|
5284
|
+
/**
|
|
5285
|
+
* The name of the price.
|
|
5286
|
+
*/
|
|
5287
|
+
name: string;
|
|
5288
|
+
|
|
5289
|
+
/**
|
|
5290
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5291
|
+
* usage-based.
|
|
5292
|
+
*/
|
|
5293
|
+
billable_metric_id?: string | null;
|
|
5294
|
+
|
|
5295
|
+
/**
|
|
5296
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5297
|
+
* this is true, and in-arrears if this is false.
|
|
5298
|
+
*/
|
|
5299
|
+
billed_in_advance?: boolean | null;
|
|
5300
|
+
|
|
5301
|
+
/**
|
|
5302
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5303
|
+
* months.
|
|
5304
|
+
*/
|
|
5305
|
+
billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
|
|
5306
|
+
|
|
5307
|
+
/**
|
|
5308
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5309
|
+
*/
|
|
5310
|
+
conversion_rate?: number | null;
|
|
5311
|
+
|
|
5312
|
+
/**
|
|
5313
|
+
* An alias for the price.
|
|
5314
|
+
*/
|
|
5315
|
+
external_price_id?: string | null;
|
|
5316
|
+
|
|
5317
|
+
/**
|
|
5318
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5319
|
+
* applied.
|
|
5320
|
+
*/
|
|
5321
|
+
fixed_price_quantity?: number | null;
|
|
5322
|
+
|
|
5323
|
+
/**
|
|
5324
|
+
* The property used to group this price on an invoice
|
|
5325
|
+
*/
|
|
5326
|
+
invoice_grouping_key?: string | null;
|
|
5327
|
+
|
|
5328
|
+
/**
|
|
5329
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5330
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5331
|
+
*/
|
|
5332
|
+
invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
|
|
5333
|
+
|
|
5334
|
+
/**
|
|
5335
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5336
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5337
|
+
* by setting `metadata` to `null`.
|
|
5338
|
+
*/
|
|
5339
|
+
metadata?: Record<string, string | null> | null;
|
|
5340
|
+
}
|
|
5341
|
+
|
|
5342
|
+
export namespace NewFloatingGroupedWithProratedMinimumPrice {
|
|
5343
|
+
/**
|
|
5344
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5345
|
+
* months.
|
|
5346
|
+
*/
|
|
5347
|
+
export interface BillingCycleConfiguration {
|
|
5348
|
+
/**
|
|
5349
|
+
* The duration of the billing period.
|
|
5350
|
+
*/
|
|
5351
|
+
duration: number;
|
|
5352
|
+
|
|
5353
|
+
/**
|
|
5354
|
+
* The unit of billing period duration.
|
|
5355
|
+
*/
|
|
5356
|
+
duration_unit: 'day' | 'month';
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
/**
|
|
5360
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5361
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5362
|
+
*/
|
|
5363
|
+
export interface InvoicingCycleConfiguration {
|
|
5364
|
+
/**
|
|
5365
|
+
* The duration of the billing period.
|
|
5366
|
+
*/
|
|
5367
|
+
duration: number;
|
|
5368
|
+
|
|
5369
|
+
/**
|
|
5370
|
+
* The unit of billing period duration.
|
|
5371
|
+
*/
|
|
5372
|
+
duration_unit: 'day' | 'month';
|
|
5373
|
+
}
|
|
5374
|
+
}
|
|
5375
|
+
|
|
5152
5376
|
export interface NewFloatingBulkWithProrationPrice {
|
|
5153
5377
|
bulk_with_proration_config: Record<string, unknown>;
|
|
5154
5378
|
|
|
@@ -2229,18 +2229,32 @@ export namespace SubscriptionFetchScheduleResponse {
|
|
|
2229
2229
|
export interface SubscriptionCreateParams {
|
|
2230
2230
|
align_billing_with_subscription_start_date?: boolean;
|
|
2231
2231
|
|
|
2232
|
+
/**
|
|
2233
|
+
* Determines whether issued invoices for this subscription will automatically be
|
|
2234
|
+
* charged with the saved payment method on the due date. If not specified, this
|
|
2235
|
+
* defaults to the behavior configured for this customer.
|
|
2236
|
+
*/
|
|
2232
2237
|
auto_collection?: boolean | null;
|
|
2233
2238
|
|
|
2234
2239
|
aws_region?: string | null;
|
|
2235
2240
|
|
|
2236
2241
|
billing_cycle_anchor_configuration?: SubscriptionCreateParams.BillingCycleAnchorConfiguration | null;
|
|
2237
2242
|
|
|
2243
|
+
/**
|
|
2244
|
+
* Redemption code to be used for this subscription. If the coupon cannot be found
|
|
2245
|
+
* by its redemption code, or cannot be redeemed, an error response will be
|
|
2246
|
+
* returned and the subscription creation or plan change will not be scheduled.
|
|
2247
|
+
*/
|
|
2238
2248
|
coupon_redemption_code?: string | null;
|
|
2239
2249
|
|
|
2240
2250
|
credits_overage_rate?: number | null;
|
|
2241
2251
|
|
|
2242
2252
|
customer_id?: string | null;
|
|
2243
2253
|
|
|
2254
|
+
/**
|
|
2255
|
+
* Determines the default memo on this subscription's invoices. Note that if this
|
|
2256
|
+
* is not provided, it is determined by the plan configuration.
|
|
2257
|
+
*/
|
|
2244
2258
|
default_invoice_memo?: string | null;
|
|
2245
2259
|
|
|
2246
2260
|
end_date?: string | null;
|
|
@@ -2257,8 +2271,16 @@ export interface SubscriptionCreateParams {
|
|
|
2257
2271
|
*/
|
|
2258
2272
|
external_plan_id?: string | null;
|
|
2259
2273
|
|
|
2274
|
+
/**
|
|
2275
|
+
* The phase of the plan to start with
|
|
2276
|
+
*/
|
|
2260
2277
|
initial_phase_order?: number | null;
|
|
2261
2278
|
|
|
2279
|
+
/**
|
|
2280
|
+
* When this subscription's accrued usage reaches this threshold, an invoice will
|
|
2281
|
+
* be issued for the subscription. If not specified, invoices will only be issued
|
|
2282
|
+
* at the end of the billing period.
|
|
2283
|
+
*/
|
|
2262
2284
|
invoicing_threshold?: string | null;
|
|
2263
2285
|
|
|
2264
2286
|
/**
|
|
@@ -2268,6 +2290,11 @@ export interface SubscriptionCreateParams {
|
|
|
2268
2290
|
*/
|
|
2269
2291
|
metadata?: Record<string, string | null> | null;
|
|
2270
2292
|
|
|
2293
|
+
/**
|
|
2294
|
+
* The net terms determines the difference between the invoice date and the issue
|
|
2295
|
+
* date for the invoice. If you intend the invoice to be due on issue, set this
|
|
2296
|
+
* to 0. If not provided, this defaults to the value specified in the plan.
|
|
2297
|
+
*/
|
|
2271
2298
|
net_terms?: number | null;
|
|
2272
2299
|
|
|
2273
2300
|
per_credit_overage_amount?: number | null;
|
|
@@ -2296,6 +2323,7 @@ export interface SubscriptionCreateParams {
|
|
|
2296
2323
|
| SubscriptionCreateParams.OverridePackageWithAllocationPrice
|
|
2297
2324
|
| SubscriptionCreateParams.OverrideUnitWithPercentPrice
|
|
2298
2325
|
| SubscriptionCreateParams.OverrideGroupedAllocationPrice
|
|
2326
|
+
| SubscriptionCreateParams.OverrideGroupedWithProratedMinimumPrice
|
|
2299
2327
|
| SubscriptionCreateParams.OverrideBulkWithProrationPrice
|
|
2300
2328
|
> | null;
|
|
2301
2329
|
|
|
@@ -3561,6 +3589,82 @@ export namespace SubscriptionCreateParams {
|
|
|
3561
3589
|
}
|
|
3562
3590
|
}
|
|
3563
3591
|
|
|
3592
|
+
export interface OverrideGroupedWithProratedMinimumPrice {
|
|
3593
|
+
id: string;
|
|
3594
|
+
|
|
3595
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
3596
|
+
|
|
3597
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
3598
|
+
|
|
3599
|
+
/**
|
|
3600
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3601
|
+
*/
|
|
3602
|
+
conversion_rate?: number | null;
|
|
3603
|
+
|
|
3604
|
+
/**
|
|
3605
|
+
* The currency of the price. If not provided, the currency of the plan will be
|
|
3606
|
+
* used.
|
|
3607
|
+
*/
|
|
3608
|
+
currency?: string | null;
|
|
3609
|
+
|
|
3610
|
+
/**
|
|
3611
|
+
* The subscription's override discount for the plan.
|
|
3612
|
+
*/
|
|
3613
|
+
discount?: OverrideGroupedWithProratedMinimumPrice.Discount | null;
|
|
3614
|
+
|
|
3615
|
+
/**
|
|
3616
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3617
|
+
*/
|
|
3618
|
+
fixed_price_quantity?: number | null;
|
|
3619
|
+
|
|
3620
|
+
/**
|
|
3621
|
+
* The subscription's override maximum amount for the plan.
|
|
3622
|
+
*/
|
|
3623
|
+
maximum_amount?: string | null;
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* The subscription's override minimum amount for the plan.
|
|
3627
|
+
*/
|
|
3628
|
+
minimum_amount?: string | null;
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
export namespace OverrideGroupedWithProratedMinimumPrice {
|
|
3632
|
+
/**
|
|
3633
|
+
* The subscription's override discount for the plan.
|
|
3634
|
+
*/
|
|
3635
|
+
export interface Discount {
|
|
3636
|
+
discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
|
|
3637
|
+
|
|
3638
|
+
/**
|
|
3639
|
+
* Only available if discount_type is `amount`.
|
|
3640
|
+
*/
|
|
3641
|
+
amount_discount?: string | null;
|
|
3642
|
+
|
|
3643
|
+
/**
|
|
3644
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3645
|
+
* this can be a subset of prices.
|
|
3646
|
+
*/
|
|
3647
|
+
applies_to_price_ids?: Array<string> | null;
|
|
3648
|
+
|
|
3649
|
+
/**
|
|
3650
|
+
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3651
|
+
* and 1.
|
|
3652
|
+
*/
|
|
3653
|
+
percentage_discount?: number | null;
|
|
3654
|
+
|
|
3655
|
+
/**
|
|
3656
|
+
* Only available if discount_type is `trial`
|
|
3657
|
+
*/
|
|
3658
|
+
trial_amount_discount?: string | null;
|
|
3659
|
+
|
|
3660
|
+
/**
|
|
3661
|
+
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3662
|
+
* discount is for
|
|
3663
|
+
*/
|
|
3664
|
+
usage_discount?: number | null;
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3564
3668
|
export interface OverrideBulkWithProrationPrice {
|
|
3565
3669
|
id: string;
|
|
3566
3670
|
|
|
@@ -3879,6 +3983,7 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
3879
3983
|
| Add.NewFloatingTieredWithProrationPrice
|
|
3880
3984
|
| Add.NewFloatingUnitWithProrationPrice
|
|
3881
3985
|
| Add.NewFloatingGroupedAllocationPrice
|
|
3986
|
+
| Add.NewFloatingGroupedWithProratedMinimumPrice
|
|
3882
3987
|
| Add.NewFloatingBulkWithProrationPrice
|
|
3883
3988
|
| null;
|
|
3884
3989
|
|
|
@@ -6294,6 +6399,118 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
6294
6399
|
}
|
|
6295
6400
|
}
|
|
6296
6401
|
|
|
6402
|
+
export interface NewFloatingGroupedWithProratedMinimumPrice {
|
|
6403
|
+
/**
|
|
6404
|
+
* The cadence to bill for this price on.
|
|
6405
|
+
*/
|
|
6406
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
6407
|
+
|
|
6408
|
+
/**
|
|
6409
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
6410
|
+
*/
|
|
6411
|
+
currency: string;
|
|
6412
|
+
|
|
6413
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
6414
|
+
|
|
6415
|
+
/**
|
|
6416
|
+
* The id of the item the plan will be associated with.
|
|
6417
|
+
*/
|
|
6418
|
+
item_id: string;
|
|
6419
|
+
|
|
6420
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
6421
|
+
|
|
6422
|
+
/**
|
|
6423
|
+
* The name of the price.
|
|
6424
|
+
*/
|
|
6425
|
+
name: string;
|
|
6426
|
+
|
|
6427
|
+
/**
|
|
6428
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
6429
|
+
* usage-based.
|
|
6430
|
+
*/
|
|
6431
|
+
billable_metric_id?: string | null;
|
|
6432
|
+
|
|
6433
|
+
/**
|
|
6434
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
6435
|
+
* this is true, and in-arrears if this is false.
|
|
6436
|
+
*/
|
|
6437
|
+
billed_in_advance?: boolean | null;
|
|
6438
|
+
|
|
6439
|
+
/**
|
|
6440
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
6441
|
+
* months.
|
|
6442
|
+
*/
|
|
6443
|
+
billing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
|
|
6444
|
+
|
|
6445
|
+
/**
|
|
6446
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
6447
|
+
*/
|
|
6448
|
+
conversion_rate?: number | null;
|
|
6449
|
+
|
|
6450
|
+
/**
|
|
6451
|
+
* An alias for the price.
|
|
6452
|
+
*/
|
|
6453
|
+
external_price_id?: string | null;
|
|
6454
|
+
|
|
6455
|
+
/**
|
|
6456
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
6457
|
+
* applied.
|
|
6458
|
+
*/
|
|
6459
|
+
fixed_price_quantity?: number | null;
|
|
6460
|
+
|
|
6461
|
+
/**
|
|
6462
|
+
* The property used to group this price on an invoice
|
|
6463
|
+
*/
|
|
6464
|
+
invoice_grouping_key?: string | null;
|
|
6465
|
+
|
|
6466
|
+
/**
|
|
6467
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
6468
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
6469
|
+
*/
|
|
6470
|
+
invoicing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
|
|
6471
|
+
|
|
6472
|
+
/**
|
|
6473
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
6474
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
6475
|
+
* by setting `metadata` to `null`.
|
|
6476
|
+
*/
|
|
6477
|
+
metadata?: Record<string, string | null> | null;
|
|
6478
|
+
}
|
|
6479
|
+
|
|
6480
|
+
export namespace NewFloatingGroupedWithProratedMinimumPrice {
|
|
6481
|
+
/**
|
|
6482
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
6483
|
+
* months.
|
|
6484
|
+
*/
|
|
6485
|
+
export interface BillingCycleConfiguration {
|
|
6486
|
+
/**
|
|
6487
|
+
* The duration of the billing period.
|
|
6488
|
+
*/
|
|
6489
|
+
duration: number;
|
|
6490
|
+
|
|
6491
|
+
/**
|
|
6492
|
+
* The unit of billing period duration.
|
|
6493
|
+
*/
|
|
6494
|
+
duration_unit: 'day' | 'month';
|
|
6495
|
+
}
|
|
6496
|
+
|
|
6497
|
+
/**
|
|
6498
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
6499
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
6500
|
+
*/
|
|
6501
|
+
export interface InvoicingCycleConfiguration {
|
|
6502
|
+
/**
|
|
6503
|
+
* The duration of the billing period.
|
|
6504
|
+
*/
|
|
6505
|
+
duration: number;
|
|
6506
|
+
|
|
6507
|
+
/**
|
|
6508
|
+
* The unit of billing period duration.
|
|
6509
|
+
*/
|
|
6510
|
+
duration_unit: 'day' | 'month';
|
|
6511
|
+
}
|
|
6512
|
+
}
|
|
6513
|
+
|
|
6297
6514
|
export interface NewFloatingBulkWithProrationPrice {
|
|
6298
6515
|
bulk_with_proration_config: Record<string, unknown>;
|
|
6299
6516
|
|
|
@@ -6557,6 +6774,13 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
6557
6774
|
*/
|
|
6558
6775
|
align_billing_with_plan_change_date?: boolean | null;
|
|
6559
6776
|
|
|
6777
|
+
/**
|
|
6778
|
+
* Determines whether issued invoices for this subscription will automatically be
|
|
6779
|
+
* charged with the saved payment method on the due date. If not specified, this
|
|
6780
|
+
* defaults to the behavior configured for this customer.
|
|
6781
|
+
*/
|
|
6782
|
+
auto_collection?: boolean | null;
|
|
6783
|
+
|
|
6560
6784
|
/**
|
|
6561
6785
|
* Reset billing periods to be aligned with the plan change's effective date or
|
|
6562
6786
|
* start of the month. Defaults to `unchanged` which keeps subscription's existing
|
|
@@ -6573,12 +6797,18 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
6573
6797
|
/**
|
|
6574
6798
|
* Redemption code to be used for this subscription. If the coupon cannot be found
|
|
6575
6799
|
* by its redemption code, or cannot be redeemed, an error response will be
|
|
6576
|
-
* returned and the plan change will not be scheduled.
|
|
6800
|
+
* returned and the subscription creation or plan change will not be scheduled.
|
|
6577
6801
|
*/
|
|
6578
6802
|
coupon_redemption_code?: string | null;
|
|
6579
6803
|
|
|
6580
6804
|
credits_overage_rate?: number | null;
|
|
6581
6805
|
|
|
6806
|
+
/**
|
|
6807
|
+
* Determines the default memo on this subscription's invoices. Note that if this
|
|
6808
|
+
* is not provided, it is determined by the plan configuration.
|
|
6809
|
+
*/
|
|
6810
|
+
default_invoice_memo?: string | null;
|
|
6811
|
+
|
|
6582
6812
|
/**
|
|
6583
6813
|
* The external_plan_id of the plan that the given subscription should be switched
|
|
6584
6814
|
* to. Note that either this property or `plan_id` must be specified.
|
|
@@ -6597,6 +6827,13 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
6597
6827
|
*/
|
|
6598
6828
|
invoicing_threshold?: string | null;
|
|
6599
6829
|
|
|
6830
|
+
/**
|
|
6831
|
+
* The net terms determines the difference between the invoice date and the issue
|
|
6832
|
+
* date for the invoice. If you intend the invoice to be due on issue, set this
|
|
6833
|
+
* to 0. If not provided, this defaults to the value specified in the plan.
|
|
6834
|
+
*/
|
|
6835
|
+
net_terms?: number | null;
|
|
6836
|
+
|
|
6600
6837
|
per_credit_overage_amount?: number | null;
|
|
6601
6838
|
|
|
6602
6839
|
/**
|
|
@@ -6623,6 +6860,7 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
6623
6860
|
| SubscriptionSchedulePlanChangeParams.OverridePackageWithAllocationPrice
|
|
6624
6861
|
| SubscriptionSchedulePlanChangeParams.OverrideUnitWithPercentPrice
|
|
6625
6862
|
| SubscriptionSchedulePlanChangeParams.OverrideGroupedAllocationPrice
|
|
6863
|
+
| SubscriptionSchedulePlanChangeParams.OverrideGroupedWithProratedMinimumPrice
|
|
6626
6864
|
| SubscriptionSchedulePlanChangeParams.OverrideBulkWithProrationPrice
|
|
6627
6865
|
> | null;
|
|
6628
6866
|
}
|
|
@@ -7863,6 +8101,82 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7863
8101
|
}
|
|
7864
8102
|
}
|
|
7865
8103
|
|
|
8104
|
+
export interface OverrideGroupedWithProratedMinimumPrice {
|
|
8105
|
+
id: string;
|
|
8106
|
+
|
|
8107
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
8108
|
+
|
|
8109
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
8110
|
+
|
|
8111
|
+
/**
|
|
8112
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
8113
|
+
*/
|
|
8114
|
+
conversion_rate?: number | null;
|
|
8115
|
+
|
|
8116
|
+
/**
|
|
8117
|
+
* The currency of the price. If not provided, the currency of the plan will be
|
|
8118
|
+
* used.
|
|
8119
|
+
*/
|
|
8120
|
+
currency?: string | null;
|
|
8121
|
+
|
|
8122
|
+
/**
|
|
8123
|
+
* The subscription's override discount for the plan.
|
|
8124
|
+
*/
|
|
8125
|
+
discount?: OverrideGroupedWithProratedMinimumPrice.Discount | null;
|
|
8126
|
+
|
|
8127
|
+
/**
|
|
8128
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
8129
|
+
*/
|
|
8130
|
+
fixed_price_quantity?: number | null;
|
|
8131
|
+
|
|
8132
|
+
/**
|
|
8133
|
+
* The subscription's override maximum amount for the plan.
|
|
8134
|
+
*/
|
|
8135
|
+
maximum_amount?: string | null;
|
|
8136
|
+
|
|
8137
|
+
/**
|
|
8138
|
+
* The subscription's override minimum amount for the plan.
|
|
8139
|
+
*/
|
|
8140
|
+
minimum_amount?: string | null;
|
|
8141
|
+
}
|
|
8142
|
+
|
|
8143
|
+
export namespace OverrideGroupedWithProratedMinimumPrice {
|
|
8144
|
+
/**
|
|
8145
|
+
* The subscription's override discount for the plan.
|
|
8146
|
+
*/
|
|
8147
|
+
export interface Discount {
|
|
8148
|
+
discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
|
|
8149
|
+
|
|
8150
|
+
/**
|
|
8151
|
+
* Only available if discount_type is `amount`.
|
|
8152
|
+
*/
|
|
8153
|
+
amount_discount?: string | null;
|
|
8154
|
+
|
|
8155
|
+
/**
|
|
8156
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8157
|
+
* this can be a subset of prices.
|
|
8158
|
+
*/
|
|
8159
|
+
applies_to_price_ids?: Array<string> | null;
|
|
8160
|
+
|
|
8161
|
+
/**
|
|
8162
|
+
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8163
|
+
* and 1.
|
|
8164
|
+
*/
|
|
8165
|
+
percentage_discount?: number | null;
|
|
8166
|
+
|
|
8167
|
+
/**
|
|
8168
|
+
* Only available if discount_type is `trial`
|
|
8169
|
+
*/
|
|
8170
|
+
trial_amount_discount?: string | null;
|
|
8171
|
+
|
|
8172
|
+
/**
|
|
8173
|
+
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8174
|
+
* discount is for
|
|
8175
|
+
*/
|
|
8176
|
+
usage_discount?: number | null;
|
|
8177
|
+
}
|
|
8178
|
+
}
|
|
8179
|
+
|
|
7866
8180
|
export interface OverrideBulkWithProrationPrice {
|
|
7867
8181
|
id: string;
|
|
7868
8182
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.15.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.15.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.15.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|