orb-billing 0.5.5 → 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 (210) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -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/models/alert.rb +33 -1
  7. data/lib/orb/models/amount_discount.rb +10 -10
  8. data/lib/orb/models/credit_note_create_params.rb +9 -9
  9. data/lib/orb/models/customer_create_params.rb +21 -3
  10. data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
  11. data/lib/orb/models/customer_update_params.rb +21 -3
  12. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
  13. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
  14. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
  15. data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
  16. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
  17. data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
  18. data/lib/orb/models/invoice.rb +626 -9
  19. data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
  20. data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
  21. data/lib/orb/models/item.rb +18 -1
  22. data/lib/orb/models/item_archive_params.rb +14 -0
  23. data/lib/orb/models/item_create_params.rb +14 -1
  24. data/lib/orb/models/item_update_params.rb +16 -1
  25. data/lib/orb/models/percentage_discount.rb +10 -10
  26. data/lib/orb/models/plan.rb +618 -9
  27. data/lib/orb/models/plan_create_params.rb +2066 -30
  28. data/lib/orb/models/plan_set_default_version_params.rb +22 -0
  29. data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
  30. data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
  31. data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
  32. data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
  33. data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
  34. data/lib/orb/models/plans/version_create_params.rb +17794 -0
  35. data/lib/orb/models/plans/version_create_response.rb +814 -0
  36. data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
  37. data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
  38. data/lib/orb/models/price.rb +4124 -70
  39. data/lib/orb/models/price_create_params.rb +45 -1
  40. data/lib/orb/models/price_evaluate_params.rb +8529 -21
  41. data/lib/orb/models/price_evaluate_response.rb +38 -3
  42. data/lib/orb/models/subscription.rb +730 -54
  43. data/lib/orb/models/subscription_cancel_response.rb +706 -54
  44. data/lib/orb/models/subscription_change_apply_response.rb +728 -54
  45. data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
  46. data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
  47. data/lib/orb/models/subscription_create_params.rb +5992 -1698
  48. data/lib/orb/models/subscription_create_response.rb +706 -54
  49. data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
  50. data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
  51. data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
  52. data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
  53. data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
  54. data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
  55. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
  56. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
  57. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
  58. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
  59. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
  60. data/lib/orb/models/subscription_update_trial_response.rb +706 -54
  61. data/lib/orb/models/trial_discount.rb +10 -10
  62. data/lib/orb/models/usage_discount.rb +10 -10
  63. data/lib/orb/models.rb +4 -0
  64. data/lib/orb/resources/credit_notes.rb +3 -3
  65. data/lib/orb/resources/customers/balance_transactions.rb +0 -7
  66. data/lib/orb/resources/customers.rb +4 -7
  67. data/lib/orb/resources/dimensional_price_groups.rb +1 -1
  68. data/lib/orb/resources/items.rb +34 -2
  69. data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
  70. data/lib/orb/resources/plans/external_plan_id.rb +32 -1
  71. data/lib/orb/resources/plans/versions.rb +86 -0
  72. data/lib/orb/resources/plans.rb +33 -2
  73. data/lib/orb/resources/prices.rb +23 -17
  74. data/lib/orb/resources/subscriptions.rb +5 -1
  75. data/lib/orb/version.rb +1 -1
  76. data/lib/orb.rb +13 -0
  77. data/rbi/orb/models/alert.rbi +50 -3
  78. data/rbi/orb/models/amount_discount.rbi +8 -8
  79. data/rbi/orb/models/credit_note_create_params.rbi +8 -8
  80. data/rbi/orb/models/customer_create_params.rbi +38 -4
  81. data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
  82. data/rbi/orb/models/customer_update_params.rbi +38 -4
  83. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
  84. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
  85. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
  86. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
  87. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
  88. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
  89. data/rbi/orb/models/invoice.rbi +1451 -35
  90. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
  91. data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
  92. data/rbi/orb/models/item.rbi +20 -1
  93. data/rbi/orb/models/item_archive_params.rbi +25 -0
  94. data/rbi/orb/models/item_create_params.rbi +18 -1
  95. data/rbi/orb/models/item_update_params.rbi +17 -1
  96. data/rbi/orb/models/percentage_discount.rbi +10 -10
  97. data/rbi/orb/models/plan.rbi +1339 -4
  98. data/rbi/orb/models/plan_create_params.rbi +3833 -29
  99. data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
  100. data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
  101. data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
  102. data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
  103. data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
  104. data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
  105. data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
  106. data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
  107. data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
  108. data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
  109. data/rbi/orb/models/price.rbi +9447 -441
  110. data/rbi/orb/models/price_create_params.rbi +80 -0
  111. data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
  112. data/rbi/orb/models/price_evaluate_response.rbi +68 -5
  113. data/rbi/orb/models/subscription.rbi +1654 -44
  114. data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
  115. data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
  116. data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
  117. data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
  118. data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
  119. data/rbi/orb/models/subscription_create_response.rbi +1692 -44
  120. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
  121. data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
  122. data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
  123. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
  124. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
  125. data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
  126. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
  127. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
  128. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
  129. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
  130. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
  131. data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
  132. data/rbi/orb/models/trial_discount.rbi +8 -8
  133. data/rbi/orb/models/usage_discount.rbi +10 -10
  134. data/rbi/orb/models.rbi +4 -0
  135. data/rbi/orb/resources/credit_notes.rbi +3 -3
  136. data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
  137. data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
  138. data/rbi/orb/resources/customers.rbi +7 -7
  139. data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
  140. data/rbi/orb/resources/items.rbi +20 -0
  141. data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
  142. data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
  143. data/rbi/orb/resources/plans/versions.rbi +91 -0
  144. data/rbi/orb/resources/plans.rbi +27 -2
  145. data/rbi/orb/resources/prices.rbi +27 -17
  146. data/rbi/orb/resources/subscriptions.rbi +9 -1
  147. data/sig/orb/models/alert.rbs +20 -3
  148. data/sig/orb/models/amount_discount.rbs +5 -5
  149. data/sig/orb/models/credit_note_create_params.rbs +6 -6
  150. data/sig/orb/models/customer_create_params.rbs +13 -0
  151. data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
  152. data/sig/orb/models/customer_update_params.rbs +13 -0
  153. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
  154. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
  155. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
  156. data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
  157. data/sig/orb/models/invoice.rbs +558 -4
  158. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
  159. data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
  160. data/sig/orb/models/item.rbs +5 -0
  161. data/sig/orb/models/item_archive_params.rbs +14 -0
  162. data/sig/orb/models/item_create_params.rbs +10 -2
  163. data/sig/orb/models/item_update_params.rbs +5 -0
  164. data/sig/orb/models/percentage_discount.rbs +5 -5
  165. data/sig/orb/models/plan.rbs +538 -4
  166. data/sig/orb/models/plan_create_params.rbs +1460 -3
  167. data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
  168. data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
  169. data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
  170. data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
  171. data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
  172. data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
  173. data/sig/orb/models/plans/version_create_params.rbs +12898 -0
  174. data/sig/orb/models/plans/version_create_response.rbs +662 -0
  175. data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
  176. data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
  177. data/sig/orb/models/price.rbs +3512 -96
  178. data/sig/orb/models/price_create_params.rbs +32 -0
  179. data/sig/orb/models/price_evaluate_params.rbs +6187 -10
  180. data/sig/orb/models/price_evaluate_response.rbs +41 -4
  181. data/sig/orb/models/subscription.rbs +609 -29
  182. data/sig/orb/models/subscription_cancel_response.rbs +609 -29
  183. data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
  184. data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
  185. data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
  186. data/sig/orb/models/subscription_create_params.rbs +4450 -1466
  187. data/sig/orb/models/subscription_create_response.rbs +609 -29
  188. data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
  189. data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
  190. data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
  191. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
  192. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
  193. data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
  194. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
  195. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
  196. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
  197. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
  198. data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
  199. data/sig/orb/models/trial_discount.rbs +5 -5
  200. data/sig/orb/models/usage_discount.rbs +5 -5
  201. data/sig/orb/models.rbs +4 -0
  202. data/sig/orb/resources/credit_notes.rbs +1 -1
  203. data/sig/orb/resources/items.rbs +7 -0
  204. data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
  205. data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
  206. data/sig/orb/resources/plans/versions.rbs +28 -0
  207. data/sig/orb/resources/plans.rbs +8 -0
  208. data/sig/orb/resources/prices.rbs +3 -3
  209. data/sig/orb/resources/subscriptions.rbs +2 -0
  210. metadata +40 -1
@@ -167,6 +167,8 @@ module Orb
167
167
  required :default_invoice_memo, String, nil?: true
168
168
 
169
169
  # @!attribute discount_intervals
170
+ # @deprecated
171
+ #
170
172
  # The discount intervals for this subscription sorted by the start_date.
171
173
  #
172
174
  # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage>]
@@ -191,6 +193,8 @@ module Orb
191
193
  required :invoicing_threshold, String, nil?: true
192
194
 
193
195
  # @!attribute maximum_intervals
196
+ # @deprecated
197
+ #
194
198
  # The maximum intervals for this subscription sorted by the start_date.
195
199
  #
196
200
  # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval>]
@@ -207,12 +211,20 @@ module Orb
207
211
  required :metadata, Orb::Internal::Type::HashOf[String]
208
212
 
209
213
  # @!attribute minimum_intervals
214
+ # @deprecated
215
+ #
210
216
  # The minimum intervals for this subscription sorted by the start_date.
211
217
  #
212
218
  # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval>]
213
219
  required :minimum_intervals,
214
220
  -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval] }
215
221
 
222
+ # @!attribute name
223
+ # The name of the subscription.
224
+ #
225
+ # @return [String]
226
+ required :name, String
227
+
216
228
  # @!attribute net_terms
217
229
  # Determines the difference between the invoice issue date for subscription
218
230
  # invoices as the date that they are due. A value of `0` here represents that the
@@ -236,8 +248,8 @@ module Orb
236
248
  # subscription. You can see more about how to configure prices in the
237
249
  # [Price resource](/reference/price).
238
250
  #
239
- # @return [Orb::Models::Plan]
240
- required :plan, -> { Orb::Plan }
251
+ # @return [Orb::Models::Plan, nil]
252
+ required :plan, -> { Orb::Plan }, nil?: true
241
253
 
242
254
  # @!attribute price_intervals
243
255
  # The price intervals for this subscription.
@@ -279,7 +291,7 @@ module Orb
279
291
  -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::ChangedResources },
280
292
  nil?: true
281
293
 
282
- # @!method initialize(id:, active_plan_phase_order:, adjustment_intervals:, auto_collection:, billing_cycle_anchor_configuration:, billing_cycle_day:, created_at:, current_billing_period_end_date:, current_billing_period_start_date:, customer:, default_invoice_memo:, discount_intervals:, end_date:, fixed_fee_quantity_schedule:, invoicing_threshold:, maximum_intervals:, metadata:, minimum_intervals:, net_terms:, pending_subscription_change:, plan:, price_intervals:, redeemed_coupon:, start_date:, status:, trial_info:, changed_resources: nil)
294
+ # @!method initialize(id:, active_plan_phase_order:, adjustment_intervals:, auto_collection:, billing_cycle_anchor_configuration:, billing_cycle_day:, created_at:, current_billing_period_end_date:, current_billing_period_start_date:, customer:, default_invoice_memo:, discount_intervals:, end_date:, fixed_fee_quantity_schedule:, invoicing_threshold:, maximum_intervals:, metadata:, minimum_intervals:, name:, net_terms:, pending_subscription_change:, plan:, price_intervals:, redeemed_coupon:, start_date:, status:, trial_info:, changed_resources: nil)
283
295
  # Some parameter documentations has been truncated, see
284
296
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription} for more details.
285
297
  #
@@ -319,11 +331,13 @@ module Orb
319
331
  #
320
332
  # @param minimum_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
321
333
  #
334
+ # @param name [String] The name of the subscription.
335
+ #
322
336
  # @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
323
337
  #
324
338
  # @param pending_subscription_change [Orb::Models::SubscriptionChangeCancelResponse::Subscription::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
325
339
  #
326
- # @param plan [Orb::Models::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
340
+ # @param plan [Orb::Models::Plan, nil] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
327
341
  #
328
342
  # @param price_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::PriceInterval>] The price intervals for this subscription.
329
343
  #
@@ -411,11 +425,24 @@ module Orb
411
425
  required :adjustment_type, const: :usage_discount
412
426
 
413
427
  # @!attribute applies_to_price_ids
428
+ # @deprecated
429
+ #
414
430
  # The price IDs that this adjustment applies to.
415
431
  #
416
432
  # @return [Array<String>]
417
433
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
418
434
 
435
+ # @!attribute filters
436
+ # The filters that determine which prices to apply this adjustment to.
437
+ #
438
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter>]
439
+ required :filters,
440
+ -> do
441
+ Orb::Internal::Type::ArrayOf[
442
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter
443
+ ]
444
+ end
445
+
419
446
  # @!attribute is_invoice_level
420
447
  # True for adjustments that apply to an entire invocice, false for adjustments
421
448
  # that apply to only one price.
@@ -442,7 +469,7 @@ module Orb
442
469
  # @return [Float]
443
470
  required :usage_discount, Float
444
471
 
445
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
472
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
446
473
  # Some parameter documentations has been truncated, see
447
474
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount}
448
475
  # for more details.
@@ -451,6 +478,8 @@ module Orb
451
478
  #
452
479
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
453
480
  #
481
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
482
+ #
454
483
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
455
484
  #
456
485
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
@@ -460,6 +489,64 @@ module Orb
460
489
  # @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
461
490
  #
462
491
  # @param adjustment_type [Symbol, :usage_discount]
492
+
493
+ class Filter < Orb::Internal::Type::BaseModel
494
+ # @!attribute field
495
+ # The property of the price to filter on.
496
+ #
497
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field]
498
+ required :field,
499
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field }
500
+
501
+ # @!attribute operator
502
+ # Should prices that match the filter be included or excluded.
503
+ #
504
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator]
505
+ required :operator,
506
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator }
507
+
508
+ # @!attribute values
509
+ # The IDs or values that match this filter.
510
+ #
511
+ # @return [Array<String>]
512
+ required :values, Orb::Internal::Type::ArrayOf[String]
513
+
514
+ # @!method initialize(field:, operator:, values:)
515
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
516
+ #
517
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
518
+ #
519
+ # @param values [Array<String>] The IDs or values that match this filter.
520
+
521
+ # The property of the price to filter on.
522
+ #
523
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter#field
524
+ module Field
525
+ extend Orb::Internal::Type::Enum
526
+
527
+ PRICE_ID = :price_id
528
+ ITEM_ID = :item_id
529
+ PRICE_TYPE = :price_type
530
+ CURRENCY = :currency
531
+ PRICING_UNIT_ID = :pricing_unit_id
532
+
533
+ # @!method self.values
534
+ # @return [Array<Symbol>]
535
+ end
536
+
537
+ # Should prices that match the filter be included or excluded.
538
+ #
539
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter#operator
540
+ module Operator
541
+ extend Orb::Internal::Type::Enum
542
+
543
+ INCLUDES = :includes
544
+ EXCLUDES = :excludes
545
+
546
+ # @!method self.values
547
+ # @return [Array<Symbol>]
548
+ end
549
+ end
463
550
  end
464
551
 
465
552
  class AmountDiscount < Orb::Internal::Type::BaseModel
@@ -481,11 +568,24 @@ module Orb
481
568
  required :amount_discount, String
482
569
 
483
570
  # @!attribute applies_to_price_ids
571
+ # @deprecated
572
+ #
484
573
  # The price IDs that this adjustment applies to.
485
574
  #
486
575
  # @return [Array<String>]
487
576
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
488
577
 
578
+ # @!attribute filters
579
+ # The filters that determine which prices to apply this adjustment to.
580
+ #
581
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter>]
582
+ required :filters,
583
+ -> do
584
+ Orb::Internal::Type::ArrayOf[
585
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter
586
+ ]
587
+ end
588
+
489
589
  # @!attribute is_invoice_level
490
590
  # True for adjustments that apply to an entire invocice, false for adjustments
491
591
  # that apply to only one price.
@@ -505,7 +605,7 @@ module Orb
505
605
  # @return [String, nil]
506
606
  required :reason, String, nil?: true
507
607
 
508
- # @!method initialize(id:, amount_discount:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
608
+ # @!method initialize(id:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
509
609
  # Some parameter documentations has been truncated, see
510
610
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount}
511
611
  # for more details.
@@ -516,6 +616,8 @@ module Orb
516
616
  #
517
617
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
518
618
  #
619
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
620
+ #
519
621
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
520
622
  #
521
623
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
@@ -523,6 +625,64 @@ module Orb
523
625
  # @param reason [String, nil] The reason for the adjustment.
524
626
  #
525
627
  # @param adjustment_type [Symbol, :amount_discount]
628
+
629
+ class Filter < Orb::Internal::Type::BaseModel
630
+ # @!attribute field
631
+ # The property of the price to filter on.
632
+ #
633
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field]
634
+ required :field,
635
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field }
636
+
637
+ # @!attribute operator
638
+ # Should prices that match the filter be included or excluded.
639
+ #
640
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator]
641
+ required :operator,
642
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator }
643
+
644
+ # @!attribute values
645
+ # The IDs or values that match this filter.
646
+ #
647
+ # @return [Array<String>]
648
+ required :values, Orb::Internal::Type::ArrayOf[String]
649
+
650
+ # @!method initialize(field:, operator:, values:)
651
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
652
+ #
653
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
654
+ #
655
+ # @param values [Array<String>] The IDs or values that match this filter.
656
+
657
+ # The property of the price to filter on.
658
+ #
659
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter#field
660
+ module Field
661
+ extend Orb::Internal::Type::Enum
662
+
663
+ PRICE_ID = :price_id
664
+ ITEM_ID = :item_id
665
+ PRICE_TYPE = :price_type
666
+ CURRENCY = :currency
667
+ PRICING_UNIT_ID = :pricing_unit_id
668
+
669
+ # @!method self.values
670
+ # @return [Array<Symbol>]
671
+ end
672
+
673
+ # Should prices that match the filter be included or excluded.
674
+ #
675
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter#operator
676
+ module Operator
677
+ extend Orb::Internal::Type::Enum
678
+
679
+ INCLUDES = :includes
680
+ EXCLUDES = :excludes
681
+
682
+ # @!method self.values
683
+ # @return [Array<Symbol>]
684
+ end
685
+ end
526
686
  end
527
687
 
528
688
  class PercentageDiscount < Orb::Internal::Type::BaseModel
@@ -537,11 +697,24 @@ module Orb
537
697
  required :adjustment_type, const: :percentage_discount
538
698
 
539
699
  # @!attribute applies_to_price_ids
700
+ # @deprecated
701
+ #
540
702
  # The price IDs that this adjustment applies to.
541
703
  #
542
704
  # @return [Array<String>]
543
705
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
544
706
 
707
+ # @!attribute filters
708
+ # The filters that determine which prices to apply this adjustment to.
709
+ #
710
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>]
711
+ required :filters,
712
+ -> do
713
+ Orb::Internal::Type::ArrayOf[
714
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter
715
+ ]
716
+ end
717
+
545
718
  # @!attribute is_invoice_level
546
719
  # True for adjustments that apply to an entire invocice, false for adjustments
547
720
  # that apply to only one price.
@@ -568,7 +741,7 @@ module Orb
568
741
  # @return [String, nil]
569
742
  required :reason, String, nil?: true
570
743
 
571
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
744
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
572
745
  # Some parameter documentations has been truncated, see
573
746
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount}
574
747
  # for more details.
@@ -577,6 +750,8 @@ module Orb
577
750
  #
578
751
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
579
752
  #
753
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
754
+ #
580
755
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
581
756
  #
582
757
  # @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
@@ -586,6 +761,64 @@ module Orb
586
761
  # @param reason [String, nil] The reason for the adjustment.
587
762
  #
588
763
  # @param adjustment_type [Symbol, :percentage_discount]
764
+
765
+ class Filter < Orb::Internal::Type::BaseModel
766
+ # @!attribute field
767
+ # The property of the price to filter on.
768
+ #
769
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field]
770
+ required :field,
771
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field }
772
+
773
+ # @!attribute operator
774
+ # Should prices that match the filter be included or excluded.
775
+ #
776
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator]
777
+ required :operator,
778
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator }
779
+
780
+ # @!attribute values
781
+ # The IDs or values that match this filter.
782
+ #
783
+ # @return [Array<String>]
784
+ required :values, Orb::Internal::Type::ArrayOf[String]
785
+
786
+ # @!method initialize(field:, operator:, values:)
787
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
788
+ #
789
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
790
+ #
791
+ # @param values [Array<String>] The IDs or values that match this filter.
792
+
793
+ # The property of the price to filter on.
794
+ #
795
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#field
796
+ module Field
797
+ extend Orb::Internal::Type::Enum
798
+
799
+ PRICE_ID = :price_id
800
+ ITEM_ID = :item_id
801
+ PRICE_TYPE = :price_type
802
+ CURRENCY = :currency
803
+ PRICING_UNIT_ID = :pricing_unit_id
804
+
805
+ # @!method self.values
806
+ # @return [Array<Symbol>]
807
+ end
808
+
809
+ # Should prices that match the filter be included or excluded.
810
+ #
811
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#operator
812
+ module Operator
813
+ extend Orb::Internal::Type::Enum
814
+
815
+ INCLUDES = :includes
816
+ EXCLUDES = :excludes
817
+
818
+ # @!method self.values
819
+ # @return [Array<Symbol>]
820
+ end
821
+ end
589
822
  end
590
823
 
591
824
  class Minimum < Orb::Internal::Type::BaseModel
@@ -600,11 +833,24 @@ module Orb
600
833
  required :adjustment_type, const: :minimum
601
834
 
602
835
  # @!attribute applies_to_price_ids
836
+ # @deprecated
837
+ #
603
838
  # The price IDs that this adjustment applies to.
604
839
  #
605
840
  # @return [Array<String>]
606
841
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
607
842
 
843
+ # @!attribute filters
844
+ # The filters that determine which prices to apply this adjustment to.
845
+ #
846
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter>]
847
+ required :filters,
848
+ -> do
849
+ Orb::Internal::Type::ArrayOf[
850
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter
851
+ ]
852
+ end
853
+
608
854
  # @!attribute is_invoice_level
609
855
  # True for adjustments that apply to an entire invocice, false for adjustments
610
856
  # that apply to only one price.
@@ -637,7 +883,7 @@ module Orb
637
883
  # @return [String, nil]
638
884
  required :reason, String, nil?: true
639
885
 
640
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
886
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
641
887
  # Some parameter documentations has been truncated, see
642
888
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum}
643
889
  # for more details.
@@ -646,6 +892,8 @@ module Orb
646
892
  #
647
893
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
648
894
  #
895
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
896
+ #
649
897
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
650
898
  #
651
899
  # @param item_id [String] The item ID that revenue from this minimum will be attributed to.
@@ -657,6 +905,64 @@ module Orb
657
905
  # @param reason [String, nil] The reason for the adjustment.
658
906
  #
659
907
  # @param adjustment_type [Symbol, :minimum]
908
+
909
+ class Filter < Orb::Internal::Type::BaseModel
910
+ # @!attribute field
911
+ # The property of the price to filter on.
912
+ #
913
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field]
914
+ required :field,
915
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field }
916
+
917
+ # @!attribute operator
918
+ # Should prices that match the filter be included or excluded.
919
+ #
920
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator]
921
+ required :operator,
922
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator }
923
+
924
+ # @!attribute values
925
+ # The IDs or values that match this filter.
926
+ #
927
+ # @return [Array<String>]
928
+ required :values, Orb::Internal::Type::ArrayOf[String]
929
+
930
+ # @!method initialize(field:, operator:, values:)
931
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
932
+ #
933
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
934
+ #
935
+ # @param values [Array<String>] The IDs or values that match this filter.
936
+
937
+ # The property of the price to filter on.
938
+ #
939
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter#field
940
+ module Field
941
+ extend Orb::Internal::Type::Enum
942
+
943
+ PRICE_ID = :price_id
944
+ ITEM_ID = :item_id
945
+ PRICE_TYPE = :price_type
946
+ CURRENCY = :currency
947
+ PRICING_UNIT_ID = :pricing_unit_id
948
+
949
+ # @!method self.values
950
+ # @return [Array<Symbol>]
951
+ end
952
+
953
+ # Should prices that match the filter be included or excluded.
954
+ #
955
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter#operator
956
+ module Operator
957
+ extend Orb::Internal::Type::Enum
958
+
959
+ INCLUDES = :includes
960
+ EXCLUDES = :excludes
961
+
962
+ # @!method self.values
963
+ # @return [Array<Symbol>]
964
+ end
965
+ end
660
966
  end
661
967
 
662
968
  class Maximum < Orb::Internal::Type::BaseModel
@@ -671,11 +977,24 @@ module Orb
671
977
  required :adjustment_type, const: :maximum
672
978
 
673
979
  # @!attribute applies_to_price_ids
980
+ # @deprecated
981
+ #
674
982
  # The price IDs that this adjustment applies to.
675
983
  #
676
984
  # @return [Array<String>]
677
985
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
678
986
 
987
+ # @!attribute filters
988
+ # The filters that determine which prices to apply this adjustment to.
989
+ #
990
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter>]
991
+ required :filters,
992
+ -> do
993
+ Orb::Internal::Type::ArrayOf[
994
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter
995
+ ]
996
+ end
997
+
679
998
  # @!attribute is_invoice_level
680
999
  # True for adjustments that apply to an entire invocice, false for adjustments
681
1000
  # that apply to only one price.
@@ -702,7 +1021,7 @@ module Orb
702
1021
  # @return [String, nil]
703
1022
  required :reason, String, nil?: true
704
1023
 
705
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
1024
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
706
1025
  # Some parameter documentations has been truncated, see
707
1026
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum}
708
1027
  # for more details.
@@ -711,6 +1030,8 @@ module Orb
711
1030
  #
712
1031
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
713
1032
  #
1033
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
1034
+ #
714
1035
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
715
1036
  #
716
1037
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
@@ -720,6 +1041,64 @@ module Orb
720
1041
  # @param reason [String, nil] The reason for the adjustment.
721
1042
  #
722
1043
  # @param adjustment_type [Symbol, :maximum]
1044
+
1045
+ class Filter < Orb::Internal::Type::BaseModel
1046
+ # @!attribute field
1047
+ # The property of the price to filter on.
1048
+ #
1049
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field]
1050
+ required :field,
1051
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field }
1052
+
1053
+ # @!attribute operator
1054
+ # Should prices that match the filter be included or excluded.
1055
+ #
1056
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator]
1057
+ required :operator,
1058
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator }
1059
+
1060
+ # @!attribute values
1061
+ # The IDs or values that match this filter.
1062
+ #
1063
+ # @return [Array<String>]
1064
+ required :values, Orb::Internal::Type::ArrayOf[String]
1065
+
1066
+ # @!method initialize(field:, operator:, values:)
1067
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
1068
+ #
1069
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
1070
+ #
1071
+ # @param values [Array<String>] The IDs or values that match this filter.
1072
+
1073
+ # The property of the price to filter on.
1074
+ #
1075
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter#field
1076
+ module Field
1077
+ extend Orb::Internal::Type::Enum
1078
+
1079
+ PRICE_ID = :price_id
1080
+ ITEM_ID = :item_id
1081
+ PRICE_TYPE = :price_type
1082
+ CURRENCY = :currency
1083
+ PRICING_UNIT_ID = :pricing_unit_id
1084
+
1085
+ # @!method self.values
1086
+ # @return [Array<Symbol>]
1087
+ end
1088
+
1089
+ # Should prices that match the filter be included or excluded.
1090
+ #
1091
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter#operator
1092
+ module Operator
1093
+ extend Orb::Internal::Type::Enum
1094
+
1095
+ INCLUDES = :includes
1096
+ EXCLUDES = :excludes
1097
+
1098
+ # @!method self.values
1099
+ # @return [Array<Symbol>]
1100
+ end
1101
+ end
723
1102
  end
724
1103
 
725
1104
  # @!method self.variants
@@ -786,12 +1165,6 @@ module Orb
786
1165
  # @return [String]
787
1166
  required :amount_discount, String
788
1167
 
789
- # @!attribute applies_to_price_ids
790
- # The price ids that this discount interval applies to.
791
- #
792
- # @return [Array<String>]
793
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
794
-
795
1168
  # @!attribute applies_to_price_interval_ids
796
1169
  # The price interval ids that this discount interval applies to.
797
1170
  #
@@ -809,33 +1182,92 @@ module Orb
809
1182
  # @return [Time, nil]
810
1183
  required :end_date, Time, nil?: true
811
1184
 
1185
+ # @!attribute filters
1186
+ # The filters that determine which prices this discount interval applies to.
1187
+ #
1188
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter>]
1189
+ required :filters,
1190
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter] }
1191
+
812
1192
  # @!attribute start_date
813
1193
  # The start date of the discount interval.
814
1194
  #
815
1195
  # @return [Time]
816
1196
  required :start_date, Time
817
1197
 
818
- # @!method initialize(amount_discount:, applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, start_date:, discount_type: :amount)
1198
+ # @!method initialize(amount_discount:, applies_to_price_interval_ids:, end_date:, filters:, start_date:, discount_type: :amount)
819
1199
  # @param amount_discount [String] Only available if discount_type is `amount`.
820
1200
  #
821
- # @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
822
- #
823
1201
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
824
1202
  #
825
1203
  # @param end_date [Time, nil] The end date of the discount interval.
826
1204
  #
1205
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter>] The filters that determine which prices this discount interval applies to.
1206
+ #
827
1207
  # @param start_date [Time] The start date of the discount interval.
828
1208
  #
829
1209
  # @param discount_type [Symbol, :amount]
1210
+
1211
+ class Filter < Orb::Internal::Type::BaseModel
1212
+ # @!attribute field
1213
+ # The property of the price to filter on.
1214
+ #
1215
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter::Field]
1216
+ required :field,
1217
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter::Field }
1218
+
1219
+ # @!attribute operator
1220
+ # Should prices that match the filter be included or excluded.
1221
+ #
1222
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter::Operator]
1223
+ required :operator,
1224
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter::Operator }
1225
+
1226
+ # @!attribute values
1227
+ # The IDs or values that match this filter.
1228
+ #
1229
+ # @return [Array<String>]
1230
+ required :values, Orb::Internal::Type::ArrayOf[String]
1231
+
1232
+ # @!method initialize(field:, operator:, values:)
1233
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter::Field] The property of the price to filter on.
1234
+ #
1235
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter::Operator] Should prices that match the filter be included or excluded.
1236
+ #
1237
+ # @param values [Array<String>] The IDs or values that match this filter.
1238
+
1239
+ # The property of the price to filter on.
1240
+ #
1241
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter#field
1242
+ module Field
1243
+ extend Orb::Internal::Type::Enum
1244
+
1245
+ PRICE_ID = :price_id
1246
+ ITEM_ID = :item_id
1247
+ PRICE_TYPE = :price_type
1248
+ CURRENCY = :currency
1249
+ PRICING_UNIT_ID = :pricing_unit_id
1250
+
1251
+ # @!method self.values
1252
+ # @return [Array<Symbol>]
1253
+ end
1254
+
1255
+ # Should prices that match the filter be included or excluded.
1256
+ #
1257
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount::Filter#operator
1258
+ module Operator
1259
+ extend Orb::Internal::Type::Enum
1260
+
1261
+ INCLUDES = :includes
1262
+ EXCLUDES = :excludes
1263
+
1264
+ # @!method self.values
1265
+ # @return [Array<Symbol>]
1266
+ end
1267
+ end
830
1268
  end
831
1269
 
832
1270
  class Percentage < Orb::Internal::Type::BaseModel
833
- # @!attribute applies_to_price_ids
834
- # The price ids that this discount interval applies to.
835
- #
836
- # @return [Array<String>]
837
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
838
-
839
1271
  # @!attribute applies_to_price_interval_ids
840
1272
  # The price interval ids that this discount interval applies to.
841
1273
  #
@@ -853,6 +1285,13 @@ module Orb
853
1285
  # @return [Time, nil]
854
1286
  required :end_date, Time, nil?: true
855
1287
 
1288
+ # @!attribute filters
1289
+ # The filters that determine which prices this discount interval applies to.
1290
+ #
1291
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter>]
1292
+ required :filters,
1293
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter] }
1294
+
856
1295
  # @!attribute percentage_discount
857
1296
  # Only available if discount_type is `percentage`.This is a number between 0
858
1297
  # and 1.
@@ -866,31 +1305,83 @@ module Orb
866
1305
  # @return [Time]
867
1306
  required :start_date, Time
868
1307
 
869
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, percentage_discount:, start_date:, discount_type: :percentage)
1308
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, percentage_discount:, start_date:, discount_type: :percentage)
870
1309
  # Some parameter documentations has been truncated, see
871
1310
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage}
872
1311
  # for more details.
873
1312
  #
874
- # @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
875
- #
876
1313
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
877
1314
  #
878
1315
  # @param end_date [Time, nil] The end date of the discount interval.
879
1316
  #
1317
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter>] The filters that determine which prices this discount interval applies to.
1318
+ #
880
1319
  # @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
881
1320
  #
882
1321
  # @param start_date [Time] The start date of the discount interval.
883
1322
  #
884
1323
  # @param discount_type [Symbol, :percentage]
1324
+
1325
+ class Filter < Orb::Internal::Type::BaseModel
1326
+ # @!attribute field
1327
+ # The property of the price to filter on.
1328
+ #
1329
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter::Field]
1330
+ required :field,
1331
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter::Field }
1332
+
1333
+ # @!attribute operator
1334
+ # Should prices that match the filter be included or excluded.
1335
+ #
1336
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter::Operator]
1337
+ required :operator,
1338
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter::Operator }
1339
+
1340
+ # @!attribute values
1341
+ # The IDs or values that match this filter.
1342
+ #
1343
+ # @return [Array<String>]
1344
+ required :values, Orb::Internal::Type::ArrayOf[String]
1345
+
1346
+ # @!method initialize(field:, operator:, values:)
1347
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter::Field] The property of the price to filter on.
1348
+ #
1349
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter::Operator] Should prices that match the filter be included or excluded.
1350
+ #
1351
+ # @param values [Array<String>] The IDs or values that match this filter.
1352
+
1353
+ # The property of the price to filter on.
1354
+ #
1355
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter#field
1356
+ module Field
1357
+ extend Orb::Internal::Type::Enum
1358
+
1359
+ PRICE_ID = :price_id
1360
+ ITEM_ID = :item_id
1361
+ PRICE_TYPE = :price_type
1362
+ CURRENCY = :currency
1363
+ PRICING_UNIT_ID = :pricing_unit_id
1364
+
1365
+ # @!method self.values
1366
+ # @return [Array<Symbol>]
1367
+ end
1368
+
1369
+ # Should prices that match the filter be included or excluded.
1370
+ #
1371
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage::Filter#operator
1372
+ module Operator
1373
+ extend Orb::Internal::Type::Enum
1374
+
1375
+ INCLUDES = :includes
1376
+ EXCLUDES = :excludes
1377
+
1378
+ # @!method self.values
1379
+ # @return [Array<Symbol>]
1380
+ end
1381
+ end
885
1382
  end
886
1383
 
887
1384
  class Usage < Orb::Internal::Type::BaseModel
888
- # @!attribute applies_to_price_ids
889
- # The price ids that this discount interval applies to.
890
- #
891
- # @return [Array<String>]
892
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
893
-
894
1385
  # @!attribute applies_to_price_interval_ids
895
1386
  # The price interval ids that this discount interval applies to.
896
1387
  #
@@ -908,6 +1399,13 @@ module Orb
908
1399
  # @return [Time, nil]
909
1400
  required :end_date, Time, nil?: true
910
1401
 
1402
+ # @!attribute filters
1403
+ # The filters that determine which prices this discount interval applies to.
1404
+ #
1405
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter>]
1406
+ required :filters,
1407
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter] }
1408
+
911
1409
  # @!attribute start_date
912
1410
  # The start date of the discount interval.
913
1411
  #
@@ -921,22 +1419,80 @@ module Orb
921
1419
  # @return [Float]
922
1420
  required :usage_discount, Float
923
1421
 
924
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, start_date:, usage_discount:, discount_type: :usage)
1422
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, start_date:, usage_discount:, discount_type: :usage)
925
1423
  # Some parameter documentations has been truncated, see
926
1424
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage}
927
1425
  # for more details.
928
1426
  #
929
- # @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
930
- #
931
1427
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
932
1428
  #
933
1429
  # @param end_date [Time, nil] The end date of the discount interval.
934
1430
  #
1431
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter>] The filters that determine which prices this discount interval applies to.
1432
+ #
935
1433
  # @param start_date [Time] The start date of the discount interval.
936
1434
  #
937
1435
  # @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
938
1436
  #
939
1437
  # @param discount_type [Symbol, :usage]
1438
+
1439
+ class Filter < Orb::Internal::Type::BaseModel
1440
+ # @!attribute field
1441
+ # The property of the price to filter on.
1442
+ #
1443
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter::Field]
1444
+ required :field,
1445
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter::Field }
1446
+
1447
+ # @!attribute operator
1448
+ # Should prices that match the filter be included or excluded.
1449
+ #
1450
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter::Operator]
1451
+ required :operator,
1452
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter::Operator }
1453
+
1454
+ # @!attribute values
1455
+ # The IDs or values that match this filter.
1456
+ #
1457
+ # @return [Array<String>]
1458
+ required :values, Orb::Internal::Type::ArrayOf[String]
1459
+
1460
+ # @!method initialize(field:, operator:, values:)
1461
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter::Field] The property of the price to filter on.
1462
+ #
1463
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter::Operator] Should prices that match the filter be included or excluded.
1464
+ #
1465
+ # @param values [Array<String>] The IDs or values that match this filter.
1466
+
1467
+ # The property of the price to filter on.
1468
+ #
1469
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter#field
1470
+ module Field
1471
+ extend Orb::Internal::Type::Enum
1472
+
1473
+ PRICE_ID = :price_id
1474
+ ITEM_ID = :item_id
1475
+ PRICE_TYPE = :price_type
1476
+ CURRENCY = :currency
1477
+ PRICING_UNIT_ID = :pricing_unit_id
1478
+
1479
+ # @!method self.values
1480
+ # @return [Array<Symbol>]
1481
+ end
1482
+
1483
+ # Should prices that match the filter be included or excluded.
1484
+ #
1485
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage::Filter#operator
1486
+ module Operator
1487
+ extend Orb::Internal::Type::Enum
1488
+
1489
+ INCLUDES = :includes
1490
+ EXCLUDES = :excludes
1491
+
1492
+ # @!method self.values
1493
+ # @return [Array<Symbol>]
1494
+ end
1495
+ end
940
1496
  end
941
1497
 
942
1498
  # @!method self.variants
@@ -972,12 +1528,6 @@ module Orb
972
1528
  end
973
1529
 
974
1530
  class MaximumInterval < Orb::Internal::Type::BaseModel
975
- # @!attribute applies_to_price_ids
976
- # The price ids that this maximum interval applies to.
977
- #
978
- # @return [Array<String>]
979
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
980
-
981
1531
  # @!attribute applies_to_price_interval_ids
982
1532
  # The price interval ids that this maximum interval applies to.
983
1533
  #
@@ -990,6 +1540,13 @@ module Orb
990
1540
  # @return [Time, nil]
991
1541
  required :end_date, Time, nil?: true
992
1542
 
1543
+ # @!attribute filters
1544
+ # The filters that determine which prices this maximum interval applies to.
1545
+ #
1546
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter>]
1547
+ required :filters,
1548
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter] }
1549
+
993
1550
  # @!attribute maximum_amount
994
1551
  # The maximum amount to charge in a given billing period for the price intervals
995
1552
  # this transform applies to.
@@ -1003,29 +1560,81 @@ module Orb
1003
1560
  # @return [Time]
1004
1561
  required :start_date, Time
1005
1562
 
1006
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:)
1563
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, maximum_amount:, start_date:)
1007
1564
  # Some parameter documentations has been truncated, see
1008
1565
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval}
1009
1566
  # for more details.
1010
1567
  #
1011
- # @param applies_to_price_ids [Array<String>] The price ids that this maximum interval applies to.
1012
- #
1013
1568
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this maximum interval applies to.
1014
1569
  #
1015
1570
  # @param end_date [Time, nil] The end date of the maximum interval.
1016
1571
  #
1572
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter>] The filters that determine which prices this maximum interval applies to.
1573
+ #
1017
1574
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
1018
1575
  #
1019
1576
  # @param start_date [Time] The start date of the maximum interval.
1577
+
1578
+ class Filter < Orb::Internal::Type::BaseModel
1579
+ # @!attribute field
1580
+ # The property of the price to filter on.
1581
+ #
1582
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter::Field]
1583
+ required :field,
1584
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter::Field }
1585
+
1586
+ # @!attribute operator
1587
+ # Should prices that match the filter be included or excluded.
1588
+ #
1589
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter::Operator]
1590
+ required :operator,
1591
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter::Operator }
1592
+
1593
+ # @!attribute values
1594
+ # The IDs or values that match this filter.
1595
+ #
1596
+ # @return [Array<String>]
1597
+ required :values, Orb::Internal::Type::ArrayOf[String]
1598
+
1599
+ # @!method initialize(field:, operator:, values:)
1600
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter::Field] The property of the price to filter on.
1601
+ #
1602
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
1603
+ #
1604
+ # @param values [Array<String>] The IDs or values that match this filter.
1605
+
1606
+ # The property of the price to filter on.
1607
+ #
1608
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter#field
1609
+ module Field
1610
+ extend Orb::Internal::Type::Enum
1611
+
1612
+ PRICE_ID = :price_id
1613
+ ITEM_ID = :item_id
1614
+ PRICE_TYPE = :price_type
1615
+ CURRENCY = :currency
1616
+ PRICING_UNIT_ID = :pricing_unit_id
1617
+
1618
+ # @!method self.values
1619
+ # @return [Array<Symbol>]
1620
+ end
1621
+
1622
+ # Should prices that match the filter be included or excluded.
1623
+ #
1624
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval::Filter#operator
1625
+ module Operator
1626
+ extend Orb::Internal::Type::Enum
1627
+
1628
+ INCLUDES = :includes
1629
+ EXCLUDES = :excludes
1630
+
1631
+ # @!method self.values
1632
+ # @return [Array<Symbol>]
1633
+ end
1634
+ end
1020
1635
  end
1021
1636
 
1022
1637
  class MinimumInterval < Orb::Internal::Type::BaseModel
1023
- # @!attribute applies_to_price_ids
1024
- # The price ids that this minimum interval applies to.
1025
- #
1026
- # @return [Array<String>]
1027
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
1028
-
1029
1638
  # @!attribute applies_to_price_interval_ids
1030
1639
  # The price interval ids that this minimum interval applies to.
1031
1640
  #
@@ -1038,6 +1647,13 @@ module Orb
1038
1647
  # @return [Time, nil]
1039
1648
  required :end_date, Time, nil?: true
1040
1649
 
1650
+ # @!attribute filters
1651
+ # The filters that determine which prices this minimum interval applies to.
1652
+ #
1653
+ # @return [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter>]
1654
+ required :filters,
1655
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter] }
1656
+
1041
1657
  # @!attribute minimum_amount
1042
1658
  # The minimum amount to charge in a given billing period for the price intervals
1043
1659
  # this minimum applies to.
@@ -1051,20 +1667,78 @@ module Orb
1051
1667
  # @return [Time]
1052
1668
  required :start_date, Time
1053
1669
 
1054
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:)
1670
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, minimum_amount:, start_date:)
1055
1671
  # Some parameter documentations has been truncated, see
1056
1672
  # {Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval}
1057
1673
  # for more details.
1058
1674
  #
1059
- # @param applies_to_price_ids [Array<String>] The price ids that this minimum interval applies to.
1060
- #
1061
1675
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this minimum interval applies to.
1062
1676
  #
1063
1677
  # @param end_date [Time, nil] The end date of the minimum interval.
1064
1678
  #
1679
+ # @param filters [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter>] The filters that determine which prices this minimum interval applies to.
1680
+ #
1065
1681
  # @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
1066
1682
  #
1067
1683
  # @param start_date [Time] The start date of the minimum interval.
1684
+
1685
+ class Filter < Orb::Internal::Type::BaseModel
1686
+ # @!attribute field
1687
+ # The property of the price to filter on.
1688
+ #
1689
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter::Field]
1690
+ required :field,
1691
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter::Field }
1692
+
1693
+ # @!attribute operator
1694
+ # Should prices that match the filter be included or excluded.
1695
+ #
1696
+ # @return [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter::Operator]
1697
+ required :operator,
1698
+ enum: -> { Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter::Operator }
1699
+
1700
+ # @!attribute values
1701
+ # The IDs or values that match this filter.
1702
+ #
1703
+ # @return [Array<String>]
1704
+ required :values, Orb::Internal::Type::ArrayOf[String]
1705
+
1706
+ # @!method initialize(field:, operator:, values:)
1707
+ # @param field [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter::Field] The property of the price to filter on.
1708
+ #
1709
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
1710
+ #
1711
+ # @param values [Array<String>] The IDs or values that match this filter.
1712
+
1713
+ # The property of the price to filter on.
1714
+ #
1715
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter#field
1716
+ module Field
1717
+ extend Orb::Internal::Type::Enum
1718
+
1719
+ PRICE_ID = :price_id
1720
+ ITEM_ID = :item_id
1721
+ PRICE_TYPE = :price_type
1722
+ CURRENCY = :currency
1723
+ PRICING_UNIT_ID = :pricing_unit_id
1724
+
1725
+ # @!method self.values
1726
+ # @return [Array<Symbol>]
1727
+ end
1728
+
1729
+ # Should prices that match the filter be included or excluded.
1730
+ #
1731
+ # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval::Filter#operator
1732
+ module Operator
1733
+ extend Orb::Internal::Type::Enum
1734
+
1735
+ INCLUDES = :includes
1736
+ EXCLUDES = :excludes
1737
+
1738
+ # @!method self.values
1739
+ # @return [Array<Symbol>]
1740
+ end
1741
+ end
1068
1742
  end
1069
1743
 
1070
1744
  # @see Orb::Models::SubscriptionChangeCancelResponse::Subscription#pending_subscription_change