orb-billing 5.31.0 → 5.33.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/beta/beta.d.ts +218 -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 +218 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/plans/plans.d.ts +109 -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 +309 -3
- 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 +105 -1
- 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 +539 -5
- 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/beta/beta.ts +258 -0
- package/src/resources/beta/external-plan-id.ts +258 -0
- package/src/resources/plans/plans.ts +129 -0
- package/src/resources/prices/prices.ts +366 -0
- package/src/resources/shared.ts +138 -0
- package/src/resources/subscriptions.ts +655 -17
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -202,6 +202,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
202
202
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
203
203
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
204
204
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
205
|
+
| AddPrice.NewPlanCumulativeGroupedAllocationPrice
|
|
205
206
|
| Shared.NewPlanMinimumCompositePrice
|
|
206
207
|
| AddPrice.NewPlanPercentCompositePrice
|
|
207
208
|
| AddPrice.NewPlanEventOutputPrice
|
|
@@ -618,6 +619,134 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
618
619
|
}
|
|
619
620
|
}
|
|
620
621
|
|
|
622
|
+
export interface NewPlanCumulativeGroupedAllocationPrice {
|
|
623
|
+
/**
|
|
624
|
+
* The cadence to bill for this price on.
|
|
625
|
+
*/
|
|
626
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
630
|
+
*/
|
|
631
|
+
cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* The id of the item the price will be associated with.
|
|
635
|
+
*/
|
|
636
|
+
item_id: string;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* The pricing model type
|
|
640
|
+
*/
|
|
641
|
+
model_type: 'cumulative_grouped_allocation';
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* The name of the price.
|
|
645
|
+
*/
|
|
646
|
+
name: string;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
650
|
+
* usage-based.
|
|
651
|
+
*/
|
|
652
|
+
billable_metric_id?: string | null;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
656
|
+
* this is true, and in-arrears if this is false.
|
|
657
|
+
*/
|
|
658
|
+
billed_in_advance?: boolean | null;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
662
|
+
* months.
|
|
663
|
+
*/
|
|
664
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
668
|
+
*/
|
|
669
|
+
conversion_rate?: number | null;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
673
|
+
*/
|
|
674
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
678
|
+
* price is billed.
|
|
679
|
+
*/
|
|
680
|
+
currency?: string | null;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* For dimensional price: specifies a price group and dimension values
|
|
684
|
+
*/
|
|
685
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* An alias for the price.
|
|
689
|
+
*/
|
|
690
|
+
external_price_id?: string | null;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
694
|
+
* applied.
|
|
695
|
+
*/
|
|
696
|
+
fixed_price_quantity?: number | null;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* The property used to group this price on an invoice
|
|
700
|
+
*/
|
|
701
|
+
invoice_grouping_key?: string | null;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
705
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
706
|
+
*/
|
|
707
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
711
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
712
|
+
* by setting `metadata` to `null`.
|
|
713
|
+
*/
|
|
714
|
+
metadata?: { [key: string]: string | null } | null;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
718
|
+
* in the same API call.
|
|
719
|
+
*/
|
|
720
|
+
reference_id?: string | null;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export namespace NewPlanCumulativeGroupedAllocationPrice {
|
|
724
|
+
/**
|
|
725
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
726
|
+
*/
|
|
727
|
+
export interface CumulativeGroupedAllocationConfig {
|
|
728
|
+
/**
|
|
729
|
+
* The overall allocation across all groups
|
|
730
|
+
*/
|
|
731
|
+
cumulative_allocation: string;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* The allocation per individual group
|
|
735
|
+
*/
|
|
736
|
+
group_allocation: string;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* The event property used to group usage before applying allocations
|
|
740
|
+
*/
|
|
741
|
+
grouping_key: string;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* The amount to charge for each unit outside of the allocation
|
|
745
|
+
*/
|
|
746
|
+
unit_amount: string;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
621
750
|
export interface NewPlanPercentCompositePrice {
|
|
622
751
|
/**
|
|
623
752
|
* The cadence to bill for this price on.
|
|
@@ -951,6 +1080,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
951
1080
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
952
1081
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
953
1082
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
1083
|
+
| ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
|
|
954
1084
|
| Shared.NewPlanMinimumCompositePrice
|
|
955
1085
|
| ReplacePrice.NewPlanPercentCompositePrice
|
|
956
1086
|
| ReplacePrice.NewPlanEventOutputPrice
|
|
@@ -1367,6 +1497,134 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
1367
1497
|
}
|
|
1368
1498
|
}
|
|
1369
1499
|
|
|
1500
|
+
export interface NewPlanCumulativeGroupedAllocationPrice {
|
|
1501
|
+
/**
|
|
1502
|
+
* The cadence to bill for this price on.
|
|
1503
|
+
*/
|
|
1504
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
1508
|
+
*/
|
|
1509
|
+
cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* The id of the item the price will be associated with.
|
|
1513
|
+
*/
|
|
1514
|
+
item_id: string;
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* The pricing model type
|
|
1518
|
+
*/
|
|
1519
|
+
model_type: 'cumulative_grouped_allocation';
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* The name of the price.
|
|
1523
|
+
*/
|
|
1524
|
+
name: string;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
1528
|
+
* usage-based.
|
|
1529
|
+
*/
|
|
1530
|
+
billable_metric_id?: string | null;
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1534
|
+
* this is true, and in-arrears if this is false.
|
|
1535
|
+
*/
|
|
1536
|
+
billed_in_advance?: boolean | null;
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
1540
|
+
* months.
|
|
1541
|
+
*/
|
|
1542
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1546
|
+
*/
|
|
1547
|
+
conversion_rate?: number | null;
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
1551
|
+
*/
|
|
1552
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1556
|
+
* price is billed.
|
|
1557
|
+
*/
|
|
1558
|
+
currency?: string | null;
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* For dimensional price: specifies a price group and dimension values
|
|
1562
|
+
*/
|
|
1563
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* An alias for the price.
|
|
1567
|
+
*/
|
|
1568
|
+
external_price_id?: string | null;
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
1572
|
+
* applied.
|
|
1573
|
+
*/
|
|
1574
|
+
fixed_price_quantity?: number | null;
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* The property used to group this price on an invoice
|
|
1578
|
+
*/
|
|
1579
|
+
invoice_grouping_key?: string | null;
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1583
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
1584
|
+
*/
|
|
1585
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1589
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1590
|
+
* by setting `metadata` to `null`.
|
|
1591
|
+
*/
|
|
1592
|
+
metadata?: { [key: string]: string | null } | null;
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
1596
|
+
* in the same API call.
|
|
1597
|
+
*/
|
|
1598
|
+
reference_id?: string | null;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
export namespace NewPlanCumulativeGroupedAllocationPrice {
|
|
1602
|
+
/**
|
|
1603
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
1604
|
+
*/
|
|
1605
|
+
export interface CumulativeGroupedAllocationConfig {
|
|
1606
|
+
/**
|
|
1607
|
+
* The overall allocation across all groups
|
|
1608
|
+
*/
|
|
1609
|
+
cumulative_allocation: string;
|
|
1610
|
+
|
|
1611
|
+
/**
|
|
1612
|
+
* The allocation per individual group
|
|
1613
|
+
*/
|
|
1614
|
+
group_allocation: string;
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* The event property used to group usage before applying allocations
|
|
1618
|
+
*/
|
|
1619
|
+
grouping_key: string;
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* The amount to charge for each unit outside of the allocation
|
|
1623
|
+
*/
|
|
1624
|
+
unit_amount: string;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1370
1628
|
export interface NewPlanPercentCompositePrice {
|
|
1371
1629
|
/**
|
|
1372
1630
|
* The cadence to bill for this price on.
|
|
@@ -147,6 +147,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
147
147
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
148
148
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
149
149
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
150
|
+
| AddPrice.NewPlanCumulativeGroupedAllocationPrice
|
|
150
151
|
| Shared.NewPlanMinimumCompositePrice
|
|
151
152
|
| AddPrice.NewPlanPercentCompositePrice
|
|
152
153
|
| AddPrice.NewPlanEventOutputPrice
|
|
@@ -563,6 +564,134 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
563
564
|
}
|
|
564
565
|
}
|
|
565
566
|
|
|
567
|
+
export interface NewPlanCumulativeGroupedAllocationPrice {
|
|
568
|
+
/**
|
|
569
|
+
* The cadence to bill for this price on.
|
|
570
|
+
*/
|
|
571
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
575
|
+
*/
|
|
576
|
+
cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The id of the item the price will be associated with.
|
|
580
|
+
*/
|
|
581
|
+
item_id: string;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* The pricing model type
|
|
585
|
+
*/
|
|
586
|
+
model_type: 'cumulative_grouped_allocation';
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* The name of the price.
|
|
590
|
+
*/
|
|
591
|
+
name: string;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
595
|
+
* usage-based.
|
|
596
|
+
*/
|
|
597
|
+
billable_metric_id?: string | null;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
601
|
+
* this is true, and in-arrears if this is false.
|
|
602
|
+
*/
|
|
603
|
+
billed_in_advance?: boolean | null;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
607
|
+
* months.
|
|
608
|
+
*/
|
|
609
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
613
|
+
*/
|
|
614
|
+
conversion_rate?: number | null;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
618
|
+
*/
|
|
619
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
623
|
+
* price is billed.
|
|
624
|
+
*/
|
|
625
|
+
currency?: string | null;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* For dimensional price: specifies a price group and dimension values
|
|
629
|
+
*/
|
|
630
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* An alias for the price.
|
|
634
|
+
*/
|
|
635
|
+
external_price_id?: string | null;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
639
|
+
* applied.
|
|
640
|
+
*/
|
|
641
|
+
fixed_price_quantity?: number | null;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* The property used to group this price on an invoice
|
|
645
|
+
*/
|
|
646
|
+
invoice_grouping_key?: string | null;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
650
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
651
|
+
*/
|
|
652
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
656
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
657
|
+
* by setting `metadata` to `null`.
|
|
658
|
+
*/
|
|
659
|
+
metadata?: { [key: string]: string | null } | null;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
663
|
+
* in the same API call.
|
|
664
|
+
*/
|
|
665
|
+
reference_id?: string | null;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export namespace NewPlanCumulativeGroupedAllocationPrice {
|
|
669
|
+
/**
|
|
670
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
671
|
+
*/
|
|
672
|
+
export interface CumulativeGroupedAllocationConfig {
|
|
673
|
+
/**
|
|
674
|
+
* The overall allocation across all groups
|
|
675
|
+
*/
|
|
676
|
+
cumulative_allocation: string;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The allocation per individual group
|
|
680
|
+
*/
|
|
681
|
+
group_allocation: string;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* The event property used to group usage before applying allocations
|
|
685
|
+
*/
|
|
686
|
+
grouping_key: string;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* The amount to charge for each unit outside of the allocation
|
|
690
|
+
*/
|
|
691
|
+
unit_amount: string;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
566
695
|
export interface NewPlanPercentCompositePrice {
|
|
567
696
|
/**
|
|
568
697
|
* The cadence to bill for this price on.
|
|
@@ -896,6 +1025,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
896
1025
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
897
1026
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
898
1027
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
1028
|
+
| ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
|
|
899
1029
|
| Shared.NewPlanMinimumCompositePrice
|
|
900
1030
|
| ReplacePrice.NewPlanPercentCompositePrice
|
|
901
1031
|
| ReplacePrice.NewPlanEventOutputPrice
|
|
@@ -1312,6 +1442,134 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
1312
1442
|
}
|
|
1313
1443
|
}
|
|
1314
1444
|
|
|
1445
|
+
export interface NewPlanCumulativeGroupedAllocationPrice {
|
|
1446
|
+
/**
|
|
1447
|
+
* The cadence to bill for this price on.
|
|
1448
|
+
*/
|
|
1449
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
1453
|
+
*/
|
|
1454
|
+
cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* The id of the item the price will be associated with.
|
|
1458
|
+
*/
|
|
1459
|
+
item_id: string;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* The pricing model type
|
|
1463
|
+
*/
|
|
1464
|
+
model_type: 'cumulative_grouped_allocation';
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* The name of the price.
|
|
1468
|
+
*/
|
|
1469
|
+
name: string;
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
1473
|
+
* usage-based.
|
|
1474
|
+
*/
|
|
1475
|
+
billable_metric_id?: string | null;
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1479
|
+
* this is true, and in-arrears if this is false.
|
|
1480
|
+
*/
|
|
1481
|
+
billed_in_advance?: boolean | null;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
1485
|
+
* months.
|
|
1486
|
+
*/
|
|
1487
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1491
|
+
*/
|
|
1492
|
+
conversion_rate?: number | null;
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
1496
|
+
*/
|
|
1497
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1501
|
+
* price is billed.
|
|
1502
|
+
*/
|
|
1503
|
+
currency?: string | null;
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* For dimensional price: specifies a price group and dimension values
|
|
1507
|
+
*/
|
|
1508
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* An alias for the price.
|
|
1512
|
+
*/
|
|
1513
|
+
external_price_id?: string | null;
|
|
1514
|
+
|
|
1515
|
+
/**
|
|
1516
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
1517
|
+
* applied.
|
|
1518
|
+
*/
|
|
1519
|
+
fixed_price_quantity?: number | null;
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* The property used to group this price on an invoice
|
|
1523
|
+
*/
|
|
1524
|
+
invoice_grouping_key?: string | null;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1528
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
1529
|
+
*/
|
|
1530
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1534
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1535
|
+
* by setting `metadata` to `null`.
|
|
1536
|
+
*/
|
|
1537
|
+
metadata?: { [key: string]: string | null } | null;
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
1541
|
+
* in the same API call.
|
|
1542
|
+
*/
|
|
1543
|
+
reference_id?: string | null;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
export namespace NewPlanCumulativeGroupedAllocationPrice {
|
|
1547
|
+
/**
|
|
1548
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
1549
|
+
*/
|
|
1550
|
+
export interface CumulativeGroupedAllocationConfig {
|
|
1551
|
+
/**
|
|
1552
|
+
* The overall allocation across all groups
|
|
1553
|
+
*/
|
|
1554
|
+
cumulative_allocation: string;
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* The allocation per individual group
|
|
1558
|
+
*/
|
|
1559
|
+
group_allocation: string;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* The event property used to group usage before applying allocations
|
|
1563
|
+
*/
|
|
1564
|
+
grouping_key: string;
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* The amount to charge for each unit outside of the allocation
|
|
1568
|
+
*/
|
|
1569
|
+
unit_amount: string;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1315
1573
|
export interface NewPlanPercentCompositePrice {
|
|
1316
1574
|
/**
|
|
1317
1575
|
* The cadence to bill for this price on.
|
|
@@ -350,6 +350,7 @@ export namespace PlanCreateParams {
|
|
|
350
350
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
351
351
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
352
352
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
353
|
+
| Price.NewPlanCumulativeGroupedAllocationPrice
|
|
353
354
|
| Shared.NewPlanMinimumCompositePrice
|
|
354
355
|
| Price.NewPlanPercentCompositePrice
|
|
355
356
|
| Price.NewPlanEventOutputPrice
|
|
@@ -766,6 +767,134 @@ export namespace PlanCreateParams {
|
|
|
766
767
|
}
|
|
767
768
|
}
|
|
768
769
|
|
|
770
|
+
export interface NewPlanCumulativeGroupedAllocationPrice {
|
|
771
|
+
/**
|
|
772
|
+
* The cadence to bill for this price on.
|
|
773
|
+
*/
|
|
774
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
778
|
+
*/
|
|
779
|
+
cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* The id of the item the price will be associated with.
|
|
783
|
+
*/
|
|
784
|
+
item_id: string;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* The pricing model type
|
|
788
|
+
*/
|
|
789
|
+
model_type: 'cumulative_grouped_allocation';
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* The name of the price.
|
|
793
|
+
*/
|
|
794
|
+
name: string;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
798
|
+
* usage-based.
|
|
799
|
+
*/
|
|
800
|
+
billable_metric_id?: string | null;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
804
|
+
* this is true, and in-arrears if this is false.
|
|
805
|
+
*/
|
|
806
|
+
billed_in_advance?: boolean | null;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
810
|
+
* months.
|
|
811
|
+
*/
|
|
812
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
816
|
+
*/
|
|
817
|
+
conversion_rate?: number | null;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
821
|
+
*/
|
|
822
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
826
|
+
* price is billed.
|
|
827
|
+
*/
|
|
828
|
+
currency?: string | null;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* For dimensional price: specifies a price group and dimension values
|
|
832
|
+
*/
|
|
833
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* An alias for the price.
|
|
837
|
+
*/
|
|
838
|
+
external_price_id?: string | null;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
842
|
+
* applied.
|
|
843
|
+
*/
|
|
844
|
+
fixed_price_quantity?: number | null;
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* The property used to group this price on an invoice
|
|
848
|
+
*/
|
|
849
|
+
invoice_grouping_key?: string | null;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
853
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
854
|
+
*/
|
|
855
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
859
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
860
|
+
* by setting `metadata` to `null`.
|
|
861
|
+
*/
|
|
862
|
+
metadata?: { [key: string]: string | null } | null;
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
866
|
+
* in the same API call.
|
|
867
|
+
*/
|
|
868
|
+
reference_id?: string | null;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
export namespace NewPlanCumulativeGroupedAllocationPrice {
|
|
872
|
+
/**
|
|
873
|
+
* Configuration for cumulative_grouped_allocation pricing
|
|
874
|
+
*/
|
|
875
|
+
export interface CumulativeGroupedAllocationConfig {
|
|
876
|
+
/**
|
|
877
|
+
* The overall allocation across all groups
|
|
878
|
+
*/
|
|
879
|
+
cumulative_allocation: string;
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* The allocation per individual group
|
|
883
|
+
*/
|
|
884
|
+
group_allocation: string;
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* The event property used to group usage before applying allocations
|
|
888
|
+
*/
|
|
889
|
+
grouping_key: string;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* The amount to charge for each unit outside of the allocation
|
|
893
|
+
*/
|
|
894
|
+
unit_amount: string;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
769
898
|
export interface NewPlanPercentCompositePrice {
|
|
770
899
|
/**
|
|
771
900
|
* The cadence to bill for this price on.
|