orb-billing 0.6.0 → 0.7.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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +4 -0
  5. data/lib/orb/models/{plans/version_create_params.rb → beta/external_plan_id_create_plan_version_params.rb} +1880 -1734
  6. data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +22 -0
  7. data/lib/orb/models/{plans/external_plan_id_set_default_version_params.rb → beta/external_plan_id_set_default_plan_version_params.rb} +3 -3
  8. data/lib/orb/models/beta_create_plan_version_params.rb +17758 -0
  9. data/lib/orb/models/beta_fetch_plan_version_params.rb +20 -0
  10. data/lib/orb/models/{plan_set_default_version_params.rb → beta_set_default_plan_version_params.rb} +2 -2
  11. data/lib/orb/models/plan_version.rb +735 -0
  12. data/lib/orb/models/plan_version_phase.rb +70 -0
  13. data/lib/orb/models/price_evaluate_multiple_params.rb +8620 -0
  14. data/lib/orb/models/price_evaluate_multiple_response.rb +51 -0
  15. data/lib/orb/models/price_evaluate_params.rb +21 -8529
  16. data/lib/orb/models/price_evaluate_response.rb +3 -38
  17. data/lib/orb/models.rb +14 -2
  18. data/lib/orb/resources/beta/external_plan_id.rb +113 -0
  19. data/lib/orb/resources/beta.rb +115 -0
  20. data/lib/orb/resources/plans/external_plan_id.rb +0 -31
  21. data/lib/orb/resources/plans.rb +0 -31
  22. data/lib/orb/resources/prices.rb +69 -8
  23. data/lib/orb/version.rb +1 -1
  24. data/lib/orb.rb +12 -12
  25. data/rbi/orb/client.rbi +3 -0
  26. data/rbi/orb/models/{plans/version_create_params.rbi → beta/external_plan_id_create_plan_version_params.rbi} +2816 -2771
  27. data/rbi/orb/models/{plans/version_retrieve_params.rbi → beta/external_plan_id_fetch_plan_version_params.rbi} +10 -7
  28. data/rbi/orb/models/{plans/external_plan_id_set_default_version_params.rbi → beta/external_plan_id_set_default_plan_version_params.rbi} +3 -3
  29. data/rbi/orb/models/beta_create_plan_version_params.rbi +32595 -0
  30. data/rbi/orb/models/beta_fetch_plan_version_params.rbi +35 -0
  31. data/rbi/orb/models/{plan_set_default_version_params.rbi → beta_set_default_plan_version_params.rbi} +2 -2
  32. data/rbi/orb/models/plan_version.rbi +1367 -0
  33. data/rbi/orb/models/plan_version_phase.rbi +99 -0
  34. data/rbi/orb/models/price_evaluate_multiple_params.rbi +15764 -0
  35. data/rbi/orb/models/price_evaluate_multiple_response.rbi +96 -0
  36. data/rbi/orb/models/price_evaluate_params.rbi +25 -15684
  37. data/rbi/orb/models/price_evaluate_response.rbi +5 -68
  38. data/rbi/orb/models.rbi +14 -2
  39. data/rbi/orb/resources/{plans/versions.rbi → beta/external_plan_id.rbi} +42 -15
  40. data/rbi/orb/resources/beta.rbi +111 -0
  41. data/rbi/orb/resources/plans/external_plan_id.rbi +0 -22
  42. data/rbi/orb/resources/plans.rbi +0 -22
  43. data/rbi/orb/resources/prices.rbi +66 -4
  44. data/sig/orb/client.rbs +2 -0
  45. data/sig/orb/models/{plans/version_create_params.rbs → beta/external_plan_id_create_plan_version_params.rbs} +1763 -1763
  46. data/sig/orb/models/{plans/version_retrieve_params.rbs → beta/external_plan_id_fetch_plan_version_params.rbs} +7 -7
  47. data/sig/orb/models/{plans/external_plan_id_set_default_version_params.rbs → beta/external_plan_id_set_default_plan_version_params.rbs} +3 -3
  48. data/sig/orb/models/beta_create_plan_version_params.rbs +12877 -0
  49. data/sig/orb/models/beta_fetch_plan_version_params.rbs +20 -0
  50. data/sig/orb/models/{plan_set_default_version_params.rbs → beta_set_default_plan_version_params.rbs} +2 -2
  51. data/sig/orb/models/plan_version.rbs +583 -0
  52. data/sig/orb/models/plan_version_phase.rbs +60 -0
  53. data/sig/orb/models/price_evaluate_multiple_params.rbs +6230 -0
  54. data/sig/orb/models/price_evaluate_multiple_response.rbs +50 -0
  55. data/sig/orb/models/price_evaluate_params.rbs +10 -6187
  56. data/sig/orb/models/price_evaluate_response.rbs +4 -41
  57. data/sig/orb/models.rbs +14 -2
  58. data/sig/orb/resources/beta/external_plan_id.rbs +34 -0
  59. data/sig/orb/resources/beta.rbs +34 -0
  60. data/sig/orb/resources/plans/external_plan_id.rbs +0 -8
  61. data/sig/orb/resources/plans.rbs +0 -8
  62. data/sig/orb/resources/prices.rbs +13 -2
  63. metadata +37 -37
  64. data/lib/orb/models/plans/external_plan_id/version_create_params.rb +0 -17948
  65. data/lib/orb/models/plans/external_plan_id/version_create_response.rb +0 -819
  66. data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +0 -24
  67. data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +0 -819
  68. data/lib/orb/models/plans/version_create_response.rb +0 -814
  69. data/lib/orb/models/plans/version_retrieve_params.rb +0 -22
  70. data/lib/orb/models/plans/version_retrieve_response.rb +0 -814
  71. data/lib/orb/resources/plans/external_plan_id/versions.rb +0 -88
  72. data/lib/orb/resources/plans/versions.rb +0 -86
  73. data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +0 -32668
  74. data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +0 -1562
  75. data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +0 -42
  76. data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +0 -1562
  77. data/rbi/orb/models/plans/version_create_response.rbi +0 -1556
  78. data/rbi/orb/models/plans/version_retrieve_response.rbi +0 -1558
  79. data/rbi/orb/resources/plans/external_plan_id/versions.rbi +0 -103
  80. data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +0 -12923
  81. data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +0 -664
  82. data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +0 -27
  83. data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +0 -664
  84. data/sig/orb/models/plans/version_create_response.rbs +0 -662
  85. data/sig/orb/models/plans/version_retrieve_response.rbs +0 -662
  86. data/sig/orb/resources/plans/external_plan_id/versions.rbs +0 -30
  87. data/sig/orb/resources/plans/versions.rbs +0 -28
@@ -1,1558 +0,0 @@
1
- # typed: strong
2
-
3
- module Orb
4
- module Models
5
- module Plans
6
- class VersionRetrieveResponse < Orb::Internal::Type::BaseModel
7
- OrHash =
8
- T.type_alias do
9
- T.any(
10
- Orb::Models::Plans::VersionRetrieveResponse,
11
- Orb::Internal::AnyHash
12
- )
13
- end
14
-
15
- # Adjustments for this plan. If the plan has phases, this includes adjustments
16
- # across all phases of the plan.
17
- sig do
18
- returns(
19
- T::Array[
20
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Variants
21
- ]
22
- )
23
- end
24
- attr_accessor :adjustments
25
-
26
- sig { returns(Time) }
27
- attr_accessor :created_at
28
-
29
- sig do
30
- returns(
31
- T.nilable(
32
- T::Array[Orb::Models::Plans::VersionRetrieveResponse::PlanPhase]
33
- )
34
- )
35
- end
36
- attr_accessor :plan_phases
37
-
38
- # Prices for this plan. If the plan has phases, this includes prices across all
39
- # phases of the plan.
40
- sig { returns(T::Array[Orb::Price::Variants]) }
41
- attr_accessor :prices
42
-
43
- sig { returns(Integer) }
44
- attr_accessor :version
45
-
46
- # The PlanVersion resource represents the prices and adjustments present on a
47
- # specific version of a plan.
48
- sig do
49
- params(
50
- adjustments:
51
- T::Array[
52
- T.any(
53
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::OrHash,
54
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::OrHash,
55
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::OrHash,
56
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::OrHash,
57
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::OrHash
58
- )
59
- ],
60
- created_at: Time,
61
- plan_phases:
62
- T.nilable(
63
- T::Array[
64
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::OrHash
65
- ]
66
- ),
67
- prices:
68
- T::Array[
69
- T.any(
70
- Orb::Price::Unit::OrHash,
71
- Orb::Price::Package::OrHash,
72
- Orb::Price::Matrix::OrHash,
73
- Orb::Price::Tiered::OrHash,
74
- Orb::Price::TieredBps::OrHash,
75
- Orb::Price::Bps::OrHash,
76
- Orb::Price::BulkBps::OrHash,
77
- Orb::Price::Bulk::OrHash,
78
- Orb::Price::ThresholdTotalAmount::OrHash,
79
- Orb::Price::TieredPackage::OrHash,
80
- Orb::Price::GroupedTiered::OrHash,
81
- Orb::Price::TieredWithMinimum::OrHash,
82
- Orb::Price::TieredPackageWithMinimum::OrHash,
83
- Orb::Price::PackageWithAllocation::OrHash,
84
- Orb::Price::UnitWithPercent::OrHash,
85
- Orb::Price::MatrixWithAllocation::OrHash,
86
- Orb::Price::TieredWithProration::OrHash,
87
- Orb::Price::UnitWithProration::OrHash,
88
- Orb::Price::GroupedAllocation::OrHash,
89
- Orb::Price::GroupedWithProratedMinimum::OrHash,
90
- Orb::Price::GroupedWithMeteredMinimum::OrHash,
91
- Orb::Price::MatrixWithDisplayName::OrHash,
92
- Orb::Price::BulkWithProration::OrHash,
93
- Orb::Price::GroupedTieredPackage::OrHash,
94
- Orb::Price::MaxGroupTieredPackage::OrHash,
95
- Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
96
- Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
97
- Orb::Price::CumulativeGroupedBulk::OrHash
98
- )
99
- ],
100
- version: Integer
101
- ).returns(T.attached_class)
102
- end
103
- def self.new(
104
- # Adjustments for this plan. If the plan has phases, this includes adjustments
105
- # across all phases of the plan.
106
- adjustments:,
107
- created_at:,
108
- plan_phases:,
109
- # Prices for this plan. If the plan has phases, this includes prices across all
110
- # phases of the plan.
111
- prices:,
112
- version:
113
- )
114
- end
115
-
116
- sig do
117
- override.returns(
118
- {
119
- adjustments:
120
- T::Array[
121
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Variants
122
- ],
123
- created_at: Time,
124
- plan_phases:
125
- T.nilable(
126
- T::Array[
127
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase
128
- ]
129
- ),
130
- prices: T::Array[Orb::Price::Variants],
131
- version: Integer
132
- }
133
- )
134
- end
135
- def to_hash
136
- end
137
-
138
- module Adjustment
139
- extend Orb::Internal::Type::Union
140
-
141
- Variants =
142
- T.type_alias do
143
- T.any(
144
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount,
145
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount,
146
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount,
147
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum,
148
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum
149
- )
150
- end
151
-
152
- class UsageDiscount < Orb::Internal::Type::BaseModel
153
- OrHash =
154
- T.type_alias do
155
- T.any(
156
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount,
157
- Orb::Internal::AnyHash
158
- )
159
- end
160
-
161
- sig { returns(String) }
162
- attr_accessor :id
163
-
164
- sig { returns(Symbol) }
165
- attr_accessor :adjustment_type
166
-
167
- # The price IDs that this adjustment applies to.
168
- sig { returns(T::Array[String]) }
169
- attr_accessor :applies_to_price_ids
170
-
171
- # The filters that determine which prices to apply this adjustment to.
172
- sig do
173
- returns(
174
- T::Array[
175
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter
176
- ]
177
- )
178
- end
179
- attr_accessor :filters
180
-
181
- # True for adjustments that apply to an entire invocice, false for adjustments
182
- # that apply to only one price.
183
- sig { returns(T::Boolean) }
184
- attr_accessor :is_invoice_level
185
-
186
- # The plan phase in which this adjustment is active.
187
- sig { returns(T.nilable(Integer)) }
188
- attr_accessor :plan_phase_order
189
-
190
- # The reason for the adjustment.
191
- sig { returns(T.nilable(String)) }
192
- attr_accessor :reason
193
-
194
- # The number of usage units by which to discount the price this adjustment applies
195
- # to in a given billing period.
196
- sig { returns(Float) }
197
- attr_accessor :usage_discount
198
-
199
- sig do
200
- params(
201
- id: String,
202
- applies_to_price_ids: T::Array[String],
203
- filters:
204
- T::Array[
205
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::OrHash
206
- ],
207
- is_invoice_level: T::Boolean,
208
- plan_phase_order: T.nilable(Integer),
209
- reason: T.nilable(String),
210
- usage_discount: Float,
211
- adjustment_type: Symbol
212
- ).returns(T.attached_class)
213
- end
214
- def self.new(
215
- id:,
216
- # The price IDs that this adjustment applies to.
217
- applies_to_price_ids:,
218
- # The filters that determine which prices to apply this adjustment to.
219
- filters:,
220
- # True for adjustments that apply to an entire invocice, false for adjustments
221
- # that apply to only one price.
222
- is_invoice_level:,
223
- # The plan phase in which this adjustment is active.
224
- plan_phase_order:,
225
- # The reason for the adjustment.
226
- reason:,
227
- # The number of usage units by which to discount the price this adjustment applies
228
- # to in a given billing period.
229
- usage_discount:,
230
- adjustment_type: :usage_discount
231
- )
232
- end
233
-
234
- sig do
235
- override.returns(
236
- {
237
- id: String,
238
- adjustment_type: Symbol,
239
- applies_to_price_ids: T::Array[String],
240
- filters:
241
- T::Array[
242
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter
243
- ],
244
- is_invoice_level: T::Boolean,
245
- plan_phase_order: T.nilable(Integer),
246
- reason: T.nilable(String),
247
- usage_discount: Float
248
- }
249
- )
250
- end
251
- def to_hash
252
- end
253
-
254
- class Filter < Orb::Internal::Type::BaseModel
255
- OrHash =
256
- T.type_alias do
257
- T.any(
258
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter,
259
- Orb::Internal::AnyHash
260
- )
261
- end
262
-
263
- # The property of the price to filter on.
264
- sig do
265
- returns(
266
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
267
- )
268
- end
269
- attr_accessor :field
270
-
271
- # Should prices that match the filter be included or excluded.
272
- sig do
273
- returns(
274
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
275
- )
276
- end
277
- attr_accessor :operator
278
-
279
- # The IDs or values that match this filter.
280
- sig { returns(T::Array[String]) }
281
- attr_accessor :values
282
-
283
- sig do
284
- params(
285
- field:
286
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
287
- operator:
288
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
289
- values: T::Array[String]
290
- ).returns(T.attached_class)
291
- end
292
- def self.new(
293
- # The property of the price to filter on.
294
- field:,
295
- # Should prices that match the filter be included or excluded.
296
- operator:,
297
- # The IDs or values that match this filter.
298
- values:
299
- )
300
- end
301
-
302
- sig do
303
- override.returns(
304
- {
305
- field:
306
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol,
307
- operator:
308
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol,
309
- values: T::Array[String]
310
- }
311
- )
312
- end
313
- def to_hash
314
- end
315
-
316
- # The property of the price to filter on.
317
- module Field
318
- extend Orb::Internal::Type::Enum
319
-
320
- TaggedSymbol =
321
- T.type_alias do
322
- T.all(
323
- Symbol,
324
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field
325
- )
326
- end
327
- OrSymbol = T.type_alias { T.any(Symbol, String) }
328
-
329
- PRICE_ID =
330
- T.let(
331
- :price_id,
332
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
333
- )
334
- ITEM_ID =
335
- T.let(
336
- :item_id,
337
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
338
- )
339
- PRICE_TYPE =
340
- T.let(
341
- :price_type,
342
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
343
- )
344
- CURRENCY =
345
- T.let(
346
- :currency,
347
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
348
- )
349
- PRICING_UNIT_ID =
350
- T.let(
351
- :pricing_unit_id,
352
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
353
- )
354
-
355
- sig do
356
- override.returns(
357
- T::Array[
358
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
359
- ]
360
- )
361
- end
362
- def self.values
363
- end
364
- end
365
-
366
- # Should prices that match the filter be included or excluded.
367
- module Operator
368
- extend Orb::Internal::Type::Enum
369
-
370
- TaggedSymbol =
371
- T.type_alias do
372
- T.all(
373
- Symbol,
374
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator
375
- )
376
- end
377
- OrSymbol = T.type_alias { T.any(Symbol, String) }
378
-
379
- INCLUDES =
380
- T.let(
381
- :includes,
382
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
383
- )
384
- EXCLUDES =
385
- T.let(
386
- :excludes,
387
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
388
- )
389
-
390
- sig do
391
- override.returns(
392
- T::Array[
393
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
394
- ]
395
- )
396
- end
397
- def self.values
398
- end
399
- end
400
- end
401
- end
402
-
403
- class AmountDiscount < Orb::Internal::Type::BaseModel
404
- OrHash =
405
- T.type_alias do
406
- T.any(
407
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount,
408
- Orb::Internal::AnyHash
409
- )
410
- end
411
-
412
- sig { returns(String) }
413
- attr_accessor :id
414
-
415
- sig { returns(Symbol) }
416
- attr_accessor :adjustment_type
417
-
418
- # The amount by which to discount the prices this adjustment applies to in a given
419
- # billing period.
420
- sig { returns(String) }
421
- attr_accessor :amount_discount
422
-
423
- # The price IDs that this adjustment applies to.
424
- sig { returns(T::Array[String]) }
425
- attr_accessor :applies_to_price_ids
426
-
427
- # The filters that determine which prices to apply this adjustment to.
428
- sig do
429
- returns(
430
- T::Array[
431
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter
432
- ]
433
- )
434
- end
435
- attr_accessor :filters
436
-
437
- # True for adjustments that apply to an entire invocice, false for adjustments
438
- # that apply to only one price.
439
- sig { returns(T::Boolean) }
440
- attr_accessor :is_invoice_level
441
-
442
- # The plan phase in which this adjustment is active.
443
- sig { returns(T.nilable(Integer)) }
444
- attr_accessor :plan_phase_order
445
-
446
- # The reason for the adjustment.
447
- sig { returns(T.nilable(String)) }
448
- attr_accessor :reason
449
-
450
- sig do
451
- params(
452
- id: String,
453
- amount_discount: String,
454
- applies_to_price_ids: T::Array[String],
455
- filters:
456
- T::Array[
457
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::OrHash
458
- ],
459
- is_invoice_level: T::Boolean,
460
- plan_phase_order: T.nilable(Integer),
461
- reason: T.nilable(String),
462
- adjustment_type: Symbol
463
- ).returns(T.attached_class)
464
- end
465
- def self.new(
466
- id:,
467
- # The amount by which to discount the prices this adjustment applies to in a given
468
- # billing period.
469
- amount_discount:,
470
- # The price IDs that this adjustment applies to.
471
- applies_to_price_ids:,
472
- # The filters that determine which prices to apply this adjustment to.
473
- filters:,
474
- # True for adjustments that apply to an entire invocice, false for adjustments
475
- # that apply to only one price.
476
- is_invoice_level:,
477
- # The plan phase in which this adjustment is active.
478
- plan_phase_order:,
479
- # The reason for the adjustment.
480
- reason:,
481
- adjustment_type: :amount_discount
482
- )
483
- end
484
-
485
- sig do
486
- override.returns(
487
- {
488
- id: String,
489
- adjustment_type: Symbol,
490
- amount_discount: String,
491
- applies_to_price_ids: T::Array[String],
492
- filters:
493
- T::Array[
494
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter
495
- ],
496
- is_invoice_level: T::Boolean,
497
- plan_phase_order: T.nilable(Integer),
498
- reason: T.nilable(String)
499
- }
500
- )
501
- end
502
- def to_hash
503
- end
504
-
505
- class Filter < Orb::Internal::Type::BaseModel
506
- OrHash =
507
- T.type_alias do
508
- T.any(
509
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter,
510
- Orb::Internal::AnyHash
511
- )
512
- end
513
-
514
- # The property of the price to filter on.
515
- sig do
516
- returns(
517
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
518
- )
519
- end
520
- attr_accessor :field
521
-
522
- # Should prices that match the filter be included or excluded.
523
- sig do
524
- returns(
525
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
526
- )
527
- end
528
- attr_accessor :operator
529
-
530
- # The IDs or values that match this filter.
531
- sig { returns(T::Array[String]) }
532
- attr_accessor :values
533
-
534
- sig do
535
- params(
536
- field:
537
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
538
- operator:
539
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
540
- values: T::Array[String]
541
- ).returns(T.attached_class)
542
- end
543
- def self.new(
544
- # The property of the price to filter on.
545
- field:,
546
- # Should prices that match the filter be included or excluded.
547
- operator:,
548
- # The IDs or values that match this filter.
549
- values:
550
- )
551
- end
552
-
553
- sig do
554
- override.returns(
555
- {
556
- field:
557
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol,
558
- operator:
559
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol,
560
- values: T::Array[String]
561
- }
562
- )
563
- end
564
- def to_hash
565
- end
566
-
567
- # The property of the price to filter on.
568
- module Field
569
- extend Orb::Internal::Type::Enum
570
-
571
- TaggedSymbol =
572
- T.type_alias do
573
- T.all(
574
- Symbol,
575
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field
576
- )
577
- end
578
- OrSymbol = T.type_alias { T.any(Symbol, String) }
579
-
580
- PRICE_ID =
581
- T.let(
582
- :price_id,
583
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
584
- )
585
- ITEM_ID =
586
- T.let(
587
- :item_id,
588
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
589
- )
590
- PRICE_TYPE =
591
- T.let(
592
- :price_type,
593
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
594
- )
595
- CURRENCY =
596
- T.let(
597
- :currency,
598
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
599
- )
600
- PRICING_UNIT_ID =
601
- T.let(
602
- :pricing_unit_id,
603
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
604
- )
605
-
606
- sig do
607
- override.returns(
608
- T::Array[
609
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
610
- ]
611
- )
612
- end
613
- def self.values
614
- end
615
- end
616
-
617
- # Should prices that match the filter be included or excluded.
618
- module Operator
619
- extend Orb::Internal::Type::Enum
620
-
621
- TaggedSymbol =
622
- T.type_alias do
623
- T.all(
624
- Symbol,
625
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator
626
- )
627
- end
628
- OrSymbol = T.type_alias { T.any(Symbol, String) }
629
-
630
- INCLUDES =
631
- T.let(
632
- :includes,
633
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
634
- )
635
- EXCLUDES =
636
- T.let(
637
- :excludes,
638
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
639
- )
640
-
641
- sig do
642
- override.returns(
643
- T::Array[
644
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
645
- ]
646
- )
647
- end
648
- def self.values
649
- end
650
- end
651
- end
652
- end
653
-
654
- class PercentageDiscount < Orb::Internal::Type::BaseModel
655
- OrHash =
656
- T.type_alias do
657
- T.any(
658
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount,
659
- Orb::Internal::AnyHash
660
- )
661
- end
662
-
663
- sig { returns(String) }
664
- attr_accessor :id
665
-
666
- sig { returns(Symbol) }
667
- attr_accessor :adjustment_type
668
-
669
- # The price IDs that this adjustment applies to.
670
- sig { returns(T::Array[String]) }
671
- attr_accessor :applies_to_price_ids
672
-
673
- # The filters that determine which prices to apply this adjustment to.
674
- sig do
675
- returns(
676
- T::Array[
677
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter
678
- ]
679
- )
680
- end
681
- attr_accessor :filters
682
-
683
- # True for adjustments that apply to an entire invocice, false for adjustments
684
- # that apply to only one price.
685
- sig { returns(T::Boolean) }
686
- attr_accessor :is_invoice_level
687
-
688
- # The percentage (as a value between 0 and 1) by which to discount the price
689
- # intervals this adjustment applies to in a given billing period.
690
- sig { returns(Float) }
691
- attr_accessor :percentage_discount
692
-
693
- # The plan phase in which this adjustment is active.
694
- sig { returns(T.nilable(Integer)) }
695
- attr_accessor :plan_phase_order
696
-
697
- # The reason for the adjustment.
698
- sig { returns(T.nilable(String)) }
699
- attr_accessor :reason
700
-
701
- sig do
702
- params(
703
- id: String,
704
- applies_to_price_ids: T::Array[String],
705
- filters:
706
- T::Array[
707
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::OrHash
708
- ],
709
- is_invoice_level: T::Boolean,
710
- percentage_discount: Float,
711
- plan_phase_order: T.nilable(Integer),
712
- reason: T.nilable(String),
713
- adjustment_type: Symbol
714
- ).returns(T.attached_class)
715
- end
716
- def self.new(
717
- id:,
718
- # The price IDs that this adjustment applies to.
719
- applies_to_price_ids:,
720
- # The filters that determine which prices to apply this adjustment to.
721
- filters:,
722
- # True for adjustments that apply to an entire invocice, false for adjustments
723
- # that apply to only one price.
724
- is_invoice_level:,
725
- # The percentage (as a value between 0 and 1) by which to discount the price
726
- # intervals this adjustment applies to in a given billing period.
727
- percentage_discount:,
728
- # The plan phase in which this adjustment is active.
729
- plan_phase_order:,
730
- # The reason for the adjustment.
731
- reason:,
732
- adjustment_type: :percentage_discount
733
- )
734
- end
735
-
736
- sig do
737
- override.returns(
738
- {
739
- id: String,
740
- adjustment_type: Symbol,
741
- applies_to_price_ids: T::Array[String],
742
- filters:
743
- T::Array[
744
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter
745
- ],
746
- is_invoice_level: T::Boolean,
747
- percentage_discount: Float,
748
- plan_phase_order: T.nilable(Integer),
749
- reason: T.nilable(String)
750
- }
751
- )
752
- end
753
- def to_hash
754
- end
755
-
756
- class Filter < Orb::Internal::Type::BaseModel
757
- OrHash =
758
- T.type_alias do
759
- T.any(
760
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter,
761
- Orb::Internal::AnyHash
762
- )
763
- end
764
-
765
- # The property of the price to filter on.
766
- sig do
767
- returns(
768
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
769
- )
770
- end
771
- attr_accessor :field
772
-
773
- # Should prices that match the filter be included or excluded.
774
- sig do
775
- returns(
776
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
777
- )
778
- end
779
- attr_accessor :operator
780
-
781
- # The IDs or values that match this filter.
782
- sig { returns(T::Array[String]) }
783
- attr_accessor :values
784
-
785
- sig do
786
- params(
787
- field:
788
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
789
- operator:
790
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
791
- values: T::Array[String]
792
- ).returns(T.attached_class)
793
- end
794
- def self.new(
795
- # The property of the price to filter on.
796
- field:,
797
- # Should prices that match the filter be included or excluded.
798
- operator:,
799
- # The IDs or values that match this filter.
800
- values:
801
- )
802
- end
803
-
804
- sig do
805
- override.returns(
806
- {
807
- field:
808
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol,
809
- operator:
810
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol,
811
- values: T::Array[String]
812
- }
813
- )
814
- end
815
- def to_hash
816
- end
817
-
818
- # The property of the price to filter on.
819
- module Field
820
- extend Orb::Internal::Type::Enum
821
-
822
- TaggedSymbol =
823
- T.type_alias do
824
- T.all(
825
- Symbol,
826
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field
827
- )
828
- end
829
- OrSymbol = T.type_alias { T.any(Symbol, String) }
830
-
831
- PRICE_ID =
832
- T.let(
833
- :price_id,
834
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
835
- )
836
- ITEM_ID =
837
- T.let(
838
- :item_id,
839
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
840
- )
841
- PRICE_TYPE =
842
- T.let(
843
- :price_type,
844
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
845
- )
846
- CURRENCY =
847
- T.let(
848
- :currency,
849
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
850
- )
851
- PRICING_UNIT_ID =
852
- T.let(
853
- :pricing_unit_id,
854
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
855
- )
856
-
857
- sig do
858
- override.returns(
859
- T::Array[
860
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
861
- ]
862
- )
863
- end
864
- def self.values
865
- end
866
- end
867
-
868
- # Should prices that match the filter be included or excluded.
869
- module Operator
870
- extend Orb::Internal::Type::Enum
871
-
872
- TaggedSymbol =
873
- T.type_alias do
874
- T.all(
875
- Symbol,
876
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator
877
- )
878
- end
879
- OrSymbol = T.type_alias { T.any(Symbol, String) }
880
-
881
- INCLUDES =
882
- T.let(
883
- :includes,
884
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
885
- )
886
- EXCLUDES =
887
- T.let(
888
- :excludes,
889
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
890
- )
891
-
892
- sig do
893
- override.returns(
894
- T::Array[
895
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
896
- ]
897
- )
898
- end
899
- def self.values
900
- end
901
- end
902
- end
903
- end
904
-
905
- class Minimum < Orb::Internal::Type::BaseModel
906
- OrHash =
907
- T.type_alias do
908
- T.any(
909
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum,
910
- Orb::Internal::AnyHash
911
- )
912
- end
913
-
914
- sig { returns(String) }
915
- attr_accessor :id
916
-
917
- sig { returns(Symbol) }
918
- attr_accessor :adjustment_type
919
-
920
- # The price IDs that this adjustment applies to.
921
- sig { returns(T::Array[String]) }
922
- attr_accessor :applies_to_price_ids
923
-
924
- # The filters that determine which prices to apply this adjustment to.
925
- sig do
926
- returns(
927
- T::Array[
928
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter
929
- ]
930
- )
931
- end
932
- attr_accessor :filters
933
-
934
- # True for adjustments that apply to an entire invocice, false for adjustments
935
- # that apply to only one price.
936
- sig { returns(T::Boolean) }
937
- attr_accessor :is_invoice_level
938
-
939
- # The item ID that revenue from this minimum will be attributed to.
940
- sig { returns(String) }
941
- attr_accessor :item_id
942
-
943
- # The minimum amount to charge in a given billing period for the prices this
944
- # adjustment applies to.
945
- sig { returns(String) }
946
- attr_accessor :minimum_amount
947
-
948
- # The plan phase in which this adjustment is active.
949
- sig { returns(T.nilable(Integer)) }
950
- attr_accessor :plan_phase_order
951
-
952
- # The reason for the adjustment.
953
- sig { returns(T.nilable(String)) }
954
- attr_accessor :reason
955
-
956
- sig do
957
- params(
958
- id: String,
959
- applies_to_price_ids: T::Array[String],
960
- filters:
961
- T::Array[
962
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::OrHash
963
- ],
964
- is_invoice_level: T::Boolean,
965
- item_id: String,
966
- minimum_amount: String,
967
- plan_phase_order: T.nilable(Integer),
968
- reason: T.nilable(String),
969
- adjustment_type: Symbol
970
- ).returns(T.attached_class)
971
- end
972
- def self.new(
973
- id:,
974
- # The price IDs that this adjustment applies to.
975
- applies_to_price_ids:,
976
- # The filters that determine which prices to apply this adjustment to.
977
- filters:,
978
- # True for adjustments that apply to an entire invocice, false for adjustments
979
- # that apply to only one price.
980
- is_invoice_level:,
981
- # The item ID that revenue from this minimum will be attributed to.
982
- item_id:,
983
- # The minimum amount to charge in a given billing period for the prices this
984
- # adjustment applies to.
985
- minimum_amount:,
986
- # The plan phase in which this adjustment is active.
987
- plan_phase_order:,
988
- # The reason for the adjustment.
989
- reason:,
990
- adjustment_type: :minimum
991
- )
992
- end
993
-
994
- sig do
995
- override.returns(
996
- {
997
- id: String,
998
- adjustment_type: Symbol,
999
- applies_to_price_ids: T::Array[String],
1000
- filters:
1001
- T::Array[
1002
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter
1003
- ],
1004
- is_invoice_level: T::Boolean,
1005
- item_id: String,
1006
- minimum_amount: String,
1007
- plan_phase_order: T.nilable(Integer),
1008
- reason: T.nilable(String)
1009
- }
1010
- )
1011
- end
1012
- def to_hash
1013
- end
1014
-
1015
- class Filter < Orb::Internal::Type::BaseModel
1016
- OrHash =
1017
- T.type_alias do
1018
- T.any(
1019
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter,
1020
- Orb::Internal::AnyHash
1021
- )
1022
- end
1023
-
1024
- # The property of the price to filter on.
1025
- sig do
1026
- returns(
1027
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1028
- )
1029
- end
1030
- attr_accessor :field
1031
-
1032
- # Should prices that match the filter be included or excluded.
1033
- sig do
1034
- returns(
1035
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1036
- )
1037
- end
1038
- attr_accessor :operator
1039
-
1040
- # The IDs or values that match this filter.
1041
- sig { returns(T::Array[String]) }
1042
- attr_accessor :values
1043
-
1044
- sig do
1045
- params(
1046
- field:
1047
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::OrSymbol,
1048
- operator:
1049
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator::OrSymbol,
1050
- values: T::Array[String]
1051
- ).returns(T.attached_class)
1052
- end
1053
- def self.new(
1054
- # The property of the price to filter on.
1055
- field:,
1056
- # Should prices that match the filter be included or excluded.
1057
- operator:,
1058
- # The IDs or values that match this filter.
1059
- values:
1060
- )
1061
- end
1062
-
1063
- sig do
1064
- override.returns(
1065
- {
1066
- field:
1067
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol,
1068
- operator:
1069
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol,
1070
- values: T::Array[String]
1071
- }
1072
- )
1073
- end
1074
- def to_hash
1075
- end
1076
-
1077
- # The property of the price to filter on.
1078
- module Field
1079
- extend Orb::Internal::Type::Enum
1080
-
1081
- TaggedSymbol =
1082
- T.type_alias do
1083
- T.all(
1084
- Symbol,
1085
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field
1086
- )
1087
- end
1088
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1089
-
1090
- PRICE_ID =
1091
- T.let(
1092
- :price_id,
1093
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1094
- )
1095
- ITEM_ID =
1096
- T.let(
1097
- :item_id,
1098
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1099
- )
1100
- PRICE_TYPE =
1101
- T.let(
1102
- :price_type,
1103
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1104
- )
1105
- CURRENCY =
1106
- T.let(
1107
- :currency,
1108
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1109
- )
1110
- PRICING_UNIT_ID =
1111
- T.let(
1112
- :pricing_unit_id,
1113
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1114
- )
1115
-
1116
- sig do
1117
- override.returns(
1118
- T::Array[
1119
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1120
- ]
1121
- )
1122
- end
1123
- def self.values
1124
- end
1125
- end
1126
-
1127
- # Should prices that match the filter be included or excluded.
1128
- module Operator
1129
- extend Orb::Internal::Type::Enum
1130
-
1131
- TaggedSymbol =
1132
- T.type_alias do
1133
- T.all(
1134
- Symbol,
1135
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator
1136
- )
1137
- end
1138
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1139
-
1140
- INCLUDES =
1141
- T.let(
1142
- :includes,
1143
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1144
- )
1145
- EXCLUDES =
1146
- T.let(
1147
- :excludes,
1148
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1149
- )
1150
-
1151
- sig do
1152
- override.returns(
1153
- T::Array[
1154
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1155
- ]
1156
- )
1157
- end
1158
- def self.values
1159
- end
1160
- end
1161
- end
1162
- end
1163
-
1164
- class Maximum < Orb::Internal::Type::BaseModel
1165
- OrHash =
1166
- T.type_alias do
1167
- T.any(
1168
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum,
1169
- Orb::Internal::AnyHash
1170
- )
1171
- end
1172
-
1173
- sig { returns(String) }
1174
- attr_accessor :id
1175
-
1176
- sig { returns(Symbol) }
1177
- attr_accessor :adjustment_type
1178
-
1179
- # The price IDs that this adjustment applies to.
1180
- sig { returns(T::Array[String]) }
1181
- attr_accessor :applies_to_price_ids
1182
-
1183
- # The filters that determine which prices to apply this adjustment to.
1184
- sig do
1185
- returns(
1186
- T::Array[
1187
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter
1188
- ]
1189
- )
1190
- end
1191
- attr_accessor :filters
1192
-
1193
- # True for adjustments that apply to an entire invocice, false for adjustments
1194
- # that apply to only one price.
1195
- sig { returns(T::Boolean) }
1196
- attr_accessor :is_invoice_level
1197
-
1198
- # The maximum amount to charge in a given billing period for the prices this
1199
- # adjustment applies to.
1200
- sig { returns(String) }
1201
- attr_accessor :maximum_amount
1202
-
1203
- # The plan phase in which this adjustment is active.
1204
- sig { returns(T.nilable(Integer)) }
1205
- attr_accessor :plan_phase_order
1206
-
1207
- # The reason for the adjustment.
1208
- sig { returns(T.nilable(String)) }
1209
- attr_accessor :reason
1210
-
1211
- sig do
1212
- params(
1213
- id: String,
1214
- applies_to_price_ids: T::Array[String],
1215
- filters:
1216
- T::Array[
1217
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::OrHash
1218
- ],
1219
- is_invoice_level: T::Boolean,
1220
- maximum_amount: String,
1221
- plan_phase_order: T.nilable(Integer),
1222
- reason: T.nilable(String),
1223
- adjustment_type: Symbol
1224
- ).returns(T.attached_class)
1225
- end
1226
- def self.new(
1227
- id:,
1228
- # The price IDs that this adjustment applies to.
1229
- applies_to_price_ids:,
1230
- # The filters that determine which prices to apply this adjustment to.
1231
- filters:,
1232
- # True for adjustments that apply to an entire invocice, false for adjustments
1233
- # that apply to only one price.
1234
- is_invoice_level:,
1235
- # The maximum amount to charge in a given billing period for the prices this
1236
- # adjustment applies to.
1237
- maximum_amount:,
1238
- # The plan phase in which this adjustment is active.
1239
- plan_phase_order:,
1240
- # The reason for the adjustment.
1241
- reason:,
1242
- adjustment_type: :maximum
1243
- )
1244
- end
1245
-
1246
- sig do
1247
- override.returns(
1248
- {
1249
- id: String,
1250
- adjustment_type: Symbol,
1251
- applies_to_price_ids: T::Array[String],
1252
- filters:
1253
- T::Array[
1254
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter
1255
- ],
1256
- is_invoice_level: T::Boolean,
1257
- maximum_amount: String,
1258
- plan_phase_order: T.nilable(Integer),
1259
- reason: T.nilable(String)
1260
- }
1261
- )
1262
- end
1263
- def to_hash
1264
- end
1265
-
1266
- class Filter < Orb::Internal::Type::BaseModel
1267
- OrHash =
1268
- T.type_alias do
1269
- T.any(
1270
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter,
1271
- Orb::Internal::AnyHash
1272
- )
1273
- end
1274
-
1275
- # The property of the price to filter on.
1276
- sig do
1277
- returns(
1278
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1279
- )
1280
- end
1281
- attr_accessor :field
1282
-
1283
- # Should prices that match the filter be included or excluded.
1284
- sig do
1285
- returns(
1286
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1287
- )
1288
- end
1289
- attr_accessor :operator
1290
-
1291
- # The IDs or values that match this filter.
1292
- sig { returns(T::Array[String]) }
1293
- attr_accessor :values
1294
-
1295
- sig do
1296
- params(
1297
- field:
1298
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::OrSymbol,
1299
- operator:
1300
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator::OrSymbol,
1301
- values: T::Array[String]
1302
- ).returns(T.attached_class)
1303
- end
1304
- def self.new(
1305
- # The property of the price to filter on.
1306
- field:,
1307
- # Should prices that match the filter be included or excluded.
1308
- operator:,
1309
- # The IDs or values that match this filter.
1310
- values:
1311
- )
1312
- end
1313
-
1314
- sig do
1315
- override.returns(
1316
- {
1317
- field:
1318
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol,
1319
- operator:
1320
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol,
1321
- values: T::Array[String]
1322
- }
1323
- )
1324
- end
1325
- def to_hash
1326
- end
1327
-
1328
- # The property of the price to filter on.
1329
- module Field
1330
- extend Orb::Internal::Type::Enum
1331
-
1332
- TaggedSymbol =
1333
- T.type_alias do
1334
- T.all(
1335
- Symbol,
1336
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field
1337
- )
1338
- end
1339
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1340
-
1341
- PRICE_ID =
1342
- T.let(
1343
- :price_id,
1344
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1345
- )
1346
- ITEM_ID =
1347
- T.let(
1348
- :item_id,
1349
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1350
- )
1351
- PRICE_TYPE =
1352
- T.let(
1353
- :price_type,
1354
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1355
- )
1356
- CURRENCY =
1357
- T.let(
1358
- :currency,
1359
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1360
- )
1361
- PRICING_UNIT_ID =
1362
- T.let(
1363
- :pricing_unit_id,
1364
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1365
- )
1366
-
1367
- sig do
1368
- override.returns(
1369
- T::Array[
1370
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1371
- ]
1372
- )
1373
- end
1374
- def self.values
1375
- end
1376
- end
1377
-
1378
- # Should prices that match the filter be included or excluded.
1379
- module Operator
1380
- extend Orb::Internal::Type::Enum
1381
-
1382
- TaggedSymbol =
1383
- T.type_alias do
1384
- T.all(
1385
- Symbol,
1386
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator
1387
- )
1388
- end
1389
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1390
-
1391
- INCLUDES =
1392
- T.let(
1393
- :includes,
1394
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1395
- )
1396
- EXCLUDES =
1397
- T.let(
1398
- :excludes,
1399
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1400
- )
1401
-
1402
- sig do
1403
- override.returns(
1404
- T::Array[
1405
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1406
- ]
1407
- )
1408
- end
1409
- def self.values
1410
- end
1411
- end
1412
- end
1413
- end
1414
-
1415
- sig do
1416
- override.returns(
1417
- T::Array[
1418
- Orb::Models::Plans::VersionRetrieveResponse::Adjustment::Variants
1419
- ]
1420
- )
1421
- end
1422
- def self.variants
1423
- end
1424
- end
1425
-
1426
- class PlanPhase < Orb::Internal::Type::BaseModel
1427
- OrHash =
1428
- T.type_alias do
1429
- T.any(
1430
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase,
1431
- Orb::Internal::AnyHash
1432
- )
1433
- end
1434
-
1435
- sig { returns(String) }
1436
- attr_accessor :id
1437
-
1438
- sig { returns(T.nilable(String)) }
1439
- attr_accessor :description
1440
-
1441
- # How many terms of length `duration_unit` this phase is active for. If null, this
1442
- # phase is evergreen and active indefinitely
1443
- sig { returns(T.nilable(Integer)) }
1444
- attr_accessor :duration
1445
-
1446
- sig do
1447
- returns(
1448
- T.nilable(
1449
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1450
- )
1451
- )
1452
- end
1453
- attr_accessor :duration_unit
1454
-
1455
- sig { returns(String) }
1456
- attr_accessor :name
1457
-
1458
- # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
1459
- sig { returns(Integer) }
1460
- attr_accessor :order
1461
-
1462
- sig do
1463
- params(
1464
- id: String,
1465
- description: T.nilable(String),
1466
- duration: T.nilable(Integer),
1467
- duration_unit:
1468
- T.nilable(
1469
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::OrSymbol
1470
- ),
1471
- name: String,
1472
- order: Integer
1473
- ).returns(T.attached_class)
1474
- end
1475
- def self.new(
1476
- id:,
1477
- description:,
1478
- # How many terms of length `duration_unit` this phase is active for. If null, this
1479
- # phase is evergreen and active indefinitely
1480
- duration:,
1481
- duration_unit:,
1482
- name:,
1483
- # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
1484
- order:
1485
- )
1486
- end
1487
-
1488
- sig do
1489
- override.returns(
1490
- {
1491
- id: String,
1492
- description: T.nilable(String),
1493
- duration: T.nilable(Integer),
1494
- duration_unit:
1495
- T.nilable(
1496
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1497
- ),
1498
- name: String,
1499
- order: Integer
1500
- }
1501
- )
1502
- end
1503
- def to_hash
1504
- end
1505
-
1506
- module DurationUnit
1507
- extend Orb::Internal::Type::Enum
1508
-
1509
- TaggedSymbol =
1510
- T.type_alias do
1511
- T.all(
1512
- Symbol,
1513
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit
1514
- )
1515
- end
1516
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1517
-
1518
- DAILY =
1519
- T.let(
1520
- :daily,
1521
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1522
- )
1523
- MONTHLY =
1524
- T.let(
1525
- :monthly,
1526
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1527
- )
1528
- QUARTERLY =
1529
- T.let(
1530
- :quarterly,
1531
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1532
- )
1533
- SEMI_ANNUAL =
1534
- T.let(
1535
- :semi_annual,
1536
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1537
- )
1538
- ANNUAL =
1539
- T.let(
1540
- :annual,
1541
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1542
- )
1543
-
1544
- sig do
1545
- override.returns(
1546
- T::Array[
1547
- Orb::Models::Plans::VersionRetrieveResponse::PlanPhase::DurationUnit::TaggedSymbol
1548
- ]
1549
- )
1550
- end
1551
- def self.values
1552
- end
1553
- end
1554
- end
1555
- end
1556
- end
1557
- end
1558
- end