orb-billing 1.24.0 → 1.26.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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/alert.rb +4 -2
  5. data/lib/orb/models/alert_update_params.rb +5 -3
  6. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +530 -6
  7. data/lib/orb/models/beta_create_plan_version_params.rb +526 -6
  8. data/lib/orb/models/changed_subscription_resources.rb +5 -5
  9. data/lib/orb/models/invoice.rb +5 -5
  10. data/lib/orb/models/invoice_fetch_upcoming_response.rb +5 -5
  11. data/lib/orb/models/invoice_issue_summary_response.rb +3 -3
  12. data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
  13. data/lib/orb/models/invoice_list_summary_response.rb +3 -3
  14. data/lib/orb/models/per_price_cost.rb +2 -2
  15. data/lib/orb/models/plan.rb +2 -2
  16. data/lib/orb/models/plan_create_params.rb +259 -3
  17. data/lib/orb/models/plan_version.rb +2 -2
  18. data/lib/orb/models/price.rb +433 -1
  19. data/lib/orb/models/price_create_params.rb +244 -3
  20. data/lib/orb/models/price_evaluate_multiple_params.rb +255 -3
  21. data/lib/orb/models/price_evaluate_preview_events_params.rb +255 -3
  22. data/lib/orb/models/price_interval.rb +2 -2
  23. data/lib/orb/models/subscription_create_params.rb +521 -6
  24. data/lib/orb/models/subscription_price_intervals_params.rb +251 -3
  25. data/lib/orb/models/subscription_schedule_plan_change_params.rb +530 -6
  26. data/lib/orb/resources/alerts.rb +5 -2
  27. data/lib/orb/resources/customers/costs.rb +20 -0
  28. data/lib/orb/resources/licenses/external_licenses.rb +7 -0
  29. data/lib/orb/resources/licenses/usage.rb +3 -0
  30. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  31. data/lib/orb/resources/prices.rb +5 -5
  32. data/lib/orb/resources/subscriptions.rb +39 -6
  33. data/lib/orb/version.rb +1 -1
  34. data/rbi/orb/models/alert.rbi +6 -2
  35. data/rbi/orb/models/alert_update_params.rbi +8 -4
  36. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2789 -1903
  37. data/rbi/orb/models/beta_create_plan_version_params.rbi +2788 -1902
  38. data/rbi/orb/models/changed_subscription_resources.rbi +7 -6
  39. data/rbi/orb/models/invoice.rbi +7 -6
  40. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +7 -6
  41. data/rbi/orb/models/invoice_issue_summary_response.rbi +6 -6
  42. data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
  43. data/rbi/orb/models/invoice_list_summary_response.rbi +6 -6
  44. data/rbi/orb/models/per_price_cost.rbi +1 -0
  45. data/rbi/orb/models/plan.rbi +1 -0
  46. data/rbi/orb/models/plan_create_params.rbi +443 -0
  47. data/rbi/orb/models/plan_version.rbi +1 -0
  48. data/rbi/orb/models/price.rbi +766 -0
  49. data/rbi/orb/models/price_create_params.rbi +431 -0
  50. data/rbi/orb/models/price_evaluate_multiple_params.rbi +431 -0
  51. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +431 -0
  52. data/rbi/orb/models/price_interval.rbi +1 -0
  53. data/rbi/orb/models/subscription_create_params.rbi +2489 -1603
  54. data/rbi/orb/models/subscription_price_intervals_params.rbi +431 -0
  55. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2483 -1597
  56. data/rbi/orb/resources/alerts.rbi +8 -3
  57. data/rbi/orb/resources/customers/costs.rbi +20 -0
  58. data/rbi/orb/resources/licenses/external_licenses.rbi +7 -0
  59. data/rbi/orb/resources/licenses/usage.rbi +3 -0
  60. data/rbi/orb/resources/prices.rbi +1 -0
  61. data/rbi/orb/resources/subscriptions.rbi +39 -6
  62. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +366 -0
  63. data/sig/orb/models/beta_create_plan_version_params.rbs +366 -0
  64. data/sig/orb/models/plan_create_params.rbs +183 -0
  65. data/sig/orb/models/price.rbs +327 -0
  66. data/sig/orb/models/price_create_params.rbs +173 -0
  67. data/sig/orb/models/price_evaluate_multiple_params.rbs +178 -0
  68. data/sig/orb/models/price_evaluate_preview_events_params.rbs +178 -0
  69. data/sig/orb/models/subscription_create_params.rbs +366 -0
  70. data/sig/orb/models/subscription_price_intervals_params.rbs +178 -0
  71. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +366 -0
  72. metadata +2 -2
@@ -18,7 +18,10 @@ module Orb
18
18
  def retrieve(alert_id, request_options: {})
19
19
  end
20
20
 
21
- # This endpoint updates the thresholds of an alert.
21
+ # This endpoint updates the thresholds of an alert. On cost alerts it also updates
22
+ # `price_filters`, and on subscription-scoped grouped cost alerts
23
+ # `threshold_overrides`; omitting either leaves it unchanged, and an empty list
24
+ # clears it.
22
25
  sig do
23
26
  params(
24
27
  alert_configuration_id: String,
@@ -36,8 +39,10 @@ module Orb
36
39
  alert_configuration_id,
37
40
  # The thresholds that define the values at which the alert will be triggered.
38
41
  thresholds:,
39
- # Replaces the price filters on a grouped cost alert; an empty list clears them.
40
- # Only applicable to cost alerts with grouping_keys. Omit to leave unchanged.
42
+ # Replaces the price filters on the alert; an empty list clears them. Only
43
+ # applicable to spend_exceeded alerts and to cost_exceeded alerts with
44
+ # grouping_keys set. Alerts accept the price_id, item_id, and price_type fields
45
+ # only. Omit to leave unchanged.
41
46
  price_filters: nil,
42
47
  # Replaces the per-group threshold overrides on a grouped cost alert; an empty
43
48
  # list clears them. Only applicable to cost alerts with grouping_keys. Omit to
@@ -139,6 +139,16 @@ module Orb
139
139
  # matrix dimensions. Orb will return `price_groups` with the `grouping_key` and
140
140
  # `secondary_grouping_key` based on the matrix price definition, for each
141
141
  # `grouping_value` and `secondary_grouping_value` available.
142
+ #
143
+ # ## Trials
144
+ #
145
+ # During a trial, usage prices carry a trial discount, capped at the plan's trial
146
+ # maximum amount (or 100% when no maximum is set), and the trial period is billed
147
+ # as a single invoice dated at the trial's end. In the costs response,
148
+ # trial-period usage appears at full list price in `subtotal`, with the trial
149
+ # discount reflected in `total`: `total` is \$0 as long as usage stays within the
150
+ # trial maximum, and usage beyond the maximum bills normally. Fixed fees are not
151
+ # charged during a trial.
142
152
  sig do
143
153
  params(
144
154
  customer_id: String,
@@ -284,6 +294,16 @@ module Orb
284
294
  # matrix dimensions. Orb will return `price_groups` with the `grouping_key` and
285
295
  # `secondary_grouping_key` based on the matrix price definition, for each
286
296
  # `grouping_value` and `secondary_grouping_value` available.
297
+ #
298
+ # ## Trials
299
+ #
300
+ # During a trial, usage prices carry a trial discount, capped at the plan's trial
301
+ # maximum amount (or 100% when no maximum is set), and the trial period is billed
302
+ # as a single invoice dated at the trial's end. In the costs response,
303
+ # trial-period usage appears at full list price in `subtotal`, with the trial
304
+ # discount reflected in `total`: `total` is \$0 as long as usage stays within the
305
+ # trial maximum, and usage beyond the maximum bills normally. Fixed fees are not
306
+ # charged during a trial.
287
307
  sig do
288
308
  params(
289
309
  external_customer_id: String,
@@ -7,6 +7,13 @@ module Orb
7
7
  # Returns usage and remaining credits for a license identified by its external
8
8
  # license ID.
9
9
  #
10
+ # Resolves the currently active license with this external ID, i.e. the license
11
+ # whose active window contains the current time. An external license ID can map to
12
+ # multiple licenses over time, so if none is currently active (deactivated, window
13
+ # ended, or not yet started) this returns a 404. To fetch usage for a license
14
+ # regardless of active state, use the endpoint that takes Orb's internal license
15
+ # ID.
16
+ #
10
17
  # Date range defaults to the current billing period if not specified.
11
18
  sig do
12
19
  params(
@@ -44,6 +44,9 @@ module Orb
44
44
 
45
45
  # Returns usage and remaining credits for a specific license over a date range.
46
46
  #
47
+ # Resolves the license by ID regardless of whether it is currently active, unlike
48
+ # the external-license-ID variant, which only resolves a currently active license.
49
+ #
47
50
  # Date range defaults to the current billing period if not specified.
48
51
  sig do
49
52
  params(
@@ -50,6 +50,7 @@ module Orb
50
50
  Orb::NewFloatingTieredPackagePrice::OrHash,
51
51
  Orb::NewFloatingTieredWithMinimumPrice::OrHash,
52
52
  Orb::NewFloatingGroupedTieredPrice::OrHash,
53
+ Orb::PriceCreateParams::Body::GroupedTieredMatrix::OrHash,
53
54
  Orb::NewFloatingTieredPackageWithMinimumPrice::OrHash,
54
55
  Orb::NewFloatingPackageWithAllocationPrice::OrHash,
55
56
  Orb::NewFloatingUnitWithPercentPrice::OrHash,
@@ -1103,6 +1103,17 @@ module Orb
1103
1103
  # Note that one of `plan_id` or `external_plan_id` is required in the request body
1104
1104
  # for this operation.
1105
1105
  #
1106
+ # ## Interaction with scheduled cancellations
1107
+ #
1108
+ # Scheduling a plan change also unschedules a pending cancellation, as long as the
1109
+ # cancellation date is on or after the plan change date: Orb honors the plan
1110
+ # change over the scheduled cancellation, and the subscription continues on the
1111
+ # new plan. Scheduling a plan change after the subscription's end date returns a
1112
+ # validation error instead.
1113
+ #
1114
+ # Any plan changes already scheduled at or after the new plan change's date are
1115
+ # unscheduled and replaced by it.
1116
+ #
1106
1117
  # ## Customize your customer's subscriptions
1107
1118
  #
1108
1119
  # Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -1439,11 +1450,19 @@ module Orb
1439
1450
  # cancellation. This operation will turn on auto-renew, ensuring that the
1440
1451
  # subscription does not end at the currently scheduled cancellation time.
1441
1452
  #
1442
- # Note: uncancellation is a lossy operation. Price intervals that were cut short
1443
- # by the cancellation are extended to infinity (original end dates are lost), and
1444
- # future intervals or phases scheduled after the cancellation time are permanently
1445
- # deleted. For complex subscriptions with phases or scheduled plan changes,
1446
- # consider creating a new plan change instead of uncancelling.
1453
+ # A cancellation that has already taken effect cannot be unscheduled. This
1454
+ # includes backdated cancellations: once the subscription's end date is in the
1455
+ # past, this endpoint returns a validation error.
1456
+ #
1457
+ # Note: uncancellation is a lossy operation. Price and adjustment intervals that
1458
+ # were cut short by the cancellation are extended to infinity (original end dates
1459
+ # are lost), and future intervals or phases scheduled after the cancellation time
1460
+ # are permanently deleted. For complex subscriptions with phases or scheduled plan
1461
+ # changes, consider creating a new plan change instead of uncancelling.
1462
+ #
1463
+ # If the scheduled cancellation already produced invoices or credit notes (for
1464
+ # example, a proration refund credit note for an in-advance fee), uncancelling
1465
+ # voids and reissues them as needed to match the subscription's new state.
1447
1466
  sig do
1448
1467
  params(
1449
1468
  subscription_id: String,
@@ -1474,7 +1493,21 @@ module Orb
1474
1493
  end
1475
1494
 
1476
1495
  # This endpoint can be used to unschedule any pending plan changes on an existing
1477
- # subscription. When called, all upcoming plan changes will be unscheduled.
1496
+ # subscription. When called, all upcoming plan changes will be unscheduled; it is
1497
+ # not possible to unschedule a single plan change if multiple are scheduled.
1498
+ #
1499
+ # Note: unscheduling a plan change is a lossy operation, with the same semantics
1500
+ # as
1501
+ # [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1502
+ # Prices and adjustments on the current plan that were scheduled to end at the
1503
+ # plan change time are extended to infinity (original end dates are lost), and
1504
+ # anything scheduled to start after the plan change time is permanently deleted.
1505
+ # Coupons redeemed as part of an unscheduled plan change are released and can be
1506
+ # redeemed again.
1507
+ #
1508
+ # A scheduled cancellation is not affected by this operation: if the subscription
1509
+ # has both a pending plan change and a scheduled cancellation, unscheduling the
1510
+ # plan change leaves the cancellation in place.
1478
1511
  sig do
1479
1512
  params(
1480
1513
  subscription_id: String,
@@ -475,6 +475,7 @@ module Orb
475
475
  | Orb::NewPlanTieredPackagePrice
476
476
  | Orb::NewPlanTieredWithMinimumPrice
477
477
  | Orb::NewPlanGroupedTieredPrice
478
+ | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix
478
479
  | Orb::NewPlanTieredPackageWithMinimumPrice
479
480
  | Orb::NewPlanPackageWithAllocationPrice
480
481
  | Orb::NewPlanUnitWithPercentPrice
@@ -689,6 +690,188 @@ module Orb
689
690
  end
690
691
  end
691
692
 
693
+ type grouped_tiered_matrix =
694
+ {
695
+ cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence,
696
+ grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
697
+ item_id: String,
698
+ model_type: :grouped_tiered_matrix,
699
+ name: String,
700
+ billable_metric_id: String?,
701
+ billed_in_advance: bool?,
702
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
703
+ conversion_rate: Float?,
704
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
705
+ currency: String?,
706
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
707
+ external_price_id: String?,
708
+ fixed_price_quantity: Float?,
709
+ invoice_grouping_key: String?,
710
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
711
+ license_type_id: String?,
712
+ metadata: ::Hash[Symbol, String?]?,
713
+ reference_id: String?
714
+ }
715
+
716
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
717
+ attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence
718
+
719
+ attr_accessor grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
720
+
721
+ attr_accessor item_id: String
722
+
723
+ attr_accessor model_type: :grouped_tiered_matrix
724
+
725
+ attr_accessor name: String
726
+
727
+ attr_accessor billable_metric_id: String?
728
+
729
+ attr_accessor billed_in_advance: bool?
730
+
731
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
732
+
733
+ attr_accessor conversion_rate: Float?
734
+
735
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
736
+
737
+ attr_accessor currency: String?
738
+
739
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
740
+
741
+ attr_accessor external_price_id: String?
742
+
743
+ attr_accessor fixed_price_quantity: Float?
744
+
745
+ attr_accessor invoice_grouping_key: String?
746
+
747
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
748
+
749
+ attr_accessor license_type_id: String?
750
+
751
+ attr_accessor metadata: ::Hash[Symbol, String?]?
752
+
753
+ attr_accessor reference_id: String?
754
+
755
+ def initialize: (
756
+ cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence,
757
+ grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
758
+ item_id: String,
759
+ name: String,
760
+ ?billable_metric_id: String?,
761
+ ?billed_in_advance: bool?,
762
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
763
+ ?conversion_rate: Float?,
764
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
765
+ ?currency: String?,
766
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
767
+ ?external_price_id: String?,
768
+ ?fixed_price_quantity: Float?,
769
+ ?invoice_grouping_key: String?,
770
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
771
+ ?license_type_id: String?,
772
+ ?metadata: ::Hash[Symbol, String?]?,
773
+ ?reference_id: String?,
774
+ ?model_type: :grouped_tiered_matrix
775
+ ) -> void
776
+
777
+ def to_hash: -> {
778
+ cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence,
779
+ grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
780
+ item_id: String,
781
+ model_type: :grouped_tiered_matrix,
782
+ name: String,
783
+ billable_metric_id: String?,
784
+ billed_in_advance: bool?,
785
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
786
+ conversion_rate: Float?,
787
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
788
+ currency: String?,
789
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
790
+ external_price_id: String?,
791
+ fixed_price_quantity: Float?,
792
+ invoice_grouping_key: String?,
793
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
794
+ license_type_id: String?,
795
+ metadata: ::Hash[Symbol, String?]?,
796
+ reference_id: String?
797
+ }
798
+
799
+ type cadence =
800
+ :annual
801
+ | :semi_annual
802
+ | :monthly
803
+ | :quarterly
804
+ | :one_time
805
+ | :custom
806
+
807
+ module Cadence
808
+ extend Orb::Internal::Type::Enum
809
+
810
+ ANNUAL: :annual
811
+ SEMI_ANNUAL: :semi_annual
812
+ MONTHLY: :monthly
813
+ QUARTERLY: :quarterly
814
+ ONE_TIME: :one_time
815
+ CUSTOM: :custom
816
+
817
+ def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence]
818
+ end
819
+
820
+ type grouped_tiered_matrix_config =
821
+ {
822
+ default_unit_amount: String,
823
+ dimension: String,
824
+ tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
825
+ }
826
+
827
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
828
+ attr_accessor default_unit_amount: String
829
+
830
+ attr_accessor dimension: String
831
+
832
+ attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
833
+
834
+ def initialize: (
835
+ default_unit_amount: String,
836
+ dimension: String,
837
+ tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
838
+ ) -> void
839
+
840
+ def to_hash: -> {
841
+ default_unit_amount: String,
842
+ dimension: String,
843
+ tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
844
+ }
845
+
846
+ type tier =
847
+ {
848
+ dimension_value: String,
849
+ tier_lower_bound: String,
850
+ unit_amount: String
851
+ }
852
+
853
+ class Tier < Orb::Internal::Type::BaseModel
854
+ attr_accessor dimension_value: String
855
+
856
+ attr_accessor tier_lower_bound: String
857
+
858
+ attr_accessor unit_amount: String
859
+
860
+ def initialize: (
861
+ dimension_value: String,
862
+ tier_lower_bound: String,
863
+ unit_amount: String
864
+ ) -> void
865
+
866
+ def to_hash: -> {
867
+ dimension_value: String,
868
+ tier_lower_bound: String,
869
+ unit_amount: String
870
+ }
871
+ end
872
+ end
873
+ end
874
+
692
875
  type matrix_with_threshold_discounts =
693
876
  {
694
877
  cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence,
@@ -2537,6 +2720,7 @@ module Orb
2537
2720
  | Orb::NewPlanTieredPackagePrice
2538
2721
  | Orb::NewPlanTieredWithMinimumPrice
2539
2722
  | Orb::NewPlanGroupedTieredPrice
2723
+ | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix
2540
2724
  | Orb::NewPlanTieredPackageWithMinimumPrice
2541
2725
  | Orb::NewPlanPackageWithAllocationPrice
2542
2726
  | Orb::NewPlanUnitWithPercentPrice
@@ -2751,6 +2935,188 @@ module Orb
2751
2935
  end
2752
2936
  end
2753
2937
 
2938
+ type grouped_tiered_matrix =
2939
+ {
2940
+ cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence,
2941
+ grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
2942
+ item_id: String,
2943
+ model_type: :grouped_tiered_matrix,
2944
+ name: String,
2945
+ billable_metric_id: String?,
2946
+ billed_in_advance: bool?,
2947
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
2948
+ conversion_rate: Float?,
2949
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
2950
+ currency: String?,
2951
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
2952
+ external_price_id: String?,
2953
+ fixed_price_quantity: Float?,
2954
+ invoice_grouping_key: String?,
2955
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
2956
+ license_type_id: String?,
2957
+ metadata: ::Hash[Symbol, String?]?,
2958
+ reference_id: String?
2959
+ }
2960
+
2961
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
2962
+ attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence
2963
+
2964
+ attr_accessor grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
2965
+
2966
+ attr_accessor item_id: String
2967
+
2968
+ attr_accessor model_type: :grouped_tiered_matrix
2969
+
2970
+ attr_accessor name: String
2971
+
2972
+ attr_accessor billable_metric_id: String?
2973
+
2974
+ attr_accessor billed_in_advance: bool?
2975
+
2976
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
2977
+
2978
+ attr_accessor conversion_rate: Float?
2979
+
2980
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
2981
+
2982
+ attr_accessor currency: String?
2983
+
2984
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
2985
+
2986
+ attr_accessor external_price_id: String?
2987
+
2988
+ attr_accessor fixed_price_quantity: Float?
2989
+
2990
+ attr_accessor invoice_grouping_key: String?
2991
+
2992
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
2993
+
2994
+ attr_accessor license_type_id: String?
2995
+
2996
+ attr_accessor metadata: ::Hash[Symbol, String?]?
2997
+
2998
+ attr_accessor reference_id: String?
2999
+
3000
+ def initialize: (
3001
+ cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence,
3002
+ grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
3003
+ item_id: String,
3004
+ name: String,
3005
+ ?billable_metric_id: String?,
3006
+ ?billed_in_advance: bool?,
3007
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3008
+ ?conversion_rate: Float?,
3009
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
3010
+ ?currency: String?,
3011
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
3012
+ ?external_price_id: String?,
3013
+ ?fixed_price_quantity: Float?,
3014
+ ?invoice_grouping_key: String?,
3015
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3016
+ ?license_type_id: String?,
3017
+ ?metadata: ::Hash[Symbol, String?]?,
3018
+ ?reference_id: String?,
3019
+ ?model_type: :grouped_tiered_matrix
3020
+ ) -> void
3021
+
3022
+ def to_hash: -> {
3023
+ cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence,
3024
+ grouped_tiered_matrix_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
3025
+ item_id: String,
3026
+ model_type: :grouped_tiered_matrix,
3027
+ name: String,
3028
+ billable_metric_id: String?,
3029
+ billed_in_advance: bool?,
3030
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3031
+ conversion_rate: Float?,
3032
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
3033
+ currency: String?,
3034
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
3035
+ external_price_id: String?,
3036
+ fixed_price_quantity: Float?,
3037
+ invoice_grouping_key: String?,
3038
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3039
+ license_type_id: String?,
3040
+ metadata: ::Hash[Symbol, String?]?,
3041
+ reference_id: String?
3042
+ }
3043
+
3044
+ type cadence =
3045
+ :annual
3046
+ | :semi_annual
3047
+ | :monthly
3048
+ | :quarterly
3049
+ | :one_time
3050
+ | :custom
3051
+
3052
+ module Cadence
3053
+ extend Orb::Internal::Type::Enum
3054
+
3055
+ ANNUAL: :annual
3056
+ SEMI_ANNUAL: :semi_annual
3057
+ MONTHLY: :monthly
3058
+ QUARTERLY: :quarterly
3059
+ ONE_TIME: :one_time
3060
+ CUSTOM: :custom
3061
+
3062
+ def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence]
3063
+ end
3064
+
3065
+ type grouped_tiered_matrix_config =
3066
+ {
3067
+ default_unit_amount: String,
3068
+ dimension: String,
3069
+ tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3070
+ }
3071
+
3072
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
3073
+ attr_accessor default_unit_amount: String
3074
+
3075
+ attr_accessor dimension: String
3076
+
3077
+ attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3078
+
3079
+ def initialize: (
3080
+ default_unit_amount: String,
3081
+ dimension: String,
3082
+ tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3083
+ ) -> void
3084
+
3085
+ def to_hash: -> {
3086
+ default_unit_amount: String,
3087
+ dimension: String,
3088
+ tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3089
+ }
3090
+
3091
+ type tier =
3092
+ {
3093
+ dimension_value: String,
3094
+ tier_lower_bound: String,
3095
+ unit_amount: String
3096
+ }
3097
+
3098
+ class Tier < Orb::Internal::Type::BaseModel
3099
+ attr_accessor dimension_value: String
3100
+
3101
+ attr_accessor tier_lower_bound: String
3102
+
3103
+ attr_accessor unit_amount: String
3104
+
3105
+ def initialize: (
3106
+ dimension_value: String,
3107
+ tier_lower_bound: String,
3108
+ unit_amount: String
3109
+ ) -> void
3110
+
3111
+ def to_hash: -> {
3112
+ dimension_value: String,
3113
+ tier_lower_bound: String,
3114
+ unit_amount: String
3115
+ }
3116
+ end
3117
+ end
3118
+ end
3119
+
2754
3120
  type matrix_with_threshold_discounts =
2755
3121
  {
2756
3122
  cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence,