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
@@ -69,38 +69,7 @@ module Orb
69
69
  ),
70
70
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
71
71
  request_options: Orb::RequestOptions::OrHash
72
- ).returns(
73
- T.any(
74
- Orb::Price::Unit,
75
- Orb::Price::Package,
76
- Orb::Price::Matrix,
77
- Orb::Price::Tiered,
78
- Orb::Price::TieredBps,
79
- Orb::Price::Bps,
80
- Orb::Price::BulkBps,
81
- Orb::Price::Bulk,
82
- Orb::Price::ThresholdTotalAmount,
83
- Orb::Price::TieredPackage,
84
- Orb::Price::GroupedTiered,
85
- Orb::Price::TieredWithMinimum,
86
- Orb::Price::TieredPackageWithMinimum,
87
- Orb::Price::PackageWithAllocation,
88
- Orb::Price::UnitWithPercent,
89
- Orb::Price::MatrixWithAllocation,
90
- Orb::Price::TieredWithProration,
91
- Orb::Price::UnitWithProration,
92
- Orb::Price::GroupedAllocation,
93
- Orb::Price::GroupedWithProratedMinimum,
94
- Orb::Price::GroupedWithMeteredMinimum,
95
- Orb::Price::MatrixWithDisplayName,
96
- Orb::Price::BulkWithProration,
97
- Orb::Price::GroupedTieredPackage,
98
- Orb::Price::MaxGroupTieredPackage,
99
- Orb::Price::ScalableMatrixWithUnitPricing,
100
- Orb::Price::ScalableMatrixWithTieredPricing,
101
- Orb::Price::CumulativeGroupedBulk
102
- )
103
- )
72
+ ).returns(Orb::Price::Variants)
104
73
  end
105
74
  def create(
106
75
  # The cadence to bill for this price on.
@@ -177,38 +146,7 @@ module Orb
177
146
  price_id: String,
178
147
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
179
148
  request_options: Orb::RequestOptions::OrHash
180
- ).returns(
181
- T.any(
182
- Orb::Price::Unit,
183
- Orb::Price::Package,
184
- Orb::Price::Matrix,
185
- Orb::Price::Tiered,
186
- Orb::Price::TieredBps,
187
- Orb::Price::Bps,
188
- Orb::Price::BulkBps,
189
- Orb::Price::Bulk,
190
- Orb::Price::ThresholdTotalAmount,
191
- Orb::Price::TieredPackage,
192
- Orb::Price::GroupedTiered,
193
- Orb::Price::TieredWithMinimum,
194
- Orb::Price::TieredPackageWithMinimum,
195
- Orb::Price::PackageWithAllocation,
196
- Orb::Price::UnitWithPercent,
197
- Orb::Price::MatrixWithAllocation,
198
- Orb::Price::TieredWithProration,
199
- Orb::Price::UnitWithProration,
200
- Orb::Price::GroupedAllocation,
201
- Orb::Price::GroupedWithProratedMinimum,
202
- Orb::Price::GroupedWithMeteredMinimum,
203
- Orb::Price::MatrixWithDisplayName,
204
- Orb::Price::BulkWithProration,
205
- Orb::Price::GroupedTieredPackage,
206
- Orb::Price::MaxGroupTieredPackage,
207
- Orb::Price::ScalableMatrixWithUnitPricing,
208
- Orb::Price::ScalableMatrixWithTieredPricing,
209
- Orb::Price::CumulativeGroupedBulk
210
- )
211
- )
149
+ ).returns(Orb::Price::Variants)
212
150
  end
213
151
  def update(
214
152
  price_id,
@@ -227,40 +165,7 @@ module Orb
227
165
  cursor: T.nilable(String),
228
166
  limit: Integer,
229
167
  request_options: Orb::RequestOptions::OrHash
230
- ).returns(
231
- Orb::Internal::Page[
232
- T.any(
233
- Orb::Price::Unit,
234
- Orb::Price::Package,
235
- Orb::Price::Matrix,
236
- Orb::Price::Tiered,
237
- Orb::Price::TieredBps,
238
- Orb::Price::Bps,
239
- Orb::Price::BulkBps,
240
- Orb::Price::Bulk,
241
- Orb::Price::ThresholdTotalAmount,
242
- Orb::Price::TieredPackage,
243
- Orb::Price::GroupedTiered,
244
- Orb::Price::TieredWithMinimum,
245
- Orb::Price::TieredPackageWithMinimum,
246
- Orb::Price::PackageWithAllocation,
247
- Orb::Price::UnitWithPercent,
248
- Orb::Price::MatrixWithAllocation,
249
- Orb::Price::TieredWithProration,
250
- Orb::Price::UnitWithProration,
251
- Orb::Price::GroupedAllocation,
252
- Orb::Price::GroupedWithProratedMinimum,
253
- Orb::Price::GroupedWithMeteredMinimum,
254
- Orb::Price::MatrixWithDisplayName,
255
- Orb::Price::BulkWithProration,
256
- Orb::Price::GroupedTieredPackage,
257
- Orb::Price::MaxGroupTieredPackage,
258
- Orb::Price::ScalableMatrixWithUnitPricing,
259
- Orb::Price::ScalableMatrixWithTieredPricing,
260
- Orb::Price::CumulativeGroupedBulk
261
- )
262
- ]
263
- )
168
+ ).returns(Orb::Internal::Page[Orb::Price::Variants])
264
169
  end
265
170
  def list(
266
171
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
@@ -332,38 +237,7 @@ module Orb
332
237
  params(
333
238
  price_id: String,
334
239
  request_options: Orb::RequestOptions::OrHash
335
- ).returns(
336
- T.any(
337
- Orb::Price::Unit,
338
- Orb::Price::Package,
339
- Orb::Price::Matrix,
340
- Orb::Price::Tiered,
341
- Orb::Price::TieredBps,
342
- Orb::Price::Bps,
343
- Orb::Price::BulkBps,
344
- Orb::Price::Bulk,
345
- Orb::Price::ThresholdTotalAmount,
346
- Orb::Price::TieredPackage,
347
- Orb::Price::GroupedTiered,
348
- Orb::Price::TieredWithMinimum,
349
- Orb::Price::TieredPackageWithMinimum,
350
- Orb::Price::PackageWithAllocation,
351
- Orb::Price::UnitWithPercent,
352
- Orb::Price::MatrixWithAllocation,
353
- Orb::Price::TieredWithProration,
354
- Orb::Price::UnitWithProration,
355
- Orb::Price::GroupedAllocation,
356
- Orb::Price::GroupedWithProratedMinimum,
357
- Orb::Price::GroupedWithMeteredMinimum,
358
- Orb::Price::MatrixWithDisplayName,
359
- Orb::Price::BulkWithProration,
360
- Orb::Price::GroupedTieredPackage,
361
- Orb::Price::MaxGroupTieredPackage,
362
- Orb::Price::ScalableMatrixWithUnitPricing,
363
- Orb::Price::ScalableMatrixWithTieredPricing,
364
- Orb::Price::CumulativeGroupedBulk
365
- )
366
- )
240
+ ).returns(Orb::Price::Variants)
367
241
  end
368
242
  def fetch(price_id, request_options: {})
369
243
  end
@@ -863,12 +863,7 @@ module Orb
863
863
  view_mode:
864
864
  T.nilable(Orb::SubscriptionFetchUsageParams::ViewMode::OrSymbol),
865
865
  request_options: Orb::RequestOptions::OrHash
866
- ).returns(
867
- T.any(
868
- Orb::SubscriptionUsage::UngroupedSubscriptionUsage,
869
- Orb::SubscriptionUsage::GroupedSubscriptionUsage
870
- )
871
- )
866
+ ).returns(Orb::SubscriptionUsage::Variants)
872
867
  end
873
868
  def fetch_usage(
874
869
  subscription_id,
@@ -1484,10 +1479,7 @@ module Orb
1484
1479
  params(
1485
1480
  subscription_id: String,
1486
1481
  trial_end_date:
1487
- T.any(
1488
- Time,
1489
- Orb::SubscriptionUpdateTrialParams::TrialEndDate::OrSymbol
1490
- ),
1482
+ Orb::SubscriptionUpdateTrialParams::TrialEndDate::Variants,
1491
1483
  shift: T::Boolean,
1492
1484
  request_options: Orb::RequestOptions::OrHash
1493
1485
  ).returns(Orb::Models::SubscriptionUpdateTrialResponse)
@@ -3,6 +3,7 @@ module Orb
3
3
  module Type
4
4
  class ArrayOf[Elem]
5
5
  include Orb::Internal::Type::Converter
6
+ include Orb::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.[]: (
8
9
  ::Hash[Symbol, top]
@@ -27,6 +28,8 @@ module Orb
27
28
  state: Orb::Internal::Type::Converter::dump_state
28
29
  ) -> (::Array[top] | top)
29
30
 
31
+ def to_sorbet_type: -> top
32
+
30
33
  def item_type: -> Elem
31
34
 
32
35
  def nilable?: -> bool
@@ -68,6 +68,8 @@ module Orb
68
68
  state: Orb::Internal::Type::Converter::dump_state
69
69
  ) -> (::Hash[top, top] | top)
70
70
 
71
+ def self.to_sorbet_type: -> top
72
+
71
73
  def self.recursively_to_h: (
72
74
  Orb::Internal::Type::BaseModel model,
73
75
  convert: bool
@@ -3,6 +3,7 @@ module Orb
3
3
  module Type
4
4
  class Boolean
5
5
  extend Orb::Internal::Type::Converter
6
+ extend Orb::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.===: (top other) -> bool
8
9
 
@@ -17,6 +18,8 @@ module Orb
17
18
  bool | top value,
18
19
  state: Orb::Internal::Type::Converter::dump_state
19
20
  ) -> (bool | top)
21
+
22
+ def self.to_sorbet_type: -> top
20
23
  end
21
24
  end
22
25
  end
@@ -23,6 +23,8 @@ module Orb
23
23
  state: Orb::Internal::Type::Converter::dump_state
24
24
  ) -> (Symbol | top)
25
25
 
26
+ def to_sorbet_type: -> top
27
+
26
28
  def inspect: (?depth: Integer) -> String
27
29
  end
28
30
  end
@@ -17,6 +17,8 @@ module Orb
17
17
  Pathname | StringIO | IO | String | top value,
18
18
  state: Orb::Internal::Type::Converter::dump_state
19
19
  ) -> (Pathname | StringIO | IO | String | top)
20
+
21
+ def self.to_sorbet_type: -> top
20
22
  end
21
23
  end
22
24
  end
@@ -3,6 +3,7 @@ module Orb
3
3
  module Type
4
4
  class HashOf[Elem]
5
5
  include Orb::Internal::Type::Converter
6
+ include Orb::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.[]: (
8
9
  ::Hash[Symbol, top]
@@ -27,6 +28,8 @@ module Orb
27
28
  state: Orb::Internal::Type::Converter::dump_state
28
29
  ) -> (::Hash[Symbol, top] | top)
29
30
 
31
+ def to_sorbet_type: -> top
32
+
30
33
  def item_type: -> Elem
31
34
 
32
35
  def nilable?: -> bool
@@ -43,6 +43,8 @@ module Orb
43
43
  state: Orb::Internal::Type::Converter::dump_state
44
44
  ) -> top
45
45
 
46
+ def to_sorbet_type: -> top
47
+
46
48
  def inspect: (?depth: Integer) -> String
47
49
  end
48
50
  end
@@ -3,6 +3,7 @@ module Orb
3
3
  module Type
4
4
  class Unknown
5
5
  extend Orb::Internal::Type::Converter
6
+ extend Orb::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.===: (top other) -> bool
8
9
 
@@ -17,6 +18,8 @@ module Orb
17
18
  top value,
18
19
  state: Orb::Internal::Type::Converter::dump_state
19
20
  ) -> top
21
+
22
+ def self.to_sorbet_type: -> top
20
23
  end
21
24
  end
22
25
  end
@@ -5,6 +5,10 @@ module Orb
5
5
 
6
6
  def self?.monotonic_secs: -> Float
7
7
 
8
+ def self?.walk_namespaces: (
9
+ Module | Class ns
10
+ ) -> Enumerable[(Module | Class)]
11
+
8
12
  def self?.arch: -> String
9
13
 
10
14
  def self?.os: -> String
@@ -166,7 +170,15 @@ module Orb
166
170
 
167
171
  def const_missing: (Symbol name) -> void
168
172
 
173
+ def sorbet_constant_defined?: (Symbol name) -> bool
174
+
169
175
  def define_sorbet_constant!: (Symbol name) { -> top } -> void
176
+
177
+ def to_sorbet_type: -> top
178
+
179
+ def self.to_sorbet_type: (
180
+ Orb::Internal::Util::SorbetRuntimeSupport | top `type`
181
+ ) -> top
170
182
  end
171
183
  end
172
184
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orb-billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orb