orb-billing 5.15.0 → 5.17.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 +22 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.ts +396 -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 +396 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/invoice-line-items.d.ts +27 -5
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +11 -0
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +11 -0
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/items.d.ts +37 -0
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js.map +1 -1
- package/resources/items.mjs.map +1 -1
- package/resources/plans/plans.d.ts +198 -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 +558 -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 +280 -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 +1104 -131
- 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 +468 -0
- package/src/resources/beta/external-plan-id.ts +468 -0
- package/src/resources/invoice-line-items.ts +29 -6
- package/src/resources/items.ts +38 -0
- package/src/resources/plans/plans.ts +234 -0
- package/src/resources/prices/prices.ts +688 -28
- package/src/resources/shared.ts +337 -1
- package/src/resources/subscriptions.ts +1250 -94
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -350,6 +350,8 @@ export namespace PlanCreateParams {
|
|
|
350
350
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
351
351
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
352
352
|
| Shared.NewPlanMinimumCompositePrice
|
|
353
|
+
| Price.NewPlanPercentCompositePrice
|
|
354
|
+
| Price.NewPlanEventOutputPrice
|
|
353
355
|
| null;
|
|
354
356
|
}
|
|
355
357
|
|
|
@@ -612,6 +614,238 @@ export namespace PlanCreateParams {
|
|
|
612
614
|
per_unit_rate: string;
|
|
613
615
|
}
|
|
614
616
|
}
|
|
617
|
+
|
|
618
|
+
export interface NewPlanPercentCompositePrice {
|
|
619
|
+
/**
|
|
620
|
+
* The cadence to bill for this price on.
|
|
621
|
+
*/
|
|
622
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* The id of the item the price will be associated with.
|
|
626
|
+
*/
|
|
627
|
+
item_id: string;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* The pricing model type
|
|
631
|
+
*/
|
|
632
|
+
model_type: 'percent';
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* The name of the price.
|
|
636
|
+
*/
|
|
637
|
+
name: string;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Configuration for percent pricing
|
|
641
|
+
*/
|
|
642
|
+
percent_config: NewPlanPercentCompositePrice.PercentConfig;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
646
|
+
* usage-based.
|
|
647
|
+
*/
|
|
648
|
+
billable_metric_id?: string | null;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
652
|
+
* this is true, and in-arrears if this is false.
|
|
653
|
+
*/
|
|
654
|
+
billed_in_advance?: boolean | null;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
658
|
+
* months.
|
|
659
|
+
*/
|
|
660
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
664
|
+
*/
|
|
665
|
+
conversion_rate?: number | null;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
669
|
+
*/
|
|
670
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
674
|
+
* price is billed.
|
|
675
|
+
*/
|
|
676
|
+
currency?: string | null;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* For dimensional price: specifies a price group and dimension values
|
|
680
|
+
*/
|
|
681
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* An alias for the price.
|
|
685
|
+
*/
|
|
686
|
+
external_price_id?: string | null;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
690
|
+
* applied.
|
|
691
|
+
*/
|
|
692
|
+
fixed_price_quantity?: number | null;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* The property used to group this price on an invoice
|
|
696
|
+
*/
|
|
697
|
+
invoice_grouping_key?: string | null;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
701
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
702
|
+
*/
|
|
703
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
707
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
708
|
+
* by setting `metadata` to `null`.
|
|
709
|
+
*/
|
|
710
|
+
metadata?: { [key: string]: string | null } | null;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
714
|
+
* in the same API call.
|
|
715
|
+
*/
|
|
716
|
+
reference_id?: string | null;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export namespace NewPlanPercentCompositePrice {
|
|
720
|
+
/**
|
|
721
|
+
* Configuration for percent pricing
|
|
722
|
+
*/
|
|
723
|
+
export interface PercentConfig {
|
|
724
|
+
/**
|
|
725
|
+
* What percent of the component subtotals to charge
|
|
726
|
+
*/
|
|
727
|
+
percent: number;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export interface NewPlanEventOutputPrice {
|
|
732
|
+
/**
|
|
733
|
+
* The cadence to bill for this price on.
|
|
734
|
+
*/
|
|
735
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Configuration for event_output pricing
|
|
739
|
+
*/
|
|
740
|
+
event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* The id of the item the price will be associated with.
|
|
744
|
+
*/
|
|
745
|
+
item_id: string;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* The pricing model type
|
|
749
|
+
*/
|
|
750
|
+
model_type: 'event_output';
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* The name of the price.
|
|
754
|
+
*/
|
|
755
|
+
name: string;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
759
|
+
* usage-based.
|
|
760
|
+
*/
|
|
761
|
+
billable_metric_id?: string | null;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
765
|
+
* this is true, and in-arrears if this is false.
|
|
766
|
+
*/
|
|
767
|
+
billed_in_advance?: boolean | null;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
771
|
+
* months.
|
|
772
|
+
*/
|
|
773
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
777
|
+
*/
|
|
778
|
+
conversion_rate?: number | null;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
782
|
+
*/
|
|
783
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
787
|
+
* price is billed.
|
|
788
|
+
*/
|
|
789
|
+
currency?: string | null;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* For dimensional price: specifies a price group and dimension values
|
|
793
|
+
*/
|
|
794
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* An alias for the price.
|
|
798
|
+
*/
|
|
799
|
+
external_price_id?: string | null;
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
803
|
+
* applied.
|
|
804
|
+
*/
|
|
805
|
+
fixed_price_quantity?: number | null;
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* The property used to group this price on an invoice
|
|
809
|
+
*/
|
|
810
|
+
invoice_grouping_key?: string | null;
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
814
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
815
|
+
*/
|
|
816
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
820
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
821
|
+
* by setting `metadata` to `null`.
|
|
822
|
+
*/
|
|
823
|
+
metadata?: { [key: string]: string | null } | null;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
827
|
+
* in the same API call.
|
|
828
|
+
*/
|
|
829
|
+
reference_id?: string | null;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export namespace NewPlanEventOutputPrice {
|
|
833
|
+
/**
|
|
834
|
+
* Configuration for event_output pricing
|
|
835
|
+
*/
|
|
836
|
+
export interface EventOutputConfig {
|
|
837
|
+
/**
|
|
838
|
+
* The key in the event data to extract the unit rate from.
|
|
839
|
+
*/
|
|
840
|
+
unit_rating_key: string;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* An optional key in the event data to group by (e.g., event ID). All events will
|
|
844
|
+
* also be grouped by their unit rate.
|
|
845
|
+
*/
|
|
846
|
+
grouping_key?: string | null;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
615
849
|
}
|
|
616
850
|
|
|
617
851
|
export interface Adjustment {
|