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
@@ -16,6 +16,7 @@ module Orb
16
16
  | Orb::Price::PackageWithAllocation
17
17
  | Orb::Price::UnitWithPercent
18
18
  | Orb::Price::MatrixWithAllocation
19
+ | Orb::Price::TieredMatrixWithAllocation
19
20
  | Orb::Price::MatrixWithThresholdDiscounts
20
21
  | Orb::Price::TieredWithProration
21
22
  | Orb::Price::UnitWithProration
@@ -4473,6 +4474,337 @@ module Orb
4473
4474
  end
4474
4475
  end
4475
4476
 
4477
+ type tiered_matrix_with_allocation =
4478
+ {
4479
+ id: String,
4480
+ billable_metric: Orb::BillableMetricTiny?,
4481
+ billing_cycle_configuration: Orb::BillingCycleConfiguration,
4482
+ billing_mode: Orb::Models::Price::TieredMatrixWithAllocation::billing_mode,
4483
+ cadence: Orb::Models::Price::TieredMatrixWithAllocation::cadence,
4484
+ composite_price_filters: ::Array[Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter]?,
4485
+ conversion_rate: Float?,
4486
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
4487
+ created_at: Time,
4488
+ credit_allocation: Orb::Allocation?,
4489
+ currency: String,
4490
+ discount: Orb::Models::discount?,
4491
+ external_price_id: String?,
4492
+ fixed_price_quantity: Float?,
4493
+ invoice_grouping_key: String?,
4494
+ invoicing_cycle_configuration: Orb::BillingCycleConfiguration?,
4495
+ item: Orb::ItemSlim,
4496
+ maximum: Orb::Maximum?,
4497
+ maximum_amount: String?,
4498
+ metadata: ::Hash[Symbol, String],
4499
+ minimum: Orb::Minimum?,
4500
+ minimum_amount: String?,
4501
+ model_type: :tiered_matrix_with_allocation,
4502
+ name: String,
4503
+ plan_phase_order: Integer?,
4504
+ price_type: Orb::Models::Price::TieredMatrixWithAllocation::price_type,
4505
+ replaces_price_id: String?,
4506
+ tiered_matrix_with_allocation_config: Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
4507
+ dimensional_price_configuration: Orb::DimensionalPriceConfiguration?,
4508
+ license_type: Orb::Price::TieredMatrixWithAllocation::LicenseType?
4509
+ }
4510
+
4511
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
4512
+ attr_accessor id: String
4513
+
4514
+ attr_accessor billable_metric: Orb::BillableMetricTiny?
4515
+
4516
+ attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration
4517
+
4518
+ attr_accessor billing_mode: Orb::Models::Price::TieredMatrixWithAllocation::billing_mode
4519
+
4520
+ attr_accessor cadence: Orb::Models::Price::TieredMatrixWithAllocation::cadence
4521
+
4522
+ attr_accessor composite_price_filters: ::Array[Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter]?
4523
+
4524
+ attr_accessor conversion_rate: Float?
4525
+
4526
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
4527
+
4528
+ attr_accessor created_at: Time
4529
+
4530
+ attr_accessor credit_allocation: Orb::Allocation?
4531
+
4532
+ attr_accessor currency: String
4533
+
4534
+ attr_accessor discount: Orb::Models::discount?
4535
+
4536
+ attr_accessor external_price_id: String?
4537
+
4538
+ attr_accessor fixed_price_quantity: Float?
4539
+
4540
+ attr_accessor invoice_grouping_key: String?
4541
+
4542
+ attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration?
4543
+
4544
+ attr_accessor item: Orb::ItemSlim
4545
+
4546
+ attr_accessor maximum: Orb::Maximum?
4547
+
4548
+ attr_accessor maximum_amount: String?
4549
+
4550
+ attr_accessor metadata: ::Hash[Symbol, String]
4551
+
4552
+ attr_accessor minimum: Orb::Minimum?
4553
+
4554
+ attr_accessor minimum_amount: String?
4555
+
4556
+ attr_accessor model_type: :tiered_matrix_with_allocation
4557
+
4558
+ attr_accessor name: String
4559
+
4560
+ attr_accessor plan_phase_order: Integer?
4561
+
4562
+ attr_accessor price_type: Orb::Models::Price::TieredMatrixWithAllocation::price_type
4563
+
4564
+ attr_accessor replaces_price_id: String?
4565
+
4566
+ attr_accessor tiered_matrix_with_allocation_config: Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
4567
+
4568
+ attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration?
4569
+
4570
+ attr_accessor license_type: Orb::Price::TieredMatrixWithAllocation::LicenseType?
4571
+
4572
+ def initialize: (
4573
+ id: String,
4574
+ billable_metric: Orb::BillableMetricTiny?,
4575
+ billing_cycle_configuration: Orb::BillingCycleConfiguration,
4576
+ billing_mode: Orb::Models::Price::TieredMatrixWithAllocation::billing_mode,
4577
+ cadence: Orb::Models::Price::TieredMatrixWithAllocation::cadence,
4578
+ composite_price_filters: ::Array[Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter]?,
4579
+ conversion_rate: Float?,
4580
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
4581
+ created_at: Time,
4582
+ credit_allocation: Orb::Allocation?,
4583
+ currency: String,
4584
+ discount: Orb::Models::discount?,
4585
+ external_price_id: String?,
4586
+ fixed_price_quantity: Float?,
4587
+ invoice_grouping_key: String?,
4588
+ invoicing_cycle_configuration: Orb::BillingCycleConfiguration?,
4589
+ item: Orb::ItemSlim,
4590
+ maximum: Orb::Maximum?,
4591
+ maximum_amount: String?,
4592
+ metadata: ::Hash[Symbol, String],
4593
+ minimum: Orb::Minimum?,
4594
+ minimum_amount: String?,
4595
+ name: String,
4596
+ plan_phase_order: Integer?,
4597
+ price_type: Orb::Models::Price::TieredMatrixWithAllocation::price_type,
4598
+ replaces_price_id: String?,
4599
+ tiered_matrix_with_allocation_config: Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
4600
+ ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?,
4601
+ ?license_type: Orb::Price::TieredMatrixWithAllocation::LicenseType?,
4602
+ ?model_type: :tiered_matrix_with_allocation
4603
+ ) -> void
4604
+
4605
+ def to_hash: -> {
4606
+ id: String,
4607
+ billable_metric: Orb::BillableMetricTiny?,
4608
+ billing_cycle_configuration: Orb::BillingCycleConfiguration,
4609
+ billing_mode: Orb::Models::Price::TieredMatrixWithAllocation::billing_mode,
4610
+ cadence: Orb::Models::Price::TieredMatrixWithAllocation::cadence,
4611
+ composite_price_filters: ::Array[Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter]?,
4612
+ conversion_rate: Float?,
4613
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
4614
+ created_at: Time,
4615
+ credit_allocation: Orb::Allocation?,
4616
+ currency: String,
4617
+ discount: Orb::Models::discount?,
4618
+ external_price_id: String?,
4619
+ fixed_price_quantity: Float?,
4620
+ invoice_grouping_key: String?,
4621
+ invoicing_cycle_configuration: Orb::BillingCycleConfiguration?,
4622
+ item: Orb::ItemSlim,
4623
+ maximum: Orb::Maximum?,
4624
+ maximum_amount: String?,
4625
+ metadata: ::Hash[Symbol, String],
4626
+ minimum: Orb::Minimum?,
4627
+ minimum_amount: String?,
4628
+ model_type: :tiered_matrix_with_allocation,
4629
+ name: String,
4630
+ plan_phase_order: Integer?,
4631
+ price_type: Orb::Models::Price::TieredMatrixWithAllocation::price_type,
4632
+ replaces_price_id: String?,
4633
+ tiered_matrix_with_allocation_config: Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
4634
+ dimensional_price_configuration: Orb::DimensionalPriceConfiguration?,
4635
+ license_type: Orb::Price::TieredMatrixWithAllocation::LicenseType?
4636
+ }
4637
+
4638
+ type billing_mode = :in_advance | :in_arrear
4639
+
4640
+ module BillingMode
4641
+ extend Orb::Internal::Type::Enum
4642
+
4643
+ IN_ADVANCE: :in_advance
4644
+ IN_ARREAR: :in_arrear
4645
+
4646
+ def self?.values: -> ::Array[Orb::Models::Price::TieredMatrixWithAllocation::billing_mode]
4647
+ end
4648
+
4649
+ type cadence =
4650
+ :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom
4651
+
4652
+ module Cadence
4653
+ extend Orb::Internal::Type::Enum
4654
+
4655
+ ONE_TIME: :one_time
4656
+ MONTHLY: :monthly
4657
+ QUARTERLY: :quarterly
4658
+ SEMI_ANNUAL: :semi_annual
4659
+ ANNUAL: :annual
4660
+ CUSTOM: :custom
4661
+
4662
+ def self?.values: -> ::Array[Orb::Models::Price::TieredMatrixWithAllocation::cadence]
4663
+ end
4664
+
4665
+ type composite_price_filter =
4666
+ {
4667
+ field: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::field,
4668
+ operator: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::operator,
4669
+ values: ::Array[String]
4670
+ }
4671
+
4672
+ class CompositePriceFilter < Orb::Internal::Type::BaseModel
4673
+ attr_accessor field: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::field
4674
+
4675
+ attr_accessor operator: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::operator
4676
+
4677
+ attr_accessor values: ::Array[String]
4678
+
4679
+ def initialize: (
4680
+ field: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::field,
4681
+ operator: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::operator,
4682
+ values: ::Array[String]
4683
+ ) -> void
4684
+
4685
+ def to_hash: -> {
4686
+ field: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::field,
4687
+ operator: Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::operator,
4688
+ values: ::Array[String]
4689
+ }
4690
+
4691
+ type field =
4692
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
4693
+
4694
+ module Field
4695
+ extend Orb::Internal::Type::Enum
4696
+
4697
+ PRICE_ID: :price_id
4698
+ ITEM_ID: :item_id
4699
+ PRICE_TYPE: :price_type
4700
+ CURRENCY: :currency
4701
+ PRICING_UNIT_ID: :pricing_unit_id
4702
+
4703
+ def self?.values: -> ::Array[Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::field]
4704
+ end
4705
+
4706
+ type operator = :includes | :excludes
4707
+
4708
+ module Operator
4709
+ extend Orb::Internal::Type::Enum
4710
+
4711
+ INCLUDES: :includes
4712
+ EXCLUDES: :excludes
4713
+
4714
+ def self?.values: -> ::Array[Orb::Models::Price::TieredMatrixWithAllocation::CompositePriceFilter::operator]
4715
+ end
4716
+ end
4717
+
4718
+ type price_type = :usage_price | :fixed_price | :composite_price
4719
+
4720
+ module PriceType
4721
+ extend Orb::Internal::Type::Enum
4722
+
4723
+ USAGE_PRICE: :usage_price
4724
+ FIXED_PRICE: :fixed_price
4725
+ COMPOSITE_PRICE: :composite_price
4726
+
4727
+ def self?.values: -> ::Array[Orb::Models::Price::TieredMatrixWithAllocation::price_type]
4728
+ end
4729
+
4730
+ type tiered_matrix_with_allocation_config =
4731
+ {
4732
+ allocation: String,
4733
+ default_unit_amount: String,
4734
+ dimensions: ::Array[String],
4735
+ tiers: ::Array[Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
4736
+ }
4737
+
4738
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
4739
+ attr_accessor allocation: String
4740
+
4741
+ attr_accessor default_unit_amount: String
4742
+
4743
+ attr_accessor dimensions: ::Array[String]
4744
+
4745
+ attr_accessor tiers: ::Array[Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
4746
+
4747
+ def initialize: (
4748
+ allocation: String,
4749
+ default_unit_amount: String,
4750
+ dimensions: ::Array[String],
4751
+ tiers: ::Array[Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
4752
+ ) -> void
4753
+
4754
+ def to_hash: -> {
4755
+ allocation: String,
4756
+ default_unit_amount: String,
4757
+ dimensions: ::Array[String],
4758
+ tiers: ::Array[Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
4759
+ }
4760
+
4761
+ type tier =
4762
+ {
4763
+ dimension_values: ::Array[String],
4764
+ tier_lower_bound: String,
4765
+ unit_amount: String
4766
+ }
4767
+
4768
+ class Tier < Orb::Internal::Type::BaseModel
4769
+ attr_accessor dimension_values: ::Array[String]
4770
+
4771
+ attr_accessor tier_lower_bound: String
4772
+
4773
+ attr_accessor unit_amount: String
4774
+
4775
+ def initialize: (
4776
+ dimension_values: ::Array[String],
4777
+ tier_lower_bound: String,
4778
+ unit_amount: String
4779
+ ) -> void
4780
+
4781
+ def to_hash: -> {
4782
+ dimension_values: ::Array[String],
4783
+ tier_lower_bound: String,
4784
+ unit_amount: String
4785
+ }
4786
+ end
4787
+ end
4788
+
4789
+ type license_type = { id: String, grouping_key: String, name: String }
4790
+
4791
+ class LicenseType < Orb::Internal::Type::BaseModel
4792
+ attr_accessor id: String
4793
+
4794
+ attr_accessor grouping_key: String
4795
+
4796
+ attr_accessor name: String
4797
+
4798
+ def initialize: (
4799
+ id: String,
4800
+ grouping_key: String,
4801
+ name: String
4802
+ ) -> void
4803
+
4804
+ def to_hash: -> { id: String, grouping_key: String, name: String }
4805
+ end
4806
+ end
4807
+
4476
4808
  type matrix_with_threshold_discounts =
4477
4809
  {
4478
4810
  id: String,
@@ -36,6 +36,7 @@ module Orb
36
36
  | Orb::NewFloatingPackageWithAllocationPrice
37
37
  | Orb::NewFloatingUnitWithPercentPrice
38
38
  | Orb::NewFloatingMatrixWithAllocationPrice
39
+ | Orb::PriceCreateParams::Body::TieredMatrixWithAllocation
39
40
  | Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts
40
41
  | Orb::NewFloatingTieredWithProrationPrice
41
42
  | Orb::NewFloatingUnitWithProrationPrice
@@ -402,6 +403,183 @@ module Orb
402
403
  end
403
404
  end
404
405
 
406
+ type tiered_matrix_with_allocation =
407
+ {
408
+ cadence: Orb::Models::PriceCreateParams::Body::TieredMatrixWithAllocation::cadence,
409
+ currency: String,
410
+ item_id: String,
411
+ model_type: :tiered_matrix_with_allocation,
412
+ name: String,
413
+ tiered_matrix_with_allocation_config: Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
414
+ billable_metric_id: String?,
415
+ billed_in_advance: bool?,
416
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
417
+ conversion_rate: Float?,
418
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
419
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
420
+ external_price_id: String?,
421
+ fixed_price_quantity: Float?,
422
+ invoice_grouping_key: String?,
423
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
424
+ license_type_id: String?,
425
+ metadata: ::Hash[Symbol, String?]?
426
+ }
427
+
428
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
429
+ attr_accessor cadence: Orb::Models::PriceCreateParams::Body::TieredMatrixWithAllocation::cadence
430
+
431
+ attr_accessor currency: String
432
+
433
+ attr_accessor item_id: String
434
+
435
+ attr_accessor model_type: :tiered_matrix_with_allocation
436
+
437
+ attr_accessor name: String
438
+
439
+ attr_accessor tiered_matrix_with_allocation_config: Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
440
+
441
+ attr_accessor billable_metric_id: String?
442
+
443
+ attr_accessor billed_in_advance: bool?
444
+
445
+ attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration?
446
+
447
+ attr_accessor conversion_rate: Float?
448
+
449
+ attr_accessor conversion_rate_config: Orb::Models::conversion_rate_config?
450
+
451
+ attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?
452
+
453
+ attr_accessor external_price_id: String?
454
+
455
+ attr_accessor fixed_price_quantity: Float?
456
+
457
+ attr_accessor invoice_grouping_key: String?
458
+
459
+ attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?
460
+
461
+ attr_accessor license_type_id: String?
462
+
463
+ attr_accessor metadata: ::Hash[Symbol, String?]?
464
+
465
+ def initialize: (
466
+ cadence: Orb::Models::PriceCreateParams::Body::TieredMatrixWithAllocation::cadence,
467
+ currency: String,
468
+ item_id: String,
469
+ name: String,
470
+ tiered_matrix_with_allocation_config: Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
471
+ ?billable_metric_id: String?,
472
+ ?billed_in_advance: bool?,
473
+ ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
474
+ ?conversion_rate: Float?,
475
+ ?conversion_rate_config: Orb::Models::conversion_rate_config?,
476
+ ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
477
+ ?external_price_id: String?,
478
+ ?fixed_price_quantity: Float?,
479
+ ?invoice_grouping_key: String?,
480
+ ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
481
+ ?license_type_id: String?,
482
+ ?metadata: ::Hash[Symbol, String?]?,
483
+ ?model_type: :tiered_matrix_with_allocation
484
+ ) -> void
485
+
486
+ def to_hash: -> {
487
+ cadence: Orb::Models::PriceCreateParams::Body::TieredMatrixWithAllocation::cadence,
488
+ currency: String,
489
+ item_id: String,
490
+ model_type: :tiered_matrix_with_allocation,
491
+ name: String,
492
+ tiered_matrix_with_allocation_config: Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
493
+ billable_metric_id: String?,
494
+ billed_in_advance: bool?,
495
+ billing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
496
+ conversion_rate: Float?,
497
+ conversion_rate_config: Orb::Models::conversion_rate_config?,
498
+ dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?,
499
+ external_price_id: String?,
500
+ fixed_price_quantity: Float?,
501
+ invoice_grouping_key: String?,
502
+ invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?,
503
+ license_type_id: String?,
504
+ metadata: ::Hash[Symbol, String?]?
505
+ }
506
+
507
+ type cadence =
508
+ :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom
509
+
510
+ module Cadence
511
+ extend Orb::Internal::Type::Enum
512
+
513
+ ANNUAL: :annual
514
+ SEMI_ANNUAL: :semi_annual
515
+ MONTHLY: :monthly
516
+ QUARTERLY: :quarterly
517
+ ONE_TIME: :one_time
518
+ CUSTOM: :custom
519
+
520
+ def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::TieredMatrixWithAllocation::cadence]
521
+ end
522
+
523
+ type tiered_matrix_with_allocation_config =
524
+ {
525
+ allocation: String,
526
+ default_unit_amount: String,
527
+ dimensions: ::Array[String],
528
+ tiers: ::Array[Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
529
+ }
530
+
531
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
532
+ attr_accessor allocation: String
533
+
534
+ attr_accessor default_unit_amount: String
535
+
536
+ attr_accessor dimensions: ::Array[String]
537
+
538
+ attr_accessor tiers: ::Array[Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
539
+
540
+ def initialize: (
541
+ allocation: String,
542
+ default_unit_amount: String,
543
+ dimensions: ::Array[String],
544
+ tiers: ::Array[Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
545
+ ) -> void
546
+
547
+ def to_hash: -> {
548
+ allocation: String,
549
+ default_unit_amount: String,
550
+ dimensions: ::Array[String],
551
+ tiers: ::Array[Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier]
552
+ }
553
+
554
+ type tier =
555
+ {
556
+ dimension_values: ::Array[String],
557
+ tier_lower_bound: String,
558
+ unit_amount: String
559
+ }
560
+
561
+ class Tier < Orb::Internal::Type::BaseModel
562
+ attr_accessor dimension_values: ::Array[String]
563
+
564
+ attr_accessor tier_lower_bound: String
565
+
566
+ attr_accessor unit_amount: String
567
+
568
+ def initialize: (
569
+ dimension_values: ::Array[String],
570
+ tier_lower_bound: String,
571
+ unit_amount: String
572
+ ) -> void
573
+
574
+ def to_hash: -> {
575
+ dimension_values: ::Array[String],
576
+ tier_lower_bound: String,
577
+ unit_amount: String
578
+ }
579
+ end
580
+ end
581
+ end
582
+
405
583
  type matrix_with_threshold_discounts =
406
584
  {
407
585
  cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence,