orb-billing 0.10.0 → 0.12.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/union.rb +3 -8
  5. data/lib/orb/internal/util.rb +8 -9
  6. data/lib/orb/models/amount_discount.rb +65 -1
  7. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
  8. data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
  9. data/lib/orb/models/percentage_discount.rb +65 -1
  10. data/lib/orb/models/subscription_create_params.rb +1435 -15
  11. data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
  12. data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
  13. data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
  14. data/lib/orb/models/trial_discount.rb +65 -1
  15. data/lib/orb/models/usage_discount.rb +65 -1
  16. data/lib/orb/resources/subscriptions.rb +6 -4
  17. data/lib/orb/version.rb +1 -1
  18. data/rbi/orb/internal/util.rbi +2 -0
  19. data/rbi/orb/models/amount_discount.rbi +117 -0
  20. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
  21. data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
  22. data/rbi/orb/models/percentage_discount.rbi +131 -0
  23. data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
  24. data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
  25. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
  26. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
  27. data/rbi/orb/models/trial_discount.rbi +109 -0
  28. data/rbi/orb/models/usage_discount.rbi +109 -0
  29. data/rbi/orb/resources/subscriptions.rbi +7 -4
  30. data/sig/orb/models/amount_discount.rbs +58 -0
  31. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
  32. data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
  33. data/sig/orb/models/percentage_discount.rbs +58 -0
  34. data/sig/orb/models/subscription_create_params.rbs +1130 -20
  35. data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
  36. data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
  37. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
  38. data/sig/orb/models/trial_discount.rbs +58 -0
  39. data/sig/orb/models/usage_discount.rbs +58 -0
  40. data/sig/orb/resources/subscriptions.rbs +2 -1
  41. metadata +2 -2
@@ -16438,10 +16438,40 @@ module Orb
16438
16438
  sig { returns(Float) }
16439
16439
  attr_accessor :percentage_discount
16440
16440
 
16441
+ # If set, the adjustment will apply to every price on the subscription.
16442
+ sig do
16443
+ returns(
16444
+ T.nilable(
16445
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll::OrBoolean
16446
+ )
16447
+ )
16448
+ end
16449
+ attr_accessor :applies_to_all
16450
+
16451
+ # The set of item IDs to which this adjustment applies.
16452
+ sig { returns(T.nilable(T::Array[String])) }
16453
+ attr_accessor :applies_to_item_ids
16454
+
16441
16455
  # The set of price IDs to which this adjustment applies.
16442
16456
  sig { returns(T.nilable(T::Array[String])) }
16443
16457
  attr_accessor :applies_to_price_ids
16444
16458
 
16459
+ # If set, only prices in the specified currency will have the adjustment applied.
16460
+ sig { returns(T.nilable(String)) }
16461
+ attr_accessor :currency
16462
+
16463
+ # A list of filters that determine which prices this adjustment will apply to.
16464
+ sig do
16465
+ returns(
16466
+ T.nilable(
16467
+ T::Array[
16468
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter
16469
+ ]
16470
+ )
16471
+ )
16472
+ end
16473
+ attr_accessor :filters
16474
+
16445
16475
  # When false, this adjustment will be applied to a single price. Otherwise, it
16446
16476
  # will be applied at the invoice level, possibly to multiple prices.
16447
16477
  sig { returns(T.nilable(T::Boolean)) }
@@ -16450,21 +16480,57 @@ module Orb
16450
16480
  sig { params(is_invoice_level: T::Boolean).void }
16451
16481
  attr_writer :is_invoice_level
16452
16482
 
16483
+ # If set, only prices of the specified type will have the adjustment applied.
16484
+ sig do
16485
+ returns(
16486
+ T.nilable(
16487
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::OrSymbol
16488
+ )
16489
+ )
16490
+ end
16491
+ attr_accessor :price_type
16492
+
16453
16493
  sig do
16454
16494
  params(
16455
16495
  percentage_discount: Float,
16496
+ applies_to_all:
16497
+ T.nilable(
16498
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll::OrBoolean
16499
+ ),
16500
+ applies_to_item_ids: T.nilable(T::Array[String]),
16456
16501
  applies_to_price_ids: T.nilable(T::Array[String]),
16502
+ currency: T.nilable(String),
16503
+ filters:
16504
+ T.nilable(
16505
+ T::Array[
16506
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::OrHash
16507
+ ]
16508
+ ),
16457
16509
  is_invoice_level: T::Boolean,
16510
+ price_type:
16511
+ T.nilable(
16512
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::OrSymbol
16513
+ ),
16458
16514
  adjustment_type: Symbol
16459
16515
  ).returns(T.attached_class)
16460
16516
  end
16461
16517
  def self.new(
16462
16518
  percentage_discount:,
16519
+ # If set, the adjustment will apply to every price on the subscription.
16520
+ applies_to_all: nil,
16521
+ # The set of item IDs to which this adjustment applies.
16522
+ applies_to_item_ids: nil,
16463
16523
  # The set of price IDs to which this adjustment applies.
16464
16524
  applies_to_price_ids: nil,
16525
+ # If set, only prices in the specified currency will have the adjustment applied.
16526
+ currency: nil,
16527
+ # A list of filters that determine which prices this adjustment will apply to.
16528
+ filters: nil,
16465
16529
  # When false, this adjustment will be applied to a single price. Otherwise, it
16466
16530
  # will be applied at the invoice level, possibly to multiple prices.
16467
16531
  is_invoice_level: nil,
16532
+ # If set, only prices of the specified type will have the adjustment applied.
16533
+ price_type: nil,
16468
16534
  adjustment_type: :percentage_discount
16469
16535
  )
16470
16536
  end
@@ -16474,13 +16540,257 @@ module Orb
16474
16540
  {
16475
16541
  adjustment_type: Symbol,
16476
16542
  percentage_discount: Float,
16543
+ applies_to_all:
16544
+ T.nilable(
16545
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll::OrBoolean
16546
+ ),
16547
+ applies_to_item_ids: T.nilable(T::Array[String]),
16477
16548
  applies_to_price_ids: T.nilable(T::Array[String]),
16478
- is_invoice_level: T::Boolean
16549
+ currency: T.nilable(String),
16550
+ filters:
16551
+ T.nilable(
16552
+ T::Array[
16553
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter
16554
+ ]
16555
+ ),
16556
+ is_invoice_level: T::Boolean,
16557
+ price_type:
16558
+ T.nilable(
16559
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::OrSymbol
16560
+ )
16479
16561
  }
16480
16562
  )
16481
16563
  end
16482
16564
  def to_hash
16483
16565
  end
16566
+
16567
+ # If set, the adjustment will apply to every price on the subscription.
16568
+ module AppliesToAll
16569
+ extend Orb::Internal::Type::Enum
16570
+
16571
+ TaggedBoolean =
16572
+ T.type_alias do
16573
+ T.all(
16574
+ T::Boolean,
16575
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll
16576
+ )
16577
+ end
16578
+ OrBoolean = T.type_alias { T::Boolean }
16579
+
16580
+ TRUE =
16581
+ T.let(
16582
+ true,
16583
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll::TaggedBoolean
16584
+ )
16585
+
16586
+ sig do
16587
+ override.returns(
16588
+ T::Array[
16589
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll::TaggedBoolean
16590
+ ]
16591
+ )
16592
+ end
16593
+ def self.values
16594
+ end
16595
+ end
16596
+
16597
+ class Filter < Orb::Internal::Type::BaseModel
16598
+ OrHash =
16599
+ T.type_alias do
16600
+ T.any(
16601
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter,
16602
+ Orb::Internal::AnyHash
16603
+ )
16604
+ end
16605
+
16606
+ # The property of the price to filter on.
16607
+ sig do
16608
+ returns(
16609
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::OrSymbol
16610
+ )
16611
+ end
16612
+ attr_accessor :field
16613
+
16614
+ # Should prices that match the filter be included or excluded.
16615
+ sig do
16616
+ returns(
16617
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol
16618
+ )
16619
+ end
16620
+ attr_accessor :operator
16621
+
16622
+ # The IDs or values that match this filter.
16623
+ sig { returns(T::Array[String]) }
16624
+ attr_accessor :values
16625
+
16626
+ sig do
16627
+ params(
16628
+ field:
16629
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
16630
+ operator:
16631
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
16632
+ values: T::Array[String]
16633
+ ).returns(T.attached_class)
16634
+ end
16635
+ def self.new(
16636
+ # The property of the price to filter on.
16637
+ field:,
16638
+ # Should prices that match the filter be included or excluded.
16639
+ operator:,
16640
+ # The IDs or values that match this filter.
16641
+ values:
16642
+ )
16643
+ end
16644
+
16645
+ sig do
16646
+ override.returns(
16647
+ {
16648
+ field:
16649
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
16650
+ operator:
16651
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
16652
+ values: T::Array[String]
16653
+ }
16654
+ )
16655
+ end
16656
+ def to_hash
16657
+ end
16658
+
16659
+ # The property of the price to filter on.
16660
+ module Field
16661
+ extend Orb::Internal::Type::Enum
16662
+
16663
+ TaggedSymbol =
16664
+ T.type_alias do
16665
+ T.all(
16666
+ Symbol,
16667
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field
16668
+ )
16669
+ end
16670
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
16671
+
16672
+ PRICE_ID =
16673
+ T.let(
16674
+ :price_id,
16675
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
16676
+ )
16677
+ ITEM_ID =
16678
+ T.let(
16679
+ :item_id,
16680
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
16681
+ )
16682
+ PRICE_TYPE =
16683
+ T.let(
16684
+ :price_type,
16685
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
16686
+ )
16687
+ CURRENCY =
16688
+ T.let(
16689
+ :currency,
16690
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
16691
+ )
16692
+ PRICING_UNIT_ID =
16693
+ T.let(
16694
+ :pricing_unit_id,
16695
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
16696
+ )
16697
+
16698
+ sig do
16699
+ override.returns(
16700
+ T::Array[
16701
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
16702
+ ]
16703
+ )
16704
+ end
16705
+ def self.values
16706
+ end
16707
+ end
16708
+
16709
+ # Should prices that match the filter be included or excluded.
16710
+ module Operator
16711
+ extend Orb::Internal::Type::Enum
16712
+
16713
+ TaggedSymbol =
16714
+ T.type_alias do
16715
+ T.all(
16716
+ Symbol,
16717
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator
16718
+ )
16719
+ end
16720
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
16721
+
16722
+ INCLUDES =
16723
+ T.let(
16724
+ :includes,
16725
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
16726
+ )
16727
+ EXCLUDES =
16728
+ T.let(
16729
+ :excludes,
16730
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
16731
+ )
16732
+
16733
+ sig do
16734
+ override.returns(
16735
+ T::Array[
16736
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
16737
+ ]
16738
+ )
16739
+ end
16740
+ def self.values
16741
+ end
16742
+ end
16743
+ end
16744
+
16745
+ # If set, only prices of the specified type will have the adjustment applied.
16746
+ module PriceType
16747
+ extend Orb::Internal::Type::Enum
16748
+
16749
+ TaggedSymbol =
16750
+ T.type_alias do
16751
+ T.all(
16752
+ Symbol,
16753
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType
16754
+ )
16755
+ end
16756
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
16757
+
16758
+ USAGE =
16759
+ T.let(
16760
+ :usage,
16761
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::TaggedSymbol
16762
+ )
16763
+ FIXED_IN_ADVANCE =
16764
+ T.let(
16765
+ :fixed_in_advance,
16766
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::TaggedSymbol
16767
+ )
16768
+ FIXED_IN_ARREARS =
16769
+ T.let(
16770
+ :fixed_in_arrears,
16771
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::TaggedSymbol
16772
+ )
16773
+ FIXED =
16774
+ T.let(
16775
+ :fixed,
16776
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::TaggedSymbol
16777
+ )
16778
+ IN_ARREARS =
16779
+ T.let(
16780
+ :in_arrears,
16781
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::TaggedSymbol
16782
+ )
16783
+
16784
+ sig do
16785
+ override.returns(
16786
+ T::Array[
16787
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType::TaggedSymbol
16788
+ ]
16789
+ )
16790
+ end
16791
+ def self.values
16792
+ end
16793
+ end
16484
16794
  end
16485
16795
 
16486
16796
  class UsageDiscount < Orb::Internal::Type::BaseModel
@@ -16498,10 +16808,40 @@ module Orb
16498
16808
  sig { returns(Float) }
16499
16809
  attr_accessor :usage_discount
16500
16810
 
16811
+ # If set, the adjustment will apply to every price on the subscription.
16812
+ sig do
16813
+ returns(
16814
+ T.nilable(
16815
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll::OrBoolean
16816
+ )
16817
+ )
16818
+ end
16819
+ attr_accessor :applies_to_all
16820
+
16821
+ # The set of item IDs to which this adjustment applies.
16822
+ sig { returns(T.nilable(T::Array[String])) }
16823
+ attr_accessor :applies_to_item_ids
16824
+
16501
16825
  # The set of price IDs to which this adjustment applies.
16502
16826
  sig { returns(T.nilable(T::Array[String])) }
16503
16827
  attr_accessor :applies_to_price_ids
16504
16828
 
16829
+ # If set, only prices in the specified currency will have the adjustment applied.
16830
+ sig { returns(T.nilable(String)) }
16831
+ attr_accessor :currency
16832
+
16833
+ # A list of filters that determine which prices this adjustment will apply to.
16834
+ sig do
16835
+ returns(
16836
+ T.nilable(
16837
+ T::Array[
16838
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter
16839
+ ]
16840
+ )
16841
+ )
16842
+ end
16843
+ attr_accessor :filters
16844
+
16505
16845
  # When false, this adjustment will be applied to a single price. Otherwise, it
16506
16846
  # will be applied at the invoice level, possibly to multiple prices.
16507
16847
  sig { returns(T.nilable(T::Boolean)) }
@@ -16510,21 +16850,57 @@ module Orb
16510
16850
  sig { params(is_invoice_level: T::Boolean).void }
16511
16851
  attr_writer :is_invoice_level
16512
16852
 
16853
+ # If set, only prices of the specified type will have the adjustment applied.
16854
+ sig do
16855
+ returns(
16856
+ T.nilable(
16857
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::OrSymbol
16858
+ )
16859
+ )
16860
+ end
16861
+ attr_accessor :price_type
16862
+
16513
16863
  sig do
16514
16864
  params(
16515
16865
  usage_discount: Float,
16866
+ applies_to_all:
16867
+ T.nilable(
16868
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll::OrBoolean
16869
+ ),
16870
+ applies_to_item_ids: T.nilable(T::Array[String]),
16516
16871
  applies_to_price_ids: T.nilable(T::Array[String]),
16872
+ currency: T.nilable(String),
16873
+ filters:
16874
+ T.nilable(
16875
+ T::Array[
16876
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::OrHash
16877
+ ]
16878
+ ),
16517
16879
  is_invoice_level: T::Boolean,
16880
+ price_type:
16881
+ T.nilable(
16882
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::OrSymbol
16883
+ ),
16518
16884
  adjustment_type: Symbol
16519
16885
  ).returns(T.attached_class)
16520
16886
  end
16521
16887
  def self.new(
16522
16888
  usage_discount:,
16889
+ # If set, the adjustment will apply to every price on the subscription.
16890
+ applies_to_all: nil,
16891
+ # The set of item IDs to which this adjustment applies.
16892
+ applies_to_item_ids: nil,
16523
16893
  # The set of price IDs to which this adjustment applies.
16524
16894
  applies_to_price_ids: nil,
16895
+ # If set, only prices in the specified currency will have the adjustment applied.
16896
+ currency: nil,
16897
+ # A list of filters that determine which prices this adjustment will apply to.
16898
+ filters: nil,
16525
16899
  # When false, this adjustment will be applied to a single price. Otherwise, it
16526
16900
  # will be applied at the invoice level, possibly to multiple prices.
16527
16901
  is_invoice_level: nil,
16902
+ # If set, only prices of the specified type will have the adjustment applied.
16903
+ price_type: nil,
16528
16904
  adjustment_type: :usage_discount
16529
16905
  )
16530
16906
  end
@@ -16534,33 +16910,307 @@ module Orb
16534
16910
  {
16535
16911
  adjustment_type: Symbol,
16536
16912
  usage_discount: Float,
16913
+ applies_to_all:
16914
+ T.nilable(
16915
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll::OrBoolean
16916
+ ),
16917
+ applies_to_item_ids: T.nilable(T::Array[String]),
16537
16918
  applies_to_price_ids: T.nilable(T::Array[String]),
16538
- is_invoice_level: T::Boolean
16919
+ currency: T.nilable(String),
16920
+ filters:
16921
+ T.nilable(
16922
+ T::Array[
16923
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter
16924
+ ]
16925
+ ),
16926
+ is_invoice_level: T::Boolean,
16927
+ price_type:
16928
+ T.nilable(
16929
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::OrSymbol
16930
+ )
16539
16931
  }
16540
16932
  )
16541
16933
  end
16542
16934
  def to_hash
16543
16935
  end
16544
- end
16545
-
16546
- class AmountDiscount < Orb::Internal::Type::BaseModel
16547
- OrHash =
16548
- T.type_alias do
16549
- T.any(
16550
- Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount,
16551
- Orb::Internal::AnyHash
16552
- )
16553
- end
16554
16936
 
16555
- sig { returns(Symbol) }
16556
- attr_accessor :adjustment_type
16937
+ # If set, the adjustment will apply to every price on the subscription.
16938
+ module AppliesToAll
16939
+ extend Orb::Internal::Type::Enum
16557
16940
 
16558
- sig { returns(String) }
16559
- attr_accessor :amount_discount
16941
+ TaggedBoolean =
16942
+ T.type_alias do
16943
+ T.all(
16944
+ T::Boolean,
16945
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll
16946
+ )
16947
+ end
16948
+ OrBoolean = T.type_alias { T::Boolean }
16560
16949
 
16561
- # The set of price IDs to which this adjustment applies.
16562
- sig { returns(T.nilable(T::Array[String])) }
16563
- attr_accessor :applies_to_price_ids
16950
+ TRUE =
16951
+ T.let(
16952
+ true,
16953
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll::TaggedBoolean
16954
+ )
16955
+
16956
+ sig do
16957
+ override.returns(
16958
+ T::Array[
16959
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll::TaggedBoolean
16960
+ ]
16961
+ )
16962
+ end
16963
+ def self.values
16964
+ end
16965
+ end
16966
+
16967
+ class Filter < Orb::Internal::Type::BaseModel
16968
+ OrHash =
16969
+ T.type_alias do
16970
+ T.any(
16971
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter,
16972
+ Orb::Internal::AnyHash
16973
+ )
16974
+ end
16975
+
16976
+ # The property of the price to filter on.
16977
+ sig do
16978
+ returns(
16979
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::OrSymbol
16980
+ )
16981
+ end
16982
+ attr_accessor :field
16983
+
16984
+ # Should prices that match the filter be included or excluded.
16985
+ sig do
16986
+ returns(
16987
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator::OrSymbol
16988
+ )
16989
+ end
16990
+ attr_accessor :operator
16991
+
16992
+ # The IDs or values that match this filter.
16993
+ sig { returns(T::Array[String]) }
16994
+ attr_accessor :values
16995
+
16996
+ sig do
16997
+ params(
16998
+ field:
16999
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
17000
+ operator:
17001
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
17002
+ values: T::Array[String]
17003
+ ).returns(T.attached_class)
17004
+ end
17005
+ def self.new(
17006
+ # The property of the price to filter on.
17007
+ field:,
17008
+ # Should prices that match the filter be included or excluded.
17009
+ operator:,
17010
+ # The IDs or values that match this filter.
17011
+ values:
17012
+ )
17013
+ end
17014
+
17015
+ sig do
17016
+ override.returns(
17017
+ {
17018
+ field:
17019
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
17020
+ operator:
17021
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
17022
+ values: T::Array[String]
17023
+ }
17024
+ )
17025
+ end
17026
+ def to_hash
17027
+ end
17028
+
17029
+ # The property of the price to filter on.
17030
+ module Field
17031
+ extend Orb::Internal::Type::Enum
17032
+
17033
+ TaggedSymbol =
17034
+ T.type_alias do
17035
+ T.all(
17036
+ Symbol,
17037
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field
17038
+ )
17039
+ end
17040
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17041
+
17042
+ PRICE_ID =
17043
+ T.let(
17044
+ :price_id,
17045
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
17046
+ )
17047
+ ITEM_ID =
17048
+ T.let(
17049
+ :item_id,
17050
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
17051
+ )
17052
+ PRICE_TYPE =
17053
+ T.let(
17054
+ :price_type,
17055
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
17056
+ )
17057
+ CURRENCY =
17058
+ T.let(
17059
+ :currency,
17060
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
17061
+ )
17062
+ PRICING_UNIT_ID =
17063
+ T.let(
17064
+ :pricing_unit_id,
17065
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
17066
+ )
17067
+
17068
+ sig do
17069
+ override.returns(
17070
+ T::Array[
17071
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
17072
+ ]
17073
+ )
17074
+ end
17075
+ def self.values
17076
+ end
17077
+ end
17078
+
17079
+ # Should prices that match the filter be included or excluded.
17080
+ module Operator
17081
+ extend Orb::Internal::Type::Enum
17082
+
17083
+ TaggedSymbol =
17084
+ T.type_alias do
17085
+ T.all(
17086
+ Symbol,
17087
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator
17088
+ )
17089
+ end
17090
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17091
+
17092
+ INCLUDES =
17093
+ T.let(
17094
+ :includes,
17095
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
17096
+ )
17097
+ EXCLUDES =
17098
+ T.let(
17099
+ :excludes,
17100
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
17101
+ )
17102
+
17103
+ sig do
17104
+ override.returns(
17105
+ T::Array[
17106
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
17107
+ ]
17108
+ )
17109
+ end
17110
+ def self.values
17111
+ end
17112
+ end
17113
+ end
17114
+
17115
+ # If set, only prices of the specified type will have the adjustment applied.
17116
+ module PriceType
17117
+ extend Orb::Internal::Type::Enum
17118
+
17119
+ TaggedSymbol =
17120
+ T.type_alias do
17121
+ T.all(
17122
+ Symbol,
17123
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType
17124
+ )
17125
+ end
17126
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17127
+
17128
+ USAGE =
17129
+ T.let(
17130
+ :usage,
17131
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::TaggedSymbol
17132
+ )
17133
+ FIXED_IN_ADVANCE =
17134
+ T.let(
17135
+ :fixed_in_advance,
17136
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::TaggedSymbol
17137
+ )
17138
+ FIXED_IN_ARREARS =
17139
+ T.let(
17140
+ :fixed_in_arrears,
17141
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::TaggedSymbol
17142
+ )
17143
+ FIXED =
17144
+ T.let(
17145
+ :fixed,
17146
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::TaggedSymbol
17147
+ )
17148
+ IN_ARREARS =
17149
+ T.let(
17150
+ :in_arrears,
17151
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::TaggedSymbol
17152
+ )
17153
+
17154
+ sig do
17155
+ override.returns(
17156
+ T::Array[
17157
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType::TaggedSymbol
17158
+ ]
17159
+ )
17160
+ end
17161
+ def self.values
17162
+ end
17163
+ end
17164
+ end
17165
+
17166
+ class AmountDiscount < Orb::Internal::Type::BaseModel
17167
+ OrHash =
17168
+ T.type_alias do
17169
+ T.any(
17170
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount,
17171
+ Orb::Internal::AnyHash
17172
+ )
17173
+ end
17174
+
17175
+ sig { returns(Symbol) }
17176
+ attr_accessor :adjustment_type
17177
+
17178
+ sig { returns(String) }
17179
+ attr_accessor :amount_discount
17180
+
17181
+ # If set, the adjustment will apply to every price on the subscription.
17182
+ sig do
17183
+ returns(
17184
+ T.nilable(
17185
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll::OrBoolean
17186
+ )
17187
+ )
17188
+ end
17189
+ attr_accessor :applies_to_all
17190
+
17191
+ # The set of item IDs to which this adjustment applies.
17192
+ sig { returns(T.nilable(T::Array[String])) }
17193
+ attr_accessor :applies_to_item_ids
17194
+
17195
+ # The set of price IDs to which this adjustment applies.
17196
+ sig { returns(T.nilable(T::Array[String])) }
17197
+ attr_accessor :applies_to_price_ids
17198
+
17199
+ # If set, only prices in the specified currency will have the adjustment applied.
17200
+ sig { returns(T.nilable(String)) }
17201
+ attr_accessor :currency
17202
+
17203
+ # A list of filters that determine which prices this adjustment will apply to.
17204
+ sig do
17205
+ returns(
17206
+ T.nilable(
17207
+ T::Array[
17208
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter
17209
+ ]
17210
+ )
17211
+ )
17212
+ end
17213
+ attr_accessor :filters
16564
17214
 
16565
17215
  # When false, this adjustment will be applied to a single price. Otherwise, it
16566
17216
  # will be applied at the invoice level, possibly to multiple prices.
@@ -16570,21 +17220,57 @@ module Orb
16570
17220
  sig { params(is_invoice_level: T::Boolean).void }
16571
17221
  attr_writer :is_invoice_level
16572
17222
 
17223
+ # If set, only prices of the specified type will have the adjustment applied.
17224
+ sig do
17225
+ returns(
17226
+ T.nilable(
17227
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::OrSymbol
17228
+ )
17229
+ )
17230
+ end
17231
+ attr_accessor :price_type
17232
+
16573
17233
  sig do
16574
17234
  params(
16575
17235
  amount_discount: String,
17236
+ applies_to_all:
17237
+ T.nilable(
17238
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll::OrBoolean
17239
+ ),
17240
+ applies_to_item_ids: T.nilable(T::Array[String]),
16576
17241
  applies_to_price_ids: T.nilable(T::Array[String]),
17242
+ currency: T.nilable(String),
17243
+ filters:
17244
+ T.nilable(
17245
+ T::Array[
17246
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::OrHash
17247
+ ]
17248
+ ),
16577
17249
  is_invoice_level: T::Boolean,
17250
+ price_type:
17251
+ T.nilable(
17252
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::OrSymbol
17253
+ ),
16578
17254
  adjustment_type: Symbol
16579
17255
  ).returns(T.attached_class)
16580
17256
  end
16581
17257
  def self.new(
16582
17258
  amount_discount:,
17259
+ # If set, the adjustment will apply to every price on the subscription.
17260
+ applies_to_all: nil,
17261
+ # The set of item IDs to which this adjustment applies.
17262
+ applies_to_item_ids: nil,
16583
17263
  # The set of price IDs to which this adjustment applies.
16584
17264
  applies_to_price_ids: nil,
17265
+ # If set, only prices in the specified currency will have the adjustment applied.
17266
+ currency: nil,
17267
+ # A list of filters that determine which prices this adjustment will apply to.
17268
+ filters: nil,
16585
17269
  # When false, this adjustment will be applied to a single price. Otherwise, it
16586
17270
  # will be applied at the invoice level, possibly to multiple prices.
16587
17271
  is_invoice_level: nil,
17272
+ # If set, only prices of the specified type will have the adjustment applied.
17273
+ price_type: nil,
16588
17274
  adjustment_type: :amount_discount
16589
17275
  )
16590
17276
  end
@@ -16594,20 +17280,642 @@ module Orb
16594
17280
  {
16595
17281
  adjustment_type: Symbol,
16596
17282
  amount_discount: String,
17283
+ applies_to_all:
17284
+ T.nilable(
17285
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll::OrBoolean
17286
+ ),
17287
+ applies_to_item_ids: T.nilable(T::Array[String]),
16597
17288
  applies_to_price_ids: T.nilable(T::Array[String]),
16598
- is_invoice_level: T::Boolean
17289
+ currency: T.nilable(String),
17290
+ filters:
17291
+ T.nilable(
17292
+ T::Array[
17293
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter
17294
+ ]
17295
+ ),
17296
+ is_invoice_level: T::Boolean,
17297
+ price_type:
17298
+ T.nilable(
17299
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::OrSymbol
17300
+ )
16599
17301
  }
16600
17302
  )
16601
17303
  end
16602
17304
  def to_hash
16603
17305
  end
17306
+
17307
+ # If set, the adjustment will apply to every price on the subscription.
17308
+ module AppliesToAll
17309
+ extend Orb::Internal::Type::Enum
17310
+
17311
+ TaggedBoolean =
17312
+ T.type_alias do
17313
+ T.all(
17314
+ T::Boolean,
17315
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll
17316
+ )
17317
+ end
17318
+ OrBoolean = T.type_alias { T::Boolean }
17319
+
17320
+ TRUE =
17321
+ T.let(
17322
+ true,
17323
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll::TaggedBoolean
17324
+ )
17325
+
17326
+ sig do
17327
+ override.returns(
17328
+ T::Array[
17329
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll::TaggedBoolean
17330
+ ]
17331
+ )
17332
+ end
17333
+ def self.values
17334
+ end
17335
+ end
17336
+
17337
+ class Filter < Orb::Internal::Type::BaseModel
17338
+ OrHash =
17339
+ T.type_alias do
17340
+ T.any(
17341
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter,
17342
+ Orb::Internal::AnyHash
17343
+ )
17344
+ end
17345
+
17346
+ # The property of the price to filter on.
17347
+ sig do
17348
+ returns(
17349
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::OrSymbol
17350
+ )
17351
+ end
17352
+ attr_accessor :field
17353
+
17354
+ # Should prices that match the filter be included or excluded.
17355
+ sig do
17356
+ returns(
17357
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator::OrSymbol
17358
+ )
17359
+ end
17360
+ attr_accessor :operator
17361
+
17362
+ # The IDs or values that match this filter.
17363
+ sig { returns(T::Array[String]) }
17364
+ attr_accessor :values
17365
+
17366
+ sig do
17367
+ params(
17368
+ field:
17369
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
17370
+ operator:
17371
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
17372
+ values: T::Array[String]
17373
+ ).returns(T.attached_class)
17374
+ end
17375
+ def self.new(
17376
+ # The property of the price to filter on.
17377
+ field:,
17378
+ # Should prices that match the filter be included or excluded.
17379
+ operator:,
17380
+ # The IDs or values that match this filter.
17381
+ values:
17382
+ )
17383
+ end
17384
+
17385
+ sig do
17386
+ override.returns(
17387
+ {
17388
+ field:
17389
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
17390
+ operator:
17391
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
17392
+ values: T::Array[String]
17393
+ }
17394
+ )
17395
+ end
17396
+ def to_hash
17397
+ end
17398
+
17399
+ # The property of the price to filter on.
17400
+ module Field
17401
+ extend Orb::Internal::Type::Enum
17402
+
17403
+ TaggedSymbol =
17404
+ T.type_alias do
17405
+ T.all(
17406
+ Symbol,
17407
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field
17408
+ )
17409
+ end
17410
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17411
+
17412
+ PRICE_ID =
17413
+ T.let(
17414
+ :price_id,
17415
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
17416
+ )
17417
+ ITEM_ID =
17418
+ T.let(
17419
+ :item_id,
17420
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
17421
+ )
17422
+ PRICE_TYPE =
17423
+ T.let(
17424
+ :price_type,
17425
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
17426
+ )
17427
+ CURRENCY =
17428
+ T.let(
17429
+ :currency,
17430
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
17431
+ )
17432
+ PRICING_UNIT_ID =
17433
+ T.let(
17434
+ :pricing_unit_id,
17435
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
17436
+ )
17437
+
17438
+ sig do
17439
+ override.returns(
17440
+ T::Array[
17441
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
17442
+ ]
17443
+ )
17444
+ end
17445
+ def self.values
17446
+ end
17447
+ end
17448
+
17449
+ # Should prices that match the filter be included or excluded.
17450
+ module Operator
17451
+ extend Orb::Internal::Type::Enum
17452
+
17453
+ TaggedSymbol =
17454
+ T.type_alias do
17455
+ T.all(
17456
+ Symbol,
17457
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator
17458
+ )
17459
+ end
17460
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17461
+
17462
+ INCLUDES =
17463
+ T.let(
17464
+ :includes,
17465
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
17466
+ )
17467
+ EXCLUDES =
17468
+ T.let(
17469
+ :excludes,
17470
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
17471
+ )
17472
+
17473
+ sig do
17474
+ override.returns(
17475
+ T::Array[
17476
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
17477
+ ]
17478
+ )
17479
+ end
17480
+ def self.values
17481
+ end
17482
+ end
17483
+ end
17484
+
17485
+ # If set, only prices of the specified type will have the adjustment applied.
17486
+ module PriceType
17487
+ extend Orb::Internal::Type::Enum
17488
+
17489
+ TaggedSymbol =
17490
+ T.type_alias do
17491
+ T.all(
17492
+ Symbol,
17493
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType
17494
+ )
17495
+ end
17496
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17497
+
17498
+ USAGE =
17499
+ T.let(
17500
+ :usage,
17501
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::TaggedSymbol
17502
+ )
17503
+ FIXED_IN_ADVANCE =
17504
+ T.let(
17505
+ :fixed_in_advance,
17506
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::TaggedSymbol
17507
+ )
17508
+ FIXED_IN_ARREARS =
17509
+ T.let(
17510
+ :fixed_in_arrears,
17511
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::TaggedSymbol
17512
+ )
17513
+ FIXED =
17514
+ T.let(
17515
+ :fixed,
17516
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::TaggedSymbol
17517
+ )
17518
+ IN_ARREARS =
17519
+ T.let(
17520
+ :in_arrears,
17521
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::TaggedSymbol
17522
+ )
17523
+
17524
+ sig do
17525
+ override.returns(
17526
+ T::Array[
17527
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType::TaggedSymbol
17528
+ ]
17529
+ )
17530
+ end
17531
+ def self.values
17532
+ end
17533
+ end
17534
+ end
17535
+
17536
+ class Minimum < Orb::Internal::Type::BaseModel
17537
+ OrHash =
17538
+ T.type_alias do
17539
+ T.any(
17540
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum,
17541
+ Orb::Internal::AnyHash
17542
+ )
17543
+ end
17544
+
17545
+ sig { returns(Symbol) }
17546
+ attr_accessor :adjustment_type
17547
+
17548
+ # The item ID that revenue from this minimum will be attributed to.
17549
+ sig { returns(String) }
17550
+ attr_accessor :item_id
17551
+
17552
+ sig { returns(String) }
17553
+ attr_accessor :minimum_amount
17554
+
17555
+ # If set, the adjustment will apply to every price on the subscription.
17556
+ sig do
17557
+ returns(
17558
+ T.nilable(
17559
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll::OrBoolean
17560
+ )
17561
+ )
17562
+ end
17563
+ attr_accessor :applies_to_all
17564
+
17565
+ # The set of item IDs to which this adjustment applies.
17566
+ sig { returns(T.nilable(T::Array[String])) }
17567
+ attr_accessor :applies_to_item_ids
17568
+
17569
+ # The set of price IDs to which this adjustment applies.
17570
+ sig { returns(T.nilable(T::Array[String])) }
17571
+ attr_accessor :applies_to_price_ids
17572
+
17573
+ # If set, only prices in the specified currency will have the adjustment applied.
17574
+ sig { returns(T.nilable(String)) }
17575
+ attr_accessor :currency
17576
+
17577
+ # A list of filters that determine which prices this adjustment will apply to.
17578
+ sig do
17579
+ returns(
17580
+ T.nilable(
17581
+ T::Array[
17582
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter
17583
+ ]
17584
+ )
17585
+ )
17586
+ end
17587
+ attr_accessor :filters
17588
+
17589
+ # When false, this adjustment will be applied to a single price. Otherwise, it
17590
+ # will be applied at the invoice level, possibly to multiple prices.
17591
+ sig { returns(T.nilable(T::Boolean)) }
17592
+ attr_reader :is_invoice_level
17593
+
17594
+ sig { params(is_invoice_level: T::Boolean).void }
17595
+ attr_writer :is_invoice_level
17596
+
17597
+ # If set, only prices of the specified type will have the adjustment applied.
17598
+ sig do
17599
+ returns(
17600
+ T.nilable(
17601
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::OrSymbol
17602
+ )
17603
+ )
17604
+ end
17605
+ attr_accessor :price_type
17606
+
17607
+ sig do
17608
+ params(
17609
+ item_id: String,
17610
+ minimum_amount: String,
17611
+ applies_to_all:
17612
+ T.nilable(
17613
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll::OrBoolean
17614
+ ),
17615
+ applies_to_item_ids: T.nilable(T::Array[String]),
17616
+ applies_to_price_ids: T.nilable(T::Array[String]),
17617
+ currency: T.nilable(String),
17618
+ filters:
17619
+ T.nilable(
17620
+ T::Array[
17621
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::OrHash
17622
+ ]
17623
+ ),
17624
+ is_invoice_level: T::Boolean,
17625
+ price_type:
17626
+ T.nilable(
17627
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::OrSymbol
17628
+ ),
17629
+ adjustment_type: Symbol
17630
+ ).returns(T.attached_class)
17631
+ end
17632
+ def self.new(
17633
+ # The item ID that revenue from this minimum will be attributed to.
17634
+ item_id:,
17635
+ minimum_amount:,
17636
+ # If set, the adjustment will apply to every price on the subscription.
17637
+ applies_to_all: nil,
17638
+ # The set of item IDs to which this adjustment applies.
17639
+ applies_to_item_ids: nil,
17640
+ # The set of price IDs to which this adjustment applies.
17641
+ applies_to_price_ids: nil,
17642
+ # If set, only prices in the specified currency will have the adjustment applied.
17643
+ currency: nil,
17644
+ # A list of filters that determine which prices this adjustment will apply to.
17645
+ filters: nil,
17646
+ # When false, this adjustment will be applied to a single price. Otherwise, it
17647
+ # will be applied at the invoice level, possibly to multiple prices.
17648
+ is_invoice_level: nil,
17649
+ # If set, only prices of the specified type will have the adjustment applied.
17650
+ price_type: nil,
17651
+ adjustment_type: :minimum
17652
+ )
17653
+ end
17654
+
17655
+ sig do
17656
+ override.returns(
17657
+ {
17658
+ adjustment_type: Symbol,
17659
+ item_id: String,
17660
+ minimum_amount: String,
17661
+ applies_to_all:
17662
+ T.nilable(
17663
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll::OrBoolean
17664
+ ),
17665
+ applies_to_item_ids: T.nilable(T::Array[String]),
17666
+ applies_to_price_ids: T.nilable(T::Array[String]),
17667
+ currency: T.nilable(String),
17668
+ filters:
17669
+ T.nilable(
17670
+ T::Array[
17671
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter
17672
+ ]
17673
+ ),
17674
+ is_invoice_level: T::Boolean,
17675
+ price_type:
17676
+ T.nilable(
17677
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::OrSymbol
17678
+ )
17679
+ }
17680
+ )
17681
+ end
17682
+ def to_hash
17683
+ end
17684
+
17685
+ # If set, the adjustment will apply to every price on the subscription.
17686
+ module AppliesToAll
17687
+ extend Orb::Internal::Type::Enum
17688
+
17689
+ TaggedBoolean =
17690
+ T.type_alias do
17691
+ T.all(
17692
+ T::Boolean,
17693
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll
17694
+ )
17695
+ end
17696
+ OrBoolean = T.type_alias { T::Boolean }
17697
+
17698
+ TRUE =
17699
+ T.let(
17700
+ true,
17701
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll::TaggedBoolean
17702
+ )
17703
+
17704
+ sig do
17705
+ override.returns(
17706
+ T::Array[
17707
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll::TaggedBoolean
17708
+ ]
17709
+ )
17710
+ end
17711
+ def self.values
17712
+ end
17713
+ end
17714
+
17715
+ class Filter < Orb::Internal::Type::BaseModel
17716
+ OrHash =
17717
+ T.type_alias do
17718
+ T.any(
17719
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter,
17720
+ Orb::Internal::AnyHash
17721
+ )
17722
+ end
17723
+
17724
+ # The property of the price to filter on.
17725
+ sig do
17726
+ returns(
17727
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::OrSymbol
17728
+ )
17729
+ end
17730
+ attr_accessor :field
17731
+
17732
+ # Should prices that match the filter be included or excluded.
17733
+ sig do
17734
+ returns(
17735
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator::OrSymbol
17736
+ )
17737
+ end
17738
+ attr_accessor :operator
17739
+
17740
+ # The IDs or values that match this filter.
17741
+ sig { returns(T::Array[String]) }
17742
+ attr_accessor :values
17743
+
17744
+ sig do
17745
+ params(
17746
+ field:
17747
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::OrSymbol,
17748
+ operator:
17749
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator::OrSymbol,
17750
+ values: T::Array[String]
17751
+ ).returns(T.attached_class)
17752
+ end
17753
+ def self.new(
17754
+ # The property of the price to filter on.
17755
+ field:,
17756
+ # Should prices that match the filter be included or excluded.
17757
+ operator:,
17758
+ # The IDs or values that match this filter.
17759
+ values:
17760
+ )
17761
+ end
17762
+
17763
+ sig do
17764
+ override.returns(
17765
+ {
17766
+ field:
17767
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::OrSymbol,
17768
+ operator:
17769
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator::OrSymbol,
17770
+ values: T::Array[String]
17771
+ }
17772
+ )
17773
+ end
17774
+ def to_hash
17775
+ end
17776
+
17777
+ # The property of the price to filter on.
17778
+ module Field
17779
+ extend Orb::Internal::Type::Enum
17780
+
17781
+ TaggedSymbol =
17782
+ T.type_alias do
17783
+ T.all(
17784
+ Symbol,
17785
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field
17786
+ )
17787
+ end
17788
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17789
+
17790
+ PRICE_ID =
17791
+ T.let(
17792
+ :price_id,
17793
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::TaggedSymbol
17794
+ )
17795
+ ITEM_ID =
17796
+ T.let(
17797
+ :item_id,
17798
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::TaggedSymbol
17799
+ )
17800
+ PRICE_TYPE =
17801
+ T.let(
17802
+ :price_type,
17803
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::TaggedSymbol
17804
+ )
17805
+ CURRENCY =
17806
+ T.let(
17807
+ :currency,
17808
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::TaggedSymbol
17809
+ )
17810
+ PRICING_UNIT_ID =
17811
+ T.let(
17812
+ :pricing_unit_id,
17813
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::TaggedSymbol
17814
+ )
17815
+
17816
+ sig do
17817
+ override.returns(
17818
+ T::Array[
17819
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field::TaggedSymbol
17820
+ ]
17821
+ )
17822
+ end
17823
+ def self.values
17824
+ end
17825
+ end
17826
+
17827
+ # Should prices that match the filter be included or excluded.
17828
+ module Operator
17829
+ extend Orb::Internal::Type::Enum
17830
+
17831
+ TaggedSymbol =
17832
+ T.type_alias do
17833
+ T.all(
17834
+ Symbol,
17835
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator
17836
+ )
17837
+ end
17838
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17839
+
17840
+ INCLUDES =
17841
+ T.let(
17842
+ :includes,
17843
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator::TaggedSymbol
17844
+ )
17845
+ EXCLUDES =
17846
+ T.let(
17847
+ :excludes,
17848
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator::TaggedSymbol
17849
+ )
17850
+
17851
+ sig do
17852
+ override.returns(
17853
+ T::Array[
17854
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator::TaggedSymbol
17855
+ ]
17856
+ )
17857
+ end
17858
+ def self.values
17859
+ end
17860
+ end
17861
+ end
17862
+
17863
+ # If set, only prices of the specified type will have the adjustment applied.
17864
+ module PriceType
17865
+ extend Orb::Internal::Type::Enum
17866
+
17867
+ TaggedSymbol =
17868
+ T.type_alias do
17869
+ T.all(
17870
+ Symbol,
17871
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType
17872
+ )
17873
+ end
17874
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
17875
+
17876
+ USAGE =
17877
+ T.let(
17878
+ :usage,
17879
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::TaggedSymbol
17880
+ )
17881
+ FIXED_IN_ADVANCE =
17882
+ T.let(
17883
+ :fixed_in_advance,
17884
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::TaggedSymbol
17885
+ )
17886
+ FIXED_IN_ARREARS =
17887
+ T.let(
17888
+ :fixed_in_arrears,
17889
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::TaggedSymbol
17890
+ )
17891
+ FIXED =
17892
+ T.let(
17893
+ :fixed,
17894
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::TaggedSymbol
17895
+ )
17896
+ IN_ARREARS =
17897
+ T.let(
17898
+ :in_arrears,
17899
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::TaggedSymbol
17900
+ )
17901
+
17902
+ sig do
17903
+ override.returns(
17904
+ T::Array[
17905
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType::TaggedSymbol
17906
+ ]
17907
+ )
17908
+ end
17909
+ def self.values
17910
+ end
17911
+ end
16604
17912
  end
16605
17913
 
16606
- class Minimum < Orb::Internal::Type::BaseModel
17914
+ class Maximum < Orb::Internal::Type::BaseModel
16607
17915
  OrHash =
16608
17916
  T.type_alias do
16609
17917
  T.any(
16610
- Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum,
17918
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum,
16611
17919
  Orb::Internal::AnyHash
16612
17920
  )
16613
17921
  end
@@ -16615,17 +17923,43 @@ module Orb
16615
17923
  sig { returns(Symbol) }
16616
17924
  attr_accessor :adjustment_type
16617
17925
 
16618
- # The item ID that revenue from this minimum will be attributed to.
16619
17926
  sig { returns(String) }
16620
- attr_accessor :item_id
17927
+ attr_accessor :maximum_amount
16621
17928
 
16622
- sig { returns(String) }
16623
- attr_accessor :minimum_amount
17929
+ # If set, the adjustment will apply to every price on the subscription.
17930
+ sig do
17931
+ returns(
17932
+ T.nilable(
17933
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll::OrBoolean
17934
+ )
17935
+ )
17936
+ end
17937
+ attr_accessor :applies_to_all
17938
+
17939
+ # The set of item IDs to which this adjustment applies.
17940
+ sig { returns(T.nilable(T::Array[String])) }
17941
+ attr_accessor :applies_to_item_ids
16624
17942
 
16625
17943
  # The set of price IDs to which this adjustment applies.
16626
17944
  sig { returns(T.nilable(T::Array[String])) }
16627
17945
  attr_accessor :applies_to_price_ids
16628
17946
 
17947
+ # If set, only prices in the specified currency will have the adjustment applied.
17948
+ sig { returns(T.nilable(String)) }
17949
+ attr_accessor :currency
17950
+
17951
+ # A list of filters that determine which prices this adjustment will apply to.
17952
+ sig do
17953
+ returns(
17954
+ T.nilable(
17955
+ T::Array[
17956
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter
17957
+ ]
17958
+ )
17959
+ )
17960
+ end
17961
+ attr_accessor :filters
17962
+
16629
17963
  # When false, this adjustment will be applied to a single price. Otherwise, it
16630
17964
  # will be applied at the invoice level, possibly to multiple prices.
16631
17965
  sig { returns(T.nilable(T::Boolean)) }
@@ -16634,25 +17968,58 @@ module Orb
16634
17968
  sig { params(is_invoice_level: T::Boolean).void }
16635
17969
  attr_writer :is_invoice_level
16636
17970
 
17971
+ # If set, only prices of the specified type will have the adjustment applied.
17972
+ sig do
17973
+ returns(
17974
+ T.nilable(
17975
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::OrSymbol
17976
+ )
17977
+ )
17978
+ end
17979
+ attr_accessor :price_type
17980
+
16637
17981
  sig do
16638
17982
  params(
16639
- item_id: String,
16640
- minimum_amount: String,
17983
+ maximum_amount: String,
17984
+ applies_to_all:
17985
+ T.nilable(
17986
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll::OrBoolean
17987
+ ),
17988
+ applies_to_item_ids: T.nilable(T::Array[String]),
16641
17989
  applies_to_price_ids: T.nilable(T::Array[String]),
17990
+ currency: T.nilable(String),
17991
+ filters:
17992
+ T.nilable(
17993
+ T::Array[
17994
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::OrHash
17995
+ ]
17996
+ ),
16642
17997
  is_invoice_level: T::Boolean,
17998
+ price_type:
17999
+ T.nilable(
18000
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::OrSymbol
18001
+ ),
16643
18002
  adjustment_type: Symbol
16644
18003
  ).returns(T.attached_class)
16645
18004
  end
16646
18005
  def self.new(
16647
- # The item ID that revenue from this minimum will be attributed to.
16648
- item_id:,
16649
- minimum_amount:,
18006
+ maximum_amount:,
18007
+ # If set, the adjustment will apply to every price on the subscription.
18008
+ applies_to_all: nil,
18009
+ # The set of item IDs to which this adjustment applies.
18010
+ applies_to_item_ids: nil,
16650
18011
  # The set of price IDs to which this adjustment applies.
16651
18012
  applies_to_price_ids: nil,
18013
+ # If set, only prices in the specified currency will have the adjustment applied.
18014
+ currency: nil,
18015
+ # A list of filters that determine which prices this adjustment will apply to.
18016
+ filters: nil,
16652
18017
  # When false, this adjustment will be applied to a single price. Otherwise, it
16653
18018
  # will be applied at the invoice level, possibly to multiple prices.
16654
18019
  is_invoice_level: nil,
16655
- adjustment_type: :minimum
18020
+ # If set, only prices of the specified type will have the adjustment applied.
18021
+ price_type: nil,
18022
+ adjustment_type: :maximum
16656
18023
  )
16657
18024
  end
16658
18025
 
@@ -16660,74 +18027,257 @@ module Orb
16660
18027
  override.returns(
16661
18028
  {
16662
18029
  adjustment_type: Symbol,
16663
- item_id: String,
16664
- minimum_amount: String,
18030
+ maximum_amount: String,
18031
+ applies_to_all:
18032
+ T.nilable(
18033
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll::OrBoolean
18034
+ ),
18035
+ applies_to_item_ids: T.nilable(T::Array[String]),
16665
18036
  applies_to_price_ids: T.nilable(T::Array[String]),
16666
- is_invoice_level: T::Boolean
18037
+ currency: T.nilable(String),
18038
+ filters:
18039
+ T.nilable(
18040
+ T::Array[
18041
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter
18042
+ ]
18043
+ ),
18044
+ is_invoice_level: T::Boolean,
18045
+ price_type:
18046
+ T.nilable(
18047
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::OrSymbol
18048
+ )
16667
18049
  }
16668
18050
  )
16669
18051
  end
16670
18052
  def to_hash
16671
18053
  end
16672
- end
16673
18054
 
16674
- class Maximum < Orb::Internal::Type::BaseModel
16675
- OrHash =
16676
- T.type_alias do
16677
- T.any(
16678
- Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum,
16679
- Orb::Internal::AnyHash
18055
+ # If set, the adjustment will apply to every price on the subscription.
18056
+ module AppliesToAll
18057
+ extend Orb::Internal::Type::Enum
18058
+
18059
+ TaggedBoolean =
18060
+ T.type_alias do
18061
+ T.all(
18062
+ T::Boolean,
18063
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll
18064
+ )
18065
+ end
18066
+ OrBoolean = T.type_alias { T::Boolean }
18067
+
18068
+ TRUE =
18069
+ T.let(
18070
+ true,
18071
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll::TaggedBoolean
18072
+ )
18073
+
18074
+ sig do
18075
+ override.returns(
18076
+ T::Array[
18077
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll::TaggedBoolean
18078
+ ]
16680
18079
  )
16681
18080
  end
18081
+ def self.values
18082
+ end
18083
+ end
16682
18084
 
16683
- sig { returns(Symbol) }
16684
- attr_accessor :adjustment_type
18085
+ class Filter < Orb::Internal::Type::BaseModel
18086
+ OrHash =
18087
+ T.type_alias do
18088
+ T.any(
18089
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter,
18090
+ Orb::Internal::AnyHash
18091
+ )
18092
+ end
16685
18093
 
16686
- sig { returns(String) }
16687
- attr_accessor :maximum_amount
18094
+ # The property of the price to filter on.
18095
+ sig do
18096
+ returns(
18097
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::OrSymbol
18098
+ )
18099
+ end
18100
+ attr_accessor :field
16688
18101
 
16689
- # The set of price IDs to which this adjustment applies.
16690
- sig { returns(T.nilable(T::Array[String])) }
16691
- attr_accessor :applies_to_price_ids
18102
+ # Should prices that match the filter be included or excluded.
18103
+ sig do
18104
+ returns(
18105
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator::OrSymbol
18106
+ )
18107
+ end
18108
+ attr_accessor :operator
16692
18109
 
16693
- # When false, this adjustment will be applied to a single price. Otherwise, it
16694
- # will be applied at the invoice level, possibly to multiple prices.
16695
- sig { returns(T.nilable(T::Boolean)) }
16696
- attr_reader :is_invoice_level
18110
+ # The IDs or values that match this filter.
18111
+ sig { returns(T::Array[String]) }
18112
+ attr_accessor :values
16697
18113
 
16698
- sig { params(is_invoice_level: T::Boolean).void }
16699
- attr_writer :is_invoice_level
18114
+ sig do
18115
+ params(
18116
+ field:
18117
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::OrSymbol,
18118
+ operator:
18119
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator::OrSymbol,
18120
+ values: T::Array[String]
18121
+ ).returns(T.attached_class)
18122
+ end
18123
+ def self.new(
18124
+ # The property of the price to filter on.
18125
+ field:,
18126
+ # Should prices that match the filter be included or excluded.
18127
+ operator:,
18128
+ # The IDs or values that match this filter.
18129
+ values:
18130
+ )
18131
+ end
16700
18132
 
16701
- sig do
16702
- params(
16703
- maximum_amount: String,
16704
- applies_to_price_ids: T.nilable(T::Array[String]),
16705
- is_invoice_level: T::Boolean,
16706
- adjustment_type: Symbol
16707
- ).returns(T.attached_class)
16708
- end
16709
- def self.new(
16710
- maximum_amount:,
16711
- # The set of price IDs to which this adjustment applies.
16712
- applies_to_price_ids: nil,
16713
- # When false, this adjustment will be applied to a single price. Otherwise, it
16714
- # will be applied at the invoice level, possibly to multiple prices.
16715
- is_invoice_level: nil,
16716
- adjustment_type: :maximum
16717
- )
16718
- end
18133
+ sig do
18134
+ override.returns(
18135
+ {
18136
+ field:
18137
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::OrSymbol,
18138
+ operator:
18139
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator::OrSymbol,
18140
+ values: T::Array[String]
18141
+ }
18142
+ )
18143
+ end
18144
+ def to_hash
18145
+ end
16719
18146
 
16720
- sig do
16721
- override.returns(
16722
- {
16723
- adjustment_type: Symbol,
16724
- maximum_amount: String,
16725
- applies_to_price_ids: T.nilable(T::Array[String]),
16726
- is_invoice_level: T::Boolean
16727
- }
16728
- )
18147
+ # The property of the price to filter on.
18148
+ module Field
18149
+ extend Orb::Internal::Type::Enum
18150
+
18151
+ TaggedSymbol =
18152
+ T.type_alias do
18153
+ T.all(
18154
+ Symbol,
18155
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field
18156
+ )
18157
+ end
18158
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
18159
+
18160
+ PRICE_ID =
18161
+ T.let(
18162
+ :price_id,
18163
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::TaggedSymbol
18164
+ )
18165
+ ITEM_ID =
18166
+ T.let(
18167
+ :item_id,
18168
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::TaggedSymbol
18169
+ )
18170
+ PRICE_TYPE =
18171
+ T.let(
18172
+ :price_type,
18173
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::TaggedSymbol
18174
+ )
18175
+ CURRENCY =
18176
+ T.let(
18177
+ :currency,
18178
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::TaggedSymbol
18179
+ )
18180
+ PRICING_UNIT_ID =
18181
+ T.let(
18182
+ :pricing_unit_id,
18183
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::TaggedSymbol
18184
+ )
18185
+
18186
+ sig do
18187
+ override.returns(
18188
+ T::Array[
18189
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field::TaggedSymbol
18190
+ ]
18191
+ )
18192
+ end
18193
+ def self.values
18194
+ end
18195
+ end
18196
+
18197
+ # Should prices that match the filter be included or excluded.
18198
+ module Operator
18199
+ extend Orb::Internal::Type::Enum
18200
+
18201
+ TaggedSymbol =
18202
+ T.type_alias do
18203
+ T.all(
18204
+ Symbol,
18205
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator
18206
+ )
18207
+ end
18208
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
18209
+
18210
+ INCLUDES =
18211
+ T.let(
18212
+ :includes,
18213
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator::TaggedSymbol
18214
+ )
18215
+ EXCLUDES =
18216
+ T.let(
18217
+ :excludes,
18218
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator::TaggedSymbol
18219
+ )
18220
+
18221
+ sig do
18222
+ override.returns(
18223
+ T::Array[
18224
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator::TaggedSymbol
18225
+ ]
18226
+ )
18227
+ end
18228
+ def self.values
18229
+ end
18230
+ end
16729
18231
  end
16730
- def to_hash
18232
+
18233
+ # If set, only prices of the specified type will have the adjustment applied.
18234
+ module PriceType
18235
+ extend Orb::Internal::Type::Enum
18236
+
18237
+ TaggedSymbol =
18238
+ T.type_alias do
18239
+ T.all(
18240
+ Symbol,
18241
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType
18242
+ )
18243
+ end
18244
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
18245
+
18246
+ USAGE =
18247
+ T.let(
18248
+ :usage,
18249
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::TaggedSymbol
18250
+ )
18251
+ FIXED_IN_ADVANCE =
18252
+ T.let(
18253
+ :fixed_in_advance,
18254
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::TaggedSymbol
18255
+ )
18256
+ FIXED_IN_ARREARS =
18257
+ T.let(
18258
+ :fixed_in_arrears,
18259
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::TaggedSymbol
18260
+ )
18261
+ FIXED =
18262
+ T.let(
18263
+ :fixed,
18264
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::TaggedSymbol
18265
+ )
18266
+ IN_ARREARS =
18267
+ T.let(
18268
+ :in_arrears,
18269
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::TaggedSymbol
18270
+ )
18271
+
18272
+ sig do
18273
+ override.returns(
18274
+ T::Array[
18275
+ Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType::TaggedSymbol
18276
+ ]
18277
+ )
18278
+ end
18279
+ def self.values
18280
+ end
16731
18281
  end
16732
18282
  end
16733
18283