orb-billing 0.5.1 → 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 +14 -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 +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2311016a3b168d7ae7594ed94985d5675b04e4cb2aa3f345c294d4ff8f096f9b
4
- data.tar.gz: e7af6660624adb5654be1cafd70a31ef4415a3f865c3eae87fa64fe2cf67e8be
3
+ metadata.gz: b576a5b271acdbf94df08e2e2be99469477ee7d6cf42a714529181b33dc0e656
4
+ data.tar.gz: 57263a9d9b323b9229d8ba1f5cd52abe936e48ce5bde2b47004073e0b53c783d
5
5
  SHA512:
6
- metadata.gz: 0b9ffd306787ad961c41d9a04bdd7d16ec200d9d7d54f30a9a1c8690ce54db8a4797862d3d19fbc1542e89833033c8b1cd2358ff459a2c6862dcbf336cbbb40a
7
- data.tar.gz: c3f4946a78b0f15f20f93952b80cef972ebdbc41134cf7a93d0154191d522ca74180b7a65a250bce9fcf374a09a7da4abb24ec75081267d009c18766adcca169
6
+ metadata.gz: 76593c5f22671c9dbb4921c565941190e1b1be6593de38b3e351fa1b52f946c22ca56ec4c8c54f1fc061859ccd6308245312f5f3d268d0be01de8e581685e403
7
+ data.tar.gz: 4073537082ae186f72e6c449469b09cec9edfb196d2716b3d2678845e9c6dc8bc6d50cd4317639cb56735f9244aa1cd8dcaabff28ff960380ba2260327c7f9ef
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.2 (2025-05-20)
4
+
5
+ Full Changelog: [v0.5.1...v0.5.2](https://github.com/orbcorp/orb-ruby/compare/v0.5.1...v0.5.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * correctly instantiate sorbet type aliases for enums and unions ([fe6a29e](https://github.com/orbcorp/orb-ruby/commit/fe6a29e33ae5266fd130d703da02eec410a3902f))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** version bump ([b4afd0a](https://github.com/orbcorp/orb-ruby/commit/b4afd0af68ade8e7a53de012123bce96cedb8670))
15
+ * use sorbet union aliases where available ([444add5](https://github.com/orbcorp/orb-ruby/commit/444add556f04ae705e8c918421419cf43df1b053))
16
+
3
17
  ## 0.5.1 (2025-05-20)
4
18
 
5
19
  Full Changelog: [v0.5.0...v0.5.1](https://github.com/orbcorp/orb-ruby/compare/v0.5.0...v0.5.1)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "orb-billing", "~> 0.5.1"
18
+ gem "orb-billing", "~> 0.5.2"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -12,6 +12,7 @@ module Orb
12
12
  # Array of items of a given type.
13
13
  class ArrayOf
14
14
  include Orb::Internal::Type::Converter
15
+ include Orb::Internal::Util::SorbetRuntimeSupport
15
16
 
16
17
  private_class_method :new
17
18
 
@@ -110,6 +111,13 @@ module Orb
110
111
  end
111
112
  end
112
113
 
114
+ # @api private
115
+ #
116
+ # @return [Object]
117
+ def to_sorbet_type
118
+ T::Array[Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
119
+ end
120
+
113
121
  # @api private
114
122
  #
115
123
  # @return [generic<Elem>]
@@ -304,6 +304,13 @@ module Orb
304
304
 
305
305
  acc
306
306
  end
307
+
308
+ # @api private
309
+ #
310
+ # @return [Object]
311
+ def to_sorbet_type
312
+ self
313
+ end
307
314
  end
308
315
 
309
316
  class << self
@@ -10,6 +10,7 @@ module Orb
10
10
  # Ruby has no Boolean class; this is something for models to refer to.
11
11
  class Boolean
12
12
  extend Orb::Internal::Type::Converter
13
+ extend Orb::Internal::Util::SorbetRuntimeSupport
13
14
 
14
15
  private_class_method :new
15
16
 
@@ -56,6 +57,13 @@ module Orb
56
57
  # @option state [Boolean] :can_retry
57
58
  #
58
59
  # @return [Boolean, Object]
60
+
61
+ # @api private
62
+ #
63
+ # @return [Object]
64
+ def to_sorbet_type
65
+ T::Boolean
66
+ end
59
67
  end
60
68
  end
61
69
  end
@@ -108,6 +108,18 @@ module Orb
108
108
  #
109
109
  # @return [Symbol, Object]
110
110
 
111
+ # @api private
112
+ #
113
+ # @return [Object]
114
+ def to_sorbet_type
115
+ case values
116
+ in []
117
+ T.noreturn
118
+ in [value, *_]
119
+ T.all(Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
120
+ end
121
+ end
122
+
111
123
  # @api private
112
124
  #
113
125
  # @param depth [Integer]
@@ -88,6 +88,13 @@ module Orb
88
88
 
89
89
  value
90
90
  end
91
+
92
+ # @api private
93
+ #
94
+ # @return [Object]
95
+ def to_sorbet_type
96
+ T.any(Pathname, StringIO, IO, String, Orb::FilePart)
97
+ end
91
98
  end
92
99
  end
93
100
  end
@@ -12,6 +12,7 @@ module Orb
12
12
  # Hash of items of a given type.
13
13
  class HashOf
14
14
  include Orb::Internal::Type::Converter
15
+ include Orb::Internal::Util::SorbetRuntimeSupport
15
16
 
16
17
  private_class_method :new
17
18
 
@@ -130,6 +131,13 @@ module Orb
130
131
  end
131
132
  end
132
133
 
134
+ # @api private
135
+ #
136
+ # @return [Object]
137
+ def to_sorbet_type
138
+ T::Hash[Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
139
+ end
140
+
133
141
  # @api private
134
142
  #
135
143
  # @return [generic<Elem>]
@@ -231,6 +231,18 @@ module Orb
231
231
  super
232
232
  end
233
233
 
234
+ # @api private
235
+ #
236
+ # @return [Object]
237
+ def to_sorbet_type
238
+ case (v = variants)
239
+ in []
240
+ T.noreturn
241
+ else
242
+ T.any(*v.map { Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
243
+ end
244
+ end
245
+
234
246
  # rubocop:enable Style/CaseEquality
235
247
  # rubocop:enable Style/HashEachMethods
236
248
 
@@ -10,6 +10,7 @@ module Orb
10
10
  # When we don't know what to expect for the value.
11
11
  class Unknown
12
12
  extend Orb::Internal::Type::Converter
13
+ extend Orb::Internal::Util::SorbetRuntimeSupport
13
14
 
14
15
  # rubocop:disable Lint/UnusedMethodArgument
15
16
 
@@ -58,6 +59,13 @@ module Orb
58
59
  # @option state [Boolean] :can_retry
59
60
  #
60
61
  # @return [Object]
62
+
63
+ # @api private
64
+ #
65
+ # @return [Object]
66
+ def to_sorbet_type
67
+ T.anything
68
+ end
61
69
  end
62
70
 
63
71
  # rubocop:enable Lint/UnusedMethodArgument
@@ -9,6 +9,23 @@ module Orb
9
9
  # @return [Float]
10
10
  def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC)
11
11
 
12
+ # @api private
13
+ #
14
+ # @param ns [Module, Class]
15
+ #
16
+ # @return [Enumerable<Module, Class>]
17
+ def self.walk_namespaces(ns)
18
+ ns.constants(false).lazy.flat_map do
19
+ case (c = ns.const_get(_1, false))
20
+ in Module | Class
21
+ walk_namespaces(c)
22
+ else
23
+ []
24
+ end
25
+ end
26
+ .chain([ns])
27
+ end
28
+
12
29
  class << self
13
30
  # @api private
14
31
  #
@@ -826,11 +843,39 @@ module Orb
826
843
  sorbet_runtime_constants.fetch(name).call
827
844
  end
828
845
 
846
+ # @api private
847
+ #
848
+ # @param name [Symbol]
849
+ #
850
+ # @return [Boolean]
851
+ def sorbet_constant_defined?(name) = sorbet_runtime_constants.key?(name)
852
+
829
853
  # @api private
830
854
  #
831
855
  # @param name [Symbol]
832
856
  # @param blk [Proc]
833
857
  def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk)
858
+
859
+ # @api private
860
+ #
861
+ # @return [Object]
862
+ def to_sorbet_type = raise NotImplementedError
863
+
864
+ class << self
865
+ # @api private
866
+ #
867
+ # @param type [Orb::Internal::Util::SorbetRuntimeSupport, Object]
868
+ #
869
+ # @return [Object]
870
+ def to_sorbet_type(type)
871
+ case type
872
+ in Orb::Internal::Util::SorbetRuntimeSupport
873
+ type.to_sorbet_type
874
+ else
875
+ type
876
+ end
877
+ end
878
+ end
834
879
  end
835
880
 
836
881
  extend Orb::Internal::Util::SorbetRuntimeSupport
@@ -84,10 +84,6 @@ module Orb
84
84
 
85
85
  # @!method self.variants
86
86
  # @return [Array(Orb::PercentageDiscount, Orb::AmountDiscount)]
87
-
88
- define_sorbet_constant!(:Variants) do
89
- T.type_alias { T.any(Orb::PercentageDiscount, Orb::AmountDiscount) }
90
- end
91
87
  end
92
88
  end
93
89
  end
@@ -89,12 +89,6 @@ module Orb
89
89
 
90
90
  # @!method self.variants
91
91
  # @return [Array(Orb::CouponCreateParams::Discount::Percentage, Orb::CouponCreateParams::Discount::Amount)]
92
-
93
- define_sorbet_constant!(:Variants) do
94
- T.type_alias do
95
- T.any(Orb::CouponCreateParams::Discount::Percentage, Orb::CouponCreateParams::Discount::Amount)
96
- end
97
- end
98
92
  end
99
93
  end
100
94
  end
@@ -489,15 +489,6 @@ module Orb
489
489
 
490
490
  # @!method self.variants
491
491
  # @return [Array(Orb::CustomerCreateParams::TaxConfiguration::Avalara, Orb::CustomerCreateParams::TaxConfiguration::Taxjar)]
492
-
493
- define_sorbet_constant!(:Variants) do
494
- T.type_alias do
495
- T.any(
496
- Orb::CustomerCreateParams::TaxConfiguration::Avalara,
497
- Orb::CustomerCreateParams::TaxConfiguration::Taxjar
498
- )
499
- end
500
- end
501
492
  end
502
493
 
503
494
  class TaxID < Orb::Internal::Type::BaseModel
@@ -490,15 +490,6 @@ module Orb
490
490
 
491
491
  # @!method self.variants
492
492
  # @return [Array(Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar)]
493
-
494
- define_sorbet_constant!(:Variants) do
495
- T.type_alias do
496
- T.any(
497
- Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara,
498
- Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar
499
- )
500
- end
501
- end
502
493
  end
503
494
 
504
495
  class TaxID < Orb::Internal::Type::BaseModel
@@ -484,15 +484,6 @@ module Orb
484
484
 
485
485
  # @!method self.variants
486
486
  # @return [Array(Orb::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::CustomerUpdateParams::TaxConfiguration::Taxjar)]
487
-
488
- define_sorbet_constant!(:Variants) do
489
- T.type_alias do
490
- T.any(
491
- Orb::CustomerUpdateParams::TaxConfiguration::Avalara,
492
- Orb::CustomerUpdateParams::TaxConfiguration::Taxjar
493
- )
494
- end
495
- end
496
487
  end
497
488
 
498
489
  class TaxID < Orb::Internal::Type::BaseModel
@@ -1190,20 +1190,6 @@ module Orb
1190
1190
 
1191
1191
  # @!method self.variants
1192
1192
  # @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiated, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Amendment)]
1193
-
1194
- define_sorbet_constant!(:Variants) do
1195
- T.type_alias do
1196
- T.any(
1197
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Increment,
1198
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Decrement,
1199
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChange,
1200
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiry,
1201
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Void,
1202
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiated,
1203
- Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Amendment
1204
- )
1205
- end
1206
- end
1207
1193
  end
1208
1194
  end
1209
1195
  end
@@ -1182,20 +1182,6 @@ module Orb
1182
1182
 
1183
1183
  # @!method self.variants
1184
1184
  # @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Void, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiated, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Amendment)]
1185
-
1186
- define_sorbet_constant!(:Variants) do
1187
- T.type_alias do
1188
- T.any(
1189
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Increment,
1190
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Decrement,
1191
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChange,
1192
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiry,
1193
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Void,
1194
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiated,
1195
- Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Amendment
1196
- )
1197
- end
1198
- end
1199
1185
  end
1200
1186
  end
1201
1187
  end
@@ -1186,20 +1186,6 @@ module Orb
1186
1186
 
1187
1187
  # @!method self.variants
1188
1188
  # @return [Array(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Increment, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Decrement, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChange, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Void, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiated, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Amendment)]
1189
-
1190
- define_sorbet_constant!(:Variants) do
1191
- T.type_alias do
1192
- T.any(
1193
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Increment,
1194
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Decrement,
1195
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChange,
1196
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiry,
1197
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Void,
1198
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiated,
1199
- Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Amendment
1200
- )
1201
- end
1202
- end
1203
1189
  end
1204
1190
  end
1205
1191
  end
@@ -1174,20 +1174,6 @@ module Orb
1174
1174
 
1175
1175
  # @!method self.variants
1176
1176
  # @return [Array(Orb::Models::Customers::Credits::LedgerListResponse::Increment, Orb::Models::Customers::Credits::LedgerListResponse::Decrement, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChange, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiry, Orb::Models::Customers::Credits::LedgerListResponse::Void, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiated, Orb::Models::Customers::Credits::LedgerListResponse::Amendment)]
1177
-
1178
- define_sorbet_constant!(:Variants) do
1179
- T.type_alias do
1180
- T.any(
1181
- Orb::Models::Customers::Credits::LedgerListResponse::Increment,
1182
- Orb::Models::Customers::Credits::LedgerListResponse::Decrement,
1183
- Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChange,
1184
- Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiry,
1185
- Orb::Models::Customers::Credits::LedgerListResponse::Void,
1186
- Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiated,
1187
- Orb::Models::Customers::Credits::LedgerListResponse::Amendment
1188
- )
1189
- end
1190
- end
1191
1177
  end
1192
1178
  end
1193
1179
  end
@@ -17,12 +17,6 @@ module Orb
17
17
 
18
18
  # @!method self.variants
19
19
  # @return [Array(Orb::PercentageDiscount, Orb::TrialDiscount, Orb::UsageDiscount, Orb::AmountDiscount)]
20
-
21
- define_sorbet_constant!(:Variants) do
22
- T.type_alias do
23
- T.any(Orb::PercentageDiscount, Orb::TrialDiscount, Orb::UsageDiscount, Orb::AmountDiscount)
24
- end
25
- end
26
20
  end
27
21
  end
28
22
  end
@@ -40,10 +40,6 @@ module Orb
40
40
 
41
41
  # @!method self.variants
42
42
  # @return [Array(String, Float, Boolean)]
43
-
44
- define_sorbet_constant!(:Variants) do
45
- T.type_alias { T.any(String, Float, T::Boolean) }
46
- end
47
43
  end
48
44
  end
49
45
  end
@@ -1608,18 +1608,6 @@ module Orb
1608
1608
 
1609
1609
  # @!method self.variants
1610
1610
  # @return [Array(Orb::Invoice::LineItem::Adjustment::UsageDiscount, Orb::Invoice::LineItem::Adjustment::AmountDiscount, Orb::Invoice::LineItem::Adjustment::PercentageDiscount, Orb::Invoice::LineItem::Adjustment::Minimum, Orb::Invoice::LineItem::Adjustment::Maximum)]
1611
-
1612
- define_sorbet_constant!(:Variants) do
1613
- T.type_alias do
1614
- T.any(
1615
- Orb::Invoice::LineItem::Adjustment::UsageDiscount,
1616
- Orb::Invoice::LineItem::Adjustment::AmountDiscount,
1617
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount,
1618
- Orb::Invoice::LineItem::Adjustment::Minimum,
1619
- Orb::Invoice::LineItem::Adjustment::Maximum
1620
- )
1621
- end
1622
- end
1623
1611
  end
1624
1612
 
1625
1613
  # @deprecated
@@ -1914,16 +1902,6 @@ module Orb
1914
1902
 
1915
1903
  # @!method self.variants
1916
1904
  # @return [Array(Orb::Invoice::LineItem::SubLineItem::Matrix, Orb::Invoice::LineItem::SubLineItem::Tier, Orb::Invoice::LineItem::SubLineItem::Null)]
1917
-
1918
- define_sorbet_constant!(:Variants) do
1919
- T.type_alias do
1920
- T.any(
1921
- Orb::Invoice::LineItem::SubLineItem::Matrix,
1922
- Orb::Invoice::LineItem::SubLineItem::Tier,
1923
- Orb::Invoice::LineItem::SubLineItem::Null
1924
- )
1925
- end
1926
- end
1927
1905
  end
1928
1906
 
1929
1907
  class TaxAmount < Orb::Internal::Type::BaseModel
@@ -1619,18 +1619,6 @@ module Orb
1619
1619
 
1620
1620
  # @!method self.variants
1621
1621
  # @return [Array(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::UsageDiscount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::AmountDiscount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::PercentageDiscount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Minimum, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Maximum)]
1622
-
1623
- define_sorbet_constant!(:Variants) do
1624
- T.type_alias do
1625
- T.any(
1626
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::UsageDiscount,
1627
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::AmountDiscount,
1628
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::PercentageDiscount,
1629
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Minimum,
1630
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Maximum
1631
- )
1632
- end
1633
- end
1634
1622
  end
1635
1623
 
1636
1624
  # @deprecated
@@ -1933,16 +1921,6 @@ module Orb
1933
1921
 
1934
1922
  # @!method self.variants
1935
1923
  # @return [Array(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Matrix, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Tier, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Null)]
1936
-
1937
- define_sorbet_constant!(:Variants) do
1938
- T.type_alias do
1939
- T.any(
1940
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Matrix,
1941
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Tier,
1942
- Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Null
1943
- )
1944
- end
1945
- end
1946
1924
  end
1947
1925
 
1948
1926
  class TaxAmount < Orb::Internal::Type::BaseModel
@@ -15,10 +15,6 @@ module Orb
15
15
 
16
16
  # @!method self.variants
17
17
  # @return [Array(Orb::PercentageDiscount, Orb::AmountDiscount, Orb::TrialDiscount)]
18
-
19
- define_sorbet_constant!(:Variants) do
20
- T.type_alias { T.any(Orb::PercentageDiscount, Orb::AmountDiscount, Orb::TrialDiscount) }
21
- end
22
18
  end
23
19
  end
24
20
  end
@@ -552,18 +552,6 @@ module Orb
552
552
 
553
553
  # @!method self.variants
554
554
  # @return [Array(Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum)]
555
-
556
- define_sorbet_constant!(:Variants) do
557
- T.type_alias do
558
- T.any(
559
- Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount,
560
- Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount,
561
- Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount,
562
- Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum,
563
- Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum
564
- )
565
- end
566
- end
567
555
  end
568
556
 
569
557
  # @deprecated
@@ -865,16 +853,6 @@ module Orb
865
853
 
866
854
  # @!method self.variants
867
855
  # @return [Array(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::Matrix, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::Tier, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::Null)]
868
-
869
- define_sorbet_constant!(:Variants) do
870
- T.type_alias do
871
- T.any(
872
- Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::Matrix,
873
- Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::Tier,
874
- Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::Null
875
- )
876
- end
877
- end
878
856
  end
879
857
 
880
858
  class TaxAmount < Orb::Internal::Type::BaseModel
@@ -542,18 +542,6 @@ module Orb
542
542
 
543
543
  # @!method self.variants
544
544
  # @return [Array(Orb::Plan::Adjustment::UsageDiscount, Orb::Plan::Adjustment::AmountDiscount, Orb::Plan::Adjustment::PercentageDiscount, Orb::Plan::Adjustment::Minimum, Orb::Plan::Adjustment::Maximum)]
545
-
546
- define_sorbet_constant!(:Variants) do
547
- T.type_alias do
548
- T.any(
549
- Orb::Plan::Adjustment::UsageDiscount,
550
- Orb::Plan::Adjustment::AmountDiscount,
551
- Orb::Plan::Adjustment::PercentageDiscount,
552
- Orb::Plan::Adjustment::Minimum,
553
- Orb::Plan::Adjustment::Maximum
554
- )
555
- end
556
- end
557
545
  end
558
546
 
559
547
  # @see Orb::Plan#base_plan
@@ -6219,38 +6219,6 @@ module Orb
6219
6219
 
6220
6220
  # @!method self.variants
6221
6221
  # @return [Array(Orb::PlanCreateParams::Price::Unit, Orb::PlanCreateParams::Price::Package, Orb::PlanCreateParams::Price::Matrix, Orb::PlanCreateParams::Price::Tiered, Orb::PlanCreateParams::Price::TieredBps, Orb::PlanCreateParams::Price::Bps, Orb::PlanCreateParams::Price::BulkBps, Orb::PlanCreateParams::Price::Bulk, Orb::PlanCreateParams::Price::ThresholdTotalAmount, Orb::PlanCreateParams::Price::TieredPackage, Orb::PlanCreateParams::Price::TieredWithMinimum, Orb::PlanCreateParams::Price::UnitWithPercent, Orb::PlanCreateParams::Price::PackageWithAllocation, Orb::PlanCreateParams::Price::TieredWithProration, Orb::PlanCreateParams::Price::UnitWithProration, Orb::PlanCreateParams::Price::GroupedAllocation, Orb::PlanCreateParams::Price::GroupedWithProratedMinimum, Orb::PlanCreateParams::Price::GroupedWithMeteredMinimum, Orb::PlanCreateParams::Price::MatrixWithDisplayName, Orb::PlanCreateParams::Price::BulkWithProration, Orb::PlanCreateParams::Price::GroupedTieredPackage, Orb::PlanCreateParams::Price::MaxGroupTieredPackage, Orb::PlanCreateParams::Price::ScalableMatrixWithUnitPricing, Orb::PlanCreateParams::Price::ScalableMatrixWithTieredPricing, Orb::PlanCreateParams::Price::CumulativeGroupedBulk)]
6222
-
6223
- define_sorbet_constant!(:Variants) do
6224
- T.type_alias do
6225
- T.any(
6226
- Orb::PlanCreateParams::Price::Unit,
6227
- Orb::PlanCreateParams::Price::Package,
6228
- Orb::PlanCreateParams::Price::Matrix,
6229
- Orb::PlanCreateParams::Price::Tiered,
6230
- Orb::PlanCreateParams::Price::TieredBps,
6231
- Orb::PlanCreateParams::Price::Bps,
6232
- Orb::PlanCreateParams::Price::BulkBps,
6233
- Orb::PlanCreateParams::Price::Bulk,
6234
- Orb::PlanCreateParams::Price::ThresholdTotalAmount,
6235
- Orb::PlanCreateParams::Price::TieredPackage,
6236
- Orb::PlanCreateParams::Price::TieredWithMinimum,
6237
- Orb::PlanCreateParams::Price::UnitWithPercent,
6238
- Orb::PlanCreateParams::Price::PackageWithAllocation,
6239
- Orb::PlanCreateParams::Price::TieredWithProration,
6240
- Orb::PlanCreateParams::Price::UnitWithProration,
6241
- Orb::PlanCreateParams::Price::GroupedAllocation,
6242
- Orb::PlanCreateParams::Price::GroupedWithProratedMinimum,
6243
- Orb::PlanCreateParams::Price::GroupedWithMeteredMinimum,
6244
- Orb::PlanCreateParams::Price::MatrixWithDisplayName,
6245
- Orb::PlanCreateParams::Price::BulkWithProration,
6246
- Orb::PlanCreateParams::Price::GroupedTieredPackage,
6247
- Orb::PlanCreateParams::Price::MaxGroupTieredPackage,
6248
- Orb::PlanCreateParams::Price::ScalableMatrixWithUnitPricing,
6249
- Orb::PlanCreateParams::Price::ScalableMatrixWithTieredPricing,
6250
- Orb::PlanCreateParams::Price::CumulativeGroupedBulk
6251
- )
6252
- end
6253
- end
6254
6222
  end
6255
6223
 
6256
6224
  # The status of the plan to create (either active or draft). If not specified,