orb-billing 0.5.0 → 0.5.2

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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/array_of.rb +8 -0
  5. data/lib/orb/internal/type/base_model.rb +7 -0
  6. data/lib/orb/internal/type/boolean.rb +8 -0
  7. data/lib/orb/internal/type/enum.rb +12 -0
  8. data/lib/orb/internal/type/file_input.rb +7 -0
  9. data/lib/orb/internal/type/hash_of.rb +8 -0
  10. data/lib/orb/internal/type/union.rb +12 -0
  11. data/lib/orb/internal/type/unknown.rb +8 -0
  12. data/lib/orb/internal/util.rb +45 -0
  13. data/lib/orb/models/coupon.rb +0 -4
  14. data/lib/orb/models/coupon_create_params.rb +0 -6
  15. data/lib/orb/models/customer_create_params.rb +0 -9
  16. data/lib/orb/models/customer_update_by_external_id_params.rb +0 -9
  17. data/lib/orb/models/customer_update_params.rb +0 -9
  18. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +0 -14
  19. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +0 -14
  20. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +0 -14
  21. data/lib/orb/models/customers/credits/ledger_list_response.rb +0 -14
  22. data/lib/orb/models/discount.rb +0 -6
  23. data/lib/orb/models/evaluate_price_group.rb +0 -4
  24. data/lib/orb/models/invoice.rb +0 -22
  25. data/lib/orb/models/invoice_fetch_upcoming_response.rb +0 -22
  26. data/lib/orb/models/invoice_level_discount.rb +0 -4
  27. data/lib/orb/models/invoice_line_item_create_response.rb +0 -22
  28. data/lib/orb/models/plan.rb +0 -12
  29. data/lib/orb/models/plan_create_params.rb +0 -32
  30. data/lib/orb/models/price.rb +0 -35
  31. data/lib/orb/models/subscription.rb +0 -22
  32. data/lib/orb/models/subscription_cancel_response.rb +0 -22
  33. data/lib/orb/models/subscription_change_apply_response.rb +0 -22
  34. data/lib/orb/models/subscription_change_cancel_response.rb +0 -22
  35. data/lib/orb/models/subscription_change_retrieve_response.rb +0 -22
  36. data/lib/orb/models/subscription_create_params.rb +0 -88
  37. data/lib/orb/models/subscription_create_response.rb +0 -22
  38. data/lib/orb/models/subscription_price_intervals_params.rb +0 -89
  39. data/lib/orb/models/subscription_price_intervals_response.rb +0 -22
  40. data/lib/orb/models/subscription_schedule_plan_change_params.rb +0 -88
  41. data/lib/orb/models/subscription_schedule_plan_change_response.rb +0 -22
  42. data/lib/orb/models/subscription_trigger_phase_response.rb +0 -22
  43. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +0 -22
  44. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +0 -22
  45. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +0 -22
  46. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +0 -22
  47. data/lib/orb/models/subscription_update_trial_response.rb +0 -22
  48. data/lib/orb/models/subscription_usage.rb +0 -9
  49. data/lib/orb/models.rb +30 -16
  50. data/lib/orb/version.rb +1 -1
  51. data/rbi/orb/internal/type/array_of.rbi +6 -0
  52. data/rbi/orb/internal/type/base_model.rbi +5 -0
  53. data/rbi/orb/internal/type/boolean.rbi +6 -0
  54. data/rbi/orb/internal/type/enum.rbi +5 -0
  55. data/rbi/orb/internal/type/file_input.rbi +5 -0
  56. data/rbi/orb/internal/type/hash_of.rbi +6 -0
  57. data/rbi/orb/internal/type/union.rbi +5 -0
  58. data/rbi/orb/internal/type/unknown.rbi +6 -0
  59. data/rbi/orb/internal/util.rbi +30 -0
  60. data/rbi/orb/models/coupon.rbi +2 -2
  61. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +2 -65
  62. data/rbi/orb/models/customers/cost_list_response.rbi +2 -65
  63. data/rbi/orb/models/evaluate_price_group.rbi +7 -3
  64. data/rbi/orb/models/invoice.rbi +10 -149
  65. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +10 -133
  66. data/rbi/orb/models/invoice_line_item_create_response.rbi +8 -114
  67. data/rbi/orb/models/plan.rbi +8 -134
  68. data/rbi/orb/models/price.rbi +56 -588
  69. data/rbi/orb/models/subscription.rbi +6 -99
  70. data/rbi/orb/models/subscription_cancel_response.rbi +6 -89
  71. data/rbi/orb/models/subscription_change_apply_response.rbi +6 -89
  72. data/rbi/orb/models/subscription_change_cancel_response.rbi +6 -89
  73. data/rbi/orb/models/subscription_change_retrieve_response.rbi +6 -89
  74. data/rbi/orb/models/subscription_create_response.rbi +6 -89
  75. data/rbi/orb/models/subscription_fetch_costs_response.rbi +2 -65
  76. data/rbi/orb/models/subscription_price_intervals_params.rbi +72 -26
  77. data/rbi/orb/models/subscription_price_intervals_response.rbi +6 -89
  78. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +6 -89
  79. data/rbi/orb/models/subscription_trigger_phase_response.rbi +6 -89
  80. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +6 -89
  81. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +6 -89
  82. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +6 -89
  83. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +6 -89
  84. data/rbi/orb/models/subscription_update_trial_params.rbi +3 -14
  85. data/rbi/orb/models/subscription_update_trial_response.rbi +6 -89
  86. data/rbi/orb/resources/customers/credits/ledger.rbi +4 -36
  87. data/rbi/orb/resources/prices/external_price_id.rbi +2 -64
  88. data/rbi/orb/resources/prices.rbi +4 -130
  89. data/rbi/orb/resources/subscriptions.rbi +2 -10
  90. data/sig/orb/internal/type/array_of.rbs +3 -0
  91. data/sig/orb/internal/type/base_model.rbs +2 -0
  92. data/sig/orb/internal/type/boolean.rbs +3 -0
  93. data/sig/orb/internal/type/enum.rbs +2 -0
  94. data/sig/orb/internal/type/file_input.rbs +2 -0
  95. data/sig/orb/internal/type/hash_of.rbs +3 -0
  96. data/sig/orb/internal/type/union.rbs +2 -0
  97. data/sig/orb/internal/type/unknown.rbs +3 -0
  98. data/sig/orb/internal/util.rbs +12 -0
  99. metadata +2 -2
@@ -106,11 +106,7 @@ module Orb
106
106
  sig do
107
107
  returns(
108
108
  T::Array[
109
- T.any(
110
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Amount,
111
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Percentage,
112
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Usage
113
- )
109
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Variants
114
110
  ]
115
111
  )
116
112
  end
@@ -448,11 +444,7 @@ module Orb
448
444
  default_invoice_memo: T.nilable(String),
449
445
  discount_intervals:
450
446
  T::Array[
451
- T.any(
452
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Amount,
453
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Percentage,
454
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Usage
455
- )
447
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Variants
456
448
  ],
457
449
  end_date: T.nilable(Time),
458
450
  fixed_fee_quantity_schedule:
@@ -512,13 +504,7 @@ module Orb
512
504
 
513
505
  sig do
514
506
  returns(
515
- T.any(
516
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::UsageDiscount,
517
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::AmountDiscount,
518
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
519
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Minimum,
520
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Maximum
521
- )
507
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Variants
522
508
  )
523
509
  end
524
510
  attr_accessor :adjustment
@@ -568,13 +554,7 @@ module Orb
568
554
  {
569
555
  id: String,
570
556
  adjustment:
571
- T.any(
572
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::UsageDiscount,
573
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::AmountDiscount,
574
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
575
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Minimum,
576
- Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Maximum
577
- ),
557
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Variants,
578
558
  applies_to_price_interval_ids: T::Array[String],
579
559
  end_date: T.nilable(Time),
580
560
  start_date: Time
@@ -1608,40 +1588,7 @@ module Orb
1608
1588
  #
1609
1589
  # For more on the types of prices, see
1610
1590
  # [the core concepts documentation](/core-concepts#plan-and-price)
1611
- sig do
1612
- returns(
1613
- T.any(
1614
- Orb::Price::Unit,
1615
- Orb::Price::Package,
1616
- Orb::Price::Matrix,
1617
- Orb::Price::Tiered,
1618
- Orb::Price::TieredBps,
1619
- Orb::Price::Bps,
1620
- Orb::Price::BulkBps,
1621
- Orb::Price::Bulk,
1622
- Orb::Price::ThresholdTotalAmount,
1623
- Orb::Price::TieredPackage,
1624
- Orb::Price::GroupedTiered,
1625
- Orb::Price::TieredWithMinimum,
1626
- Orb::Price::TieredPackageWithMinimum,
1627
- Orb::Price::PackageWithAllocation,
1628
- Orb::Price::UnitWithPercent,
1629
- Orb::Price::MatrixWithAllocation,
1630
- Orb::Price::TieredWithProration,
1631
- Orb::Price::UnitWithProration,
1632
- Orb::Price::GroupedAllocation,
1633
- Orb::Price::GroupedWithProratedMinimum,
1634
- Orb::Price::GroupedWithMeteredMinimum,
1635
- Orb::Price::MatrixWithDisplayName,
1636
- Orb::Price::BulkWithProration,
1637
- Orb::Price::GroupedTieredPackage,
1638
- Orb::Price::MaxGroupTieredPackage,
1639
- Orb::Price::ScalableMatrixWithUnitPricing,
1640
- Orb::Price::ScalableMatrixWithTieredPricing,
1641
- Orb::Price::CumulativeGroupedBulk
1642
- )
1643
- )
1644
- end
1591
+ sig { returns(Orb::Price::Variants) }
1645
1592
  attr_accessor :price
1646
1593
 
1647
1594
  # The start date of the price interval. This is the date that Orb starts billing
@@ -1761,37 +1708,7 @@ module Orb
1761
1708
  Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition
1762
1709
  ]
1763
1710
  ),
1764
- price:
1765
- T.any(
1766
- Orb::Price::Unit,
1767
- Orb::Price::Package,
1768
- Orb::Price::Matrix,
1769
- Orb::Price::Tiered,
1770
- Orb::Price::TieredBps,
1771
- Orb::Price::Bps,
1772
- Orb::Price::BulkBps,
1773
- Orb::Price::Bulk,
1774
- Orb::Price::ThresholdTotalAmount,
1775
- Orb::Price::TieredPackage,
1776
- Orb::Price::GroupedTiered,
1777
- Orb::Price::TieredWithMinimum,
1778
- Orb::Price::TieredPackageWithMinimum,
1779
- Orb::Price::PackageWithAllocation,
1780
- Orb::Price::UnitWithPercent,
1781
- Orb::Price::MatrixWithAllocation,
1782
- Orb::Price::TieredWithProration,
1783
- Orb::Price::UnitWithProration,
1784
- Orb::Price::GroupedAllocation,
1785
- Orb::Price::GroupedWithProratedMinimum,
1786
- Orb::Price::GroupedWithMeteredMinimum,
1787
- Orb::Price::MatrixWithDisplayName,
1788
- Orb::Price::BulkWithProration,
1789
- Orb::Price::GroupedTieredPackage,
1790
- Orb::Price::MaxGroupTieredPackage,
1791
- Orb::Price::ScalableMatrixWithUnitPricing,
1792
- Orb::Price::ScalableMatrixWithTieredPricing,
1793
- Orb::Price::CumulativeGroupedBulk
1794
- ),
1711
+ price: Orb::Price::Variants,
1795
1712
  start_date: Time,
1796
1713
  usage_customer_ids: T.nilable(T::Array[String])
1797
1714
  }
@@ -106,11 +106,7 @@ module Orb
106
106
  sig do
107
107
  returns(
108
108
  T::Array[
109
- T.any(
110
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Amount,
111
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Percentage,
112
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Usage
113
- )
109
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Variants
114
110
  ]
115
111
  )
116
112
  end
@@ -448,11 +444,7 @@ module Orb
448
444
  default_invoice_memo: T.nilable(String),
449
445
  discount_intervals:
450
446
  T::Array[
451
- T.any(
452
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Amount,
453
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Percentage,
454
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Usage
455
- )
447
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Variants
456
448
  ],
457
449
  end_date: T.nilable(Time),
458
450
  fixed_fee_quantity_schedule:
@@ -512,13 +504,7 @@ module Orb
512
504
 
513
505
  sig do
514
506
  returns(
515
- T.any(
516
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::UsageDiscount,
517
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::AmountDiscount,
518
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
519
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Minimum,
520
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Maximum
521
- )
507
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Variants
522
508
  )
523
509
  end
524
510
  attr_accessor :adjustment
@@ -568,13 +554,7 @@ module Orb
568
554
  {
569
555
  id: String,
570
556
  adjustment:
571
- T.any(
572
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::UsageDiscount,
573
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::AmountDiscount,
574
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
575
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Minimum,
576
- Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Maximum
577
- ),
557
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Variants,
578
558
  applies_to_price_interval_ids: T::Array[String],
579
559
  end_date: T.nilable(Time),
580
560
  start_date: Time
@@ -1608,40 +1588,7 @@ module Orb
1608
1588
  #
1609
1589
  # For more on the types of prices, see
1610
1590
  # [the core concepts documentation](/core-concepts#plan-and-price)
1611
- sig do
1612
- returns(
1613
- T.any(
1614
- Orb::Price::Unit,
1615
- Orb::Price::Package,
1616
- Orb::Price::Matrix,
1617
- Orb::Price::Tiered,
1618
- Orb::Price::TieredBps,
1619
- Orb::Price::Bps,
1620
- Orb::Price::BulkBps,
1621
- Orb::Price::Bulk,
1622
- Orb::Price::ThresholdTotalAmount,
1623
- Orb::Price::TieredPackage,
1624
- Orb::Price::GroupedTiered,
1625
- Orb::Price::TieredWithMinimum,
1626
- Orb::Price::TieredPackageWithMinimum,
1627
- Orb::Price::PackageWithAllocation,
1628
- Orb::Price::UnitWithPercent,
1629
- Orb::Price::MatrixWithAllocation,
1630
- Orb::Price::TieredWithProration,
1631
- Orb::Price::UnitWithProration,
1632
- Orb::Price::GroupedAllocation,
1633
- Orb::Price::GroupedWithProratedMinimum,
1634
- Orb::Price::GroupedWithMeteredMinimum,
1635
- Orb::Price::MatrixWithDisplayName,
1636
- Orb::Price::BulkWithProration,
1637
- Orb::Price::GroupedTieredPackage,
1638
- Orb::Price::MaxGroupTieredPackage,
1639
- Orb::Price::ScalableMatrixWithUnitPricing,
1640
- Orb::Price::ScalableMatrixWithTieredPricing,
1641
- Orb::Price::CumulativeGroupedBulk
1642
- )
1643
- )
1644
- end
1591
+ sig { returns(Orb::Price::Variants) }
1645
1592
  attr_accessor :price
1646
1593
 
1647
1594
  # The start date of the price interval. This is the date that Orb starts billing
@@ -1761,37 +1708,7 @@ module Orb
1761
1708
  Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition
1762
1709
  ]
1763
1710
  ),
1764
- price:
1765
- T.any(
1766
- Orb::Price::Unit,
1767
- Orb::Price::Package,
1768
- Orb::Price::Matrix,
1769
- Orb::Price::Tiered,
1770
- Orb::Price::TieredBps,
1771
- Orb::Price::Bps,
1772
- Orb::Price::BulkBps,
1773
- Orb::Price::Bulk,
1774
- Orb::Price::ThresholdTotalAmount,
1775
- Orb::Price::TieredPackage,
1776
- Orb::Price::GroupedTiered,
1777
- Orb::Price::TieredWithMinimum,
1778
- Orb::Price::TieredPackageWithMinimum,
1779
- Orb::Price::PackageWithAllocation,
1780
- Orb::Price::UnitWithPercent,
1781
- Orb::Price::MatrixWithAllocation,
1782
- Orb::Price::TieredWithProration,
1783
- Orb::Price::UnitWithProration,
1784
- Orb::Price::GroupedAllocation,
1785
- Orb::Price::GroupedWithProratedMinimum,
1786
- Orb::Price::GroupedWithMeteredMinimum,
1787
- Orb::Price::MatrixWithDisplayName,
1788
- Orb::Price::BulkWithProration,
1789
- Orb::Price::GroupedTieredPackage,
1790
- Orb::Price::MaxGroupTieredPackage,
1791
- Orb::Price::ScalableMatrixWithUnitPricing,
1792
- Orb::Price::ScalableMatrixWithTieredPricing,
1793
- Orb::Price::CumulativeGroupedBulk
1794
- ),
1711
+ price: Orb::Price::Variants,
1795
1712
  start_date: Time,
1796
1713
  usage_customer_ids: T.nilable(T::Array[String])
1797
1714
  }
@@ -14,12 +14,7 @@ module Orb
14
14
  # The new date that the trial should end, or the literal string `immediate` to end
15
15
  # the trial immediately.
16
16
  sig do
17
- returns(
18
- T.any(
19
- Time,
20
- Orb::SubscriptionUpdateTrialParams::TrialEndDate::OrSymbol
21
- )
22
- )
17
+ returns(Orb::SubscriptionUpdateTrialParams::TrialEndDate::Variants)
23
18
  end
24
19
  attr_accessor :trial_end_date
25
20
 
@@ -34,10 +29,7 @@ module Orb
34
29
  sig do
35
30
  params(
36
31
  trial_end_date:
37
- T.any(
38
- Time,
39
- Orb::SubscriptionUpdateTrialParams::TrialEndDate::OrSymbol
40
- ),
32
+ Orb::SubscriptionUpdateTrialParams::TrialEndDate::Variants,
41
33
  shift: T::Boolean,
42
34
  request_options: Orb::RequestOptions::OrHash
43
35
  ).returns(T.attached_class)
@@ -57,10 +49,7 @@ module Orb
57
49
  override.returns(
58
50
  {
59
51
  trial_end_date:
60
- T.any(
61
- Time,
62
- Orb::SubscriptionUpdateTrialParams::TrialEndDate::OrSymbol
63
- ),
52
+ Orb::SubscriptionUpdateTrialParams::TrialEndDate::Variants,
64
53
  shift: T::Boolean,
65
54
  request_options: Orb::RequestOptions
66
55
  }
@@ -106,11 +106,7 @@ module Orb
106
106
  sig do
107
107
  returns(
108
108
  T::Array[
109
- T.any(
110
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
111
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
112
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
113
- )
109
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Variants
114
110
  ]
115
111
  )
116
112
  end
@@ -442,11 +438,7 @@ module Orb
442
438
  default_invoice_memo: T.nilable(String),
443
439
  discount_intervals:
444
440
  T::Array[
445
- T.any(
446
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
447
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
448
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
449
- )
441
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Variants
450
442
  ],
451
443
  end_date: T.nilable(Time),
452
444
  fixed_fee_quantity_schedule:
@@ -505,13 +497,7 @@ module Orb
505
497
 
506
498
  sig do
507
499
  returns(
508
- T.any(
509
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
510
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
511
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
512
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
513
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
514
- )
500
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Variants
515
501
  )
516
502
  end
517
503
  attr_accessor :adjustment
@@ -561,13 +547,7 @@ module Orb
561
547
  {
562
548
  id: String,
563
549
  adjustment:
564
- T.any(
565
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
566
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
567
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
568
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
569
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
570
- ),
550
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Variants,
571
551
  applies_to_price_interval_ids: T::Array[String],
572
552
  end_date: T.nilable(Time),
573
553
  start_date: Time
@@ -1601,40 +1581,7 @@ module Orb
1601
1581
  #
1602
1582
  # For more on the types of prices, see
1603
1583
  # [the core concepts documentation](/core-concepts#plan-and-price)
1604
- sig do
1605
- returns(
1606
- T.any(
1607
- Orb::Price::Unit,
1608
- Orb::Price::Package,
1609
- Orb::Price::Matrix,
1610
- Orb::Price::Tiered,
1611
- Orb::Price::TieredBps,
1612
- Orb::Price::Bps,
1613
- Orb::Price::BulkBps,
1614
- Orb::Price::Bulk,
1615
- Orb::Price::ThresholdTotalAmount,
1616
- Orb::Price::TieredPackage,
1617
- Orb::Price::GroupedTiered,
1618
- Orb::Price::TieredWithMinimum,
1619
- Orb::Price::TieredPackageWithMinimum,
1620
- Orb::Price::PackageWithAllocation,
1621
- Orb::Price::UnitWithPercent,
1622
- Orb::Price::MatrixWithAllocation,
1623
- Orb::Price::TieredWithProration,
1624
- Orb::Price::UnitWithProration,
1625
- Orb::Price::GroupedAllocation,
1626
- Orb::Price::GroupedWithProratedMinimum,
1627
- Orb::Price::GroupedWithMeteredMinimum,
1628
- Orb::Price::MatrixWithDisplayName,
1629
- Orb::Price::BulkWithProration,
1630
- Orb::Price::GroupedTieredPackage,
1631
- Orb::Price::MaxGroupTieredPackage,
1632
- Orb::Price::ScalableMatrixWithUnitPricing,
1633
- Orb::Price::ScalableMatrixWithTieredPricing,
1634
- Orb::Price::CumulativeGroupedBulk
1635
- )
1636
- )
1637
- end
1584
+ sig { returns(Orb::Price::Variants) }
1638
1585
  attr_accessor :price
1639
1586
 
1640
1587
  # The start date of the price interval. This is the date that Orb starts billing
@@ -1754,37 +1701,7 @@ module Orb
1754
1701
  Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition
1755
1702
  ]
1756
1703
  ),
1757
- price:
1758
- T.any(
1759
- Orb::Price::Unit,
1760
- Orb::Price::Package,
1761
- Orb::Price::Matrix,
1762
- Orb::Price::Tiered,
1763
- Orb::Price::TieredBps,
1764
- Orb::Price::Bps,
1765
- Orb::Price::BulkBps,
1766
- Orb::Price::Bulk,
1767
- Orb::Price::ThresholdTotalAmount,
1768
- Orb::Price::TieredPackage,
1769
- Orb::Price::GroupedTiered,
1770
- Orb::Price::TieredWithMinimum,
1771
- Orb::Price::TieredPackageWithMinimum,
1772
- Orb::Price::PackageWithAllocation,
1773
- Orb::Price::UnitWithPercent,
1774
- Orb::Price::MatrixWithAllocation,
1775
- Orb::Price::TieredWithProration,
1776
- Orb::Price::UnitWithProration,
1777
- Orb::Price::GroupedAllocation,
1778
- Orb::Price::GroupedWithProratedMinimum,
1779
- Orb::Price::GroupedWithMeteredMinimum,
1780
- Orb::Price::MatrixWithDisplayName,
1781
- Orb::Price::BulkWithProration,
1782
- Orb::Price::GroupedTieredPackage,
1783
- Orb::Price::MaxGroupTieredPackage,
1784
- Orb::Price::ScalableMatrixWithUnitPricing,
1785
- Orb::Price::ScalableMatrixWithTieredPricing,
1786
- Orb::Price::CumulativeGroupedBulk
1787
- ),
1704
+ price: Orb::Price::Variants,
1788
1705
  start_date: Time,
1789
1706
  usage_customer_ids: T.nilable(T::Array[String])
1790
1707
  }
@@ -108,15 +108,7 @@ module Orb
108
108
  request_options: Orb::RequestOptions::OrHash
109
109
  ).returns(
110
110
  Orb::Internal::Page[
111
- T.any(
112
- Orb::Models::Customers::Credits::LedgerListResponse::Increment,
113
- Orb::Models::Customers::Credits::LedgerListResponse::Decrement,
114
- Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChange,
115
- Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiry,
116
- Orb::Models::Customers::Credits::LedgerListResponse::Void,
117
- Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiated,
118
- Orb::Models::Customers::Credits::LedgerListResponse::Amendment
119
- )
111
+ Orb::Models::Customers::Credits::LedgerListResponse::Variants
120
112
  ]
121
113
  )
122
114
  end
@@ -274,15 +266,7 @@ module Orb
274
266
  ),
275
267
  request_options: Orb::RequestOptions::OrHash
276
268
  ).returns(
277
- T.any(
278
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Increment,
279
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Decrement,
280
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChange,
281
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiry,
282
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Void,
283
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiated,
284
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Amendment
285
- )
269
+ Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Variants
286
270
  )
287
271
  end
288
272
  def create_entry(
@@ -461,15 +445,7 @@ module Orb
461
445
  ),
462
446
  request_options: Orb::RequestOptions::OrHash
463
447
  ).returns(
464
- T.any(
465
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Increment,
466
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Decrement,
467
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChange,
468
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiry,
469
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Void,
470
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiated,
471
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Amendment
472
- )
448
+ Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Variants
473
449
  )
474
450
  end
475
451
  def create_entry_by_external_id(
@@ -617,15 +593,7 @@ module Orb
617
593
  request_options: Orb::RequestOptions::OrHash
618
594
  ).returns(
619
595
  Orb::Internal::Page[
620
- T.any(
621
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Increment,
622
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Decrement,
623
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChange,
624
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiry,
625
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Void,
626
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiated,
627
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Amendment
628
- )
596
+ Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Variants
629
597
  ]
630
598
  )
631
599
  end
@@ -12,38 +12,7 @@ module Orb
12
12
  external_price_id: String,
13
13
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
14
14
  request_options: Orb::RequestOptions::OrHash
15
- ).returns(
16
- T.any(
17
- Orb::Price::Unit,
18
- Orb::Price::Package,
19
- Orb::Price::Matrix,
20
- Orb::Price::Tiered,
21
- Orb::Price::TieredBps,
22
- Orb::Price::Bps,
23
- Orb::Price::BulkBps,
24
- Orb::Price::Bulk,
25
- Orb::Price::ThresholdTotalAmount,
26
- Orb::Price::TieredPackage,
27
- Orb::Price::GroupedTiered,
28
- Orb::Price::TieredWithMinimum,
29
- Orb::Price::TieredPackageWithMinimum,
30
- Orb::Price::PackageWithAllocation,
31
- Orb::Price::UnitWithPercent,
32
- Orb::Price::MatrixWithAllocation,
33
- Orb::Price::TieredWithProration,
34
- Orb::Price::UnitWithProration,
35
- Orb::Price::GroupedAllocation,
36
- Orb::Price::GroupedWithProratedMinimum,
37
- Orb::Price::GroupedWithMeteredMinimum,
38
- Orb::Price::MatrixWithDisplayName,
39
- Orb::Price::BulkWithProration,
40
- Orb::Price::GroupedTieredPackage,
41
- Orb::Price::MaxGroupTieredPackage,
42
- Orb::Price::ScalableMatrixWithUnitPricing,
43
- Orb::Price::ScalableMatrixWithTieredPricing,
44
- Orb::Price::CumulativeGroupedBulk
45
- )
46
- )
15
+ ).returns(Orb::Price::Variants)
47
16
  end
48
17
  def update(
49
18
  external_price_id,
@@ -62,38 +31,7 @@ module Orb
62
31
  params(
63
32
  external_price_id: String,
64
33
  request_options: Orb::RequestOptions::OrHash
65
- ).returns(
66
- T.any(
67
- Orb::Price::Unit,
68
- Orb::Price::Package,
69
- Orb::Price::Matrix,
70
- Orb::Price::Tiered,
71
- Orb::Price::TieredBps,
72
- Orb::Price::Bps,
73
- Orb::Price::BulkBps,
74
- Orb::Price::Bulk,
75
- Orb::Price::ThresholdTotalAmount,
76
- Orb::Price::TieredPackage,
77
- Orb::Price::GroupedTiered,
78
- Orb::Price::TieredWithMinimum,
79
- Orb::Price::TieredPackageWithMinimum,
80
- Orb::Price::PackageWithAllocation,
81
- Orb::Price::UnitWithPercent,
82
- Orb::Price::MatrixWithAllocation,
83
- Orb::Price::TieredWithProration,
84
- Orb::Price::UnitWithProration,
85
- Orb::Price::GroupedAllocation,
86
- Orb::Price::GroupedWithProratedMinimum,
87
- Orb::Price::GroupedWithMeteredMinimum,
88
- Orb::Price::MatrixWithDisplayName,
89
- Orb::Price::BulkWithProration,
90
- Orb::Price::GroupedTieredPackage,
91
- Orb::Price::MaxGroupTieredPackage,
92
- Orb::Price::ScalableMatrixWithUnitPricing,
93
- Orb::Price::ScalableMatrixWithTieredPricing,
94
- Orb::Price::CumulativeGroupedBulk
95
- )
96
- )
34
+ ).returns(Orb::Price::Variants)
97
35
  end
98
36
  def fetch(external_price_id, request_options: {})
99
37
  end