orb-billing 5.17.0 → 5.19.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 +16 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.ts +258 -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 +258 -2
  8. package/resources/beta/external-plan-id.d.ts.map +1 -1
  9. package/resources/customers/credits/ledger.d.ts +10 -0
  10. package/resources/customers/credits/ledger.d.ts.map +1 -1
  11. package/resources/customers/credits/ledger.js.map +1 -1
  12. package/resources/customers/credits/ledger.mjs.map +1 -1
  13. package/resources/plans/plans.d.ts +129 -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 +369 -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 +111 -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 +659 -25
  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 +302 -0
  30. package/src/resources/beta/external-plan-id.ts +302 -0
  31. package/src/resources/customers/credits/ledger.ts +12 -0
  32. package/src/resources/plans/plans.ts +151 -0
  33. package/src/resources/prices/prices.ts +432 -0
  34. package/src/resources/shared.ts +143 -0
  35. package/src/resources/subscriptions.ts +804 -56
  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
@@ -9520,6 +9520,7 @@ export type Price =
9520
9520
  | Price.UnitPrice
9521
9521
  | Price.TieredPrice
9522
9522
  | Price.BulkPrice
9523
+ | Price.BulkWithFiltersPrice
9523
9524
  | Price.PackagePrice
9524
9525
  | Price.MatrixPrice
9525
9526
  | Price.ThresholdTotalAmountPrice
@@ -9827,6 +9828,148 @@ export namespace Price {
9827
9828
  dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
9828
9829
  }
9829
9830
 
9831
+ export interface BulkWithFiltersPrice {
9832
+ id: string;
9833
+
9834
+ billable_metric: Shared.BillableMetricTiny | null;
9835
+
9836
+ billing_cycle_configuration: Shared.BillingCycleConfiguration;
9837
+
9838
+ billing_mode: 'in_advance' | 'in_arrear';
9839
+
9840
+ /**
9841
+ * Configuration for bulk_with_filters pricing
9842
+ */
9843
+ bulk_with_filters_config: BulkWithFiltersPrice.BulkWithFiltersConfig;
9844
+
9845
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
9846
+
9847
+ composite_price_filters: Array<Shared.TransformPriceFilter> | null;
9848
+
9849
+ conversion_rate: number | null;
9850
+
9851
+ conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
9852
+
9853
+ created_at: string;
9854
+
9855
+ credit_allocation: Shared.Allocation | null;
9856
+
9857
+ currency: string;
9858
+
9859
+ /**
9860
+ * @deprecated
9861
+ */
9862
+ discount: Shared.Discount | null;
9863
+
9864
+ external_price_id: string | null;
9865
+
9866
+ fixed_price_quantity: number | null;
9867
+
9868
+ invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
9869
+
9870
+ /**
9871
+ * A minimal representation of an Item containing only the essential identifying
9872
+ * information.
9873
+ */
9874
+ item: Shared.ItemSlim;
9875
+
9876
+ /**
9877
+ * @deprecated
9878
+ */
9879
+ maximum: Shared.Maximum | null;
9880
+
9881
+ /**
9882
+ * @deprecated
9883
+ */
9884
+ maximum_amount: string | null;
9885
+
9886
+ /**
9887
+ * User specified key-value pairs for the resource. If not present, this defaults
9888
+ * to an empty dictionary. Individual keys can be removed by setting the value to
9889
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
9890
+ * `null`.
9891
+ */
9892
+ metadata: { [key: string]: string };
9893
+
9894
+ /**
9895
+ * @deprecated
9896
+ */
9897
+ minimum: Shared.Minimum | null;
9898
+
9899
+ /**
9900
+ * @deprecated
9901
+ */
9902
+ minimum_amount: string | null;
9903
+
9904
+ /**
9905
+ * The pricing model type
9906
+ */
9907
+ model_type: 'bulk_with_filters';
9908
+
9909
+ name: string;
9910
+
9911
+ plan_phase_order: number | null;
9912
+
9913
+ price_type: 'usage_price' | 'fixed_price' | 'composite_price';
9914
+
9915
+ /**
9916
+ * The price id this price replaces. This price will take the place of the replaced
9917
+ * price in plan version migrations.
9918
+ */
9919
+ replaces_price_id: string | null;
9920
+
9921
+ dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
9922
+ }
9923
+
9924
+ export namespace BulkWithFiltersPrice {
9925
+ /**
9926
+ * Configuration for bulk_with_filters pricing
9927
+ */
9928
+ export interface BulkWithFiltersConfig {
9929
+ /**
9930
+ * Property filters to apply (all must match)
9931
+ */
9932
+ filters: Array<BulkWithFiltersConfig.Filter>;
9933
+
9934
+ /**
9935
+ * Bulk tiers for rating based on total usage volume
9936
+ */
9937
+ tiers: Array<BulkWithFiltersConfig.Tier>;
9938
+ }
9939
+
9940
+ export namespace BulkWithFiltersConfig {
9941
+ /**
9942
+ * Configuration for a single property filter
9943
+ */
9944
+ export interface Filter {
9945
+ /**
9946
+ * Event property key to filter on
9947
+ */
9948
+ property_key: string;
9949
+
9950
+ /**
9951
+ * Event property value to match
9952
+ */
9953
+ property_value: string;
9954
+ }
9955
+
9956
+ /**
9957
+ * Configuration for a single bulk pricing tier
9958
+ */
9959
+ export interface Tier {
9960
+ /**
9961
+ * Amount per unit
9962
+ */
9963
+ unit_amount: string;
9964
+
9965
+ /**
9966
+ * The lower bound for this tier
9967
+ */
9968
+ tier_lower_bound?: string | null;
9969
+ }
9970
+ }
9971
+ }
9972
+
9830
9973
  export interface PackagePrice {
9831
9974
  id: string;
9832
9975