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
@@ -469,6 +469,7 @@ module Orb
469
469
  | Orb::NewPlanTieredPackagePrice
470
470
  | Orb::NewPlanTieredWithMinimumPrice
471
471
  | Orb::NewPlanGroupedTieredPrice
472
+ | Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix
472
473
  | Orb::NewPlanTieredPackageWithMinimumPrice
473
474
  | Orb::NewPlanPackageWithAllocationPrice
474
475
  | Orb::NewPlanUnitWithPercentPrice
@@ -680,6 +681,188 @@ module Orb
680
681
  end
681
682
  end
682
683
 
684
+ type grouped_tiered_matrix =
685
+ {
686
+ cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence,
687
+ grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
688
+ item_id: String,
689
+ model_type: :grouped_tiered_matrix,
690
+ name: String,
691
+ billable_metric_id: String?,
692
+ billed_in_advance: bool?,
693
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
694
+ conversion_rate: Float?,
695
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
696
+ currency: String?,
697
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
698
+ external_price_id: String?,
699
+ fixed_price_quantity: Float?,
700
+ invoice_grouping_key: String?,
701
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
702
+ license_type_id: String?,
703
+ metadata: ::Hash[Symbol, String?]?,
704
+ reference_id: String?
705
+ }
706
+
707
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
708
+ attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence
709
+
710
+ attr_accessor grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
711
+
712
+ attr_accessor item_id: String
713
+
714
+ attr_accessor model_type: :grouped_tiered_matrix
715
+
716
+ attr_accessor name: String
717
+
718
+ attr_accessor billable_metric_id: String?
719
+
720
+ attr_accessor billed_in_advance: bool?
721
+
722
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
723
+
724
+ attr_accessor conversion_rate: Float?
725
+
726
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
727
+
728
+ attr_accessor currency: String?
729
+
730
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
731
+
732
+ attr_accessor external_price_id: String?
733
+
734
+ attr_accessor fixed_price_quantity: Float?
735
+
736
+ attr_accessor invoice_grouping_key: String?
737
+
738
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
739
+
740
+ attr_accessor license_type_id: String?
741
+
742
+ attr_accessor metadata: ::Hash[Symbol, String?]?
743
+
744
+ attr_accessor reference_id: String?
745
+
746
+ def initialize: (
747
+ cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence,
748
+ grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
749
+ item_id: String,
750
+ name: String,
751
+ ?billable_metric_id: String?,
752
+ ?billed_in_advance: bool?,
753
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
754
+ ?conversion_rate: Float?,
755
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
756
+ ?currency: String?,
757
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
758
+ ?external_price_id: String?,
759
+ ?fixed_price_quantity: Float?,
760
+ ?invoice_grouping_key: String?,
761
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
762
+ ?license_type_id: String?,
763
+ ?metadata: ::Hash[Symbol, String?]?,
764
+ ?reference_id: String?,
765
+ ?model_type: :grouped_tiered_matrix
766
+ ) -> void
767
+
768
+ def to_hash: -> {
769
+ cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence,
770
+ grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
771
+ item_id: String,
772
+ model_type: :grouped_tiered_matrix,
773
+ name: String,
774
+ billable_metric_id: String?,
775
+ billed_in_advance: bool?,
776
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
777
+ conversion_rate: Float?,
778
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
779
+ currency: String?,
780
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
781
+ external_price_id: String?,
782
+ fixed_price_quantity: Float?,
783
+ invoice_grouping_key: String?,
784
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
785
+ license_type_id: String?,
786
+ metadata: ::Hash[Symbol, String?]?,
787
+ reference_id: String?
788
+ }
789
+
790
+ type cadence =
791
+ :annual
792
+ | :semi_annual
793
+ | :monthly
794
+ | :quarterly
795
+ | :one_time
796
+ | :custom
797
+
798
+ module Cadence
799
+ extend Orb::Internal::Type::Enum
800
+
801
+ ANNUAL: :annual
802
+ SEMI_ANNUAL: :semi_annual
803
+ MONTHLY: :monthly
804
+ QUARTERLY: :quarterly
805
+ ONE_TIME: :one_time
806
+ CUSTOM: :custom
807
+
808
+ def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::cadence]
809
+ end
810
+
811
+ type grouped_tiered_matrix_config =
812
+ {
813
+ default_unit_amount: String,
814
+ dimension: String,
815
+ tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
816
+ }
817
+
818
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
819
+ attr_accessor default_unit_amount: String
820
+
821
+ attr_accessor dimension: String
822
+
823
+ attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
824
+
825
+ def initialize: (
826
+ default_unit_amount: String,
827
+ dimension: String,
828
+ tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
829
+ ) -> void
830
+
831
+ def to_hash: -> {
832
+ default_unit_amount: String,
833
+ dimension: String,
834
+ tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
835
+ }
836
+
837
+ type tier =
838
+ {
839
+ dimension_value: String,
840
+ tier_lower_bound: String,
841
+ unit_amount: String
842
+ }
843
+
844
+ class Tier < Orb::Internal::Type::BaseModel
845
+ attr_accessor dimension_value: String
846
+
847
+ attr_accessor tier_lower_bound: String
848
+
849
+ attr_accessor unit_amount: String
850
+
851
+ def initialize: (
852
+ dimension_value: String,
853
+ tier_lower_bound: String,
854
+ unit_amount: String
855
+ ) -> void
856
+
857
+ def to_hash: -> {
858
+ dimension_value: String,
859
+ tier_lower_bound: String,
860
+ unit_amount: String
861
+ }
862
+ end
863
+ end
864
+ end
865
+
683
866
  type matrix_with_threshold_discounts =
684
867
  {
685
868
  cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence,
@@ -2520,6 +2703,7 @@ module Orb
2520
2703
  | Orb::NewPlanTieredPackagePrice
2521
2704
  | Orb::NewPlanTieredWithMinimumPrice
2522
2705
  | Orb::NewPlanGroupedTieredPrice
2706
+ | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix
2523
2707
  | Orb::NewPlanTieredPackageWithMinimumPrice
2524
2708
  | Orb::NewPlanPackageWithAllocationPrice
2525
2709
  | Orb::NewPlanUnitWithPercentPrice
@@ -2731,6 +2915,188 @@ module Orb
2731
2915
  end
2732
2916
  end
2733
2917
 
2918
+ type grouped_tiered_matrix =
2919
+ {
2920
+ cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence,
2921
+ grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
2922
+ item_id: String,
2923
+ model_type: :grouped_tiered_matrix,
2924
+ name: String,
2925
+ billable_metric_id: String?,
2926
+ billed_in_advance: bool?,
2927
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
2928
+ conversion_rate: Float?,
2929
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
2930
+ currency: String?,
2931
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
2932
+ external_price_id: String?,
2933
+ fixed_price_quantity: Float?,
2934
+ invoice_grouping_key: String?,
2935
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
2936
+ license_type_id: String?,
2937
+ metadata: ::Hash[Symbol, String?]?,
2938
+ reference_id: String?
2939
+ }
2940
+
2941
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
2942
+ attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence
2943
+
2944
+ attr_accessor grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
2945
+
2946
+ attr_accessor item_id: String
2947
+
2948
+ attr_accessor model_type: :grouped_tiered_matrix
2949
+
2950
+ attr_accessor name: String
2951
+
2952
+ attr_accessor billable_metric_id: String?
2953
+
2954
+ attr_accessor billed_in_advance: bool?
2955
+
2956
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
2957
+
2958
+ attr_accessor conversion_rate: Float?
2959
+
2960
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
2961
+
2962
+ attr_accessor currency: String?
2963
+
2964
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
2965
+
2966
+ attr_accessor external_price_id: String?
2967
+
2968
+ attr_accessor fixed_price_quantity: Float?
2969
+
2970
+ attr_accessor invoice_grouping_key: String?
2971
+
2972
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
2973
+
2974
+ attr_accessor license_type_id: String?
2975
+
2976
+ attr_accessor metadata: ::Hash[Symbol, String?]?
2977
+
2978
+ attr_accessor reference_id: String?
2979
+
2980
+ def initialize: (
2981
+ cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence,
2982
+ grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
2983
+ item_id: String,
2984
+ name: String,
2985
+ ?billable_metric_id: String?,
2986
+ ?billed_in_advance: bool?,
2987
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
2988
+ ?conversion_rate: Float?,
2989
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
2990
+ ?currency: String?,
2991
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
2992
+ ?external_price_id: String?,
2993
+ ?fixed_price_quantity: Float?,
2994
+ ?invoice_grouping_key: String?,
2995
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
2996
+ ?license_type_id: String?,
2997
+ ?metadata: ::Hash[Symbol, String?]?,
2998
+ ?reference_id: String?,
2999
+ ?model_type: :grouped_tiered_matrix
3000
+ ) -> void
3001
+
3002
+ def to_hash: -> {
3003
+ cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence,
3004
+ grouped_tiered_matrix_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
3005
+ item_id: String,
3006
+ model_type: :grouped_tiered_matrix,
3007
+ name: String,
3008
+ billable_metric_id: String?,
3009
+ billed_in_advance: bool?,
3010
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3011
+ conversion_rate: Float?,
3012
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
3013
+ currency: String?,
3014
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
3015
+ external_price_id: String?,
3016
+ fixed_price_quantity: Float?,
3017
+ invoice_grouping_key: String?,
3018
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3019
+ license_type_id: String?,
3020
+ metadata: ::Hash[Symbol, String?]?,
3021
+ reference_id: String?
3022
+ }
3023
+
3024
+ type cadence =
3025
+ :annual
3026
+ | :semi_annual
3027
+ | :monthly
3028
+ | :quarterly
3029
+ | :one_time
3030
+ | :custom
3031
+
3032
+ module Cadence
3033
+ extend Orb::Internal::Type::Enum
3034
+
3035
+ ANNUAL: :annual
3036
+ SEMI_ANNUAL: :semi_annual
3037
+ MONTHLY: :monthly
3038
+ QUARTERLY: :quarterly
3039
+ ONE_TIME: :one_time
3040
+ CUSTOM: :custom
3041
+
3042
+ def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::cadence]
3043
+ end
3044
+
3045
+ type grouped_tiered_matrix_config =
3046
+ {
3047
+ default_unit_amount: String,
3048
+ dimension: String,
3049
+ tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3050
+ }
3051
+
3052
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
3053
+ attr_accessor default_unit_amount: String
3054
+
3055
+ attr_accessor dimension: String
3056
+
3057
+ attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3058
+
3059
+ def initialize: (
3060
+ default_unit_amount: String,
3061
+ dimension: String,
3062
+ tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3063
+ ) -> void
3064
+
3065
+ def to_hash: -> {
3066
+ default_unit_amount: String,
3067
+ dimension: String,
3068
+ tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
3069
+ }
3070
+
3071
+ type tier =
3072
+ {
3073
+ dimension_value: String,
3074
+ tier_lower_bound: String,
3075
+ unit_amount: String
3076
+ }
3077
+
3078
+ class Tier < Orb::Internal::Type::BaseModel
3079
+ attr_accessor dimension_value: String
3080
+
3081
+ attr_accessor tier_lower_bound: String
3082
+
3083
+ attr_accessor unit_amount: String
3084
+
3085
+ def initialize: (
3086
+ dimension_value: String,
3087
+ tier_lower_bound: String,
3088
+ unit_amount: String
3089
+ ) -> void
3090
+
3091
+ def to_hash: -> {
3092
+ dimension_value: String,
3093
+ tier_lower_bound: String,
3094
+ unit_amount: String
3095
+ }
3096
+ end
3097
+ end
3098
+ end
3099
+
2734
3100
  type matrix_with_threshold_discounts =
2735
3101
  {
2736
3102
  cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence,
@@ -279,6 +279,7 @@ module Orb
279
279
  | Orb::NewPlanTieredPackagePrice
280
280
  | Orb::NewPlanTieredWithMinimumPrice
281
281
  | Orb::NewPlanGroupedTieredPrice
282
+ | Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix
282
283
  | Orb::NewPlanTieredPackageWithMinimumPrice
283
284
  | Orb::NewPlanPackageWithAllocationPrice
284
285
  | Orb::NewPlanUnitWithPercentPrice
@@ -490,6 +491,188 @@ module Orb
490
491
  end
491
492
  end
492
493
 
494
+ type grouped_tiered_matrix =
495
+ {
496
+ cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedTieredMatrix::cadence,
497
+ grouped_tiered_matrix_config: Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
498
+ item_id: String,
499
+ model_type: :grouped_tiered_matrix,
500
+ name: String,
501
+ billable_metric_id: String?,
502
+ billed_in_advance: bool?,
503
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
504
+ conversion_rate: Float?,
505
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
506
+ currency: String?,
507
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
508
+ external_price_id: String?,
509
+ fixed_price_quantity: Float?,
510
+ invoice_grouping_key: String?,
511
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
512
+ license_type_id: String?,
513
+ metadata: ::Hash[Symbol, String?]?,
514
+ reference_id: String?
515
+ }
516
+
517
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
518
+ attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedTieredMatrix::cadence
519
+
520
+ attr_accessor grouped_tiered_matrix_config: Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
521
+
522
+ attr_accessor item_id: String
523
+
524
+ attr_accessor model_type: :grouped_tiered_matrix
525
+
526
+ attr_accessor name: String
527
+
528
+ attr_accessor billable_metric_id: String?
529
+
530
+ attr_accessor billed_in_advance: bool?
531
+
532
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
533
+
534
+ attr_accessor conversion_rate: Float?
535
+
536
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
537
+
538
+ attr_accessor currency: String?
539
+
540
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
541
+
542
+ attr_accessor external_price_id: String?
543
+
544
+ attr_accessor fixed_price_quantity: Float?
545
+
546
+ attr_accessor invoice_grouping_key: String?
547
+
548
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
549
+
550
+ attr_accessor license_type_id: String?
551
+
552
+ attr_accessor metadata: ::Hash[Symbol, String?]?
553
+
554
+ attr_accessor reference_id: String?
555
+
556
+ def initialize: (
557
+ cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedTieredMatrix::cadence,
558
+ grouped_tiered_matrix_config: Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
559
+ item_id: String,
560
+ name: String,
561
+ ?billable_metric_id: String?,
562
+ ?billed_in_advance: bool?,
563
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
564
+ ?conversion_rate: Float?,
565
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
566
+ ?currency: String?,
567
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
568
+ ?external_price_id: String?,
569
+ ?fixed_price_quantity: Float?,
570
+ ?invoice_grouping_key: String?,
571
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
572
+ ?license_type_id: String?,
573
+ ?metadata: ::Hash[Symbol, String?]?,
574
+ ?reference_id: String?,
575
+ ?model_type: :grouped_tiered_matrix
576
+ ) -> void
577
+
578
+ def to_hash: -> {
579
+ cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedTieredMatrix::cadence,
580
+ grouped_tiered_matrix_config: Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
581
+ item_id: String,
582
+ model_type: :grouped_tiered_matrix,
583
+ name: String,
584
+ billable_metric_id: String?,
585
+ billed_in_advance: bool?,
586
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
587
+ conversion_rate: Float?,
588
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
589
+ currency: String?,
590
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
591
+ external_price_id: String?,
592
+ fixed_price_quantity: Float?,
593
+ invoice_grouping_key: String?,
594
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
595
+ license_type_id: String?,
596
+ metadata: ::Hash[Symbol, String?]?,
597
+ reference_id: String?
598
+ }
599
+
600
+ type cadence =
601
+ :annual
602
+ | :semi_annual
603
+ | :monthly
604
+ | :quarterly
605
+ | :one_time
606
+ | :custom
607
+
608
+ module Cadence
609
+ extend Orb::Internal::Type::Enum
610
+
611
+ ANNUAL: :annual
612
+ SEMI_ANNUAL: :semi_annual
613
+ MONTHLY: :monthly
614
+ QUARTERLY: :quarterly
615
+ ONE_TIME: :one_time
616
+ CUSTOM: :custom
617
+
618
+ def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::GroupedTieredMatrix::cadence]
619
+ end
620
+
621
+ type grouped_tiered_matrix_config =
622
+ {
623
+ default_unit_amount: String,
624
+ dimension: String,
625
+ tiers: ::Array[Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
626
+ }
627
+
628
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
629
+ attr_accessor default_unit_amount: String
630
+
631
+ attr_accessor dimension: String
632
+
633
+ attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
634
+
635
+ def initialize: (
636
+ default_unit_amount: String,
637
+ dimension: String,
638
+ tiers: ::Array[Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
639
+ ) -> void
640
+
641
+ def to_hash: -> {
642
+ default_unit_amount: String,
643
+ dimension: String,
644
+ tiers: ::Array[Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier]
645
+ }
646
+
647
+ type tier =
648
+ {
649
+ dimension_value: String,
650
+ tier_lower_bound: String,
651
+ unit_amount: String
652
+ }
653
+
654
+ class Tier < Orb::Internal::Type::BaseModel
655
+ attr_accessor dimension_value: String
656
+
657
+ attr_accessor tier_lower_bound: String
658
+
659
+ attr_accessor unit_amount: String
660
+
661
+ def initialize: (
662
+ dimension_value: String,
663
+ tier_lower_bound: String,
664
+ unit_amount: String
665
+ ) -> void
666
+
667
+ def to_hash: -> {
668
+ dimension_value: String,
669
+ tier_lower_bound: String,
670
+ unit_amount: String
671
+ }
672
+ end
673
+ end
674
+ end
675
+
493
676
  type matrix_with_threshold_discounts =
494
677
  {
495
678
  cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence,