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
@@ -6449,8 +6449,13 @@ module Orb
6449
6449
  {
6450
6450
  adjustment_type: :percentage_discount,
6451
6451
  percentage_discount: Float,
6452
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::applies_to_all?,
6453
+ applies_to_item_ids: ::Array[String]?,
6452
6454
  applies_to_price_ids: ::Array[String]?,
6453
- is_invoice_level: bool
6455
+ currency: String?,
6456
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]?,
6457
+ is_invoice_level: bool,
6458
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::price_type?
6454
6459
  }
6455
6460
 
6456
6461
  class PercentageDiscount < Orb::Internal::Type::BaseModel
@@ -6458,33 +6463,144 @@ module Orb
6458
6463
 
6459
6464
  attr_accessor percentage_discount: Float
6460
6465
 
6466
+ attr_accessor applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::applies_to_all?
6467
+
6468
+ attr_accessor applies_to_item_ids: ::Array[String]?
6469
+
6461
6470
  attr_accessor applies_to_price_ids: ::Array[String]?
6462
6471
 
6472
+ attr_accessor currency: String?
6473
+
6474
+ attr_accessor filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]?
6475
+
6463
6476
  attr_reader is_invoice_level: bool?
6464
6477
 
6465
6478
  def is_invoice_level=: (bool) -> bool
6466
6479
 
6480
+ attr_accessor price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::price_type?
6481
+
6467
6482
  def initialize: (
6468
6483
  percentage_discount: Float,
6484
+ ?applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::applies_to_all?,
6485
+ ?applies_to_item_ids: ::Array[String]?,
6469
6486
  ?applies_to_price_ids: ::Array[String]?,
6487
+ ?currency: String?,
6488
+ ?filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]?,
6470
6489
  ?is_invoice_level: bool,
6490
+ ?price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::price_type?,
6471
6491
  ?adjustment_type: :percentage_discount
6472
6492
  ) -> void
6473
6493
 
6474
6494
  def to_hash: -> {
6475
6495
  adjustment_type: :percentage_discount,
6476
6496
  percentage_discount: Float,
6497
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::applies_to_all?,
6498
+ applies_to_item_ids: ::Array[String]?,
6477
6499
  applies_to_price_ids: ::Array[String]?,
6478
- is_invoice_level: bool
6500
+ currency: String?,
6501
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]?,
6502
+ is_invoice_level: bool,
6503
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::price_type?
6479
6504
  }
6505
+
6506
+ type applies_to_all = true
6507
+
6508
+ module AppliesToAll
6509
+ extend Orb::Internal::Type::Enum
6510
+
6511
+ TRUE: true
6512
+
6513
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::applies_to_all]
6514
+ end
6515
+
6516
+ type filter =
6517
+ {
6518
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::field,
6519
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::operator,
6520
+ values: ::Array[String]
6521
+ }
6522
+
6523
+ class Filter < Orb::Internal::Type::BaseModel
6524
+ attr_accessor field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::field
6525
+
6526
+ attr_accessor operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::operator
6527
+
6528
+ attr_accessor values: ::Array[String]
6529
+
6530
+ def initialize: (
6531
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::field,
6532
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::operator,
6533
+ values: ::Array[String]
6534
+ ) -> void
6535
+
6536
+ def to_hash: -> {
6537
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::field,
6538
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::operator,
6539
+ values: ::Array[String]
6540
+ }
6541
+
6542
+ type field =
6543
+ :price_id
6544
+ | :item_id
6545
+ | :price_type
6546
+ | :currency
6547
+ | :pricing_unit_id
6548
+
6549
+ module Field
6550
+ extend Orb::Internal::Type::Enum
6551
+
6552
+ PRICE_ID: :price_id
6553
+ ITEM_ID: :item_id
6554
+ PRICE_TYPE: :price_type
6555
+ CURRENCY: :currency
6556
+ PRICING_UNIT_ID: :pricing_unit_id
6557
+
6558
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::field]
6559
+ end
6560
+
6561
+ type operator = :includes | :excludes
6562
+
6563
+ module Operator
6564
+ extend Orb::Internal::Type::Enum
6565
+
6566
+ INCLUDES: :includes
6567
+ EXCLUDES: :excludes
6568
+
6569
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::operator]
6570
+ end
6571
+ end
6572
+
6573
+ type price_type =
6574
+ :usage
6575
+ | :fixed_in_advance
6576
+ | :fixed_in_arrears
6577
+ | :fixed
6578
+ | :in_arrears
6579
+
6580
+ module PriceType
6581
+ extend Orb::Internal::Type::Enum
6582
+
6583
+ USAGE: :usage
6584
+ FIXED_IN_ADVANCE: :fixed_in_advance
6585
+ FIXED_IN_ARREARS: :fixed_in_arrears
6586
+ FIXED: :fixed
6587
+ IN_ARREARS: :in_arrears
6588
+
6589
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::price_type]
6590
+ end
6480
6591
  end
6481
6592
 
6482
6593
  type usage_discount =
6483
6594
  {
6484
6595
  adjustment_type: :usage_discount,
6485
6596
  usage_discount: Float,
6597
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::applies_to_all?,
6598
+ applies_to_item_ids: ::Array[String]?,
6486
6599
  applies_to_price_ids: ::Array[String]?,
6487
- is_invoice_level: bool
6600
+ currency: String?,
6601
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter]?,
6602
+ is_invoice_level: bool,
6603
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::price_type?
6488
6604
  }
6489
6605
 
6490
6606
  class UsageDiscount < Orb::Internal::Type::BaseModel
@@ -6492,33 +6608,144 @@ module Orb
6492
6608
 
6493
6609
  attr_accessor usage_discount: Float
6494
6610
 
6611
+ attr_accessor applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::applies_to_all?
6612
+
6613
+ attr_accessor applies_to_item_ids: ::Array[String]?
6614
+
6495
6615
  attr_accessor applies_to_price_ids: ::Array[String]?
6496
6616
 
6617
+ attr_accessor currency: String?
6618
+
6619
+ attr_accessor filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter]?
6620
+
6497
6621
  attr_reader is_invoice_level: bool?
6498
6622
 
6499
6623
  def is_invoice_level=: (bool) -> bool
6500
6624
 
6625
+ attr_accessor price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::price_type?
6626
+
6501
6627
  def initialize: (
6502
6628
  usage_discount: Float,
6629
+ ?applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::applies_to_all?,
6630
+ ?applies_to_item_ids: ::Array[String]?,
6503
6631
  ?applies_to_price_ids: ::Array[String]?,
6632
+ ?currency: String?,
6633
+ ?filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter]?,
6504
6634
  ?is_invoice_level: bool,
6635
+ ?price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::price_type?,
6505
6636
  ?adjustment_type: :usage_discount
6506
6637
  ) -> void
6507
6638
 
6508
6639
  def to_hash: -> {
6509
6640
  adjustment_type: :usage_discount,
6510
6641
  usage_discount: Float,
6642
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::applies_to_all?,
6643
+ applies_to_item_ids: ::Array[String]?,
6511
6644
  applies_to_price_ids: ::Array[String]?,
6512
- is_invoice_level: bool
6645
+ currency: String?,
6646
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter]?,
6647
+ is_invoice_level: bool,
6648
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::price_type?
6513
6649
  }
6650
+
6651
+ type applies_to_all = true
6652
+
6653
+ module AppliesToAll
6654
+ extend Orb::Internal::Type::Enum
6655
+
6656
+ TRUE: true
6657
+
6658
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::applies_to_all]
6659
+ end
6660
+
6661
+ type filter =
6662
+ {
6663
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::field,
6664
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::operator,
6665
+ values: ::Array[String]
6666
+ }
6667
+
6668
+ class Filter < Orb::Internal::Type::BaseModel
6669
+ attr_accessor field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::field
6670
+
6671
+ attr_accessor operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::operator
6672
+
6673
+ attr_accessor values: ::Array[String]
6674
+
6675
+ def initialize: (
6676
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::field,
6677
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::operator,
6678
+ values: ::Array[String]
6679
+ ) -> void
6680
+
6681
+ def to_hash: -> {
6682
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::field,
6683
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::operator,
6684
+ values: ::Array[String]
6685
+ }
6686
+
6687
+ type field =
6688
+ :price_id
6689
+ | :item_id
6690
+ | :price_type
6691
+ | :currency
6692
+ | :pricing_unit_id
6693
+
6694
+ module Field
6695
+ extend Orb::Internal::Type::Enum
6696
+
6697
+ PRICE_ID: :price_id
6698
+ ITEM_ID: :item_id
6699
+ PRICE_TYPE: :price_type
6700
+ CURRENCY: :currency
6701
+ PRICING_UNIT_ID: :pricing_unit_id
6702
+
6703
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::field]
6704
+ end
6705
+
6706
+ type operator = :includes | :excludes
6707
+
6708
+ module Operator
6709
+ extend Orb::Internal::Type::Enum
6710
+
6711
+ INCLUDES: :includes
6712
+ EXCLUDES: :excludes
6713
+
6714
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::operator]
6715
+ end
6716
+ end
6717
+
6718
+ type price_type =
6719
+ :usage
6720
+ | :fixed_in_advance
6721
+ | :fixed_in_arrears
6722
+ | :fixed
6723
+ | :in_arrears
6724
+
6725
+ module PriceType
6726
+ extend Orb::Internal::Type::Enum
6727
+
6728
+ USAGE: :usage
6729
+ FIXED_IN_ADVANCE: :fixed_in_advance
6730
+ FIXED_IN_ARREARS: :fixed_in_arrears
6731
+ FIXED: :fixed
6732
+ IN_ARREARS: :in_arrears
6733
+
6734
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::price_type]
6735
+ end
6514
6736
  end
6515
6737
 
6516
6738
  type amount_discount =
6517
6739
  {
6518
6740
  adjustment_type: :amount_discount,
6519
6741
  amount_discount: String,
6742
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::applies_to_all?,
6743
+ applies_to_item_ids: ::Array[String]?,
6520
6744
  applies_to_price_ids: ::Array[String]?,
6521
- is_invoice_level: bool
6745
+ currency: String?,
6746
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter]?,
6747
+ is_invoice_level: bool,
6748
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::price_type?
6522
6749
  }
6523
6750
 
6524
6751
  class AmountDiscount < Orb::Internal::Type::BaseModel
@@ -6526,25 +6753,131 @@ module Orb
6526
6753
 
6527
6754
  attr_accessor amount_discount: String
6528
6755
 
6756
+ attr_accessor applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::applies_to_all?
6757
+
6758
+ attr_accessor applies_to_item_ids: ::Array[String]?
6759
+
6529
6760
  attr_accessor applies_to_price_ids: ::Array[String]?
6530
6761
 
6762
+ attr_accessor currency: String?
6763
+
6764
+ attr_accessor filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter]?
6765
+
6531
6766
  attr_reader is_invoice_level: bool?
6532
6767
 
6533
6768
  def is_invoice_level=: (bool) -> bool
6534
6769
 
6770
+ attr_accessor price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::price_type?
6771
+
6535
6772
  def initialize: (
6536
6773
  amount_discount: String,
6774
+ ?applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::applies_to_all?,
6775
+ ?applies_to_item_ids: ::Array[String]?,
6537
6776
  ?applies_to_price_ids: ::Array[String]?,
6777
+ ?currency: String?,
6778
+ ?filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter]?,
6538
6779
  ?is_invoice_level: bool,
6780
+ ?price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::price_type?,
6539
6781
  ?adjustment_type: :amount_discount
6540
6782
  ) -> void
6541
6783
 
6542
6784
  def to_hash: -> {
6543
6785
  adjustment_type: :amount_discount,
6544
6786
  amount_discount: String,
6787
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::applies_to_all?,
6788
+ applies_to_item_ids: ::Array[String]?,
6545
6789
  applies_to_price_ids: ::Array[String]?,
6546
- is_invoice_level: bool
6790
+ currency: String?,
6791
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter]?,
6792
+ is_invoice_level: bool,
6793
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::price_type?
6547
6794
  }
6795
+
6796
+ type applies_to_all = true
6797
+
6798
+ module AppliesToAll
6799
+ extend Orb::Internal::Type::Enum
6800
+
6801
+ TRUE: true
6802
+
6803
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::applies_to_all]
6804
+ end
6805
+
6806
+ type filter =
6807
+ {
6808
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::field,
6809
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::operator,
6810
+ values: ::Array[String]
6811
+ }
6812
+
6813
+ class Filter < Orb::Internal::Type::BaseModel
6814
+ attr_accessor field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::field
6815
+
6816
+ attr_accessor operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::operator
6817
+
6818
+ attr_accessor values: ::Array[String]
6819
+
6820
+ def initialize: (
6821
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::field,
6822
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::operator,
6823
+ values: ::Array[String]
6824
+ ) -> void
6825
+
6826
+ def to_hash: -> {
6827
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::field,
6828
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::operator,
6829
+ values: ::Array[String]
6830
+ }
6831
+
6832
+ type field =
6833
+ :price_id
6834
+ | :item_id
6835
+ | :price_type
6836
+ | :currency
6837
+ | :pricing_unit_id
6838
+
6839
+ module Field
6840
+ extend Orb::Internal::Type::Enum
6841
+
6842
+ PRICE_ID: :price_id
6843
+ ITEM_ID: :item_id
6844
+ PRICE_TYPE: :price_type
6845
+ CURRENCY: :currency
6846
+ PRICING_UNIT_ID: :pricing_unit_id
6847
+
6848
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::field]
6849
+ end
6850
+
6851
+ type operator = :includes | :excludes
6852
+
6853
+ module Operator
6854
+ extend Orb::Internal::Type::Enum
6855
+
6856
+ INCLUDES: :includes
6857
+ EXCLUDES: :excludes
6858
+
6859
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::operator]
6860
+ end
6861
+ end
6862
+
6863
+ type price_type =
6864
+ :usage
6865
+ | :fixed_in_advance
6866
+ | :fixed_in_arrears
6867
+ | :fixed
6868
+ | :in_arrears
6869
+
6870
+ module PriceType
6871
+ extend Orb::Internal::Type::Enum
6872
+
6873
+ USAGE: :usage
6874
+ FIXED_IN_ADVANCE: :fixed_in_advance
6875
+ FIXED_IN_ARREARS: :fixed_in_arrears
6876
+ FIXED: :fixed
6877
+ IN_ARREARS: :in_arrears
6878
+
6879
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::price_type]
6880
+ end
6548
6881
  end
6549
6882
 
6550
6883
  type minimum =
@@ -6552,8 +6885,13 @@ module Orb
6552
6885
  adjustment_type: :minimum,
6553
6886
  item_id: String,
6554
6887
  minimum_amount: String,
6888
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::applies_to_all?,
6889
+ applies_to_item_ids: ::Array[String]?,
6555
6890
  applies_to_price_ids: ::Array[String]?,
6556
- is_invoice_level: bool
6891
+ currency: String?,
6892
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter]?,
6893
+ is_invoice_level: bool,
6894
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::price_type?
6557
6895
  }
6558
6896
 
6559
6897
  class Minimum < Orb::Internal::Type::BaseModel
@@ -6563,17 +6901,32 @@ module Orb
6563
6901
 
6564
6902
  attr_accessor minimum_amount: String
6565
6903
 
6904
+ attr_accessor applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::applies_to_all?
6905
+
6906
+ attr_accessor applies_to_item_ids: ::Array[String]?
6907
+
6566
6908
  attr_accessor applies_to_price_ids: ::Array[String]?
6567
6909
 
6910
+ attr_accessor currency: String?
6911
+
6912
+ attr_accessor filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter]?
6913
+
6568
6914
  attr_reader is_invoice_level: bool?
6569
6915
 
6570
6916
  def is_invoice_level=: (bool) -> bool
6571
6917
 
6918
+ attr_accessor price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::price_type?
6919
+
6572
6920
  def initialize: (
6573
6921
  item_id: String,
6574
6922
  minimum_amount: String,
6923
+ ?applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::applies_to_all?,
6924
+ ?applies_to_item_ids: ::Array[String]?,
6575
6925
  ?applies_to_price_ids: ::Array[String]?,
6926
+ ?currency: String?,
6927
+ ?filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter]?,
6576
6928
  ?is_invoice_level: bool,
6929
+ ?price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::price_type?,
6577
6930
  ?adjustment_type: :minimum
6578
6931
  ) -> void
6579
6932
 
@@ -6581,17 +6934,113 @@ module Orb
6581
6934
  adjustment_type: :minimum,
6582
6935
  item_id: String,
6583
6936
  minimum_amount: String,
6937
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::applies_to_all?,
6938
+ applies_to_item_ids: ::Array[String]?,
6584
6939
  applies_to_price_ids: ::Array[String]?,
6585
- is_invoice_level: bool
6940
+ currency: String?,
6941
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter]?,
6942
+ is_invoice_level: bool,
6943
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::price_type?
6586
6944
  }
6945
+
6946
+ type applies_to_all = true
6947
+
6948
+ module AppliesToAll
6949
+ extend Orb::Internal::Type::Enum
6950
+
6951
+ TRUE: true
6952
+
6953
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::applies_to_all]
6954
+ end
6955
+
6956
+ type filter =
6957
+ {
6958
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::field,
6959
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::operator,
6960
+ values: ::Array[String]
6961
+ }
6962
+
6963
+ class Filter < Orb::Internal::Type::BaseModel
6964
+ attr_accessor field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::field
6965
+
6966
+ attr_accessor operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::operator
6967
+
6968
+ attr_accessor values: ::Array[String]
6969
+
6970
+ def initialize: (
6971
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::field,
6972
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::operator,
6973
+ values: ::Array[String]
6974
+ ) -> void
6975
+
6976
+ def to_hash: -> {
6977
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::field,
6978
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::operator,
6979
+ values: ::Array[String]
6980
+ }
6981
+
6982
+ type field =
6983
+ :price_id
6984
+ | :item_id
6985
+ | :price_type
6986
+ | :currency
6987
+ | :pricing_unit_id
6988
+
6989
+ module Field
6990
+ extend Orb::Internal::Type::Enum
6991
+
6992
+ PRICE_ID: :price_id
6993
+ ITEM_ID: :item_id
6994
+ PRICE_TYPE: :price_type
6995
+ CURRENCY: :currency
6996
+ PRICING_UNIT_ID: :pricing_unit_id
6997
+
6998
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::field]
6999
+ end
7000
+
7001
+ type operator = :includes | :excludes
7002
+
7003
+ module Operator
7004
+ extend Orb::Internal::Type::Enum
7005
+
7006
+ INCLUDES: :includes
7007
+ EXCLUDES: :excludes
7008
+
7009
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::operator]
7010
+ end
7011
+ end
7012
+
7013
+ type price_type =
7014
+ :usage
7015
+ | :fixed_in_advance
7016
+ | :fixed_in_arrears
7017
+ | :fixed
7018
+ | :in_arrears
7019
+
7020
+ module PriceType
7021
+ extend Orb::Internal::Type::Enum
7022
+
7023
+ USAGE: :usage
7024
+ FIXED_IN_ADVANCE: :fixed_in_advance
7025
+ FIXED_IN_ARREARS: :fixed_in_arrears
7026
+ FIXED: :fixed
7027
+ IN_ARREARS: :in_arrears
7028
+
7029
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::price_type]
7030
+ end
6587
7031
  end
6588
7032
 
6589
7033
  type maximum =
6590
7034
  {
6591
7035
  adjustment_type: :maximum,
6592
7036
  maximum_amount: String,
7037
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::applies_to_all?,
7038
+ applies_to_item_ids: ::Array[String]?,
6593
7039
  applies_to_price_ids: ::Array[String]?,
6594
- is_invoice_level: bool
7040
+ currency: String?,
7041
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter]?,
7042
+ is_invoice_level: bool,
7043
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::price_type?
6595
7044
  }
6596
7045
 
6597
7046
  class Maximum < Orb::Internal::Type::BaseModel
@@ -6599,25 +7048,131 @@ module Orb
6599
7048
 
6600
7049
  attr_accessor maximum_amount: String
6601
7050
 
7051
+ attr_accessor applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::applies_to_all?
7052
+
7053
+ attr_accessor applies_to_item_ids: ::Array[String]?
7054
+
6602
7055
  attr_accessor applies_to_price_ids: ::Array[String]?
6603
7056
 
7057
+ attr_accessor currency: String?
7058
+
7059
+ attr_accessor filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter]?
7060
+
6604
7061
  attr_reader is_invoice_level: bool?
6605
7062
 
6606
7063
  def is_invoice_level=: (bool) -> bool
6607
7064
 
7065
+ attr_accessor price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::price_type?
7066
+
6608
7067
  def initialize: (
6609
7068
  maximum_amount: String,
7069
+ ?applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::applies_to_all?,
7070
+ ?applies_to_item_ids: ::Array[String]?,
6610
7071
  ?applies_to_price_ids: ::Array[String]?,
7072
+ ?currency: String?,
7073
+ ?filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter]?,
6611
7074
  ?is_invoice_level: bool,
7075
+ ?price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::price_type?,
6612
7076
  ?adjustment_type: :maximum
6613
7077
  ) -> void
6614
7078
 
6615
7079
  def to_hash: -> {
6616
7080
  adjustment_type: :maximum,
6617
7081
  maximum_amount: String,
7082
+ applies_to_all: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::applies_to_all?,
7083
+ applies_to_item_ids: ::Array[String]?,
6618
7084
  applies_to_price_ids: ::Array[String]?,
6619
- is_invoice_level: bool
7085
+ currency: String?,
7086
+ filters: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter]?,
7087
+ is_invoice_level: bool,
7088
+ price_type: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::price_type?
6620
7089
  }
7090
+
7091
+ type applies_to_all = true
7092
+
7093
+ module AppliesToAll
7094
+ extend Orb::Internal::Type::Enum
7095
+
7096
+ TRUE: true
7097
+
7098
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::applies_to_all]
7099
+ end
7100
+
7101
+ type filter =
7102
+ {
7103
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::field,
7104
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::operator,
7105
+ values: ::Array[String]
7106
+ }
7107
+
7108
+ class Filter < Orb::Internal::Type::BaseModel
7109
+ attr_accessor field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::field
7110
+
7111
+ attr_accessor operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::operator
7112
+
7113
+ attr_accessor values: ::Array[String]
7114
+
7115
+ def initialize: (
7116
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::field,
7117
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::operator,
7118
+ values: ::Array[String]
7119
+ ) -> void
7120
+
7121
+ def to_hash: -> {
7122
+ field: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::field,
7123
+ operator: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::operator,
7124
+ values: ::Array[String]
7125
+ }
7126
+
7127
+ type field =
7128
+ :price_id
7129
+ | :item_id
7130
+ | :price_type
7131
+ | :currency
7132
+ | :pricing_unit_id
7133
+
7134
+ module Field
7135
+ extend Orb::Internal::Type::Enum
7136
+
7137
+ PRICE_ID: :price_id
7138
+ ITEM_ID: :item_id
7139
+ PRICE_TYPE: :price_type
7140
+ CURRENCY: :currency
7141
+ PRICING_UNIT_ID: :pricing_unit_id
7142
+
7143
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::field]
7144
+ end
7145
+
7146
+ type operator = :includes | :excludes
7147
+
7148
+ module Operator
7149
+ extend Orb::Internal::Type::Enum
7150
+
7151
+ INCLUDES: :includes
7152
+ EXCLUDES: :excludes
7153
+
7154
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::operator]
7155
+ end
7156
+ end
7157
+
7158
+ type price_type =
7159
+ :usage
7160
+ | :fixed_in_advance
7161
+ | :fixed_in_arrears
7162
+ | :fixed
7163
+ | :in_arrears
7164
+
7165
+ module PriceType
7166
+ extend Orb::Internal::Type::Enum
7167
+
7168
+ USAGE: :usage
7169
+ FIXED_IN_ADVANCE: :fixed_in_advance
7170
+ FIXED_IN_ARREARS: :fixed_in_arrears
7171
+ FIXED: :fixed
7172
+ IN_ARREARS: :in_arrears
7173
+
7174
+ def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::price_type]
7175
+ end
6621
7176
  end
6622
7177
 
6623
7178
  def self?.variants: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::adjustment]