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::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeRetrieveResponse::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::SubscriptionChangeRetrieveResponse::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::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval>]
213
219
  required :minimum_intervals,
214
220
  -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeRetrieveResponse::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::SubscriptionChangeRetrieveResponse::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::SubscriptionChangeRetrieveResponse::Subscription} for more
285
297
  # details.
@@ -320,11 +332,13 @@ module Orb
320
332
  #
321
333
  # @param minimum_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
322
334
  #
335
+ # @param name [String] The name of the subscription.
336
+ #
323
337
  # @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
324
338
  #
325
339
  # @param pending_subscription_change [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
326
340
  #
327
- # @param plan [Orb::Models::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
341
+ # @param plan [Orb::Models::Plan, nil] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
328
342
  #
329
343
  # @param price_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval>] The price intervals for this subscription.
330
344
  #
@@ -412,11 +426,24 @@ module Orb
412
426
  required :adjustment_type, const: :usage_discount
413
427
 
414
428
  # @!attribute applies_to_price_ids
429
+ # @deprecated
430
+ #
415
431
  # The price IDs that this adjustment applies to.
416
432
  #
417
433
  # @return [Array<String>]
418
434
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
419
435
 
436
+ # @!attribute filters
437
+ # The filters that determine which prices to apply this adjustment to.
438
+ #
439
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter>]
440
+ required :filters,
441
+ -> do
442
+ Orb::Internal::Type::ArrayOf[
443
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter
444
+ ]
445
+ end
446
+
420
447
  # @!attribute is_invoice_level
421
448
  # True for adjustments that apply to an entire invocice, false for adjustments
422
449
  # that apply to only one price.
@@ -443,7 +470,7 @@ module Orb
443
470
  # @return [Float]
444
471
  required :usage_discount, Float
445
472
 
446
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
473
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
447
474
  # Some parameter documentations has been truncated, see
448
475
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount}
449
476
  # for more details.
@@ -452,6 +479,8 @@ module Orb
452
479
  #
453
480
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
454
481
  #
482
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
483
+ #
455
484
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
456
485
  #
457
486
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
@@ -461,6 +490,64 @@ module Orb
461
490
  # @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
462
491
  #
463
492
  # @param adjustment_type [Symbol, :usage_discount]
493
+
494
+ class Filter < Orb::Internal::Type::BaseModel
495
+ # @!attribute field
496
+ # The property of the price to filter on.
497
+ #
498
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field]
499
+ required :field,
500
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field }
501
+
502
+ # @!attribute operator
503
+ # Should prices that match the filter be included or excluded.
504
+ #
505
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator]
506
+ required :operator,
507
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator }
508
+
509
+ # @!attribute values
510
+ # The IDs or values that match this filter.
511
+ #
512
+ # @return [Array<String>]
513
+ required :values, Orb::Internal::Type::ArrayOf[String]
514
+
515
+ # @!method initialize(field:, operator:, values:)
516
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
517
+ #
518
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
519
+ #
520
+ # @param values [Array<String>] The IDs or values that match this filter.
521
+
522
+ # The property of the price to filter on.
523
+ #
524
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter#field
525
+ module Field
526
+ extend Orb::Internal::Type::Enum
527
+
528
+ PRICE_ID = :price_id
529
+ ITEM_ID = :item_id
530
+ PRICE_TYPE = :price_type
531
+ CURRENCY = :currency
532
+ PRICING_UNIT_ID = :pricing_unit_id
533
+
534
+ # @!method self.values
535
+ # @return [Array<Symbol>]
536
+ end
537
+
538
+ # Should prices that match the filter be included or excluded.
539
+ #
540
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter#operator
541
+ module Operator
542
+ extend Orb::Internal::Type::Enum
543
+
544
+ INCLUDES = :includes
545
+ EXCLUDES = :excludes
546
+
547
+ # @!method self.values
548
+ # @return [Array<Symbol>]
549
+ end
550
+ end
464
551
  end
465
552
 
466
553
  class AmountDiscount < Orb::Internal::Type::BaseModel
@@ -482,11 +569,24 @@ module Orb
482
569
  required :amount_discount, String
483
570
 
484
571
  # @!attribute applies_to_price_ids
572
+ # @deprecated
573
+ #
485
574
  # The price IDs that this adjustment applies to.
486
575
  #
487
576
  # @return [Array<String>]
488
577
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
489
578
 
579
+ # @!attribute filters
580
+ # The filters that determine which prices to apply this adjustment to.
581
+ #
582
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter>]
583
+ required :filters,
584
+ -> do
585
+ Orb::Internal::Type::ArrayOf[
586
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter
587
+ ]
588
+ end
589
+
490
590
  # @!attribute is_invoice_level
491
591
  # True for adjustments that apply to an entire invocice, false for adjustments
492
592
  # that apply to only one price.
@@ -506,7 +606,7 @@ module Orb
506
606
  # @return [String, nil]
507
607
  required :reason, String, nil?: true
508
608
 
509
- # @!method initialize(id:, amount_discount:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
609
+ # @!method initialize(id:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
510
610
  # Some parameter documentations has been truncated, see
511
611
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount}
512
612
  # for more details.
@@ -517,6 +617,8 @@ module Orb
517
617
  #
518
618
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
519
619
  #
620
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
621
+ #
520
622
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
521
623
  #
522
624
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
@@ -524,6 +626,64 @@ module Orb
524
626
  # @param reason [String, nil] The reason for the adjustment.
525
627
  #
526
628
  # @param adjustment_type [Symbol, :amount_discount]
629
+
630
+ class Filter < Orb::Internal::Type::BaseModel
631
+ # @!attribute field
632
+ # The property of the price to filter on.
633
+ #
634
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field]
635
+ required :field,
636
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field }
637
+
638
+ # @!attribute operator
639
+ # Should prices that match the filter be included or excluded.
640
+ #
641
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator]
642
+ required :operator,
643
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator }
644
+
645
+ # @!attribute values
646
+ # The IDs or values that match this filter.
647
+ #
648
+ # @return [Array<String>]
649
+ required :values, Orb::Internal::Type::ArrayOf[String]
650
+
651
+ # @!method initialize(field:, operator:, values:)
652
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
653
+ #
654
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
655
+ #
656
+ # @param values [Array<String>] The IDs or values that match this filter.
657
+
658
+ # The property of the price to filter on.
659
+ #
660
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter#field
661
+ module Field
662
+ extend Orb::Internal::Type::Enum
663
+
664
+ PRICE_ID = :price_id
665
+ ITEM_ID = :item_id
666
+ PRICE_TYPE = :price_type
667
+ CURRENCY = :currency
668
+ PRICING_UNIT_ID = :pricing_unit_id
669
+
670
+ # @!method self.values
671
+ # @return [Array<Symbol>]
672
+ end
673
+
674
+ # Should prices that match the filter be included or excluded.
675
+ #
676
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter#operator
677
+ module Operator
678
+ extend Orb::Internal::Type::Enum
679
+
680
+ INCLUDES = :includes
681
+ EXCLUDES = :excludes
682
+
683
+ # @!method self.values
684
+ # @return [Array<Symbol>]
685
+ end
686
+ end
527
687
  end
528
688
 
529
689
  class PercentageDiscount < Orb::Internal::Type::BaseModel
@@ -538,11 +698,24 @@ module Orb
538
698
  required :adjustment_type, const: :percentage_discount
539
699
 
540
700
  # @!attribute applies_to_price_ids
701
+ # @deprecated
702
+ #
541
703
  # The price IDs that this adjustment applies to.
542
704
  #
543
705
  # @return [Array<String>]
544
706
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
545
707
 
708
+ # @!attribute filters
709
+ # The filters that determine which prices to apply this adjustment to.
710
+ #
711
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>]
712
+ required :filters,
713
+ -> do
714
+ Orb::Internal::Type::ArrayOf[
715
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter
716
+ ]
717
+ end
718
+
546
719
  # @!attribute is_invoice_level
547
720
  # True for adjustments that apply to an entire invocice, false for adjustments
548
721
  # that apply to only one price.
@@ -569,7 +742,7 @@ module Orb
569
742
  # @return [String, nil]
570
743
  required :reason, String, nil?: true
571
744
 
572
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
745
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
573
746
  # Some parameter documentations has been truncated, see
574
747
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount}
575
748
  # for more details.
@@ -578,6 +751,8 @@ module Orb
578
751
  #
579
752
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
580
753
  #
754
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
755
+ #
581
756
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
582
757
  #
583
758
  # @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
@@ -587,6 +762,64 @@ module Orb
587
762
  # @param reason [String, nil] The reason for the adjustment.
588
763
  #
589
764
  # @param adjustment_type [Symbol, :percentage_discount]
765
+
766
+ class Filter < Orb::Internal::Type::BaseModel
767
+ # @!attribute field
768
+ # The property of the price to filter on.
769
+ #
770
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field]
771
+ required :field,
772
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field }
773
+
774
+ # @!attribute operator
775
+ # Should prices that match the filter be included or excluded.
776
+ #
777
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator]
778
+ required :operator,
779
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator }
780
+
781
+ # @!attribute values
782
+ # The IDs or values that match this filter.
783
+ #
784
+ # @return [Array<String>]
785
+ required :values, Orb::Internal::Type::ArrayOf[String]
786
+
787
+ # @!method initialize(field:, operator:, values:)
788
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
789
+ #
790
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
791
+ #
792
+ # @param values [Array<String>] The IDs or values that match this filter.
793
+
794
+ # The property of the price to filter on.
795
+ #
796
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#field
797
+ module Field
798
+ extend Orb::Internal::Type::Enum
799
+
800
+ PRICE_ID = :price_id
801
+ ITEM_ID = :item_id
802
+ PRICE_TYPE = :price_type
803
+ CURRENCY = :currency
804
+ PRICING_UNIT_ID = :pricing_unit_id
805
+
806
+ # @!method self.values
807
+ # @return [Array<Symbol>]
808
+ end
809
+
810
+ # Should prices that match the filter be included or excluded.
811
+ #
812
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#operator
813
+ module Operator
814
+ extend Orb::Internal::Type::Enum
815
+
816
+ INCLUDES = :includes
817
+ EXCLUDES = :excludes
818
+
819
+ # @!method self.values
820
+ # @return [Array<Symbol>]
821
+ end
822
+ end
590
823
  end
591
824
 
592
825
  class Minimum < Orb::Internal::Type::BaseModel
@@ -601,11 +834,24 @@ module Orb
601
834
  required :adjustment_type, const: :minimum
602
835
 
603
836
  # @!attribute applies_to_price_ids
837
+ # @deprecated
838
+ #
604
839
  # The price IDs that this adjustment applies to.
605
840
  #
606
841
  # @return [Array<String>]
607
842
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
608
843
 
844
+ # @!attribute filters
845
+ # The filters that determine which prices to apply this adjustment to.
846
+ #
847
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter>]
848
+ required :filters,
849
+ -> do
850
+ Orb::Internal::Type::ArrayOf[
851
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter
852
+ ]
853
+ end
854
+
609
855
  # @!attribute is_invoice_level
610
856
  # True for adjustments that apply to an entire invocice, false for adjustments
611
857
  # that apply to only one price.
@@ -638,7 +884,7 @@ module Orb
638
884
  # @return [String, nil]
639
885
  required :reason, String, nil?: true
640
886
 
641
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
887
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
642
888
  # Some parameter documentations has been truncated, see
643
889
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum}
644
890
  # for more details.
@@ -647,6 +893,8 @@ module Orb
647
893
  #
648
894
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
649
895
  #
896
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
897
+ #
650
898
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
651
899
  #
652
900
  # @param item_id [String] The item ID that revenue from this minimum will be attributed to.
@@ -658,6 +906,64 @@ module Orb
658
906
  # @param reason [String, nil] The reason for the adjustment.
659
907
  #
660
908
  # @param adjustment_type [Symbol, :minimum]
909
+
910
+ class Filter < Orb::Internal::Type::BaseModel
911
+ # @!attribute field
912
+ # The property of the price to filter on.
913
+ #
914
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field]
915
+ required :field,
916
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field }
917
+
918
+ # @!attribute operator
919
+ # Should prices that match the filter be included or excluded.
920
+ #
921
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator]
922
+ required :operator,
923
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator }
924
+
925
+ # @!attribute values
926
+ # The IDs or values that match this filter.
927
+ #
928
+ # @return [Array<String>]
929
+ required :values, Orb::Internal::Type::ArrayOf[String]
930
+
931
+ # @!method initialize(field:, operator:, values:)
932
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
933
+ #
934
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
935
+ #
936
+ # @param values [Array<String>] The IDs or values that match this filter.
937
+
938
+ # The property of the price to filter on.
939
+ #
940
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter#field
941
+ module Field
942
+ extend Orb::Internal::Type::Enum
943
+
944
+ PRICE_ID = :price_id
945
+ ITEM_ID = :item_id
946
+ PRICE_TYPE = :price_type
947
+ CURRENCY = :currency
948
+ PRICING_UNIT_ID = :pricing_unit_id
949
+
950
+ # @!method self.values
951
+ # @return [Array<Symbol>]
952
+ end
953
+
954
+ # Should prices that match the filter be included or excluded.
955
+ #
956
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter#operator
957
+ module Operator
958
+ extend Orb::Internal::Type::Enum
959
+
960
+ INCLUDES = :includes
961
+ EXCLUDES = :excludes
962
+
963
+ # @!method self.values
964
+ # @return [Array<Symbol>]
965
+ end
966
+ end
661
967
  end
662
968
 
663
969
  class Maximum < Orb::Internal::Type::BaseModel
@@ -672,11 +978,24 @@ module Orb
672
978
  required :adjustment_type, const: :maximum
673
979
 
674
980
  # @!attribute applies_to_price_ids
981
+ # @deprecated
982
+ #
675
983
  # The price IDs that this adjustment applies to.
676
984
  #
677
985
  # @return [Array<String>]
678
986
  required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
679
987
 
988
+ # @!attribute filters
989
+ # The filters that determine which prices to apply this adjustment to.
990
+ #
991
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter>]
992
+ required :filters,
993
+ -> do
994
+ Orb::Internal::Type::ArrayOf[
995
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter
996
+ ]
997
+ end
998
+
680
999
  # @!attribute is_invoice_level
681
1000
  # True for adjustments that apply to an entire invocice, false for adjustments
682
1001
  # that apply to only one price.
@@ -703,7 +1022,7 @@ module Orb
703
1022
  # @return [String, nil]
704
1023
  required :reason, String, nil?: true
705
1024
 
706
- # @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
1025
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
707
1026
  # Some parameter documentations has been truncated, see
708
1027
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum}
709
1028
  # for more details.
@@ -712,6 +1031,8 @@ module Orb
712
1031
  #
713
1032
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
714
1033
  #
1034
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
1035
+ #
715
1036
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
716
1037
  #
717
1038
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
@@ -721,6 +1042,64 @@ module Orb
721
1042
  # @param reason [String, nil] The reason for the adjustment.
722
1043
  #
723
1044
  # @param adjustment_type [Symbol, :maximum]
1045
+
1046
+ class Filter < Orb::Internal::Type::BaseModel
1047
+ # @!attribute field
1048
+ # The property of the price to filter on.
1049
+ #
1050
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field]
1051
+ required :field,
1052
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field }
1053
+
1054
+ # @!attribute operator
1055
+ # Should prices that match the filter be included or excluded.
1056
+ #
1057
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator]
1058
+ required :operator,
1059
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator }
1060
+
1061
+ # @!attribute values
1062
+ # The IDs or values that match this filter.
1063
+ #
1064
+ # @return [Array<String>]
1065
+ required :values, Orb::Internal::Type::ArrayOf[String]
1066
+
1067
+ # @!method initialize(field:, operator:, values:)
1068
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
1069
+ #
1070
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
1071
+ #
1072
+ # @param values [Array<String>] The IDs or values that match this filter.
1073
+
1074
+ # The property of the price to filter on.
1075
+ #
1076
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter#field
1077
+ module Field
1078
+ extend Orb::Internal::Type::Enum
1079
+
1080
+ PRICE_ID = :price_id
1081
+ ITEM_ID = :item_id
1082
+ PRICE_TYPE = :price_type
1083
+ CURRENCY = :currency
1084
+ PRICING_UNIT_ID = :pricing_unit_id
1085
+
1086
+ # @!method self.values
1087
+ # @return [Array<Symbol>]
1088
+ end
1089
+
1090
+ # Should prices that match the filter be included or excluded.
1091
+ #
1092
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter#operator
1093
+ module Operator
1094
+ extend Orb::Internal::Type::Enum
1095
+
1096
+ INCLUDES = :includes
1097
+ EXCLUDES = :excludes
1098
+
1099
+ # @!method self.values
1100
+ # @return [Array<Symbol>]
1101
+ end
1102
+ end
724
1103
  end
725
1104
 
726
1105
  # @!method self.variants
@@ -787,12 +1166,6 @@ module Orb
787
1166
  # @return [String]
788
1167
  required :amount_discount, String
789
1168
 
790
- # @!attribute applies_to_price_ids
791
- # The price ids that this discount interval applies to.
792
- #
793
- # @return [Array<String>]
794
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
795
-
796
1169
  # @!attribute applies_to_price_interval_ids
797
1170
  # The price interval ids that this discount interval applies to.
798
1171
  #
@@ -810,33 +1183,92 @@ module Orb
810
1183
  # @return [Time, nil]
811
1184
  required :end_date, Time, nil?: true
812
1185
 
1186
+ # @!attribute filters
1187
+ # The filters that determine which prices this discount interval applies to.
1188
+ #
1189
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter>]
1190
+ required :filters,
1191
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter] }
1192
+
813
1193
  # @!attribute start_date
814
1194
  # The start date of the discount interval.
815
1195
  #
816
1196
  # @return [Time]
817
1197
  required :start_date, Time
818
1198
 
819
- # @!method initialize(amount_discount:, applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, start_date:, discount_type: :amount)
1199
+ # @!method initialize(amount_discount:, applies_to_price_interval_ids:, end_date:, filters:, start_date:, discount_type: :amount)
820
1200
  # @param amount_discount [String] Only available if discount_type is `amount`.
821
1201
  #
822
- # @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
823
- #
824
1202
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
825
1203
  #
826
1204
  # @param end_date [Time, nil] The end date of the discount interval.
827
1205
  #
1206
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter>] The filters that determine which prices this discount interval applies to.
1207
+ #
828
1208
  # @param start_date [Time] The start date of the discount interval.
829
1209
  #
830
1210
  # @param discount_type [Symbol, :amount]
1211
+
1212
+ class Filter < Orb::Internal::Type::BaseModel
1213
+ # @!attribute field
1214
+ # The property of the price to filter on.
1215
+ #
1216
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter::Field]
1217
+ required :field,
1218
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter::Field }
1219
+
1220
+ # @!attribute operator
1221
+ # Should prices that match the filter be included or excluded.
1222
+ #
1223
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter::Operator]
1224
+ required :operator,
1225
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter::Operator }
1226
+
1227
+ # @!attribute values
1228
+ # The IDs or values that match this filter.
1229
+ #
1230
+ # @return [Array<String>]
1231
+ required :values, Orb::Internal::Type::ArrayOf[String]
1232
+
1233
+ # @!method initialize(field:, operator:, values:)
1234
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter::Field] The property of the price to filter on.
1235
+ #
1236
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter::Operator] Should prices that match the filter be included or excluded.
1237
+ #
1238
+ # @param values [Array<String>] The IDs or values that match this filter.
1239
+
1240
+ # The property of the price to filter on.
1241
+ #
1242
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter#field
1243
+ module Field
1244
+ extend Orb::Internal::Type::Enum
1245
+
1246
+ PRICE_ID = :price_id
1247
+ ITEM_ID = :item_id
1248
+ PRICE_TYPE = :price_type
1249
+ CURRENCY = :currency
1250
+ PRICING_UNIT_ID = :pricing_unit_id
1251
+
1252
+ # @!method self.values
1253
+ # @return [Array<Symbol>]
1254
+ end
1255
+
1256
+ # Should prices that match the filter be included or excluded.
1257
+ #
1258
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount::Filter#operator
1259
+ module Operator
1260
+ extend Orb::Internal::Type::Enum
1261
+
1262
+ INCLUDES = :includes
1263
+ EXCLUDES = :excludes
1264
+
1265
+ # @!method self.values
1266
+ # @return [Array<Symbol>]
1267
+ end
1268
+ end
831
1269
  end
832
1270
 
833
1271
  class Percentage < Orb::Internal::Type::BaseModel
834
- # @!attribute applies_to_price_ids
835
- # The price ids that this discount interval applies to.
836
- #
837
- # @return [Array<String>]
838
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
839
-
840
1272
  # @!attribute applies_to_price_interval_ids
841
1273
  # The price interval ids that this discount interval applies to.
842
1274
  #
@@ -854,6 +1286,13 @@ module Orb
854
1286
  # @return [Time, nil]
855
1287
  required :end_date, Time, nil?: true
856
1288
 
1289
+ # @!attribute filters
1290
+ # The filters that determine which prices this discount interval applies to.
1291
+ #
1292
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter>]
1293
+ required :filters,
1294
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter] }
1295
+
857
1296
  # @!attribute percentage_discount
858
1297
  # Only available if discount_type is `percentage`.This is a number between 0
859
1298
  # and 1.
@@ -867,31 +1306,83 @@ module Orb
867
1306
  # @return [Time]
868
1307
  required :start_date, Time
869
1308
 
870
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, percentage_discount:, start_date:, discount_type: :percentage)
1309
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, percentage_discount:, start_date:, discount_type: :percentage)
871
1310
  # Some parameter documentations has been truncated, see
872
1311
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage}
873
1312
  # for more details.
874
1313
  #
875
- # @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
876
- #
877
1314
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
878
1315
  #
879
1316
  # @param end_date [Time, nil] The end date of the discount interval.
880
1317
  #
1318
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter>] The filters that determine which prices this discount interval applies to.
1319
+ #
881
1320
  # @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
882
1321
  #
883
1322
  # @param start_date [Time] The start date of the discount interval.
884
1323
  #
885
1324
  # @param discount_type [Symbol, :percentage]
1325
+
1326
+ class Filter < Orb::Internal::Type::BaseModel
1327
+ # @!attribute field
1328
+ # The property of the price to filter on.
1329
+ #
1330
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter::Field]
1331
+ required :field,
1332
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter::Field }
1333
+
1334
+ # @!attribute operator
1335
+ # Should prices that match the filter be included or excluded.
1336
+ #
1337
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter::Operator]
1338
+ required :operator,
1339
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter::Operator }
1340
+
1341
+ # @!attribute values
1342
+ # The IDs or values that match this filter.
1343
+ #
1344
+ # @return [Array<String>]
1345
+ required :values, Orb::Internal::Type::ArrayOf[String]
1346
+
1347
+ # @!method initialize(field:, operator:, values:)
1348
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter::Field] The property of the price to filter on.
1349
+ #
1350
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter::Operator] Should prices that match the filter be included or excluded.
1351
+ #
1352
+ # @param values [Array<String>] The IDs or values that match this filter.
1353
+
1354
+ # The property of the price to filter on.
1355
+ #
1356
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter#field
1357
+ module Field
1358
+ extend Orb::Internal::Type::Enum
1359
+
1360
+ PRICE_ID = :price_id
1361
+ ITEM_ID = :item_id
1362
+ PRICE_TYPE = :price_type
1363
+ CURRENCY = :currency
1364
+ PRICING_UNIT_ID = :pricing_unit_id
1365
+
1366
+ # @!method self.values
1367
+ # @return [Array<Symbol>]
1368
+ end
1369
+
1370
+ # Should prices that match the filter be included or excluded.
1371
+ #
1372
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage::Filter#operator
1373
+ module Operator
1374
+ extend Orb::Internal::Type::Enum
1375
+
1376
+ INCLUDES = :includes
1377
+ EXCLUDES = :excludes
1378
+
1379
+ # @!method self.values
1380
+ # @return [Array<Symbol>]
1381
+ end
1382
+ end
886
1383
  end
887
1384
 
888
1385
  class Usage < Orb::Internal::Type::BaseModel
889
- # @!attribute applies_to_price_ids
890
- # The price ids that this discount interval applies to.
891
- #
892
- # @return [Array<String>]
893
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
894
-
895
1386
  # @!attribute applies_to_price_interval_ids
896
1387
  # The price interval ids that this discount interval applies to.
897
1388
  #
@@ -909,6 +1400,13 @@ module Orb
909
1400
  # @return [Time, nil]
910
1401
  required :end_date, Time, nil?: true
911
1402
 
1403
+ # @!attribute filters
1404
+ # The filters that determine which prices this discount interval applies to.
1405
+ #
1406
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter>]
1407
+ required :filters,
1408
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter] }
1409
+
912
1410
  # @!attribute start_date
913
1411
  # The start date of the discount interval.
914
1412
  #
@@ -922,22 +1420,80 @@ module Orb
922
1420
  # @return [Float]
923
1421
  required :usage_discount, Float
924
1422
 
925
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, start_date:, usage_discount:, discount_type: :usage)
1423
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, start_date:, usage_discount:, discount_type: :usage)
926
1424
  # Some parameter documentations has been truncated, see
927
1425
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage}
928
1426
  # for more details.
929
1427
  #
930
- # @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
931
- #
932
1428
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
933
1429
  #
934
1430
  # @param end_date [Time, nil] The end date of the discount interval.
935
1431
  #
1432
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter>] The filters that determine which prices this discount interval applies to.
1433
+ #
936
1434
  # @param start_date [Time] The start date of the discount interval.
937
1435
  #
938
1436
  # @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
939
1437
  #
940
1438
  # @param discount_type [Symbol, :usage]
1439
+
1440
+ class Filter < Orb::Internal::Type::BaseModel
1441
+ # @!attribute field
1442
+ # The property of the price to filter on.
1443
+ #
1444
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter::Field]
1445
+ required :field,
1446
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter::Field }
1447
+
1448
+ # @!attribute operator
1449
+ # Should prices that match the filter be included or excluded.
1450
+ #
1451
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter::Operator]
1452
+ required :operator,
1453
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter::Operator }
1454
+
1455
+ # @!attribute values
1456
+ # The IDs or values that match this filter.
1457
+ #
1458
+ # @return [Array<String>]
1459
+ required :values, Orb::Internal::Type::ArrayOf[String]
1460
+
1461
+ # @!method initialize(field:, operator:, values:)
1462
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter::Field] The property of the price to filter on.
1463
+ #
1464
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter::Operator] Should prices that match the filter be included or excluded.
1465
+ #
1466
+ # @param values [Array<String>] The IDs or values that match this filter.
1467
+
1468
+ # The property of the price to filter on.
1469
+ #
1470
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter#field
1471
+ module Field
1472
+ extend Orb::Internal::Type::Enum
1473
+
1474
+ PRICE_ID = :price_id
1475
+ ITEM_ID = :item_id
1476
+ PRICE_TYPE = :price_type
1477
+ CURRENCY = :currency
1478
+ PRICING_UNIT_ID = :pricing_unit_id
1479
+
1480
+ # @!method self.values
1481
+ # @return [Array<Symbol>]
1482
+ end
1483
+
1484
+ # Should prices that match the filter be included or excluded.
1485
+ #
1486
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage::Filter#operator
1487
+ module Operator
1488
+ extend Orb::Internal::Type::Enum
1489
+
1490
+ INCLUDES = :includes
1491
+ EXCLUDES = :excludes
1492
+
1493
+ # @!method self.values
1494
+ # @return [Array<Symbol>]
1495
+ end
1496
+ end
941
1497
  end
942
1498
 
943
1499
  # @!method self.variants
@@ -973,12 +1529,6 @@ module Orb
973
1529
  end
974
1530
 
975
1531
  class MaximumInterval < Orb::Internal::Type::BaseModel
976
- # @!attribute applies_to_price_ids
977
- # The price ids that this maximum interval applies to.
978
- #
979
- # @return [Array<String>]
980
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
981
-
982
1532
  # @!attribute applies_to_price_interval_ids
983
1533
  # The price interval ids that this maximum interval applies to.
984
1534
  #
@@ -991,6 +1541,13 @@ module Orb
991
1541
  # @return [Time, nil]
992
1542
  required :end_date, Time, nil?: true
993
1543
 
1544
+ # @!attribute filters
1545
+ # The filters that determine which prices this maximum interval applies to.
1546
+ #
1547
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter>]
1548
+ required :filters,
1549
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter] }
1550
+
994
1551
  # @!attribute maximum_amount
995
1552
  # The maximum amount to charge in a given billing period for the price intervals
996
1553
  # this transform applies to.
@@ -1004,29 +1561,81 @@ module Orb
1004
1561
  # @return [Time]
1005
1562
  required :start_date, Time
1006
1563
 
1007
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:)
1564
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, maximum_amount:, start_date:)
1008
1565
  # Some parameter documentations has been truncated, see
1009
1566
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval}
1010
1567
  # for more details.
1011
1568
  #
1012
- # @param applies_to_price_ids [Array<String>] The price ids that this maximum interval applies to.
1013
- #
1014
1569
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this maximum interval applies to.
1015
1570
  #
1016
1571
  # @param end_date [Time, nil] The end date of the maximum interval.
1017
1572
  #
1573
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter>] The filters that determine which prices this maximum interval applies to.
1574
+ #
1018
1575
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
1019
1576
  #
1020
1577
  # @param start_date [Time] The start date of the maximum interval.
1578
+
1579
+ class Filter < Orb::Internal::Type::BaseModel
1580
+ # @!attribute field
1581
+ # The property of the price to filter on.
1582
+ #
1583
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter::Field]
1584
+ required :field,
1585
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter::Field }
1586
+
1587
+ # @!attribute operator
1588
+ # Should prices that match the filter be included or excluded.
1589
+ #
1590
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter::Operator]
1591
+ required :operator,
1592
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter::Operator }
1593
+
1594
+ # @!attribute values
1595
+ # The IDs or values that match this filter.
1596
+ #
1597
+ # @return [Array<String>]
1598
+ required :values, Orb::Internal::Type::ArrayOf[String]
1599
+
1600
+ # @!method initialize(field:, operator:, values:)
1601
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter::Field] The property of the price to filter on.
1602
+ #
1603
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
1604
+ #
1605
+ # @param values [Array<String>] The IDs or values that match this filter.
1606
+
1607
+ # The property of the price to filter on.
1608
+ #
1609
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter#field
1610
+ module Field
1611
+ extend Orb::Internal::Type::Enum
1612
+
1613
+ PRICE_ID = :price_id
1614
+ ITEM_ID = :item_id
1615
+ PRICE_TYPE = :price_type
1616
+ CURRENCY = :currency
1617
+ PRICING_UNIT_ID = :pricing_unit_id
1618
+
1619
+ # @!method self.values
1620
+ # @return [Array<Symbol>]
1621
+ end
1622
+
1623
+ # Should prices that match the filter be included or excluded.
1624
+ #
1625
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval::Filter#operator
1626
+ module Operator
1627
+ extend Orb::Internal::Type::Enum
1628
+
1629
+ INCLUDES = :includes
1630
+ EXCLUDES = :excludes
1631
+
1632
+ # @!method self.values
1633
+ # @return [Array<Symbol>]
1634
+ end
1635
+ end
1021
1636
  end
1022
1637
 
1023
1638
  class MinimumInterval < Orb::Internal::Type::BaseModel
1024
- # @!attribute applies_to_price_ids
1025
- # The price ids that this minimum interval applies to.
1026
- #
1027
- # @return [Array<String>]
1028
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
1029
-
1030
1639
  # @!attribute applies_to_price_interval_ids
1031
1640
  # The price interval ids that this minimum interval applies to.
1032
1641
  #
@@ -1039,6 +1648,13 @@ module Orb
1039
1648
  # @return [Time, nil]
1040
1649
  required :end_date, Time, nil?: true
1041
1650
 
1651
+ # @!attribute filters
1652
+ # The filters that determine which prices this minimum interval applies to.
1653
+ #
1654
+ # @return [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter>]
1655
+ required :filters,
1656
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter] }
1657
+
1042
1658
  # @!attribute minimum_amount
1043
1659
  # The minimum amount to charge in a given billing period for the price intervals
1044
1660
  # this minimum applies to.
@@ -1052,20 +1668,78 @@ module Orb
1052
1668
  # @return [Time]
1053
1669
  required :start_date, Time
1054
1670
 
1055
- # @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:)
1671
+ # @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, minimum_amount:, start_date:)
1056
1672
  # Some parameter documentations has been truncated, see
1057
1673
  # {Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval}
1058
1674
  # for more details.
1059
1675
  #
1060
- # @param applies_to_price_ids [Array<String>] The price ids that this minimum interval applies to.
1061
- #
1062
1676
  # @param applies_to_price_interval_ids [Array<String>] The price interval ids that this minimum interval applies to.
1063
1677
  #
1064
1678
  # @param end_date [Time, nil] The end date of the minimum interval.
1065
1679
  #
1680
+ # @param filters [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter>] The filters that determine which prices this minimum interval applies to.
1681
+ #
1066
1682
  # @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
1067
1683
  #
1068
1684
  # @param start_date [Time] The start date of the minimum interval.
1685
+
1686
+ class Filter < Orb::Internal::Type::BaseModel
1687
+ # @!attribute field
1688
+ # The property of the price to filter on.
1689
+ #
1690
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter::Field]
1691
+ required :field,
1692
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter::Field }
1693
+
1694
+ # @!attribute operator
1695
+ # Should prices that match the filter be included or excluded.
1696
+ #
1697
+ # @return [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter::Operator]
1698
+ required :operator,
1699
+ enum: -> { Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter::Operator }
1700
+
1701
+ # @!attribute values
1702
+ # The IDs or values that match this filter.
1703
+ #
1704
+ # @return [Array<String>]
1705
+ required :values, Orb::Internal::Type::ArrayOf[String]
1706
+
1707
+ # @!method initialize(field:, operator:, values:)
1708
+ # @param field [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter::Field] The property of the price to filter on.
1709
+ #
1710
+ # @param operator [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
1711
+ #
1712
+ # @param values [Array<String>] The IDs or values that match this filter.
1713
+
1714
+ # The property of the price to filter on.
1715
+ #
1716
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter#field
1717
+ module Field
1718
+ extend Orb::Internal::Type::Enum
1719
+
1720
+ PRICE_ID = :price_id
1721
+ ITEM_ID = :item_id
1722
+ PRICE_TYPE = :price_type
1723
+ CURRENCY = :currency
1724
+ PRICING_UNIT_ID = :pricing_unit_id
1725
+
1726
+ # @!method self.values
1727
+ # @return [Array<Symbol>]
1728
+ end
1729
+
1730
+ # Should prices that match the filter be included or excluded.
1731
+ #
1732
+ # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval::Filter#operator
1733
+ module Operator
1734
+ extend Orb::Internal::Type::Enum
1735
+
1736
+ INCLUDES = :includes
1737
+ EXCLUDES = :excludes
1738
+
1739
+ # @!method self.values
1740
+ # @return [Array<Symbol>]
1741
+ end
1742
+ end
1069
1743
  end
1070
1744
 
1071
1745
  # @see Orb::Models::SubscriptionChangeRetrieveResponse::Subscription#pending_subscription_change