orb-billing 0.5.4 → 0.6.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 (211) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/base_model.rb +2 -2
  5. data/lib/orb/internal/type/union.rb +6 -6
  6. data/lib/orb/internal/util.rb +5 -1
  7. data/lib/orb/models/alert.rb +33 -1
  8. data/lib/orb/models/amount_discount.rb +10 -10
  9. data/lib/orb/models/credit_note_create_params.rb +9 -9
  10. data/lib/orb/models/customer_create_params.rb +21 -3
  11. data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
  12. data/lib/orb/models/customer_update_params.rb +21 -3
  13. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
  14. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
  15. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
  16. data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
  17. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
  18. data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
  19. data/lib/orb/models/invoice.rb +626 -9
  20. data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
  21. data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
  22. data/lib/orb/models/item.rb +18 -1
  23. data/lib/orb/models/item_archive_params.rb +14 -0
  24. data/lib/orb/models/item_create_params.rb +14 -1
  25. data/lib/orb/models/item_update_params.rb +16 -1
  26. data/lib/orb/models/percentage_discount.rb +10 -10
  27. data/lib/orb/models/plan.rb +618 -9
  28. data/lib/orb/models/plan_create_params.rb +2066 -30
  29. data/lib/orb/models/plan_set_default_version_params.rb +22 -0
  30. data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
  31. data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
  32. data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
  33. data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
  34. data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
  35. data/lib/orb/models/plans/version_create_params.rb +17794 -0
  36. data/lib/orb/models/plans/version_create_response.rb +814 -0
  37. data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
  38. data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
  39. data/lib/orb/models/price.rb +4124 -70
  40. data/lib/orb/models/price_create_params.rb +45 -1
  41. data/lib/orb/models/price_evaluate_params.rb +8529 -21
  42. data/lib/orb/models/price_evaluate_response.rb +38 -3
  43. data/lib/orb/models/subscription.rb +730 -54
  44. data/lib/orb/models/subscription_cancel_response.rb +706 -54
  45. data/lib/orb/models/subscription_change_apply_response.rb +728 -54
  46. data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
  47. data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
  48. data/lib/orb/models/subscription_create_params.rb +5992 -1698
  49. data/lib/orb/models/subscription_create_response.rb +706 -54
  50. data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
  51. data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
  52. data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
  53. data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
  54. data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
  55. data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
  56. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
  57. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
  58. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
  59. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
  60. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
  61. data/lib/orb/models/subscription_update_trial_response.rb +706 -54
  62. data/lib/orb/models/trial_discount.rb +10 -10
  63. data/lib/orb/models/usage_discount.rb +10 -10
  64. data/lib/orb/models.rb +4 -0
  65. data/lib/orb/resources/credit_notes.rb +3 -3
  66. data/lib/orb/resources/customers/balance_transactions.rb +0 -7
  67. data/lib/orb/resources/customers.rb +4 -7
  68. data/lib/orb/resources/dimensional_price_groups.rb +1 -1
  69. data/lib/orb/resources/items.rb +34 -2
  70. data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
  71. data/lib/orb/resources/plans/external_plan_id.rb +32 -1
  72. data/lib/orb/resources/plans/versions.rb +86 -0
  73. data/lib/orb/resources/plans.rb +33 -2
  74. data/lib/orb/resources/prices.rb +23 -17
  75. data/lib/orb/resources/subscriptions.rb +5 -1
  76. data/lib/orb/version.rb +1 -1
  77. data/lib/orb.rb +16 -1
  78. data/rbi/orb/models/alert.rbi +50 -3
  79. data/rbi/orb/models/amount_discount.rbi +8 -8
  80. data/rbi/orb/models/credit_note_create_params.rbi +8 -8
  81. data/rbi/orb/models/customer_create_params.rbi +38 -4
  82. data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
  83. data/rbi/orb/models/customer_update_params.rbi +38 -4
  84. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
  85. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
  86. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
  87. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
  88. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
  89. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
  90. data/rbi/orb/models/invoice.rbi +1451 -35
  91. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
  92. data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
  93. data/rbi/orb/models/item.rbi +20 -1
  94. data/rbi/orb/models/item_archive_params.rbi +25 -0
  95. data/rbi/orb/models/item_create_params.rbi +18 -1
  96. data/rbi/orb/models/item_update_params.rbi +17 -1
  97. data/rbi/orb/models/percentage_discount.rbi +10 -10
  98. data/rbi/orb/models/plan.rbi +1339 -4
  99. data/rbi/orb/models/plan_create_params.rbi +3833 -29
  100. data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
  101. data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
  102. data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
  103. data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
  104. data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
  105. data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
  106. data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
  107. data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
  108. data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
  109. data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
  110. data/rbi/orb/models/price.rbi +9447 -441
  111. data/rbi/orb/models/price_create_params.rbi +80 -0
  112. data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
  113. data/rbi/orb/models/price_evaluate_response.rbi +68 -5
  114. data/rbi/orb/models/subscription.rbi +1654 -44
  115. data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
  116. data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
  117. data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
  118. data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
  119. data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
  120. data/rbi/orb/models/subscription_create_response.rbi +1692 -44
  121. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
  122. data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
  123. data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
  124. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
  125. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
  126. data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
  127. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
  128. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
  129. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
  130. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
  131. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
  132. data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
  133. data/rbi/orb/models/trial_discount.rbi +8 -8
  134. data/rbi/orb/models/usage_discount.rbi +10 -10
  135. data/rbi/orb/models.rbi +4 -0
  136. data/rbi/orb/resources/credit_notes.rbi +3 -3
  137. data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
  138. data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
  139. data/rbi/orb/resources/customers.rbi +7 -7
  140. data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
  141. data/rbi/orb/resources/items.rbi +20 -0
  142. data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
  143. data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
  144. data/rbi/orb/resources/plans/versions.rbi +91 -0
  145. data/rbi/orb/resources/plans.rbi +27 -2
  146. data/rbi/orb/resources/prices.rbi +27 -17
  147. data/rbi/orb/resources/subscriptions.rbi +9 -1
  148. data/sig/orb/models/alert.rbs +20 -3
  149. data/sig/orb/models/amount_discount.rbs +5 -5
  150. data/sig/orb/models/credit_note_create_params.rbs +6 -6
  151. data/sig/orb/models/customer_create_params.rbs +13 -0
  152. data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
  153. data/sig/orb/models/customer_update_params.rbs +13 -0
  154. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
  155. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
  156. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
  157. data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
  158. data/sig/orb/models/invoice.rbs +558 -4
  159. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
  160. data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
  161. data/sig/orb/models/item.rbs +5 -0
  162. data/sig/orb/models/item_archive_params.rbs +14 -0
  163. data/sig/orb/models/item_create_params.rbs +10 -2
  164. data/sig/orb/models/item_update_params.rbs +5 -0
  165. data/sig/orb/models/percentage_discount.rbs +5 -5
  166. data/sig/orb/models/plan.rbs +538 -4
  167. data/sig/orb/models/plan_create_params.rbs +1460 -3
  168. data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
  169. data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
  170. data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
  171. data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
  172. data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
  173. data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
  174. data/sig/orb/models/plans/version_create_params.rbs +12898 -0
  175. data/sig/orb/models/plans/version_create_response.rbs +662 -0
  176. data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
  177. data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
  178. data/sig/orb/models/price.rbs +3512 -96
  179. data/sig/orb/models/price_create_params.rbs +32 -0
  180. data/sig/orb/models/price_evaluate_params.rbs +6187 -10
  181. data/sig/orb/models/price_evaluate_response.rbs +41 -4
  182. data/sig/orb/models/subscription.rbs +609 -29
  183. data/sig/orb/models/subscription_cancel_response.rbs +609 -29
  184. data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
  185. data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
  186. data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
  187. data/sig/orb/models/subscription_create_params.rbs +4450 -1466
  188. data/sig/orb/models/subscription_create_response.rbs +609 -29
  189. data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
  190. data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
  191. data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
  192. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
  193. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
  194. data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
  195. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
  196. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
  197. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
  198. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
  199. data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
  200. data/sig/orb/models/trial_discount.rbs +5 -5
  201. data/sig/orb/models/usage_discount.rbs +5 -5
  202. data/sig/orb/models.rbs +4 -0
  203. data/sig/orb/resources/credit_notes.rbs +1 -1
  204. data/sig/orb/resources/items.rbs +7 -0
  205. data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
  206. data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
  207. data/sig/orb/resources/plans/versions.rbs +28 -0
  208. data/sig/orb/resources/plans.rbs +8 -0
  209. data/sig/orb/resources/prices.rbs +3 -3
  210. data/sig/orb/resources/subscriptions.rbs +2 -0
  211. metadata +41 -2
@@ -315,6 +315,12 @@ module Orb
315
315
  sig { returns(T::Array[String]) }
316
316
  attr_accessor :applies_to_price_ids
317
317
 
318
+ # The filters that determine which prices to apply this adjustment to.
319
+ sig do
320
+ returns(T::Array[Orb::Plan::Adjustment::UsageDiscount::Filter])
321
+ end
322
+ attr_accessor :filters
323
+
318
324
  # True for adjustments that apply to an entire invocice, false for adjustments
319
325
  # that apply to only one price.
320
326
  sig { returns(T::Boolean) }
@@ -337,6 +343,8 @@ module Orb
337
343
  params(
338
344
  id: String,
339
345
  applies_to_price_ids: T::Array[String],
346
+ filters:
347
+ T::Array[Orb::Plan::Adjustment::UsageDiscount::Filter::OrHash],
340
348
  is_invoice_level: T::Boolean,
341
349
  plan_phase_order: T.nilable(Integer),
342
350
  reason: T.nilable(String),
@@ -348,6 +356,8 @@ module Orb
348
356
  id:,
349
357
  # The price IDs that this adjustment applies to.
350
358
  applies_to_price_ids:,
359
+ # The filters that determine which prices to apply this adjustment to.
360
+ filters:,
351
361
  # True for adjustments that apply to an entire invocice, false for adjustments
352
362
  # that apply to only one price.
353
363
  is_invoice_level:,
@@ -368,6 +378,7 @@ module Orb
368
378
  id: String,
369
379
  adjustment_type: Symbol,
370
380
  applies_to_price_ids: T::Array[String],
381
+ filters: T::Array[Orb::Plan::Adjustment::UsageDiscount::Filter],
371
382
  is_invoice_level: T::Boolean,
372
383
  plan_phase_order: T.nilable(Integer),
373
384
  reason: T.nilable(String),
@@ -377,6 +388,154 @@ module Orb
377
388
  end
378
389
  def to_hash
379
390
  end
391
+
392
+ class Filter < Orb::Internal::Type::BaseModel
393
+ OrHash =
394
+ T.type_alias do
395
+ T.any(
396
+ Orb::Plan::Adjustment::UsageDiscount::Filter,
397
+ Orb::Internal::AnyHash
398
+ )
399
+ end
400
+
401
+ # The property of the price to filter on.
402
+ sig do
403
+ returns(
404
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
405
+ )
406
+ end
407
+ attr_accessor :field
408
+
409
+ # Should prices that match the filter be included or excluded.
410
+ sig do
411
+ returns(
412
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
413
+ )
414
+ end
415
+ attr_accessor :operator
416
+
417
+ # The IDs or values that match this filter.
418
+ sig { returns(T::Array[String]) }
419
+ attr_accessor :values
420
+
421
+ sig do
422
+ params(
423
+ field:
424
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
425
+ operator:
426
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
427
+ values: T::Array[String]
428
+ ).returns(T.attached_class)
429
+ end
430
+ def self.new(
431
+ # The property of the price to filter on.
432
+ field:,
433
+ # Should prices that match the filter be included or excluded.
434
+ operator:,
435
+ # The IDs or values that match this filter.
436
+ values:
437
+ )
438
+ end
439
+
440
+ sig do
441
+ override.returns(
442
+ {
443
+ field:
444
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol,
445
+ operator:
446
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol,
447
+ values: T::Array[String]
448
+ }
449
+ )
450
+ end
451
+ def to_hash
452
+ end
453
+
454
+ # The property of the price to filter on.
455
+ module Field
456
+ extend Orb::Internal::Type::Enum
457
+
458
+ TaggedSymbol =
459
+ T.type_alias do
460
+ T.all(
461
+ Symbol,
462
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field
463
+ )
464
+ end
465
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
466
+
467
+ PRICE_ID =
468
+ T.let(
469
+ :price_id,
470
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
471
+ )
472
+ ITEM_ID =
473
+ T.let(
474
+ :item_id,
475
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
476
+ )
477
+ PRICE_TYPE =
478
+ T.let(
479
+ :price_type,
480
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
481
+ )
482
+ CURRENCY =
483
+ T.let(
484
+ :currency,
485
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
486
+ )
487
+ PRICING_UNIT_ID =
488
+ T.let(
489
+ :pricing_unit_id,
490
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
491
+ )
492
+
493
+ sig do
494
+ override.returns(
495
+ T::Array[
496
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
497
+ ]
498
+ )
499
+ end
500
+ def self.values
501
+ end
502
+ end
503
+
504
+ # Should prices that match the filter be included or excluded.
505
+ module Operator
506
+ extend Orb::Internal::Type::Enum
507
+
508
+ TaggedSymbol =
509
+ T.type_alias do
510
+ T.all(
511
+ Symbol,
512
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator
513
+ )
514
+ end
515
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
516
+
517
+ INCLUDES =
518
+ T.let(
519
+ :includes,
520
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
521
+ )
522
+ EXCLUDES =
523
+ T.let(
524
+ :excludes,
525
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
526
+ )
527
+
528
+ sig do
529
+ override.returns(
530
+ T::Array[
531
+ Orb::Plan::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
532
+ ]
533
+ )
534
+ end
535
+ def self.values
536
+ end
537
+ end
538
+ end
380
539
  end
381
540
 
382
541
  class AmountDiscount < Orb::Internal::Type::BaseModel
@@ -403,6 +562,12 @@ module Orb
403
562
  sig { returns(T::Array[String]) }
404
563
  attr_accessor :applies_to_price_ids
405
564
 
565
+ # The filters that determine which prices to apply this adjustment to.
566
+ sig do
567
+ returns(T::Array[Orb::Plan::Adjustment::AmountDiscount::Filter])
568
+ end
569
+ attr_accessor :filters
570
+
406
571
  # True for adjustments that apply to an entire invocice, false for adjustments
407
572
  # that apply to only one price.
408
573
  sig { returns(T::Boolean) }
@@ -421,6 +586,8 @@ module Orb
421
586
  id: String,
422
587
  amount_discount: String,
423
588
  applies_to_price_ids: T::Array[String],
589
+ filters:
590
+ T::Array[Orb::Plan::Adjustment::AmountDiscount::Filter::OrHash],
424
591
  is_invoice_level: T::Boolean,
425
592
  plan_phase_order: T.nilable(Integer),
426
593
  reason: T.nilable(String),
@@ -434,6 +601,8 @@ module Orb
434
601
  amount_discount:,
435
602
  # The price IDs that this adjustment applies to.
436
603
  applies_to_price_ids:,
604
+ # The filters that determine which prices to apply this adjustment to.
605
+ filters:,
437
606
  # True for adjustments that apply to an entire invocice, false for adjustments
438
607
  # that apply to only one price.
439
608
  is_invoice_level:,
@@ -452,6 +621,8 @@ module Orb
452
621
  adjustment_type: Symbol,
453
622
  amount_discount: String,
454
623
  applies_to_price_ids: T::Array[String],
624
+ filters:
625
+ T::Array[Orb::Plan::Adjustment::AmountDiscount::Filter],
455
626
  is_invoice_level: T::Boolean,
456
627
  plan_phase_order: T.nilable(Integer),
457
628
  reason: T.nilable(String)
@@ -460,6 +631,154 @@ module Orb
460
631
  end
461
632
  def to_hash
462
633
  end
634
+
635
+ class Filter < Orb::Internal::Type::BaseModel
636
+ OrHash =
637
+ T.type_alias do
638
+ T.any(
639
+ Orb::Plan::Adjustment::AmountDiscount::Filter,
640
+ Orb::Internal::AnyHash
641
+ )
642
+ end
643
+
644
+ # The property of the price to filter on.
645
+ sig do
646
+ returns(
647
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
648
+ )
649
+ end
650
+ attr_accessor :field
651
+
652
+ # Should prices that match the filter be included or excluded.
653
+ sig do
654
+ returns(
655
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
656
+ )
657
+ end
658
+ attr_accessor :operator
659
+
660
+ # The IDs or values that match this filter.
661
+ sig { returns(T::Array[String]) }
662
+ attr_accessor :values
663
+
664
+ sig do
665
+ params(
666
+ field:
667
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
668
+ operator:
669
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
670
+ values: T::Array[String]
671
+ ).returns(T.attached_class)
672
+ end
673
+ def self.new(
674
+ # The property of the price to filter on.
675
+ field:,
676
+ # Should prices that match the filter be included or excluded.
677
+ operator:,
678
+ # The IDs or values that match this filter.
679
+ values:
680
+ )
681
+ end
682
+
683
+ sig do
684
+ override.returns(
685
+ {
686
+ field:
687
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol,
688
+ operator:
689
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol,
690
+ values: T::Array[String]
691
+ }
692
+ )
693
+ end
694
+ def to_hash
695
+ end
696
+
697
+ # The property of the price to filter on.
698
+ module Field
699
+ extend Orb::Internal::Type::Enum
700
+
701
+ TaggedSymbol =
702
+ T.type_alias do
703
+ T.all(
704
+ Symbol,
705
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field
706
+ )
707
+ end
708
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
709
+
710
+ PRICE_ID =
711
+ T.let(
712
+ :price_id,
713
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
714
+ )
715
+ ITEM_ID =
716
+ T.let(
717
+ :item_id,
718
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
719
+ )
720
+ PRICE_TYPE =
721
+ T.let(
722
+ :price_type,
723
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
724
+ )
725
+ CURRENCY =
726
+ T.let(
727
+ :currency,
728
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
729
+ )
730
+ PRICING_UNIT_ID =
731
+ T.let(
732
+ :pricing_unit_id,
733
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
734
+ )
735
+
736
+ sig do
737
+ override.returns(
738
+ T::Array[
739
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
740
+ ]
741
+ )
742
+ end
743
+ def self.values
744
+ end
745
+ end
746
+
747
+ # Should prices that match the filter be included or excluded.
748
+ module Operator
749
+ extend Orb::Internal::Type::Enum
750
+
751
+ TaggedSymbol =
752
+ T.type_alias do
753
+ T.all(
754
+ Symbol,
755
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator
756
+ )
757
+ end
758
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
759
+
760
+ INCLUDES =
761
+ T.let(
762
+ :includes,
763
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
764
+ )
765
+ EXCLUDES =
766
+ T.let(
767
+ :excludes,
768
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
769
+ )
770
+
771
+ sig do
772
+ override.returns(
773
+ T::Array[
774
+ Orb::Plan::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
775
+ ]
776
+ )
777
+ end
778
+ def self.values
779
+ end
780
+ end
781
+ end
463
782
  end
464
783
 
465
784
  class PercentageDiscount < Orb::Internal::Type::BaseModel
@@ -481,6 +800,12 @@ module Orb
481
800
  sig { returns(T::Array[String]) }
482
801
  attr_accessor :applies_to_price_ids
483
802
 
803
+ # The filters that determine which prices to apply this adjustment to.
804
+ sig do
805
+ returns(T::Array[Orb::Plan::Adjustment::PercentageDiscount::Filter])
806
+ end
807
+ attr_accessor :filters
808
+
484
809
  # True for adjustments that apply to an entire invocice, false for adjustments
485
810
  # that apply to only one price.
486
811
  sig { returns(T::Boolean) }
@@ -503,6 +828,10 @@ module Orb
503
828
  params(
504
829
  id: String,
505
830
  applies_to_price_ids: T::Array[String],
831
+ filters:
832
+ T::Array[
833
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::OrHash
834
+ ],
506
835
  is_invoice_level: T::Boolean,
507
836
  percentage_discount: Float,
508
837
  plan_phase_order: T.nilable(Integer),
@@ -514,6 +843,8 @@ module Orb
514
843
  id:,
515
844
  # The price IDs that this adjustment applies to.
516
845
  applies_to_price_ids:,
846
+ # The filters that determine which prices to apply this adjustment to.
847
+ filters:,
517
848
  # True for adjustments that apply to an entire invocice, false for adjustments
518
849
  # that apply to only one price.
519
850
  is_invoice_level:,
@@ -534,6 +865,8 @@ module Orb
534
865
  id: String,
535
866
  adjustment_type: Symbol,
536
867
  applies_to_price_ids: T::Array[String],
868
+ filters:
869
+ T::Array[Orb::Plan::Adjustment::PercentageDiscount::Filter],
537
870
  is_invoice_level: T::Boolean,
538
871
  percentage_discount: Float,
539
872
  plan_phase_order: T.nilable(Integer),
@@ -543,6 +876,154 @@ module Orb
543
876
  end
544
877
  def to_hash
545
878
  end
879
+
880
+ class Filter < Orb::Internal::Type::BaseModel
881
+ OrHash =
882
+ T.type_alias do
883
+ T.any(
884
+ Orb::Plan::Adjustment::PercentageDiscount::Filter,
885
+ Orb::Internal::AnyHash
886
+ )
887
+ end
888
+
889
+ # The property of the price to filter on.
890
+ sig do
891
+ returns(
892
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
893
+ )
894
+ end
895
+ attr_accessor :field
896
+
897
+ # Should prices that match the filter be included or excluded.
898
+ sig do
899
+ returns(
900
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
901
+ )
902
+ end
903
+ attr_accessor :operator
904
+
905
+ # The IDs or values that match this filter.
906
+ sig { returns(T::Array[String]) }
907
+ attr_accessor :values
908
+
909
+ sig do
910
+ params(
911
+ field:
912
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
913
+ operator:
914
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
915
+ values: T::Array[String]
916
+ ).returns(T.attached_class)
917
+ end
918
+ def self.new(
919
+ # The property of the price to filter on.
920
+ field:,
921
+ # Should prices that match the filter be included or excluded.
922
+ operator:,
923
+ # The IDs or values that match this filter.
924
+ values:
925
+ )
926
+ end
927
+
928
+ sig do
929
+ override.returns(
930
+ {
931
+ field:
932
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol,
933
+ operator:
934
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol,
935
+ values: T::Array[String]
936
+ }
937
+ )
938
+ end
939
+ def to_hash
940
+ end
941
+
942
+ # The property of the price to filter on.
943
+ module Field
944
+ extend Orb::Internal::Type::Enum
945
+
946
+ TaggedSymbol =
947
+ T.type_alias do
948
+ T.all(
949
+ Symbol,
950
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field
951
+ )
952
+ end
953
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
954
+
955
+ PRICE_ID =
956
+ T.let(
957
+ :price_id,
958
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
959
+ )
960
+ ITEM_ID =
961
+ T.let(
962
+ :item_id,
963
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
964
+ )
965
+ PRICE_TYPE =
966
+ T.let(
967
+ :price_type,
968
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
969
+ )
970
+ CURRENCY =
971
+ T.let(
972
+ :currency,
973
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
974
+ )
975
+ PRICING_UNIT_ID =
976
+ T.let(
977
+ :pricing_unit_id,
978
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
979
+ )
980
+
981
+ sig do
982
+ override.returns(
983
+ T::Array[
984
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
985
+ ]
986
+ )
987
+ end
988
+ def self.values
989
+ end
990
+ end
991
+
992
+ # Should prices that match the filter be included or excluded.
993
+ module Operator
994
+ extend Orb::Internal::Type::Enum
995
+
996
+ TaggedSymbol =
997
+ T.type_alias do
998
+ T.all(
999
+ Symbol,
1000
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator
1001
+ )
1002
+ end
1003
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1004
+
1005
+ INCLUDES =
1006
+ T.let(
1007
+ :includes,
1008
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1009
+ )
1010
+ EXCLUDES =
1011
+ T.let(
1012
+ :excludes,
1013
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1014
+ )
1015
+
1016
+ sig do
1017
+ override.returns(
1018
+ T::Array[
1019
+ Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1020
+ ]
1021
+ )
1022
+ end
1023
+ def self.values
1024
+ end
1025
+ end
1026
+ end
546
1027
  end
547
1028
 
548
1029
  class Minimum < Orb::Internal::Type::BaseModel
@@ -561,6 +1042,10 @@ module Orb
561
1042
  sig { returns(T::Array[String]) }
562
1043
  attr_accessor :applies_to_price_ids
563
1044
 
1045
+ # The filters that determine which prices to apply this adjustment to.
1046
+ sig { returns(T::Array[Orb::Plan::Adjustment::Minimum::Filter]) }
1047
+ attr_accessor :filters
1048
+
564
1049
  # True for adjustments that apply to an entire invocice, false for adjustments
565
1050
  # that apply to only one price.
566
1051
  sig { returns(T::Boolean) }
@@ -587,6 +1072,7 @@ module Orb
587
1072
  params(
588
1073
  id: String,
589
1074
  applies_to_price_ids: T::Array[String],
1075
+ filters: T::Array[Orb::Plan::Adjustment::Minimum::Filter::OrHash],
590
1076
  is_invoice_level: T::Boolean,
591
1077
  item_id: String,
592
1078
  minimum_amount: String,
@@ -599,6 +1085,8 @@ module Orb
599
1085
  id:,
600
1086
  # The price IDs that this adjustment applies to.
601
1087
  applies_to_price_ids:,
1088
+ # The filters that determine which prices to apply this adjustment to.
1089
+ filters:,
602
1090
  # True for adjustments that apply to an entire invocice, false for adjustments
603
1091
  # that apply to only one price.
604
1092
  is_invoice_level:,
@@ -621,6 +1109,7 @@ module Orb
621
1109
  id: String,
622
1110
  adjustment_type: Symbol,
623
1111
  applies_to_price_ids: T::Array[String],
1112
+ filters: T::Array[Orb::Plan::Adjustment::Minimum::Filter],
624
1113
  is_invoice_level: T::Boolean,
625
1114
  item_id: String,
626
1115
  minimum_amount: String,
@@ -631,6 +1120,150 @@ module Orb
631
1120
  end
632
1121
  def to_hash
633
1122
  end
1123
+
1124
+ class Filter < Orb::Internal::Type::BaseModel
1125
+ OrHash =
1126
+ T.type_alias do
1127
+ T.any(
1128
+ Orb::Plan::Adjustment::Minimum::Filter,
1129
+ Orb::Internal::AnyHash
1130
+ )
1131
+ end
1132
+
1133
+ # The property of the price to filter on.
1134
+ sig do
1135
+ returns(
1136
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1137
+ )
1138
+ end
1139
+ attr_accessor :field
1140
+
1141
+ # Should prices that match the filter be included or excluded.
1142
+ sig do
1143
+ returns(
1144
+ Orb::Plan::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1145
+ )
1146
+ end
1147
+ attr_accessor :operator
1148
+
1149
+ # The IDs or values that match this filter.
1150
+ sig { returns(T::Array[String]) }
1151
+ attr_accessor :values
1152
+
1153
+ sig do
1154
+ params(
1155
+ field: Orb::Plan::Adjustment::Minimum::Filter::Field::OrSymbol,
1156
+ operator:
1157
+ Orb::Plan::Adjustment::Minimum::Filter::Operator::OrSymbol,
1158
+ values: T::Array[String]
1159
+ ).returns(T.attached_class)
1160
+ end
1161
+ def self.new(
1162
+ # The property of the price to filter on.
1163
+ field:,
1164
+ # Should prices that match the filter be included or excluded.
1165
+ operator:,
1166
+ # The IDs or values that match this filter.
1167
+ values:
1168
+ )
1169
+ end
1170
+
1171
+ sig do
1172
+ override.returns(
1173
+ {
1174
+ field:
1175
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol,
1176
+ operator:
1177
+ Orb::Plan::Adjustment::Minimum::Filter::Operator::TaggedSymbol,
1178
+ values: T::Array[String]
1179
+ }
1180
+ )
1181
+ end
1182
+ def to_hash
1183
+ end
1184
+
1185
+ # The property of the price to filter on.
1186
+ module Field
1187
+ extend Orb::Internal::Type::Enum
1188
+
1189
+ TaggedSymbol =
1190
+ T.type_alias do
1191
+ T.all(Symbol, Orb::Plan::Adjustment::Minimum::Filter::Field)
1192
+ end
1193
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1194
+
1195
+ PRICE_ID =
1196
+ T.let(
1197
+ :price_id,
1198
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1199
+ )
1200
+ ITEM_ID =
1201
+ T.let(
1202
+ :item_id,
1203
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1204
+ )
1205
+ PRICE_TYPE =
1206
+ T.let(
1207
+ :price_type,
1208
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1209
+ )
1210
+ CURRENCY =
1211
+ T.let(
1212
+ :currency,
1213
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1214
+ )
1215
+ PRICING_UNIT_ID =
1216
+ T.let(
1217
+ :pricing_unit_id,
1218
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1219
+ )
1220
+
1221
+ sig do
1222
+ override.returns(
1223
+ T::Array[
1224
+ Orb::Plan::Adjustment::Minimum::Filter::Field::TaggedSymbol
1225
+ ]
1226
+ )
1227
+ end
1228
+ def self.values
1229
+ end
1230
+ end
1231
+
1232
+ # Should prices that match the filter be included or excluded.
1233
+ module Operator
1234
+ extend Orb::Internal::Type::Enum
1235
+
1236
+ TaggedSymbol =
1237
+ T.type_alias do
1238
+ T.all(
1239
+ Symbol,
1240
+ Orb::Plan::Adjustment::Minimum::Filter::Operator
1241
+ )
1242
+ end
1243
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1244
+
1245
+ INCLUDES =
1246
+ T.let(
1247
+ :includes,
1248
+ Orb::Plan::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1249
+ )
1250
+ EXCLUDES =
1251
+ T.let(
1252
+ :excludes,
1253
+ Orb::Plan::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1254
+ )
1255
+
1256
+ sig do
1257
+ override.returns(
1258
+ T::Array[
1259
+ Orb::Plan::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1260
+ ]
1261
+ )
1262
+ end
1263
+ def self.values
1264
+ end
1265
+ end
1266
+ end
634
1267
  end
635
1268
 
636
1269
  class Maximum < Orb::Internal::Type::BaseModel
@@ -649,6 +1282,10 @@ module Orb
649
1282
  sig { returns(T::Array[String]) }
650
1283
  attr_accessor :applies_to_price_ids
651
1284
 
1285
+ # The filters that determine which prices to apply this adjustment to.
1286
+ sig { returns(T::Array[Orb::Plan::Adjustment::Maximum::Filter]) }
1287
+ attr_accessor :filters
1288
+
652
1289
  # True for adjustments that apply to an entire invocice, false for adjustments
653
1290
  # that apply to only one price.
654
1291
  sig { returns(T::Boolean) }
@@ -671,6 +1308,7 @@ module Orb
671
1308
  params(
672
1309
  id: String,
673
1310
  applies_to_price_ids: T::Array[String],
1311
+ filters: T::Array[Orb::Plan::Adjustment::Maximum::Filter::OrHash],
674
1312
  is_invoice_level: T::Boolean,
675
1313
  maximum_amount: String,
676
1314
  plan_phase_order: T.nilable(Integer),
@@ -682,6 +1320,8 @@ module Orb
682
1320
  id:,
683
1321
  # The price IDs that this adjustment applies to.
684
1322
  applies_to_price_ids:,
1323
+ # The filters that determine which prices to apply this adjustment to.
1324
+ filters:,
685
1325
  # True for adjustments that apply to an entire invocice, false for adjustments
686
1326
  # that apply to only one price.
687
1327
  is_invoice_level:,
@@ -702,6 +1342,7 @@ module Orb
702
1342
  id: String,
703
1343
  adjustment_type: Symbol,
704
1344
  applies_to_price_ids: T::Array[String],
1345
+ filters: T::Array[Orb::Plan::Adjustment::Maximum::Filter],
705
1346
  is_invoice_level: T::Boolean,
706
1347
  maximum_amount: String,
707
1348
  plan_phase_order: T.nilable(Integer),
@@ -711,6 +1352,150 @@ module Orb
711
1352
  end
712
1353
  def to_hash
713
1354
  end
1355
+
1356
+ class Filter < Orb::Internal::Type::BaseModel
1357
+ OrHash =
1358
+ T.type_alias do
1359
+ T.any(
1360
+ Orb::Plan::Adjustment::Maximum::Filter,
1361
+ Orb::Internal::AnyHash
1362
+ )
1363
+ end
1364
+
1365
+ # The property of the price to filter on.
1366
+ sig do
1367
+ returns(
1368
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1369
+ )
1370
+ end
1371
+ attr_accessor :field
1372
+
1373
+ # Should prices that match the filter be included or excluded.
1374
+ sig do
1375
+ returns(
1376
+ Orb::Plan::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1377
+ )
1378
+ end
1379
+ attr_accessor :operator
1380
+
1381
+ # The IDs or values that match this filter.
1382
+ sig { returns(T::Array[String]) }
1383
+ attr_accessor :values
1384
+
1385
+ sig do
1386
+ params(
1387
+ field: Orb::Plan::Adjustment::Maximum::Filter::Field::OrSymbol,
1388
+ operator:
1389
+ Orb::Plan::Adjustment::Maximum::Filter::Operator::OrSymbol,
1390
+ values: T::Array[String]
1391
+ ).returns(T.attached_class)
1392
+ end
1393
+ def self.new(
1394
+ # The property of the price to filter on.
1395
+ field:,
1396
+ # Should prices that match the filter be included or excluded.
1397
+ operator:,
1398
+ # The IDs or values that match this filter.
1399
+ values:
1400
+ )
1401
+ end
1402
+
1403
+ sig do
1404
+ override.returns(
1405
+ {
1406
+ field:
1407
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol,
1408
+ operator:
1409
+ Orb::Plan::Adjustment::Maximum::Filter::Operator::TaggedSymbol,
1410
+ values: T::Array[String]
1411
+ }
1412
+ )
1413
+ end
1414
+ def to_hash
1415
+ end
1416
+
1417
+ # The property of the price to filter on.
1418
+ module Field
1419
+ extend Orb::Internal::Type::Enum
1420
+
1421
+ TaggedSymbol =
1422
+ T.type_alias do
1423
+ T.all(Symbol, Orb::Plan::Adjustment::Maximum::Filter::Field)
1424
+ end
1425
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1426
+
1427
+ PRICE_ID =
1428
+ T.let(
1429
+ :price_id,
1430
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1431
+ )
1432
+ ITEM_ID =
1433
+ T.let(
1434
+ :item_id,
1435
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1436
+ )
1437
+ PRICE_TYPE =
1438
+ T.let(
1439
+ :price_type,
1440
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1441
+ )
1442
+ CURRENCY =
1443
+ T.let(
1444
+ :currency,
1445
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1446
+ )
1447
+ PRICING_UNIT_ID =
1448
+ T.let(
1449
+ :pricing_unit_id,
1450
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1451
+ )
1452
+
1453
+ sig do
1454
+ override.returns(
1455
+ T::Array[
1456
+ Orb::Plan::Adjustment::Maximum::Filter::Field::TaggedSymbol
1457
+ ]
1458
+ )
1459
+ end
1460
+ def self.values
1461
+ end
1462
+ end
1463
+
1464
+ # Should prices that match the filter be included or excluded.
1465
+ module Operator
1466
+ extend Orb::Internal::Type::Enum
1467
+
1468
+ TaggedSymbol =
1469
+ T.type_alias do
1470
+ T.all(
1471
+ Symbol,
1472
+ Orb::Plan::Adjustment::Maximum::Filter::Operator
1473
+ )
1474
+ end
1475
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1476
+
1477
+ INCLUDES =
1478
+ T.let(
1479
+ :includes,
1480
+ Orb::Plan::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1481
+ )
1482
+ EXCLUDES =
1483
+ T.let(
1484
+ :excludes,
1485
+ Orb::Plan::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1486
+ )
1487
+
1488
+ sig do
1489
+ override.returns(
1490
+ T::Array[
1491
+ Orb::Plan::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1492
+ ]
1493
+ )
1494
+ end
1495
+ def self.values
1496
+ end
1497
+ end
1498
+ end
714
1499
  end
715
1500
 
716
1501
  sig { override.returns(T::Array[Orb::Plan::Adjustment::Variants]) }
@@ -773,6 +1558,10 @@ module Orb
773
1558
  sig { returns(T::Array[String]) }
774
1559
  attr_accessor :applies_to_price_ids
775
1560
 
1561
+ # The filters that determine which prices to apply this maximum to.
1562
+ sig { returns(T::Array[Orb::Plan::Maximum::Filter]) }
1563
+ attr_accessor :filters
1564
+
776
1565
  # Maximum amount applied
777
1566
  sig { returns(String) }
778
1567
  attr_accessor :maximum_amount
@@ -780,6 +1569,7 @@ module Orb
780
1569
  sig do
781
1570
  params(
782
1571
  applies_to_price_ids: T::Array[String],
1572
+ filters: T::Array[Orb::Plan::Maximum::Filter::OrHash],
783
1573
  maximum_amount: String
784
1574
  ).returns(T.attached_class)
785
1575
  end
@@ -787,6 +1577,8 @@ module Orb
787
1577
  # List of price_ids that this maximum amount applies to. For plan/plan phase
788
1578
  # maximums, this can be a subset of prices.
789
1579
  applies_to_price_ids:,
1580
+ # The filters that determine which prices to apply this maximum to.
1581
+ filters:,
790
1582
  # Maximum amount applied
791
1583
  maximum_amount:
792
1584
  )
@@ -794,11 +1586,127 @@ module Orb
794
1586
 
795
1587
  sig do
796
1588
  override.returns(
797
- { applies_to_price_ids: T::Array[String], maximum_amount: String }
1589
+ {
1590
+ applies_to_price_ids: T::Array[String],
1591
+ filters: T::Array[Orb::Plan::Maximum::Filter],
1592
+ maximum_amount: String
1593
+ }
798
1594
  )
799
1595
  end
800
1596
  def to_hash
801
1597
  end
1598
+
1599
+ class Filter < Orb::Internal::Type::BaseModel
1600
+ OrHash =
1601
+ T.type_alias do
1602
+ T.any(Orb::Plan::Maximum::Filter, Orb::Internal::AnyHash)
1603
+ end
1604
+
1605
+ # The property of the price to filter on.
1606
+ sig { returns(Orb::Plan::Maximum::Filter::Field::TaggedSymbol) }
1607
+ attr_accessor :field
1608
+
1609
+ # Should prices that match the filter be included or excluded.
1610
+ sig { returns(Orb::Plan::Maximum::Filter::Operator::TaggedSymbol) }
1611
+ attr_accessor :operator
1612
+
1613
+ # The IDs or values that match this filter.
1614
+ sig { returns(T::Array[String]) }
1615
+ attr_accessor :values
1616
+
1617
+ sig do
1618
+ params(
1619
+ field: Orb::Plan::Maximum::Filter::Field::OrSymbol,
1620
+ operator: Orb::Plan::Maximum::Filter::Operator::OrSymbol,
1621
+ values: T::Array[String]
1622
+ ).returns(T.attached_class)
1623
+ end
1624
+ def self.new(
1625
+ # The property of the price to filter on.
1626
+ field:,
1627
+ # Should prices that match the filter be included or excluded.
1628
+ operator:,
1629
+ # The IDs or values that match this filter.
1630
+ values:
1631
+ )
1632
+ end
1633
+
1634
+ sig do
1635
+ override.returns(
1636
+ {
1637
+ field: Orb::Plan::Maximum::Filter::Field::TaggedSymbol,
1638
+ operator: Orb::Plan::Maximum::Filter::Operator::TaggedSymbol,
1639
+ values: T::Array[String]
1640
+ }
1641
+ )
1642
+ end
1643
+ def to_hash
1644
+ end
1645
+
1646
+ # The property of the price to filter on.
1647
+ module Field
1648
+ extend Orb::Internal::Type::Enum
1649
+
1650
+ TaggedSymbol =
1651
+ T.type_alias { T.all(Symbol, Orb::Plan::Maximum::Filter::Field) }
1652
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1653
+
1654
+ PRICE_ID =
1655
+ T.let(:price_id, Orb::Plan::Maximum::Filter::Field::TaggedSymbol)
1656
+ ITEM_ID =
1657
+ T.let(:item_id, Orb::Plan::Maximum::Filter::Field::TaggedSymbol)
1658
+ PRICE_TYPE =
1659
+ T.let(
1660
+ :price_type,
1661
+ Orb::Plan::Maximum::Filter::Field::TaggedSymbol
1662
+ )
1663
+ CURRENCY =
1664
+ T.let(:currency, Orb::Plan::Maximum::Filter::Field::TaggedSymbol)
1665
+ PRICING_UNIT_ID =
1666
+ T.let(
1667
+ :pricing_unit_id,
1668
+ Orb::Plan::Maximum::Filter::Field::TaggedSymbol
1669
+ )
1670
+
1671
+ sig do
1672
+ override.returns(
1673
+ T::Array[Orb::Plan::Maximum::Filter::Field::TaggedSymbol]
1674
+ )
1675
+ end
1676
+ def self.values
1677
+ end
1678
+ end
1679
+
1680
+ # Should prices that match the filter be included or excluded.
1681
+ module Operator
1682
+ extend Orb::Internal::Type::Enum
1683
+
1684
+ TaggedSymbol =
1685
+ T.type_alias do
1686
+ T.all(Symbol, Orb::Plan::Maximum::Filter::Operator)
1687
+ end
1688
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1689
+
1690
+ INCLUDES =
1691
+ T.let(
1692
+ :includes,
1693
+ Orb::Plan::Maximum::Filter::Operator::TaggedSymbol
1694
+ )
1695
+ EXCLUDES =
1696
+ T.let(
1697
+ :excludes,
1698
+ Orb::Plan::Maximum::Filter::Operator::TaggedSymbol
1699
+ )
1700
+
1701
+ sig do
1702
+ override.returns(
1703
+ T::Array[Orb::Plan::Maximum::Filter::Operator::TaggedSymbol]
1704
+ )
1705
+ end
1706
+ def self.values
1707
+ end
1708
+ end
1709
+ end
802
1710
  end
803
1711
 
804
1712
  class Minimum < Orb::Internal::Type::BaseModel
@@ -810,6 +1718,10 @@ module Orb
810
1718
  sig { returns(T::Array[String]) }
811
1719
  attr_accessor :applies_to_price_ids
812
1720
 
1721
+ # The filters that determine which prices to apply this minimum to.
1722
+ sig { returns(T::Array[Orb::Plan::Minimum::Filter]) }
1723
+ attr_accessor :filters
1724
+
813
1725
  # Minimum amount applied
814
1726
  sig { returns(String) }
815
1727
  attr_accessor :minimum_amount
@@ -817,6 +1729,7 @@ module Orb
817
1729
  sig do
818
1730
  params(
819
1731
  applies_to_price_ids: T::Array[String],
1732
+ filters: T::Array[Orb::Plan::Minimum::Filter::OrHash],
820
1733
  minimum_amount: String
821
1734
  ).returns(T.attached_class)
822
1735
  end
@@ -824,6 +1737,8 @@ module Orb
824
1737
  # List of price_ids that this minimum amount applies to. For plan/plan phase
825
1738
  # minimums, this can be a subset of prices.
826
1739
  applies_to_price_ids:,
1740
+ # The filters that determine which prices to apply this minimum to.
1741
+ filters:,
827
1742
  # Minimum amount applied
828
1743
  minimum_amount:
829
1744
  )
@@ -831,11 +1746,127 @@ module Orb
831
1746
 
832
1747
  sig do
833
1748
  override.returns(
834
- { applies_to_price_ids: T::Array[String], minimum_amount: String }
1749
+ {
1750
+ applies_to_price_ids: T::Array[String],
1751
+ filters: T::Array[Orb::Plan::Minimum::Filter],
1752
+ minimum_amount: String
1753
+ }
835
1754
  )
836
1755
  end
837
1756
  def to_hash
838
1757
  end
1758
+
1759
+ class Filter < Orb::Internal::Type::BaseModel
1760
+ OrHash =
1761
+ T.type_alias do
1762
+ T.any(Orb::Plan::Minimum::Filter, Orb::Internal::AnyHash)
1763
+ end
1764
+
1765
+ # The property of the price to filter on.
1766
+ sig { returns(Orb::Plan::Minimum::Filter::Field::TaggedSymbol) }
1767
+ attr_accessor :field
1768
+
1769
+ # Should prices that match the filter be included or excluded.
1770
+ sig { returns(Orb::Plan::Minimum::Filter::Operator::TaggedSymbol) }
1771
+ attr_accessor :operator
1772
+
1773
+ # The IDs or values that match this filter.
1774
+ sig { returns(T::Array[String]) }
1775
+ attr_accessor :values
1776
+
1777
+ sig do
1778
+ params(
1779
+ field: Orb::Plan::Minimum::Filter::Field::OrSymbol,
1780
+ operator: Orb::Plan::Minimum::Filter::Operator::OrSymbol,
1781
+ values: T::Array[String]
1782
+ ).returns(T.attached_class)
1783
+ end
1784
+ def self.new(
1785
+ # The property of the price to filter on.
1786
+ field:,
1787
+ # Should prices that match the filter be included or excluded.
1788
+ operator:,
1789
+ # The IDs or values that match this filter.
1790
+ values:
1791
+ )
1792
+ end
1793
+
1794
+ sig do
1795
+ override.returns(
1796
+ {
1797
+ field: Orb::Plan::Minimum::Filter::Field::TaggedSymbol,
1798
+ operator: Orb::Plan::Minimum::Filter::Operator::TaggedSymbol,
1799
+ values: T::Array[String]
1800
+ }
1801
+ )
1802
+ end
1803
+ def to_hash
1804
+ end
1805
+
1806
+ # The property of the price to filter on.
1807
+ module Field
1808
+ extend Orb::Internal::Type::Enum
1809
+
1810
+ TaggedSymbol =
1811
+ T.type_alias { T.all(Symbol, Orb::Plan::Minimum::Filter::Field) }
1812
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1813
+
1814
+ PRICE_ID =
1815
+ T.let(:price_id, Orb::Plan::Minimum::Filter::Field::TaggedSymbol)
1816
+ ITEM_ID =
1817
+ T.let(:item_id, Orb::Plan::Minimum::Filter::Field::TaggedSymbol)
1818
+ PRICE_TYPE =
1819
+ T.let(
1820
+ :price_type,
1821
+ Orb::Plan::Minimum::Filter::Field::TaggedSymbol
1822
+ )
1823
+ CURRENCY =
1824
+ T.let(:currency, Orb::Plan::Minimum::Filter::Field::TaggedSymbol)
1825
+ PRICING_UNIT_ID =
1826
+ T.let(
1827
+ :pricing_unit_id,
1828
+ Orb::Plan::Minimum::Filter::Field::TaggedSymbol
1829
+ )
1830
+
1831
+ sig do
1832
+ override.returns(
1833
+ T::Array[Orb::Plan::Minimum::Filter::Field::TaggedSymbol]
1834
+ )
1835
+ end
1836
+ def self.values
1837
+ end
1838
+ end
1839
+
1840
+ # Should prices that match the filter be included or excluded.
1841
+ module Operator
1842
+ extend Orb::Internal::Type::Enum
1843
+
1844
+ TaggedSymbol =
1845
+ T.type_alias do
1846
+ T.all(Symbol, Orb::Plan::Minimum::Filter::Operator)
1847
+ end
1848
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1849
+
1850
+ INCLUDES =
1851
+ T.let(
1852
+ :includes,
1853
+ Orb::Plan::Minimum::Filter::Operator::TaggedSymbol
1854
+ )
1855
+ EXCLUDES =
1856
+ T.let(
1857
+ :excludes,
1858
+ Orb::Plan::Minimum::Filter::Operator::TaggedSymbol
1859
+ )
1860
+
1861
+ sig do
1862
+ override.returns(
1863
+ T::Array[Orb::Plan::Minimum::Filter::Operator::TaggedSymbol]
1864
+ )
1865
+ end
1866
+ def self.values
1867
+ end
1868
+ end
1869
+ end
839
1870
  end
840
1871
 
841
1872
  class PlanPhase < Orb::Internal::Type::BaseModel
@@ -994,6 +2025,10 @@ module Orb
994
2025
  sig { returns(T::Array[String]) }
995
2026
  attr_accessor :applies_to_price_ids
996
2027
 
2028
+ # The filters that determine which prices to apply this maximum to.
2029
+ sig { returns(T::Array[Orb::Plan::PlanPhase::Maximum::Filter]) }
2030
+ attr_accessor :filters
2031
+
997
2032
  # Maximum amount applied
998
2033
  sig { returns(String) }
999
2034
  attr_accessor :maximum_amount
@@ -1001,6 +2036,7 @@ module Orb
1001
2036
  sig do
1002
2037
  params(
1003
2038
  applies_to_price_ids: T::Array[String],
2039
+ filters: T::Array[Orb::Plan::PlanPhase::Maximum::Filter::OrHash],
1004
2040
  maximum_amount: String
1005
2041
  ).returns(T.attached_class)
1006
2042
  end
@@ -1008,6 +2044,8 @@ module Orb
1008
2044
  # List of price_ids that this maximum amount applies to. For plan/plan phase
1009
2045
  # maximums, this can be a subset of prices.
1010
2046
  applies_to_price_ids:,
2047
+ # The filters that determine which prices to apply this maximum to.
2048
+ filters:,
1011
2049
  # Maximum amount applied
1012
2050
  maximum_amount:
1013
2051
  )
@@ -1015,11 +2053,156 @@ module Orb
1015
2053
 
1016
2054
  sig do
1017
2055
  override.returns(
1018
- { applies_to_price_ids: T::Array[String], maximum_amount: String }
2056
+ {
2057
+ applies_to_price_ids: T::Array[String],
2058
+ filters: T::Array[Orb::Plan::PlanPhase::Maximum::Filter],
2059
+ maximum_amount: String
2060
+ }
1019
2061
  )
1020
2062
  end
1021
2063
  def to_hash
1022
2064
  end
2065
+
2066
+ class Filter < Orb::Internal::Type::BaseModel
2067
+ OrHash =
2068
+ T.type_alias do
2069
+ T.any(
2070
+ Orb::Plan::PlanPhase::Maximum::Filter,
2071
+ Orb::Internal::AnyHash
2072
+ )
2073
+ end
2074
+
2075
+ # The property of the price to filter on.
2076
+ sig do
2077
+ returns(
2078
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2079
+ )
2080
+ end
2081
+ attr_accessor :field
2082
+
2083
+ # Should prices that match the filter be included or excluded.
2084
+ sig do
2085
+ returns(
2086
+ Orb::Plan::PlanPhase::Maximum::Filter::Operator::TaggedSymbol
2087
+ )
2088
+ end
2089
+ attr_accessor :operator
2090
+
2091
+ # The IDs or values that match this filter.
2092
+ sig { returns(T::Array[String]) }
2093
+ attr_accessor :values
2094
+
2095
+ sig do
2096
+ params(
2097
+ field: Orb::Plan::PlanPhase::Maximum::Filter::Field::OrSymbol,
2098
+ operator:
2099
+ Orb::Plan::PlanPhase::Maximum::Filter::Operator::OrSymbol,
2100
+ values: T::Array[String]
2101
+ ).returns(T.attached_class)
2102
+ end
2103
+ def self.new(
2104
+ # The property of the price to filter on.
2105
+ field:,
2106
+ # Should prices that match the filter be included or excluded.
2107
+ operator:,
2108
+ # The IDs or values that match this filter.
2109
+ values:
2110
+ )
2111
+ end
2112
+
2113
+ sig do
2114
+ override.returns(
2115
+ {
2116
+ field:
2117
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol,
2118
+ operator:
2119
+ Orb::Plan::PlanPhase::Maximum::Filter::Operator::TaggedSymbol,
2120
+ values: T::Array[String]
2121
+ }
2122
+ )
2123
+ end
2124
+ def to_hash
2125
+ end
2126
+
2127
+ # The property of the price to filter on.
2128
+ module Field
2129
+ extend Orb::Internal::Type::Enum
2130
+
2131
+ TaggedSymbol =
2132
+ T.type_alias do
2133
+ T.all(Symbol, Orb::Plan::PlanPhase::Maximum::Filter::Field)
2134
+ end
2135
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2136
+
2137
+ PRICE_ID =
2138
+ T.let(
2139
+ :price_id,
2140
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2141
+ )
2142
+ ITEM_ID =
2143
+ T.let(
2144
+ :item_id,
2145
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2146
+ )
2147
+ PRICE_TYPE =
2148
+ T.let(
2149
+ :price_type,
2150
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2151
+ )
2152
+ CURRENCY =
2153
+ T.let(
2154
+ :currency,
2155
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2156
+ )
2157
+ PRICING_UNIT_ID =
2158
+ T.let(
2159
+ :pricing_unit_id,
2160
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2161
+ )
2162
+
2163
+ sig do
2164
+ override.returns(
2165
+ T::Array[
2166
+ Orb::Plan::PlanPhase::Maximum::Filter::Field::TaggedSymbol
2167
+ ]
2168
+ )
2169
+ end
2170
+ def self.values
2171
+ end
2172
+ end
2173
+
2174
+ # Should prices that match the filter be included or excluded.
2175
+ module Operator
2176
+ extend Orb::Internal::Type::Enum
2177
+
2178
+ TaggedSymbol =
2179
+ T.type_alias do
2180
+ T.all(Symbol, Orb::Plan::PlanPhase::Maximum::Filter::Operator)
2181
+ end
2182
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2183
+
2184
+ INCLUDES =
2185
+ T.let(
2186
+ :includes,
2187
+ Orb::Plan::PlanPhase::Maximum::Filter::Operator::TaggedSymbol
2188
+ )
2189
+ EXCLUDES =
2190
+ T.let(
2191
+ :excludes,
2192
+ Orb::Plan::PlanPhase::Maximum::Filter::Operator::TaggedSymbol
2193
+ )
2194
+
2195
+ sig do
2196
+ override.returns(
2197
+ T::Array[
2198
+ Orb::Plan::PlanPhase::Maximum::Filter::Operator::TaggedSymbol
2199
+ ]
2200
+ )
2201
+ end
2202
+ def self.values
2203
+ end
2204
+ end
2205
+ end
1023
2206
  end
1024
2207
 
1025
2208
  class Minimum < Orb::Internal::Type::BaseModel
@@ -1033,6 +2216,10 @@ module Orb
1033
2216
  sig { returns(T::Array[String]) }
1034
2217
  attr_accessor :applies_to_price_ids
1035
2218
 
2219
+ # The filters that determine which prices to apply this minimum to.
2220
+ sig { returns(T::Array[Orb::Plan::PlanPhase::Minimum::Filter]) }
2221
+ attr_accessor :filters
2222
+
1036
2223
  # Minimum amount applied
1037
2224
  sig { returns(String) }
1038
2225
  attr_accessor :minimum_amount
@@ -1040,6 +2227,7 @@ module Orb
1040
2227
  sig do
1041
2228
  params(
1042
2229
  applies_to_price_ids: T::Array[String],
2230
+ filters: T::Array[Orb::Plan::PlanPhase::Minimum::Filter::OrHash],
1043
2231
  minimum_amount: String
1044
2232
  ).returns(T.attached_class)
1045
2233
  end
@@ -1047,6 +2235,8 @@ module Orb
1047
2235
  # List of price_ids that this minimum amount applies to. For plan/plan phase
1048
2236
  # minimums, this can be a subset of prices.
1049
2237
  applies_to_price_ids:,
2238
+ # The filters that determine which prices to apply this minimum to.
2239
+ filters:,
1050
2240
  # Minimum amount applied
1051
2241
  minimum_amount:
1052
2242
  )
@@ -1054,11 +2244,156 @@ module Orb
1054
2244
 
1055
2245
  sig do
1056
2246
  override.returns(
1057
- { applies_to_price_ids: T::Array[String], minimum_amount: String }
2247
+ {
2248
+ applies_to_price_ids: T::Array[String],
2249
+ filters: T::Array[Orb::Plan::PlanPhase::Minimum::Filter],
2250
+ minimum_amount: String
2251
+ }
1058
2252
  )
1059
2253
  end
1060
2254
  def to_hash
1061
2255
  end
2256
+
2257
+ class Filter < Orb::Internal::Type::BaseModel
2258
+ OrHash =
2259
+ T.type_alias do
2260
+ T.any(
2261
+ Orb::Plan::PlanPhase::Minimum::Filter,
2262
+ Orb::Internal::AnyHash
2263
+ )
2264
+ end
2265
+
2266
+ # The property of the price to filter on.
2267
+ sig do
2268
+ returns(
2269
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2270
+ )
2271
+ end
2272
+ attr_accessor :field
2273
+
2274
+ # Should prices that match the filter be included or excluded.
2275
+ sig do
2276
+ returns(
2277
+ Orb::Plan::PlanPhase::Minimum::Filter::Operator::TaggedSymbol
2278
+ )
2279
+ end
2280
+ attr_accessor :operator
2281
+
2282
+ # The IDs or values that match this filter.
2283
+ sig { returns(T::Array[String]) }
2284
+ attr_accessor :values
2285
+
2286
+ sig do
2287
+ params(
2288
+ field: Orb::Plan::PlanPhase::Minimum::Filter::Field::OrSymbol,
2289
+ operator:
2290
+ Orb::Plan::PlanPhase::Minimum::Filter::Operator::OrSymbol,
2291
+ values: T::Array[String]
2292
+ ).returns(T.attached_class)
2293
+ end
2294
+ def self.new(
2295
+ # The property of the price to filter on.
2296
+ field:,
2297
+ # Should prices that match the filter be included or excluded.
2298
+ operator:,
2299
+ # The IDs or values that match this filter.
2300
+ values:
2301
+ )
2302
+ end
2303
+
2304
+ sig do
2305
+ override.returns(
2306
+ {
2307
+ field:
2308
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol,
2309
+ operator:
2310
+ Orb::Plan::PlanPhase::Minimum::Filter::Operator::TaggedSymbol,
2311
+ values: T::Array[String]
2312
+ }
2313
+ )
2314
+ end
2315
+ def to_hash
2316
+ end
2317
+
2318
+ # The property of the price to filter on.
2319
+ module Field
2320
+ extend Orb::Internal::Type::Enum
2321
+
2322
+ TaggedSymbol =
2323
+ T.type_alias do
2324
+ T.all(Symbol, Orb::Plan::PlanPhase::Minimum::Filter::Field)
2325
+ end
2326
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2327
+
2328
+ PRICE_ID =
2329
+ T.let(
2330
+ :price_id,
2331
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2332
+ )
2333
+ ITEM_ID =
2334
+ T.let(
2335
+ :item_id,
2336
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2337
+ )
2338
+ PRICE_TYPE =
2339
+ T.let(
2340
+ :price_type,
2341
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2342
+ )
2343
+ CURRENCY =
2344
+ T.let(
2345
+ :currency,
2346
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2347
+ )
2348
+ PRICING_UNIT_ID =
2349
+ T.let(
2350
+ :pricing_unit_id,
2351
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2352
+ )
2353
+
2354
+ sig do
2355
+ override.returns(
2356
+ T::Array[
2357
+ Orb::Plan::PlanPhase::Minimum::Filter::Field::TaggedSymbol
2358
+ ]
2359
+ )
2360
+ end
2361
+ def self.values
2362
+ end
2363
+ end
2364
+
2365
+ # Should prices that match the filter be included or excluded.
2366
+ module Operator
2367
+ extend Orb::Internal::Type::Enum
2368
+
2369
+ TaggedSymbol =
2370
+ T.type_alias do
2371
+ T.all(Symbol, Orb::Plan::PlanPhase::Minimum::Filter::Operator)
2372
+ end
2373
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2374
+
2375
+ INCLUDES =
2376
+ T.let(
2377
+ :includes,
2378
+ Orb::Plan::PlanPhase::Minimum::Filter::Operator::TaggedSymbol
2379
+ )
2380
+ EXCLUDES =
2381
+ T.let(
2382
+ :excludes,
2383
+ Orb::Plan::PlanPhase::Minimum::Filter::Operator::TaggedSymbol
2384
+ )
2385
+
2386
+ sig do
2387
+ override.returns(
2388
+ T::Array[
2389
+ Orb::Plan::PlanPhase::Minimum::Filter::Operator::TaggedSymbol
2390
+ ]
2391
+ )
2392
+ end
2393
+ def self.values
2394
+ end
2395
+ end
2396
+ end
1062
2397
  end
1063
2398
  end
1064
2399