orb-billing 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/union.rb +3 -8
  5. data/lib/orb/internal/util.rb +8 -9
  6. data/lib/orb/models/amount_discount.rb +65 -1
  7. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
  8. data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
  9. data/lib/orb/models/percentage_discount.rb +65 -1
  10. data/lib/orb/models/subscription_create_params.rb +1435 -15
  11. data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
  12. data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
  13. data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
  14. data/lib/orb/models/trial_discount.rb +65 -1
  15. data/lib/orb/models/usage_discount.rb +65 -1
  16. data/lib/orb/resources/subscriptions.rb +6 -4
  17. data/lib/orb/version.rb +1 -1
  18. data/rbi/orb/internal/util.rbi +2 -0
  19. data/rbi/orb/models/amount_discount.rbi +117 -0
  20. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
  21. data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
  22. data/rbi/orb/models/percentage_discount.rbi +131 -0
  23. data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
  24. data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
  25. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
  26. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
  27. data/rbi/orb/models/trial_discount.rbi +109 -0
  28. data/rbi/orb/models/usage_discount.rbi +109 -0
  29. data/rbi/orb/resources/subscriptions.rbi +7 -4
  30. data/sig/orb/models/amount_discount.rbs +58 -0
  31. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
  32. data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
  33. data/sig/orb/models/percentage_discount.rbs +58 -0
  34. data/sig/orb/models/subscription_create_params.rbs +1130 -20
  35. data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
  36. data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
  37. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
  38. data/sig/orb/models/trial_discount.rbs +58 -0
  39. data/sig/orb/models/usage_discount.rbs +58 -0
  40. data/sig/orb/resources/subscriptions.rbs +2 -1
  41. metadata +2 -2
@@ -138,12 +138,44 @@ module Orb
138
138
  # @return [Float]
139
139
  required :percentage_discount, Float
140
140
 
141
+ # @!attribute applies_to_all
142
+ # If set, the adjustment will apply to every price on the subscription.
143
+ #
144
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
145
+ optional :applies_to_all,
146
+ enum: -> {
147
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll
148
+ },
149
+ nil?: true
150
+
151
+ # @!attribute applies_to_item_ids
152
+ # The set of item IDs to which this adjustment applies.
153
+ #
154
+ # @return [Array<String>, nil]
155
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
156
+
141
157
  # @!attribute applies_to_price_ids
142
158
  # The set of price IDs to which this adjustment applies.
143
159
  #
144
160
  # @return [Array<String>, nil]
145
161
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
146
162
 
163
+ # @!attribute currency
164
+ # If set, only prices in the specified currency will have the adjustment applied.
165
+ #
166
+ # @return [String, nil]
167
+ optional :currency, String, nil?: true
168
+
169
+ # @!attribute filters
170
+ # A list of filters that determine which prices this adjustment will apply to.
171
+ #
172
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
173
+ optional :filters,
174
+ -> {
175
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]
176
+ },
177
+ nil?: true
178
+
147
179
  # @!attribute is_invoice_level
148
180
  # When false, this adjustment will be applied to a single price. Otherwise, it
149
181
  # will be applied at the invoice level, possibly to multiple prices.
@@ -151,18 +183,128 @@ module Orb
151
183
  # @return [Boolean, nil]
152
184
  optional :is_invoice_level, Orb::Internal::Type::Boolean
153
185
 
154
- # @!method initialize(percentage_discount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :percentage_discount)
186
+ # @!attribute price_type
187
+ # If set, only prices of the specified type will have the adjustment applied.
188
+ #
189
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
190
+ optional :price_type,
191
+ enum: -> {
192
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType
193
+ },
194
+ nil?: true
195
+
196
+ # @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
155
197
  # Some parameter documentations has been truncated, see
156
198
  # {Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount}
157
199
  # for more details.
158
200
  #
159
201
  # @param percentage_discount [Float]
160
202
  #
203
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
204
+ #
205
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
206
+ #
161
207
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
162
208
  #
209
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
210
+ #
211
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
212
+ #
163
213
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
164
214
  #
215
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
216
+ #
165
217
  # @param adjustment_type [Symbol, :percentage_discount]
218
+
219
+ # If set, the adjustment will apply to every price on the subscription.
220
+ #
221
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount#applies_to_all
222
+ module AppliesToAll
223
+ extend Orb::Internal::Type::Enum
224
+
225
+ TRUE = true
226
+
227
+ # @!method self.values
228
+ # @return [Array<Boolean>]
229
+ end
230
+
231
+ class Filter < Orb::Internal::Type::BaseModel
232
+ # @!attribute field
233
+ # The property of the price to filter on.
234
+ #
235
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field]
236
+ required :field,
237
+ enum: -> {
238
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field
239
+ }
240
+
241
+ # @!attribute operator
242
+ # Should prices that match the filter be included or excluded.
243
+ #
244
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
245
+ required :operator,
246
+ enum: -> {
247
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator
248
+ }
249
+
250
+ # @!attribute values
251
+ # The IDs or values that match this filter.
252
+ #
253
+ # @return [Array<String>]
254
+ required :values, Orb::Internal::Type::ArrayOf[String]
255
+
256
+ # @!method initialize(field:, operator:, values:)
257
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
258
+ #
259
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
260
+ #
261
+ # @param values [Array<String>] The IDs or values that match this filter.
262
+
263
+ # The property of the price to filter on.
264
+ #
265
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#field
266
+ module Field
267
+ extend Orb::Internal::Type::Enum
268
+
269
+ PRICE_ID = :price_id
270
+ ITEM_ID = :item_id
271
+ PRICE_TYPE = :price_type
272
+ CURRENCY = :currency
273
+ PRICING_UNIT_ID = :pricing_unit_id
274
+
275
+ # @!method self.values
276
+ # @return [Array<Symbol>]
277
+ end
278
+
279
+ # Should prices that match the filter be included or excluded.
280
+ #
281
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#operator
282
+ module Operator
283
+ extend Orb::Internal::Type::Enum
284
+
285
+ INCLUDES = :includes
286
+ EXCLUDES = :excludes
287
+
288
+ # @!method self.values
289
+ # @return [Array<Symbol>]
290
+ end
291
+ end
292
+
293
+ # If set, only prices of the specified type will have the adjustment applied.
294
+ #
295
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount#price_type
296
+ module PriceType
297
+ extend Orb::Internal::Type::Enum
298
+
299
+ USAGE = :usage
300
+ FIXED_IN_ADVANCE = :fixed_in_advance
301
+ FIXED_IN_ARREARS = :fixed_in_arrears
302
+ FIXED = :fixed
303
+ IN_ARREARS = :in_arrears
304
+
305
+ # @!method self.values
306
+ # @return [Array<Symbol>]
307
+ end
166
308
  end
167
309
 
168
310
  class UsageDiscount < Orb::Internal::Type::BaseModel
@@ -176,12 +318,44 @@ module Orb
176
318
  # @return [Float]
177
319
  required :usage_discount, Float
178
320
 
321
+ # @!attribute applies_to_all
322
+ # If set, the adjustment will apply to every price on the subscription.
323
+ #
324
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
325
+ optional :applies_to_all,
326
+ enum: -> {
327
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll
328
+ },
329
+ nil?: true
330
+
331
+ # @!attribute applies_to_item_ids
332
+ # The set of item IDs to which this adjustment applies.
333
+ #
334
+ # @return [Array<String>, nil]
335
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
336
+
179
337
  # @!attribute applies_to_price_ids
180
338
  # The set of price IDs to which this adjustment applies.
181
339
  #
182
340
  # @return [Array<String>, nil]
183
341
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
184
342
 
343
+ # @!attribute currency
344
+ # If set, only prices in the specified currency will have the adjustment applied.
345
+ #
346
+ # @return [String, nil]
347
+ optional :currency, String, nil?: true
348
+
349
+ # @!attribute filters
350
+ # A list of filters that determine which prices this adjustment will apply to.
351
+ #
352
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil]
353
+ optional :filters,
354
+ -> {
355
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter]
356
+ },
357
+ nil?: true
358
+
185
359
  # @!attribute is_invoice_level
186
360
  # When false, this adjustment will be applied to a single price. Otherwise, it
187
361
  # will be applied at the invoice level, possibly to multiple prices.
@@ -189,18 +363,128 @@ module Orb
189
363
  # @return [Boolean, nil]
190
364
  optional :is_invoice_level, Orb::Internal::Type::Boolean
191
365
 
192
- # @!method initialize(usage_discount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :usage_discount)
366
+ # @!attribute price_type
367
+ # If set, only prices of the specified type will have the adjustment applied.
368
+ #
369
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil]
370
+ optional :price_type,
371
+ enum: -> {
372
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::PriceType
373
+ },
374
+ nil?: true
375
+
376
+ # @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
193
377
  # Some parameter documentations has been truncated, see
194
378
  # {Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount}
195
379
  # for more details.
196
380
  #
197
381
  # @param usage_discount [Float]
198
382
  #
383
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
384
+ #
385
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
386
+ #
199
387
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
200
388
  #
389
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
390
+ #
391
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
392
+ #
201
393
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
202
394
  #
395
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
396
+ #
203
397
  # @param adjustment_type [Symbol, :usage_discount]
398
+
399
+ # If set, the adjustment will apply to every price on the subscription.
400
+ #
401
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount#applies_to_all
402
+ module AppliesToAll
403
+ extend Orb::Internal::Type::Enum
404
+
405
+ TRUE = true
406
+
407
+ # @!method self.values
408
+ # @return [Array<Boolean>]
409
+ end
410
+
411
+ class Filter < Orb::Internal::Type::BaseModel
412
+ # @!attribute field
413
+ # The property of the price to filter on.
414
+ #
415
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field]
416
+ required :field,
417
+ enum: -> {
418
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field
419
+ }
420
+
421
+ # @!attribute operator
422
+ # Should prices that match the filter be included or excluded.
423
+ #
424
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator]
425
+ required :operator,
426
+ enum: -> {
427
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator
428
+ }
429
+
430
+ # @!attribute values
431
+ # The IDs or values that match this filter.
432
+ #
433
+ # @return [Array<String>]
434
+ required :values, Orb::Internal::Type::ArrayOf[String]
435
+
436
+ # @!method initialize(field:, operator:, values:)
437
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
438
+ #
439
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
440
+ #
441
+ # @param values [Array<String>] The IDs or values that match this filter.
442
+
443
+ # The property of the price to filter on.
444
+ #
445
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter#field
446
+ module Field
447
+ extend Orb::Internal::Type::Enum
448
+
449
+ PRICE_ID = :price_id
450
+ ITEM_ID = :item_id
451
+ PRICE_TYPE = :price_type
452
+ CURRENCY = :currency
453
+ PRICING_UNIT_ID = :pricing_unit_id
454
+
455
+ # @!method self.values
456
+ # @return [Array<Symbol>]
457
+ end
458
+
459
+ # Should prices that match the filter be included or excluded.
460
+ #
461
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter#operator
462
+ module Operator
463
+ extend Orb::Internal::Type::Enum
464
+
465
+ INCLUDES = :includes
466
+ EXCLUDES = :excludes
467
+
468
+ # @!method self.values
469
+ # @return [Array<Symbol>]
470
+ end
471
+ end
472
+
473
+ # If set, only prices of the specified type will have the adjustment applied.
474
+ #
475
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount#price_type
476
+ module PriceType
477
+ extend Orb::Internal::Type::Enum
478
+
479
+ USAGE = :usage
480
+ FIXED_IN_ADVANCE = :fixed_in_advance
481
+ FIXED_IN_ARREARS = :fixed_in_arrears
482
+ FIXED = :fixed
483
+ IN_ARREARS = :in_arrears
484
+
485
+ # @!method self.values
486
+ # @return [Array<Symbol>]
487
+ end
204
488
  end
205
489
 
206
490
  class AmountDiscount < Orb::Internal::Type::BaseModel
@@ -214,12 +498,44 @@ module Orb
214
498
  # @return [String]
215
499
  required :amount_discount, String
216
500
 
501
+ # @!attribute applies_to_all
502
+ # If set, the adjustment will apply to every price on the subscription.
503
+ #
504
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
505
+ optional :applies_to_all,
506
+ enum: -> {
507
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll
508
+ },
509
+ nil?: true
510
+
511
+ # @!attribute applies_to_item_ids
512
+ # The set of item IDs to which this adjustment applies.
513
+ #
514
+ # @return [Array<String>, nil]
515
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
516
+
217
517
  # @!attribute applies_to_price_ids
218
518
  # The set of price IDs to which this adjustment applies.
219
519
  #
220
520
  # @return [Array<String>, nil]
221
521
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
222
522
 
523
+ # @!attribute currency
524
+ # If set, only prices in the specified currency will have the adjustment applied.
525
+ #
526
+ # @return [String, nil]
527
+ optional :currency, String, nil?: true
528
+
529
+ # @!attribute filters
530
+ # A list of filters that determine which prices this adjustment will apply to.
531
+ #
532
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil]
533
+ optional :filters,
534
+ -> {
535
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter]
536
+ },
537
+ nil?: true
538
+
223
539
  # @!attribute is_invoice_level
224
540
  # When false, this adjustment will be applied to a single price. Otherwise, it
225
541
  # will be applied at the invoice level, possibly to multiple prices.
@@ -227,18 +543,128 @@ module Orb
227
543
  # @return [Boolean, nil]
228
544
  optional :is_invoice_level, Orb::Internal::Type::Boolean
229
545
 
230
- # @!method initialize(amount_discount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :amount_discount)
546
+ # @!attribute price_type
547
+ # If set, only prices of the specified type will have the adjustment applied.
548
+ #
549
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil]
550
+ optional :price_type,
551
+ enum: -> {
552
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::PriceType
553
+ },
554
+ nil?: true
555
+
556
+ # @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
231
557
  # Some parameter documentations has been truncated, see
232
558
  # {Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount}
233
559
  # for more details.
234
560
  #
235
561
  # @param amount_discount [String]
236
562
  #
563
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
564
+ #
565
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
566
+ #
237
567
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
238
568
  #
569
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
570
+ #
571
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
572
+ #
239
573
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
240
574
  #
575
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
576
+ #
241
577
  # @param adjustment_type [Symbol, :amount_discount]
578
+
579
+ # If set, the adjustment will apply to every price on the subscription.
580
+ #
581
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount#applies_to_all
582
+ module AppliesToAll
583
+ extend Orb::Internal::Type::Enum
584
+
585
+ TRUE = true
586
+
587
+ # @!method self.values
588
+ # @return [Array<Boolean>]
589
+ end
590
+
591
+ class Filter < Orb::Internal::Type::BaseModel
592
+ # @!attribute field
593
+ # The property of the price to filter on.
594
+ #
595
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field]
596
+ required :field,
597
+ enum: -> {
598
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field
599
+ }
600
+
601
+ # @!attribute operator
602
+ # Should prices that match the filter be included or excluded.
603
+ #
604
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator]
605
+ required :operator,
606
+ enum: -> {
607
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator
608
+ }
609
+
610
+ # @!attribute values
611
+ # The IDs or values that match this filter.
612
+ #
613
+ # @return [Array<String>]
614
+ required :values, Orb::Internal::Type::ArrayOf[String]
615
+
616
+ # @!method initialize(field:, operator:, values:)
617
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
618
+ #
619
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
620
+ #
621
+ # @param values [Array<String>] The IDs or values that match this filter.
622
+
623
+ # The property of the price to filter on.
624
+ #
625
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter#field
626
+ module Field
627
+ extend Orb::Internal::Type::Enum
628
+
629
+ PRICE_ID = :price_id
630
+ ITEM_ID = :item_id
631
+ PRICE_TYPE = :price_type
632
+ CURRENCY = :currency
633
+ PRICING_UNIT_ID = :pricing_unit_id
634
+
635
+ # @!method self.values
636
+ # @return [Array<Symbol>]
637
+ end
638
+
639
+ # Should prices that match the filter be included or excluded.
640
+ #
641
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter#operator
642
+ module Operator
643
+ extend Orb::Internal::Type::Enum
644
+
645
+ INCLUDES = :includes
646
+ EXCLUDES = :excludes
647
+
648
+ # @!method self.values
649
+ # @return [Array<Symbol>]
650
+ end
651
+ end
652
+
653
+ # If set, only prices of the specified type will have the adjustment applied.
654
+ #
655
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount#price_type
656
+ module PriceType
657
+ extend Orb::Internal::Type::Enum
658
+
659
+ USAGE = :usage
660
+ FIXED_IN_ADVANCE = :fixed_in_advance
661
+ FIXED_IN_ARREARS = :fixed_in_arrears
662
+ FIXED = :fixed
663
+ IN_ARREARS = :in_arrears
664
+
665
+ # @!method self.values
666
+ # @return [Array<Symbol>]
667
+ end
242
668
  end
243
669
 
244
670
  class Minimum < Orb::Internal::Type::BaseModel
@@ -258,12 +684,44 @@ module Orb
258
684
  # @return [String]
259
685
  required :minimum_amount, String
260
686
 
687
+ # @!attribute applies_to_all
688
+ # If set, the adjustment will apply to every price on the subscription.
689
+ #
690
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil]
691
+ optional :applies_to_all,
692
+ enum: -> {
693
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::AppliesToAll
694
+ },
695
+ nil?: true
696
+
697
+ # @!attribute applies_to_item_ids
698
+ # The set of item IDs to which this adjustment applies.
699
+ #
700
+ # @return [Array<String>, nil]
701
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
702
+
261
703
  # @!attribute applies_to_price_ids
262
704
  # The set of price IDs to which this adjustment applies.
263
705
  #
264
706
  # @return [Array<String>, nil]
265
707
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
266
708
 
709
+ # @!attribute currency
710
+ # If set, only prices in the specified currency will have the adjustment applied.
711
+ #
712
+ # @return [String, nil]
713
+ optional :currency, String, nil?: true
714
+
715
+ # @!attribute filters
716
+ # A list of filters that determine which prices this adjustment will apply to.
717
+ #
718
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter>, nil]
719
+ optional :filters,
720
+ -> {
721
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter]
722
+ },
723
+ nil?: true
724
+
267
725
  # @!attribute is_invoice_level
268
726
  # When false, this adjustment will be applied to a single price. Otherwise, it
269
727
  # will be applied at the invoice level, possibly to multiple prices.
@@ -271,7 +729,17 @@ module Orb
271
729
  # @return [Boolean, nil]
272
730
  optional :is_invoice_level, Orb::Internal::Type::Boolean
273
731
 
274
- # @!method initialize(item_id:, minimum_amount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :minimum)
732
+ # @!attribute price_type
733
+ # If set, only prices of the specified type will have the adjustment applied.
734
+ #
735
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::PriceType, nil]
736
+ optional :price_type,
737
+ enum: -> {
738
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::PriceType
739
+ },
740
+ nil?: true
741
+
742
+ # @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
275
743
  # Some parameter documentations has been truncated, see
276
744
  # {Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum}
277
745
  # for more details.
@@ -280,30 +748,162 @@ module Orb
280
748
  #
281
749
  # @param minimum_amount [String]
282
750
  #
751
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
752
+ #
753
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
754
+ #
283
755
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
284
756
  #
757
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
758
+ #
759
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
760
+ #
285
761
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
286
762
  #
763
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
764
+ #
287
765
  # @param adjustment_type [Symbol, :minimum]
288
- end
289
766
 
290
- class Maximum < Orb::Internal::Type::BaseModel
291
- # @!attribute adjustment_type
767
+ # If set, the adjustment will apply to every price on the subscription.
292
768
  #
293
- # @return [Symbol, :maximum]
294
- required :adjustment_type, const: :maximum
769
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum#applies_to_all
770
+ module AppliesToAll
771
+ extend Orb::Internal::Type::Enum
772
+
773
+ TRUE = true
774
+
775
+ # @!method self.values
776
+ # @return [Array<Boolean>]
777
+ end
778
+
779
+ class Filter < Orb::Internal::Type::BaseModel
780
+ # @!attribute field
781
+ # The property of the price to filter on.
782
+ #
783
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Field]
784
+ required :field,
785
+ enum: -> {
786
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Field
787
+ }
788
+
789
+ # @!attribute operator
790
+ # Should prices that match the filter be included or excluded.
791
+ #
792
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Operator]
793
+ required :operator,
794
+ enum: -> {
795
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Operator
796
+ }
797
+
798
+ # @!attribute values
799
+ # The IDs or values that match this filter.
800
+ #
801
+ # @return [Array<String>]
802
+ required :values, Orb::Internal::Type::ArrayOf[String]
803
+
804
+ # @!method initialize(field:, operator:, values:)
805
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
806
+ #
807
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
808
+ #
809
+ # @param values [Array<String>] The IDs or values that match this filter.
810
+
811
+ # The property of the price to filter on.
812
+ #
813
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter#field
814
+ module Field
815
+ extend Orb::Internal::Type::Enum
816
+
817
+ PRICE_ID = :price_id
818
+ ITEM_ID = :item_id
819
+ PRICE_TYPE = :price_type
820
+ CURRENCY = :currency
821
+ PRICING_UNIT_ID = :pricing_unit_id
822
+
823
+ # @!method self.values
824
+ # @return [Array<Symbol>]
825
+ end
826
+
827
+ # Should prices that match the filter be included or excluded.
828
+ #
829
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter#operator
830
+ module Operator
831
+ extend Orb::Internal::Type::Enum
832
+
833
+ INCLUDES = :includes
834
+ EXCLUDES = :excludes
835
+
836
+ # @!method self.values
837
+ # @return [Array<Symbol>]
838
+ end
839
+ end
840
+
841
+ # If set, only prices of the specified type will have the adjustment applied.
842
+ #
843
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum#price_type
844
+ module PriceType
845
+ extend Orb::Internal::Type::Enum
846
+
847
+ USAGE = :usage
848
+ FIXED_IN_ADVANCE = :fixed_in_advance
849
+ FIXED_IN_ARREARS = :fixed_in_arrears
850
+ FIXED = :fixed
851
+ IN_ARREARS = :in_arrears
852
+
853
+ # @!method self.values
854
+ # @return [Array<Symbol>]
855
+ end
856
+ end
857
+
858
+ class Maximum < Orb::Internal::Type::BaseModel
859
+ # @!attribute adjustment_type
860
+ #
861
+ # @return [Symbol, :maximum]
862
+ required :adjustment_type, const: :maximum
295
863
 
296
864
  # @!attribute maximum_amount
297
865
  #
298
866
  # @return [String]
299
867
  required :maximum_amount, String
300
868
 
869
+ # @!attribute applies_to_all
870
+ # If set, the adjustment will apply to every price on the subscription.
871
+ #
872
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil]
873
+ optional :applies_to_all,
874
+ enum: -> {
875
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::AppliesToAll
876
+ },
877
+ nil?: true
878
+
879
+ # @!attribute applies_to_item_ids
880
+ # The set of item IDs to which this adjustment applies.
881
+ #
882
+ # @return [Array<String>, nil]
883
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
884
+
301
885
  # @!attribute applies_to_price_ids
302
886
  # The set of price IDs to which this adjustment applies.
303
887
  #
304
888
  # @return [Array<String>, nil]
305
889
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
306
890
 
891
+ # @!attribute currency
892
+ # If set, only prices in the specified currency will have the adjustment applied.
893
+ #
894
+ # @return [String, nil]
895
+ optional :currency, String, nil?: true
896
+
897
+ # @!attribute filters
898
+ # A list of filters that determine which prices this adjustment will apply to.
899
+ #
900
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter>, nil]
901
+ optional :filters,
902
+ -> {
903
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter]
904
+ },
905
+ nil?: true
906
+
307
907
  # @!attribute is_invoice_level
308
908
  # When false, this adjustment will be applied to a single price. Otherwise, it
309
909
  # will be applied at the invoice level, possibly to multiple prices.
@@ -311,18 +911,128 @@ module Orb
311
911
  # @return [Boolean, nil]
312
912
  optional :is_invoice_level, Orb::Internal::Type::Boolean
313
913
 
314
- # @!method initialize(maximum_amount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :maximum)
914
+ # @!attribute price_type
915
+ # If set, only prices of the specified type will have the adjustment applied.
916
+ #
917
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::PriceType, nil]
918
+ optional :price_type,
919
+ enum: -> {
920
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::PriceType
921
+ },
922
+ nil?: true
923
+
924
+ # @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
315
925
  # Some parameter documentations has been truncated, see
316
926
  # {Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum}
317
927
  # for more details.
318
928
  #
319
929
  # @param maximum_amount [String]
320
930
  #
931
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
932
+ #
933
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
934
+ #
321
935
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
322
936
  #
937
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
938
+ #
939
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
940
+ #
323
941
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
324
942
  #
943
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
944
+ #
325
945
  # @param adjustment_type [Symbol, :maximum]
946
+
947
+ # If set, the adjustment will apply to every price on the subscription.
948
+ #
949
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum#applies_to_all
950
+ module AppliesToAll
951
+ extend Orb::Internal::Type::Enum
952
+
953
+ TRUE = true
954
+
955
+ # @!method self.values
956
+ # @return [Array<Boolean>]
957
+ end
958
+
959
+ class Filter < Orb::Internal::Type::BaseModel
960
+ # @!attribute field
961
+ # The property of the price to filter on.
962
+ #
963
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Field]
964
+ required :field,
965
+ enum: -> {
966
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Field
967
+ }
968
+
969
+ # @!attribute operator
970
+ # Should prices that match the filter be included or excluded.
971
+ #
972
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Operator]
973
+ required :operator,
974
+ enum: -> {
975
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Operator
976
+ }
977
+
978
+ # @!attribute values
979
+ # The IDs or values that match this filter.
980
+ #
981
+ # @return [Array<String>]
982
+ required :values, Orb::Internal::Type::ArrayOf[String]
983
+
984
+ # @!method initialize(field:, operator:, values:)
985
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
986
+ #
987
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
988
+ #
989
+ # @param values [Array<String>] The IDs or values that match this filter.
990
+
991
+ # The property of the price to filter on.
992
+ #
993
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter#field
994
+ module Field
995
+ extend Orb::Internal::Type::Enum
996
+
997
+ PRICE_ID = :price_id
998
+ ITEM_ID = :item_id
999
+ PRICE_TYPE = :price_type
1000
+ CURRENCY = :currency
1001
+ PRICING_UNIT_ID = :pricing_unit_id
1002
+
1003
+ # @!method self.values
1004
+ # @return [Array<Symbol>]
1005
+ end
1006
+
1007
+ # Should prices that match the filter be included or excluded.
1008
+ #
1009
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter#operator
1010
+ module Operator
1011
+ extend Orb::Internal::Type::Enum
1012
+
1013
+ INCLUDES = :includes
1014
+ EXCLUDES = :excludes
1015
+
1016
+ # @!method self.values
1017
+ # @return [Array<Symbol>]
1018
+ end
1019
+ end
1020
+
1021
+ # If set, only prices of the specified type will have the adjustment applied.
1022
+ #
1023
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum#price_type
1024
+ module PriceType
1025
+ extend Orb::Internal::Type::Enum
1026
+
1027
+ USAGE = :usage
1028
+ FIXED_IN_ADVANCE = :fixed_in_advance
1029
+ FIXED_IN_ARREARS = :fixed_in_arrears
1030
+ FIXED = :fixed
1031
+ IN_ARREARS = :in_arrears
1032
+
1033
+ # @!method self.values
1034
+ # @return [Array<Symbol>]
1035
+ end
326
1036
  end
327
1037
 
328
1038
  # @!method self.variants
@@ -9026,12 +9736,44 @@ module Orb
9026
9736
  # @return [Float]
9027
9737
  required :percentage_discount, Float
9028
9738
 
9739
+ # @!attribute applies_to_all
9740
+ # If set, the adjustment will apply to every price on the subscription.
9741
+ #
9742
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
9743
+ optional :applies_to_all,
9744
+ enum: -> {
9745
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll
9746
+ },
9747
+ nil?: true
9748
+
9749
+ # @!attribute applies_to_item_ids
9750
+ # The set of item IDs to which this adjustment applies.
9751
+ #
9752
+ # @return [Array<String>, nil]
9753
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9754
+
9029
9755
  # @!attribute applies_to_price_ids
9030
9756
  # The set of price IDs to which this adjustment applies.
9031
9757
  #
9032
9758
  # @return [Array<String>, nil]
9033
9759
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9034
9760
 
9761
+ # @!attribute currency
9762
+ # If set, only prices in the specified currency will have the adjustment applied.
9763
+ #
9764
+ # @return [String, nil]
9765
+ optional :currency, String, nil?: true
9766
+
9767
+ # @!attribute filters
9768
+ # A list of filters that determine which prices this adjustment will apply to.
9769
+ #
9770
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
9771
+ optional :filters,
9772
+ -> {
9773
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter]
9774
+ },
9775
+ nil?: true
9776
+
9035
9777
  # @!attribute is_invoice_level
9036
9778
  # When false, this adjustment will be applied to a single price. Otherwise, it
9037
9779
  # will be applied at the invoice level, possibly to multiple prices.
@@ -9039,18 +9781,128 @@ module Orb
9039
9781
  # @return [Boolean, nil]
9040
9782
  optional :is_invoice_level, Orb::Internal::Type::Boolean
9041
9783
 
9042
- # @!method initialize(percentage_discount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :percentage_discount)
9784
+ # @!attribute price_type
9785
+ # If set, only prices of the specified type will have the adjustment applied.
9786
+ #
9787
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
9788
+ optional :price_type,
9789
+ enum: -> {
9790
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType
9791
+ },
9792
+ nil?: true
9793
+
9794
+ # @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
9043
9795
  # Some parameter documentations has been truncated, see
9044
9796
  # {Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount}
9045
9797
  # for more details.
9046
9798
  #
9047
9799
  # @param percentage_discount [Float]
9048
9800
  #
9801
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
9802
+ #
9803
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
9804
+ #
9049
9805
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
9050
9806
  #
9807
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
9808
+ #
9809
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
9810
+ #
9051
9811
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
9052
9812
  #
9813
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
9814
+ #
9053
9815
  # @param adjustment_type [Symbol, :percentage_discount]
9816
+
9817
+ # If set, the adjustment will apply to every price on the subscription.
9818
+ #
9819
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount#applies_to_all
9820
+ module AppliesToAll
9821
+ extend Orb::Internal::Type::Enum
9822
+
9823
+ TRUE = true
9824
+
9825
+ # @!method self.values
9826
+ # @return [Array<Boolean>]
9827
+ end
9828
+
9829
+ class Filter < Orb::Internal::Type::BaseModel
9830
+ # @!attribute field
9831
+ # The property of the price to filter on.
9832
+ #
9833
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field]
9834
+ required :field,
9835
+ enum: -> {
9836
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field
9837
+ }
9838
+
9839
+ # @!attribute operator
9840
+ # Should prices that match the filter be included or excluded.
9841
+ #
9842
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
9843
+ required :operator,
9844
+ enum: -> {
9845
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator
9846
+ }
9847
+
9848
+ # @!attribute values
9849
+ # The IDs or values that match this filter.
9850
+ #
9851
+ # @return [Array<String>]
9852
+ required :values, Orb::Internal::Type::ArrayOf[String]
9853
+
9854
+ # @!method initialize(field:, operator:, values:)
9855
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
9856
+ #
9857
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
9858
+ #
9859
+ # @param values [Array<String>] The IDs or values that match this filter.
9860
+
9861
+ # The property of the price to filter on.
9862
+ #
9863
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter#field
9864
+ module Field
9865
+ extend Orb::Internal::Type::Enum
9866
+
9867
+ PRICE_ID = :price_id
9868
+ ITEM_ID = :item_id
9869
+ PRICE_TYPE = :price_type
9870
+ CURRENCY = :currency
9871
+ PRICING_UNIT_ID = :pricing_unit_id
9872
+
9873
+ # @!method self.values
9874
+ # @return [Array<Symbol>]
9875
+ end
9876
+
9877
+ # Should prices that match the filter be included or excluded.
9878
+ #
9879
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter#operator
9880
+ module Operator
9881
+ extend Orb::Internal::Type::Enum
9882
+
9883
+ INCLUDES = :includes
9884
+ EXCLUDES = :excludes
9885
+
9886
+ # @!method self.values
9887
+ # @return [Array<Symbol>]
9888
+ end
9889
+ end
9890
+
9891
+ # If set, only prices of the specified type will have the adjustment applied.
9892
+ #
9893
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount#price_type
9894
+ module PriceType
9895
+ extend Orb::Internal::Type::Enum
9896
+
9897
+ USAGE = :usage
9898
+ FIXED_IN_ADVANCE = :fixed_in_advance
9899
+ FIXED_IN_ARREARS = :fixed_in_arrears
9900
+ FIXED = :fixed
9901
+ IN_ARREARS = :in_arrears
9902
+
9903
+ # @!method self.values
9904
+ # @return [Array<Symbol>]
9905
+ end
9054
9906
  end
9055
9907
 
9056
9908
  class UsageDiscount < Orb::Internal::Type::BaseModel
@@ -9064,12 +9916,44 @@ module Orb
9064
9916
  # @return [Float]
9065
9917
  required :usage_discount, Float
9066
9918
 
9919
+ # @!attribute applies_to_all
9920
+ # If set, the adjustment will apply to every price on the subscription.
9921
+ #
9922
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
9923
+ optional :applies_to_all,
9924
+ enum: -> {
9925
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll
9926
+ },
9927
+ nil?: true
9928
+
9929
+ # @!attribute applies_to_item_ids
9930
+ # The set of item IDs to which this adjustment applies.
9931
+ #
9932
+ # @return [Array<String>, nil]
9933
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9934
+
9067
9935
  # @!attribute applies_to_price_ids
9068
9936
  # The set of price IDs to which this adjustment applies.
9069
9937
  #
9070
9938
  # @return [Array<String>, nil]
9071
9939
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9072
9940
 
9941
+ # @!attribute currency
9942
+ # If set, only prices in the specified currency will have the adjustment applied.
9943
+ #
9944
+ # @return [String, nil]
9945
+ optional :currency, String, nil?: true
9946
+
9947
+ # @!attribute filters
9948
+ # A list of filters that determine which prices this adjustment will apply to.
9949
+ #
9950
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter>, nil]
9951
+ optional :filters,
9952
+ -> {
9953
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter]
9954
+ },
9955
+ nil?: true
9956
+
9073
9957
  # @!attribute is_invoice_level
9074
9958
  # When false, this adjustment will be applied to a single price. Otherwise, it
9075
9959
  # will be applied at the invoice level, possibly to multiple prices.
@@ -9077,18 +9961,128 @@ module Orb
9077
9961
  # @return [Boolean, nil]
9078
9962
  optional :is_invoice_level, Orb::Internal::Type::Boolean
9079
9963
 
9080
- # @!method initialize(usage_discount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :usage_discount)
9964
+ # @!attribute price_type
9965
+ # If set, only prices of the specified type will have the adjustment applied.
9966
+ #
9967
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType, nil]
9968
+ optional :price_type,
9969
+ enum: -> {
9970
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType
9971
+ },
9972
+ nil?: true
9973
+
9974
+ # @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
9081
9975
  # Some parameter documentations has been truncated, see
9082
9976
  # {Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount}
9083
9977
  # for more details.
9084
9978
  #
9085
9979
  # @param usage_discount [Float]
9086
9980
  #
9981
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
9982
+ #
9983
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
9984
+ #
9087
9985
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
9088
9986
  #
9987
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
9988
+ #
9989
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
9990
+ #
9089
9991
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
9090
9992
  #
9993
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
9994
+ #
9091
9995
  # @param adjustment_type [Symbol, :usage_discount]
9996
+
9997
+ # If set, the adjustment will apply to every price on the subscription.
9998
+ #
9999
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount#applies_to_all
10000
+ module AppliesToAll
10001
+ extend Orb::Internal::Type::Enum
10002
+
10003
+ TRUE = true
10004
+
10005
+ # @!method self.values
10006
+ # @return [Array<Boolean>]
10007
+ end
10008
+
10009
+ class Filter < Orb::Internal::Type::BaseModel
10010
+ # @!attribute field
10011
+ # The property of the price to filter on.
10012
+ #
10013
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field]
10014
+ required :field,
10015
+ enum: -> {
10016
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field
10017
+ }
10018
+
10019
+ # @!attribute operator
10020
+ # Should prices that match the filter be included or excluded.
10021
+ #
10022
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator]
10023
+ required :operator,
10024
+ enum: -> {
10025
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator
10026
+ }
10027
+
10028
+ # @!attribute values
10029
+ # The IDs or values that match this filter.
10030
+ #
10031
+ # @return [Array<String>]
10032
+ required :values, Orb::Internal::Type::ArrayOf[String]
10033
+
10034
+ # @!method initialize(field:, operator:, values:)
10035
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
10036
+ #
10037
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
10038
+ #
10039
+ # @param values [Array<String>] The IDs or values that match this filter.
10040
+
10041
+ # The property of the price to filter on.
10042
+ #
10043
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter#field
10044
+ module Field
10045
+ extend Orb::Internal::Type::Enum
10046
+
10047
+ PRICE_ID = :price_id
10048
+ ITEM_ID = :item_id
10049
+ PRICE_TYPE = :price_type
10050
+ CURRENCY = :currency
10051
+ PRICING_UNIT_ID = :pricing_unit_id
10052
+
10053
+ # @!method self.values
10054
+ # @return [Array<Symbol>]
10055
+ end
10056
+
10057
+ # Should prices that match the filter be included or excluded.
10058
+ #
10059
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter#operator
10060
+ module Operator
10061
+ extend Orb::Internal::Type::Enum
10062
+
10063
+ INCLUDES = :includes
10064
+ EXCLUDES = :excludes
10065
+
10066
+ # @!method self.values
10067
+ # @return [Array<Symbol>]
10068
+ end
10069
+ end
10070
+
10071
+ # If set, only prices of the specified type will have the adjustment applied.
10072
+ #
10073
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount#price_type
10074
+ module PriceType
10075
+ extend Orb::Internal::Type::Enum
10076
+
10077
+ USAGE = :usage
10078
+ FIXED_IN_ADVANCE = :fixed_in_advance
10079
+ FIXED_IN_ARREARS = :fixed_in_arrears
10080
+ FIXED = :fixed
10081
+ IN_ARREARS = :in_arrears
10082
+
10083
+ # @!method self.values
10084
+ # @return [Array<Symbol>]
10085
+ end
9092
10086
  end
9093
10087
 
9094
10088
  class AmountDiscount < Orb::Internal::Type::BaseModel
@@ -9102,12 +10096,44 @@ module Orb
9102
10096
  # @return [String]
9103
10097
  required :amount_discount, String
9104
10098
 
10099
+ # @!attribute applies_to_all
10100
+ # If set, the adjustment will apply to every price on the subscription.
10101
+ #
10102
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
10103
+ optional :applies_to_all,
10104
+ enum: -> {
10105
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll
10106
+ },
10107
+ nil?: true
10108
+
10109
+ # @!attribute applies_to_item_ids
10110
+ # The set of item IDs to which this adjustment applies.
10111
+ #
10112
+ # @return [Array<String>, nil]
10113
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
10114
+
9105
10115
  # @!attribute applies_to_price_ids
9106
10116
  # The set of price IDs to which this adjustment applies.
9107
10117
  #
9108
10118
  # @return [Array<String>, nil]
9109
10119
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9110
10120
 
10121
+ # @!attribute currency
10122
+ # If set, only prices in the specified currency will have the adjustment applied.
10123
+ #
10124
+ # @return [String, nil]
10125
+ optional :currency, String, nil?: true
10126
+
10127
+ # @!attribute filters
10128
+ # A list of filters that determine which prices this adjustment will apply to.
10129
+ #
10130
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter>, nil]
10131
+ optional :filters,
10132
+ -> {
10133
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter]
10134
+ },
10135
+ nil?: true
10136
+
9111
10137
  # @!attribute is_invoice_level
9112
10138
  # When false, this adjustment will be applied to a single price. Otherwise, it
9113
10139
  # will be applied at the invoice level, possibly to multiple prices.
@@ -9115,18 +10141,128 @@ module Orb
9115
10141
  # @return [Boolean, nil]
9116
10142
  optional :is_invoice_level, Orb::Internal::Type::Boolean
9117
10143
 
9118
- # @!method initialize(amount_discount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :amount_discount)
10144
+ # @!attribute price_type
10145
+ # If set, only prices of the specified type will have the adjustment applied.
10146
+ #
10147
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType, nil]
10148
+ optional :price_type,
10149
+ enum: -> {
10150
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType
10151
+ },
10152
+ nil?: true
10153
+
10154
+ # @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
9119
10155
  # Some parameter documentations has been truncated, see
9120
10156
  # {Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount}
9121
10157
  # for more details.
9122
10158
  #
9123
10159
  # @param amount_discount [String]
9124
10160
  #
10161
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
10162
+ #
10163
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
10164
+ #
9125
10165
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
9126
10166
  #
10167
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
10168
+ #
10169
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
10170
+ #
9127
10171
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
9128
10172
  #
10173
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
10174
+ #
9129
10175
  # @param adjustment_type [Symbol, :amount_discount]
10176
+
10177
+ # If set, the adjustment will apply to every price on the subscription.
10178
+ #
10179
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount#applies_to_all
10180
+ module AppliesToAll
10181
+ extend Orb::Internal::Type::Enum
10182
+
10183
+ TRUE = true
10184
+
10185
+ # @!method self.values
10186
+ # @return [Array<Boolean>]
10187
+ end
10188
+
10189
+ class Filter < Orb::Internal::Type::BaseModel
10190
+ # @!attribute field
10191
+ # The property of the price to filter on.
10192
+ #
10193
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field]
10194
+ required :field,
10195
+ enum: -> {
10196
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field
10197
+ }
10198
+
10199
+ # @!attribute operator
10200
+ # Should prices that match the filter be included or excluded.
10201
+ #
10202
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator]
10203
+ required :operator,
10204
+ enum: -> {
10205
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator
10206
+ }
10207
+
10208
+ # @!attribute values
10209
+ # The IDs or values that match this filter.
10210
+ #
10211
+ # @return [Array<String>]
10212
+ required :values, Orb::Internal::Type::ArrayOf[String]
10213
+
10214
+ # @!method initialize(field:, operator:, values:)
10215
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
10216
+ #
10217
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
10218
+ #
10219
+ # @param values [Array<String>] The IDs or values that match this filter.
10220
+
10221
+ # The property of the price to filter on.
10222
+ #
10223
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter#field
10224
+ module Field
10225
+ extend Orb::Internal::Type::Enum
10226
+
10227
+ PRICE_ID = :price_id
10228
+ ITEM_ID = :item_id
10229
+ PRICE_TYPE = :price_type
10230
+ CURRENCY = :currency
10231
+ PRICING_UNIT_ID = :pricing_unit_id
10232
+
10233
+ # @!method self.values
10234
+ # @return [Array<Symbol>]
10235
+ end
10236
+
10237
+ # Should prices that match the filter be included or excluded.
10238
+ #
10239
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter#operator
10240
+ module Operator
10241
+ extend Orb::Internal::Type::Enum
10242
+
10243
+ INCLUDES = :includes
10244
+ EXCLUDES = :excludes
10245
+
10246
+ # @!method self.values
10247
+ # @return [Array<Symbol>]
10248
+ end
10249
+ end
10250
+
10251
+ # If set, only prices of the specified type will have the adjustment applied.
10252
+ #
10253
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount#price_type
10254
+ module PriceType
10255
+ extend Orb::Internal::Type::Enum
10256
+
10257
+ USAGE = :usage
10258
+ FIXED_IN_ADVANCE = :fixed_in_advance
10259
+ FIXED_IN_ARREARS = :fixed_in_arrears
10260
+ FIXED = :fixed
10261
+ IN_ARREARS = :in_arrears
10262
+
10263
+ # @!method self.values
10264
+ # @return [Array<Symbol>]
10265
+ end
9130
10266
  end
9131
10267
 
9132
10268
  class Minimum < Orb::Internal::Type::BaseModel
@@ -9146,12 +10282,44 @@ module Orb
9146
10282
  # @return [String]
9147
10283
  required :minimum_amount, String
9148
10284
 
10285
+ # @!attribute applies_to_all
10286
+ # If set, the adjustment will apply to every price on the subscription.
10287
+ #
10288
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll, nil]
10289
+ optional :applies_to_all,
10290
+ enum: -> {
10291
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll
10292
+ },
10293
+ nil?: true
10294
+
10295
+ # @!attribute applies_to_item_ids
10296
+ # The set of item IDs to which this adjustment applies.
10297
+ #
10298
+ # @return [Array<String>, nil]
10299
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
10300
+
9149
10301
  # @!attribute applies_to_price_ids
9150
10302
  # The set of price IDs to which this adjustment applies.
9151
10303
  #
9152
10304
  # @return [Array<String>, nil]
9153
10305
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9154
10306
 
10307
+ # @!attribute currency
10308
+ # If set, only prices in the specified currency will have the adjustment applied.
10309
+ #
10310
+ # @return [String, nil]
10311
+ optional :currency, String, nil?: true
10312
+
10313
+ # @!attribute filters
10314
+ # A list of filters that determine which prices this adjustment will apply to.
10315
+ #
10316
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter>, nil]
10317
+ optional :filters,
10318
+ -> {
10319
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter]
10320
+ },
10321
+ nil?: true
10322
+
9155
10323
  # @!attribute is_invoice_level
9156
10324
  # When false, this adjustment will be applied to a single price. Otherwise, it
9157
10325
  # will be applied at the invoice level, possibly to multiple prices.
@@ -9159,7 +10327,17 @@ module Orb
9159
10327
  # @return [Boolean, nil]
9160
10328
  optional :is_invoice_level, Orb::Internal::Type::Boolean
9161
10329
 
9162
- # @!method initialize(item_id:, minimum_amount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :minimum)
10330
+ # @!attribute price_type
10331
+ # If set, only prices of the specified type will have the adjustment applied.
10332
+ #
10333
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::PriceType, nil]
10334
+ optional :price_type,
10335
+ enum: -> {
10336
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::PriceType
10337
+ },
10338
+ nil?: true
10339
+
10340
+ # @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
9163
10341
  # Some parameter documentations has been truncated, see
9164
10342
  # {Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum}
9165
10343
  # for more details.
@@ -9168,11 +10346,111 @@ module Orb
9168
10346
  #
9169
10347
  # @param minimum_amount [String]
9170
10348
  #
10349
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
10350
+ #
10351
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
10352
+ #
9171
10353
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
9172
10354
  #
10355
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
10356
+ #
10357
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
10358
+ #
9173
10359
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
9174
10360
  #
10361
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
10362
+ #
9175
10363
  # @param adjustment_type [Symbol, :minimum]
10364
+
10365
+ # If set, the adjustment will apply to every price on the subscription.
10366
+ #
10367
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum#applies_to_all
10368
+ module AppliesToAll
10369
+ extend Orb::Internal::Type::Enum
10370
+
10371
+ TRUE = true
10372
+
10373
+ # @!method self.values
10374
+ # @return [Array<Boolean>]
10375
+ end
10376
+
10377
+ class Filter < Orb::Internal::Type::BaseModel
10378
+ # @!attribute field
10379
+ # The property of the price to filter on.
10380
+ #
10381
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field]
10382
+ required :field,
10383
+ enum: -> {
10384
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field
10385
+ }
10386
+
10387
+ # @!attribute operator
10388
+ # Should prices that match the filter be included or excluded.
10389
+ #
10390
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator]
10391
+ required :operator,
10392
+ enum: -> {
10393
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator
10394
+ }
10395
+
10396
+ # @!attribute values
10397
+ # The IDs or values that match this filter.
10398
+ #
10399
+ # @return [Array<String>]
10400
+ required :values, Orb::Internal::Type::ArrayOf[String]
10401
+
10402
+ # @!method initialize(field:, operator:, values:)
10403
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
10404
+ #
10405
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
10406
+ #
10407
+ # @param values [Array<String>] The IDs or values that match this filter.
10408
+
10409
+ # The property of the price to filter on.
10410
+ #
10411
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter#field
10412
+ module Field
10413
+ extend Orb::Internal::Type::Enum
10414
+
10415
+ PRICE_ID = :price_id
10416
+ ITEM_ID = :item_id
10417
+ PRICE_TYPE = :price_type
10418
+ CURRENCY = :currency
10419
+ PRICING_UNIT_ID = :pricing_unit_id
10420
+
10421
+ # @!method self.values
10422
+ # @return [Array<Symbol>]
10423
+ end
10424
+
10425
+ # Should prices that match the filter be included or excluded.
10426
+ #
10427
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter#operator
10428
+ module Operator
10429
+ extend Orb::Internal::Type::Enum
10430
+
10431
+ INCLUDES = :includes
10432
+ EXCLUDES = :excludes
10433
+
10434
+ # @!method self.values
10435
+ # @return [Array<Symbol>]
10436
+ end
10437
+ end
10438
+
10439
+ # If set, only prices of the specified type will have the adjustment applied.
10440
+ #
10441
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum#price_type
10442
+ module PriceType
10443
+ extend Orb::Internal::Type::Enum
10444
+
10445
+ USAGE = :usage
10446
+ FIXED_IN_ADVANCE = :fixed_in_advance
10447
+ FIXED_IN_ARREARS = :fixed_in_arrears
10448
+ FIXED = :fixed
10449
+ IN_ARREARS = :in_arrears
10450
+
10451
+ # @!method self.values
10452
+ # @return [Array<Symbol>]
10453
+ end
9176
10454
  end
9177
10455
 
9178
10456
  class Maximum < Orb::Internal::Type::BaseModel
@@ -9186,12 +10464,44 @@ module Orb
9186
10464
  # @return [String]
9187
10465
  required :maximum_amount, String
9188
10466
 
10467
+ # @!attribute applies_to_all
10468
+ # If set, the adjustment will apply to every price on the subscription.
10469
+ #
10470
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll, nil]
10471
+ optional :applies_to_all,
10472
+ enum: -> {
10473
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll
10474
+ },
10475
+ nil?: true
10476
+
10477
+ # @!attribute applies_to_item_ids
10478
+ # The set of item IDs to which this adjustment applies.
10479
+ #
10480
+ # @return [Array<String>, nil]
10481
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
10482
+
9189
10483
  # @!attribute applies_to_price_ids
9190
10484
  # The set of price IDs to which this adjustment applies.
9191
10485
  #
9192
10486
  # @return [Array<String>, nil]
9193
10487
  optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
9194
10488
 
10489
+ # @!attribute currency
10490
+ # If set, only prices in the specified currency will have the adjustment applied.
10491
+ #
10492
+ # @return [String, nil]
10493
+ optional :currency, String, nil?: true
10494
+
10495
+ # @!attribute filters
10496
+ # A list of filters that determine which prices this adjustment will apply to.
10497
+ #
10498
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter>, nil]
10499
+ optional :filters,
10500
+ -> {
10501
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter]
10502
+ },
10503
+ nil?: true
10504
+
9195
10505
  # @!attribute is_invoice_level
9196
10506
  # When false, this adjustment will be applied to a single price. Otherwise, it
9197
10507
  # will be applied at the invoice level, possibly to multiple prices.
@@ -9199,18 +10509,128 @@ module Orb
9199
10509
  # @return [Boolean, nil]
9200
10510
  optional :is_invoice_level, Orb::Internal::Type::Boolean
9201
10511
 
9202
- # @!method initialize(maximum_amount:, applies_to_price_ids: nil, is_invoice_level: nil, adjustment_type: :maximum)
10512
+ # @!attribute price_type
10513
+ # If set, only prices of the specified type will have the adjustment applied.
10514
+ #
10515
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::PriceType, nil]
10516
+ optional :price_type,
10517
+ enum: -> {
10518
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::PriceType
10519
+ },
10520
+ nil?: true
10521
+
10522
+ # @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
9203
10523
  # Some parameter documentations has been truncated, see
9204
10524
  # {Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum}
9205
10525
  # for more details.
9206
10526
  #
9207
10527
  # @param maximum_amount [String]
9208
10528
  #
10529
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
10530
+ #
10531
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
10532
+ #
9209
10533
  # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
9210
10534
  #
10535
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
10536
+ #
10537
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
10538
+ #
9211
10539
  # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
9212
10540
  #
10541
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
10542
+ #
9213
10543
  # @param adjustment_type [Symbol, :maximum]
10544
+
10545
+ # If set, the adjustment will apply to every price on the subscription.
10546
+ #
10547
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum#applies_to_all
10548
+ module AppliesToAll
10549
+ extend Orb::Internal::Type::Enum
10550
+
10551
+ TRUE = true
10552
+
10553
+ # @!method self.values
10554
+ # @return [Array<Boolean>]
10555
+ end
10556
+
10557
+ class Filter < Orb::Internal::Type::BaseModel
10558
+ # @!attribute field
10559
+ # The property of the price to filter on.
10560
+ #
10561
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field]
10562
+ required :field,
10563
+ enum: -> {
10564
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field
10565
+ }
10566
+
10567
+ # @!attribute operator
10568
+ # Should prices that match the filter be included or excluded.
10569
+ #
10570
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator]
10571
+ required :operator,
10572
+ enum: -> {
10573
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator
10574
+ }
10575
+
10576
+ # @!attribute values
10577
+ # The IDs or values that match this filter.
10578
+ #
10579
+ # @return [Array<String>]
10580
+ required :values, Orb::Internal::Type::ArrayOf[String]
10581
+
10582
+ # @!method initialize(field:, operator:, values:)
10583
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
10584
+ #
10585
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
10586
+ #
10587
+ # @param values [Array<String>] The IDs or values that match this filter.
10588
+
10589
+ # The property of the price to filter on.
10590
+ #
10591
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter#field
10592
+ module Field
10593
+ extend Orb::Internal::Type::Enum
10594
+
10595
+ PRICE_ID = :price_id
10596
+ ITEM_ID = :item_id
10597
+ PRICE_TYPE = :price_type
10598
+ CURRENCY = :currency
10599
+ PRICING_UNIT_ID = :pricing_unit_id
10600
+
10601
+ # @!method self.values
10602
+ # @return [Array<Symbol>]
10603
+ end
10604
+
10605
+ # Should prices that match the filter be included or excluded.
10606
+ #
10607
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter#operator
10608
+ module Operator
10609
+ extend Orb::Internal::Type::Enum
10610
+
10611
+ INCLUDES = :includes
10612
+ EXCLUDES = :excludes
10613
+
10614
+ # @!method self.values
10615
+ # @return [Array<Symbol>]
10616
+ end
10617
+ end
10618
+
10619
+ # If set, only prices of the specified type will have the adjustment applied.
10620
+ #
10621
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum#price_type
10622
+ module PriceType
10623
+ extend Orb::Internal::Type::Enum
10624
+
10625
+ USAGE = :usage
10626
+ FIXED_IN_ADVANCE = :fixed_in_advance
10627
+ FIXED_IN_ARREARS = :fixed_in_arrears
10628
+ FIXED = :fixed
10629
+ IN_ARREARS = :in_arrears
10630
+
10631
+ # @!method self.values
10632
+ # @return [Array<Symbol>]
10633
+ end
9214
10634
  end
9215
10635
 
9216
10636
  # @!method self.variants