orb-billing 1.30.0 → 1.31.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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +566 -6
  5. data/lib/orb/models/beta_create_plan_version_params.rb +566 -6
  6. data/lib/orb/models/changed_subscription_resources.rb +2 -2
  7. data/lib/orb/models/invoice.rb +2 -2
  8. data/lib/orb/models/invoice_fetch_upcoming_response.rb +2 -2
  9. data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
  10. data/lib/orb/models/per_price_cost.rb +2 -2
  11. data/lib/orb/models/plan.rb +2 -2
  12. data/lib/orb/models/plan_create_params.rb +278 -3
  13. data/lib/orb/models/plan_version.rb +2 -2
  14. data/lib/orb/models/price.rb +450 -1
  15. data/lib/orb/models/price_create_params.rb +263 -3
  16. data/lib/orb/models/price_evaluate_multiple_params.rb +273 -3
  17. data/lib/orb/models/price_evaluate_preview_events_params.rb +273 -3
  18. data/lib/orb/models/price_interval.rb +2 -2
  19. data/lib/orb/models/subscription_create_params.rb +566 -6
  20. data/lib/orb/models/subscription_price_intervals_params.rb +273 -3
  21. data/lib/orb/models/subscription_schedule_plan_change_params.rb +566 -6
  22. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  23. data/lib/orb/resources/prices.rb +5 -5
  24. data/lib/orb/version.rb +1 -1
  25. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2737 -1811
  26. data/rbi/orb/models/beta_create_plan_version_params.rbi +2745 -1819
  27. data/rbi/orb/models/changed_subscription_resources.rbi +1 -0
  28. data/rbi/orb/models/invoice.rbi +1 -0
  29. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1 -0
  30. data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
  31. data/rbi/orb/models/per_price_cost.rbi +1 -0
  32. data/rbi/orb/models/plan.rbi +1 -0
  33. data/rbi/orb/models/plan_create_params.rbi +463 -0
  34. data/rbi/orb/models/plan_version.rbi +1 -0
  35. data/rbi/orb/models/price.rbi +805 -0
  36. data/rbi/orb/models/price_create_params.rbi +451 -0
  37. data/rbi/orb/models/price_evaluate_multiple_params.rbi +451 -0
  38. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +451 -0
  39. data/rbi/orb/models/price_interval.rbi +1 -0
  40. data/rbi/orb/models/subscription_create_params.rbi +2660 -1734
  41. data/rbi/orb/models/subscription_price_intervals_params.rbi +451 -0
  42. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2660 -1734
  43. data/rbi/orb/resources/prices.rbi +1 -0
  44. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +376 -0
  45. data/sig/orb/models/beta_create_plan_version_params.rbs +376 -0
  46. data/sig/orb/models/plan_create_params.rbs +188 -0
  47. data/sig/orb/models/price.rbs +332 -0
  48. data/sig/orb/models/price_create_params.rbs +178 -0
  49. data/sig/orb/models/price_evaluate_multiple_params.rbs +183 -0
  50. data/sig/orb/models/price_evaluate_preview_events_params.rbs +183 -0
  51. data/sig/orb/models/subscription_create_params.rbs +376 -0
  52. data/sig/orb/models/subscription_price_intervals_params.rbs +183 -0
  53. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +376 -0
  54. metadata +1 -1
@@ -485,6 +485,7 @@ module Orb
485
485
  | Orb::NewSubscriptionPackageWithAllocationPrice
486
486
  | Orb::NewSubscriptionUnitWithPercentPrice
487
487
  | Orb::NewSubscriptionMatrixWithAllocationPrice
488
+ | Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation
488
489
  | Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts
489
490
  | Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration
490
491
  | Orb::NewSubscriptionUnitWithProrationPrice
@@ -874,6 +875,193 @@ module Orb
874
875
  end
875
876
  end
876
877
 
878
+ type tiered_matrix_with_allocation =
879
+ {
880
+ cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::cadence,
881
+ item_id: String,
882
+ model_type: :tiered_matrix_with_allocation,
883
+ name: String,
884
+ tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
885
+ billable_metric_id: String?,
886
+ billed_in_advance: bool?,
887
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
888
+ conversion_rate: Float?,
889
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
890
+ currency: String?,
891
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
892
+ external_price_id: String?,
893
+ fixed_price_quantity: Float?,
894
+ invoice_grouping_key: String?,
895
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
896
+ license_type_id: String?,
897
+ metadata: ::Hash[Symbol, String?]?,
898
+ reference_id: String?
899
+ }
900
+
901
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
902
+ attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::cadence
903
+
904
+ attr_accessor item_id: String
905
+
906
+ attr_accessor model_type: :tiered_matrix_with_allocation
907
+
908
+ attr_accessor name: String
909
+
910
+ attr_accessor tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
911
+
912
+ attr_accessor billable_metric_id: String?
913
+
914
+ attr_accessor billed_in_advance: bool?
915
+
916
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
917
+
918
+ attr_accessor conversion_rate: Float?
919
+
920
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
921
+
922
+ attr_accessor currency: String?
923
+
924
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
925
+
926
+ attr_accessor external_price_id: String?
927
+
928
+ attr_accessor fixed_price_quantity: Float?
929
+
930
+ attr_accessor invoice_grouping_key: String?
931
+
932
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
933
+
934
+ attr_accessor license_type_id: String?
935
+
936
+ attr_accessor metadata: ::Hash[Symbol, String?]?
937
+
938
+ attr_accessor reference_id: String?
939
+
940
+ def initialize: (
941
+ cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::cadence,
942
+ item_id: String,
943
+ name: String,
944
+ tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
945
+ ?billable_metric_id: String?,
946
+ ?billed_in_advance: bool?,
947
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
948
+ ?conversion_rate: Float?,
949
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
950
+ ?currency: String?,
951
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
952
+ ?external_price_id: String?,
953
+ ?fixed_price_quantity: Float?,
954
+ ?invoice_grouping_key: String?,
955
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
956
+ ?license_type_id: String?,
957
+ ?metadata: ::Hash[Symbol, String?]?,
958
+ ?reference_id: String?,
959
+ ?model_type: :tiered_matrix_with_allocation
960
+ ) -> void
961
+
962
+ def to_hash: -> {
963
+ cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::cadence,
964
+ item_id: String,
965
+ model_type: :tiered_matrix_with_allocation,
966
+ name: String,
967
+ tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
968
+ billable_metric_id: String?,
969
+ billed_in_advance: bool?,
970
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
971
+ conversion_rate: Float?,
972
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
973
+ currency: String?,
974
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
975
+ external_price_id: String?,
976
+ fixed_price_quantity: Float?,
977
+ invoice_grouping_key: String?,
978
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
979
+ license_type_id: String?,
980
+ metadata: ::Hash[Symbol, String?]?,
981
+ reference_id: String?
982
+ }
983
+
984
+ type cadence =
985
+ :annual
986
+ | :semi_annual
987
+ | :monthly
988
+ | :quarterly
989
+ | :one_time
990
+ | :custom
991
+
992
+ module Cadence
993
+ extend Orb::Internal::Type::Enum
994
+
995
+ ANNUAL: :annual
996
+ SEMI_ANNUAL: :semi_annual
997
+ MONTHLY: :monthly
998
+ QUARTERLY: :quarterly
999
+ ONE_TIME: :one_time
1000
+ CUSTOM: :custom
1001
+
1002
+ def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::cadence]
1003
+ end
1004
+
1005
+ type tiered_matrix_with_allocation_config =
1006
+ {
1007
+ allocation: String,
1008
+ default_unit_amount: String,
1009
+ dimensions: ::Array[String],
1010
+ tiers: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
1011
+ }
1012
+
1013
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
1014
+ attr_accessor allocation: String
1015
+
1016
+ attr_accessor default_unit_amount: String
1017
+
1018
+ attr_accessor dimensions: ::Array[String]
1019
+
1020
+ attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
1021
+
1022
+ def initialize: (
1023
+ allocation: String,
1024
+ default_unit_amount: String,
1025
+ dimensions: ::Array[String],
1026
+ tiers: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
1027
+ ) -> void
1028
+
1029
+ def to_hash: -> {
1030
+ allocation: String,
1031
+ default_unit_amount: String,
1032
+ dimensions: ::Array[String],
1033
+ tiers: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
1034
+ }
1035
+
1036
+ type tier =
1037
+ {
1038
+ dimension_values: ::Array[String],
1039
+ tier_lower_bound: String,
1040
+ unit_amount: String
1041
+ }
1042
+
1043
+ class Tier < Orb::Internal::Type::BaseModel
1044
+ attr_accessor dimension_values: ::Array[String]
1045
+
1046
+ attr_accessor tier_lower_bound: String
1047
+
1048
+ attr_accessor unit_amount: String
1049
+
1050
+ def initialize: (
1051
+ dimension_values: ::Array[String],
1052
+ tier_lower_bound: String,
1053
+ unit_amount: String
1054
+ ) -> void
1055
+
1056
+ def to_hash: -> {
1057
+ dimension_values: ::Array[String],
1058
+ tier_lower_bound: String,
1059
+ unit_amount: String
1060
+ }
1061
+ end
1062
+ end
1063
+ end
1064
+
877
1065
  type matrix_with_threshold_discounts =
878
1066
  {
879
1067
  cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence,
@@ -2587,6 +2775,7 @@ module Orb
2587
2775
  | Orb::NewSubscriptionPackageWithAllocationPrice
2588
2776
  | Orb::NewSubscriptionUnitWithPercentPrice
2589
2777
  | Orb::NewSubscriptionMatrixWithAllocationPrice
2778
+ | Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation
2590
2779
  | Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts
2591
2780
  | Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration
2592
2781
  | Orb::NewSubscriptionUnitWithProrationPrice
@@ -2976,6 +3165,193 @@ module Orb
2976
3165
  end
2977
3166
  end
2978
3167
 
3168
+ type tiered_matrix_with_allocation =
3169
+ {
3170
+ cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::cadence,
3171
+ item_id: String,
3172
+ model_type: :tiered_matrix_with_allocation,
3173
+ name: String,
3174
+ tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
3175
+ billable_metric_id: String?,
3176
+ billed_in_advance: bool?,
3177
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3178
+ conversion_rate: Float?,
3179
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
3180
+ currency: String?,
3181
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
3182
+ external_price_id: String?,
3183
+ fixed_price_quantity: Float?,
3184
+ invoice_grouping_key: String?,
3185
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3186
+ license_type_id: String?,
3187
+ metadata: ::Hash[Symbol, String?]?,
3188
+ reference_id: String?
3189
+ }
3190
+
3191
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
3192
+ attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::cadence
3193
+
3194
+ attr_accessor item_id: String
3195
+
3196
+ attr_accessor model_type: :tiered_matrix_with_allocation
3197
+
3198
+ attr_accessor name: String
3199
+
3200
+ attr_accessor tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
3201
+
3202
+ attr_accessor billable_metric_id: String?
3203
+
3204
+ attr_accessor billed_in_advance: bool?
3205
+
3206
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
3207
+
3208
+ attr_accessor conversion_rate: Float?
3209
+
3210
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
3211
+
3212
+ attr_accessor currency: String?
3213
+
3214
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
3215
+
3216
+ attr_accessor external_price_id: String?
3217
+
3218
+ attr_accessor fixed_price_quantity: Float?
3219
+
3220
+ attr_accessor invoice_grouping_key: String?
3221
+
3222
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
3223
+
3224
+ attr_accessor license_type_id: String?
3225
+
3226
+ attr_accessor metadata: ::Hash[Symbol, String?]?
3227
+
3228
+ attr_accessor reference_id: String?
3229
+
3230
+ def initialize: (
3231
+ cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::cadence,
3232
+ item_id: String,
3233
+ name: String,
3234
+ tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
3235
+ ?billable_metric_id: String?,
3236
+ ?billed_in_advance: bool?,
3237
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3238
+ ?conversion_rate: Float?,
3239
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
3240
+ ?currency: String?,
3241
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
3242
+ ?external_price_id: String?,
3243
+ ?fixed_price_quantity: Float?,
3244
+ ?invoice_grouping_key: String?,
3245
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3246
+ ?license_type_id: String?,
3247
+ ?metadata: ::Hash[Symbol, String?]?,
3248
+ ?reference_id: String?,
3249
+ ?model_type: :tiered_matrix_with_allocation
3250
+ ) -> void
3251
+
3252
+ def to_hash: -> {
3253
+ cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::cadence,
3254
+ item_id: String,
3255
+ model_type: :tiered_matrix_with_allocation,
3256
+ name: String,
3257
+ tiered_matrix_with_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
3258
+ billable_metric_id: String?,
3259
+ billed_in_advance: bool?,
3260
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3261
+ conversion_rate: Float?,
3262
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
3263
+ currency: String?,
3264
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
3265
+ external_price_id: String?,
3266
+ fixed_price_quantity: Float?,
3267
+ invoice_grouping_key: String?,
3268
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
3269
+ license_type_id: String?,
3270
+ metadata: ::Hash[Symbol, String?]?,
3271
+ reference_id: String?
3272
+ }
3273
+
3274
+ type cadence =
3275
+ :annual
3276
+ | :semi_annual
3277
+ | :monthly
3278
+ | :quarterly
3279
+ | :one_time
3280
+ | :custom
3281
+
3282
+ module Cadence
3283
+ extend Orb::Internal::Type::Enum
3284
+
3285
+ ANNUAL: :annual
3286
+ SEMI_ANNUAL: :semi_annual
3287
+ MONTHLY: :monthly
3288
+ QUARTERLY: :quarterly
3289
+ ONE_TIME: :one_time
3290
+ CUSTOM: :custom
3291
+
3292
+ def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::cadence]
3293
+ end
3294
+
3295
+ type tiered_matrix_with_allocation_config =
3296
+ {
3297
+ allocation: String,
3298
+ default_unit_amount: String,
3299
+ dimensions: ::Array[String],
3300
+ tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
3301
+ }
3302
+
3303
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
3304
+ attr_accessor allocation: String
3305
+
3306
+ attr_accessor default_unit_amount: String
3307
+
3308
+ attr_accessor dimensions: ::Array[String]
3309
+
3310
+ attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
3311
+
3312
+ def initialize: (
3313
+ allocation: String,
3314
+ default_unit_amount: String,
3315
+ dimensions: ::Array[String],
3316
+ tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
3317
+ ) -> void
3318
+
3319
+ def to_hash: -> {
3320
+ allocation: String,
3321
+ default_unit_amount: String,
3322
+ dimensions: ::Array[String],
3323
+ tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
3324
+ }
3325
+
3326
+ type tier =
3327
+ {
3328
+ dimension_values: ::Array[String],
3329
+ tier_lower_bound: String,
3330
+ unit_amount: String
3331
+ }
3332
+
3333
+ class Tier < Orb::Internal::Type::BaseModel
3334
+ attr_accessor dimension_values: ::Array[String]
3335
+
3336
+ attr_accessor tier_lower_bound: String
3337
+
3338
+ attr_accessor unit_amount: String
3339
+
3340
+ def initialize: (
3341
+ dimension_values: ::Array[String],
3342
+ tier_lower_bound: String,
3343
+ unit_amount: String
3344
+ ) -> void
3345
+
3346
+ def to_hash: -> {
3347
+ dimension_values: ::Array[String],
3348
+ tier_lower_bound: String,
3349
+ unit_amount: String
3350
+ }
3351
+ end
3352
+ end
3353
+ end
3354
+
2979
3355
  type matrix_with_threshold_discounts =
2980
3356
  {
2981
3357
  cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence,
@@ -254,6 +254,7 @@ module Orb
254
254
  | Orb::NewFloatingPackageWithAllocationPrice
255
255
  | Orb::NewFloatingUnitWithPercentPrice
256
256
  | Orb::NewFloatingMatrixWithAllocationPrice
257
+ | Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation
257
258
  | Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts
258
259
  | Orb::NewFloatingTieredWithProrationPrice
259
260
  | Orb::NewFloatingUnitWithProrationPrice
@@ -633,6 +634,188 @@ module Orb
633
634
  end
634
635
  end
635
636
 
637
+ type tiered_matrix_with_allocation =
638
+ {
639
+ cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::cadence,
640
+ currency: String,
641
+ item_id: String,
642
+ model_type: :tiered_matrix_with_allocation,
643
+ name: String,
644
+ tiered_matrix_with_allocation_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
645
+ billable_metric_id: String?,
646
+ billed_in_advance: bool?,
647
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
648
+ conversion_rate: Float?,
649
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
650
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
651
+ external_price_id: String?,
652
+ fixed_price_quantity: Float?,
653
+ invoice_grouping_key: String?,
654
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
655
+ license_type_id: String?,
656
+ metadata: ::Hash[Symbol, String?]?
657
+ }
658
+
659
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
660
+ attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::cadence
661
+
662
+ attr_accessor currency: String
663
+
664
+ attr_accessor item_id: String
665
+
666
+ attr_accessor model_type: :tiered_matrix_with_allocation
667
+
668
+ attr_accessor name: String
669
+
670
+ attr_accessor tiered_matrix_with_allocation_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
671
+
672
+ attr_accessor billable_metric_id: String?
673
+
674
+ attr_accessor billed_in_advance: bool?
675
+
676
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
677
+
678
+ attr_accessor conversion_rate: Float?
679
+
680
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
681
+
682
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
683
+
684
+ attr_accessor external_price_id: String?
685
+
686
+ attr_accessor fixed_price_quantity: Float?
687
+
688
+ attr_accessor invoice_grouping_key: String?
689
+
690
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
691
+
692
+ attr_accessor license_type_id: String?
693
+
694
+ attr_accessor metadata: ::Hash[Symbol, String?]?
695
+
696
+ def initialize: (
697
+ cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::cadence,
698
+ currency: String,
699
+ item_id: String,
700
+ name: String,
701
+ tiered_matrix_with_allocation_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
702
+ ?billable_metric_id: String?,
703
+ ?billed_in_advance: bool?,
704
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
705
+ ?conversion_rate: Float?,
706
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
707
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
708
+ ?external_price_id: String?,
709
+ ?fixed_price_quantity: Float?,
710
+ ?invoice_grouping_key: String?,
711
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
712
+ ?license_type_id: String?,
713
+ ?metadata: ::Hash[Symbol, String?]?,
714
+ ?model_type: :tiered_matrix_with_allocation
715
+ ) -> void
716
+
717
+ def to_hash: -> {
718
+ cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::cadence,
719
+ currency: String,
720
+ item_id: String,
721
+ model_type: :tiered_matrix_with_allocation,
722
+ name: String,
723
+ tiered_matrix_with_allocation_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
724
+ billable_metric_id: String?,
725
+ billed_in_advance: bool?,
726
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
727
+ conversion_rate: Float?,
728
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
729
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
730
+ external_price_id: String?,
731
+ fixed_price_quantity: Float?,
732
+ invoice_grouping_key: String?,
733
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
734
+ license_type_id: String?,
735
+ metadata: ::Hash[Symbol, String?]?
736
+ }
737
+
738
+ type cadence =
739
+ :annual
740
+ | :semi_annual
741
+ | :monthly
742
+ | :quarterly
743
+ | :one_time
744
+ | :custom
745
+
746
+ module Cadence
747
+ extend Orb::Internal::Type::Enum
748
+
749
+ ANNUAL: :annual
750
+ SEMI_ANNUAL: :semi_annual
751
+ MONTHLY: :monthly
752
+ QUARTERLY: :quarterly
753
+ ONE_TIME: :one_time
754
+ CUSTOM: :custom
755
+
756
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::cadence]
757
+ end
758
+
759
+ type tiered_matrix_with_allocation_config =
760
+ {
761
+ allocation: String,
762
+ default_unit_amount: String,
763
+ dimensions: ::Array[String],
764
+ tiers: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
765
+ }
766
+
767
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
768
+ attr_accessor allocation: String
769
+
770
+ attr_accessor default_unit_amount: String
771
+
772
+ attr_accessor dimensions: ::Array[String]
773
+
774
+ attr_accessor tiers: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
775
+
776
+ def initialize: (
777
+ allocation: String,
778
+ default_unit_amount: String,
779
+ dimensions: ::Array[String],
780
+ tiers: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
781
+ ) -> void
782
+
783
+ def to_hash: -> {
784
+ allocation: String,
785
+ default_unit_amount: String,
786
+ dimensions: ::Array[String],
787
+ tiers: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
788
+ }
789
+
790
+ type tier =
791
+ {
792
+ dimension_values: ::Array[String],
793
+ tier_lower_bound: String,
794
+ unit_amount: String
795
+ }
796
+
797
+ class Tier < Orb::Internal::Type::BaseModel
798
+ attr_accessor dimension_values: ::Array[String]
799
+
800
+ attr_accessor tier_lower_bound: String
801
+
802
+ attr_accessor unit_amount: String
803
+
804
+ def initialize: (
805
+ dimension_values: ::Array[String],
806
+ tier_lower_bound: String,
807
+ unit_amount: String
808
+ ) -> void
809
+
810
+ def to_hash: -> {
811
+ dimension_values: ::Array[String],
812
+ tier_lower_bound: String,
813
+ unit_amount: String
814
+ }
815
+ end
816
+ end
817
+ end
818
+
636
819
  type matrix_with_threshold_discounts =
637
820
  {
638
821
  cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence,