orb-billing 5.14.0 → 5.16.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.ts +396 -2
  4. package/resources/beta/beta.d.ts.map +1 -1
  5. package/resources/beta/beta.js.map +1 -1
  6. package/resources/beta/beta.mjs.map +1 -1
  7. package/resources/beta/external-plan-id.d.ts +396 -2
  8. package/resources/beta/external-plan-id.d.ts.map +1 -1
  9. package/resources/items.d.ts +37 -0
  10. package/resources/items.d.ts.map +1 -1
  11. package/resources/items.js.map +1 -1
  12. package/resources/items.mjs.map +1 -1
  13. package/resources/plans/plans.d.ts +198 -1
  14. package/resources/plans/plans.d.ts.map +1 -1
  15. package/resources/plans/plans.js.map +1 -1
  16. package/resources/plans/plans.mjs.map +1 -1
  17. package/resources/prices/prices.d.ts +558 -3
  18. package/resources/prices/prices.d.ts.map +1 -1
  19. package/resources/prices/prices.js.map +1 -1
  20. package/resources/prices/prices.mjs.map +1 -1
  21. package/resources/shared.d.ts +284 -1
  22. package/resources/shared.d.ts.map +1 -1
  23. package/resources/shared.js.map +1 -1
  24. package/resources/shared.mjs.map +1 -1
  25. package/resources/subscriptions.d.ts +1104 -131
  26. package/resources/subscriptions.d.ts.map +1 -1
  27. package/resources/subscriptions.js.map +1 -1
  28. package/resources/subscriptions.mjs.map +1 -1
  29. package/src/resources/beta/beta.ts +468 -0
  30. package/src/resources/beta/external-plan-id.ts +468 -0
  31. package/src/resources/items.ts +38 -0
  32. package/src/resources/plans/plans.ts +234 -0
  33. package/src/resources/prices/prices.ts +688 -28
  34. package/src/resources/shared.ts +342 -1
  35. package/src/resources/subscriptions.ts +1250 -94
  36. package/src/version.ts +1 -1
  37. package/version.d.ts +1 -1
  38. package/version.js +1 -1
  39. 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 {