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
@@ -20,9 +20,10 @@ module Orb
20
20
  maximum_intervals: ::Array[Orb::Subscription::MaximumInterval],
21
21
  metadata: ::Hash[Symbol, String],
22
22
  minimum_intervals: ::Array[Orb::Subscription::MinimumInterval],
23
+ name: String,
23
24
  net_terms: Integer,
24
25
  pending_subscription_change: Orb::Subscription::PendingSubscriptionChange?,
25
- plan: Orb::Plan,
26
+ plan: Orb::Plan?,
26
27
  price_intervals: ::Array[Orb::Subscription::PriceInterval],
27
28
  redeemed_coupon: Orb::Subscription::RedeemedCoupon?,
28
29
  start_date: Time,
@@ -67,11 +68,13 @@ module Orb
67
68
 
68
69
  attr_accessor minimum_intervals: ::Array[Orb::Subscription::MinimumInterval]
69
70
 
71
+ attr_accessor name: String
72
+
70
73
  attr_accessor net_terms: Integer
71
74
 
72
75
  attr_accessor pending_subscription_change: Orb::Subscription::PendingSubscriptionChange?
73
76
 
74
- attr_accessor plan: Orb::Plan
77
+ attr_accessor plan: Orb::Plan?
75
78
 
76
79
  attr_accessor price_intervals: ::Array[Orb::Subscription::PriceInterval]
77
80
 
@@ -102,9 +105,10 @@ module Orb
102
105
  maximum_intervals: ::Array[Orb::Subscription::MaximumInterval],
103
106
  metadata: ::Hash[Symbol, String],
104
107
  minimum_intervals: ::Array[Orb::Subscription::MinimumInterval],
108
+ name: String,
105
109
  net_terms: Integer,
106
110
  pending_subscription_change: Orb::Subscription::PendingSubscriptionChange?,
107
- plan: Orb::Plan,
111
+ plan: Orb::Plan?,
108
112
  price_intervals: ::Array[Orb::Subscription::PriceInterval],
109
113
  redeemed_coupon: Orb::Subscription::RedeemedCoupon?,
110
114
  start_date: Time,
@@ -131,9 +135,10 @@ module Orb
131
135
  maximum_intervals: ::Array[Orb::Subscription::MaximumInterval],
132
136
  metadata: ::Hash[Symbol, String],
133
137
  minimum_intervals: ::Array[Orb::Subscription::MinimumInterval],
138
+ name: String,
134
139
  net_terms: Integer,
135
140
  pending_subscription_change: Orb::Subscription::PendingSubscriptionChange?,
136
- plan: Orb::Plan,
141
+ plan: Orb::Plan?,
137
142
  price_intervals: ::Array[Orb::Subscription::PriceInterval],
138
143
  redeemed_coupon: Orb::Subscription::RedeemedCoupon?,
139
144
  start_date: Time,
@@ -192,6 +197,7 @@ module Orb
192
197
  id: String,
193
198
  adjustment_type: :usage_discount,
194
199
  applies_to_price_ids: ::Array[String],
200
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter],
195
201
  is_invoice_level: bool,
196
202
  plan_phase_order: Integer?,
197
203
  reason: String?,
@@ -205,6 +211,8 @@ module Orb
205
211
 
206
212
  attr_accessor applies_to_price_ids: ::Array[String]
207
213
 
214
+ attr_accessor filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter]
215
+
208
216
  attr_accessor is_invoice_level: bool
209
217
 
210
218
  attr_accessor plan_phase_order: Integer?
@@ -216,6 +224,7 @@ module Orb
216
224
  def initialize: (
217
225
  id: String,
218
226
  applies_to_price_ids: ::Array[String],
227
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter],
219
228
  is_invoice_level: bool,
220
229
  plan_phase_order: Integer?,
221
230
  reason: String?,
@@ -227,11 +236,69 @@ module Orb
227
236
  id: String,
228
237
  adjustment_type: :usage_discount,
229
238
  applies_to_price_ids: ::Array[String],
239
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter],
230
240
  is_invoice_level: bool,
231
241
  plan_phase_order: Integer?,
232
242
  reason: String?,
233
243
  usage_discount: Float
234
244
  }
245
+
246
+ type filter =
247
+ {
248
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::field,
249
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::operator,
250
+ values: ::Array[String]
251
+ }
252
+
253
+ class Filter < Orb::Internal::Type::BaseModel
254
+ attr_accessor field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::field
255
+
256
+ attr_accessor operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::operator
257
+
258
+ attr_accessor values: ::Array[String]
259
+
260
+ def initialize: (
261
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::field,
262
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::operator,
263
+ values: ::Array[String]
264
+ ) -> void
265
+
266
+ def to_hash: -> {
267
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::field,
268
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::operator,
269
+ values: ::Array[String]
270
+ }
271
+
272
+ type field =
273
+ :price_id
274
+ | :item_id
275
+ | :price_type
276
+ | :currency
277
+ | :pricing_unit_id
278
+
279
+ module Field
280
+ extend Orb::Internal::Type::Enum
281
+
282
+ PRICE_ID: :price_id
283
+ ITEM_ID: :item_id
284
+ PRICE_TYPE: :price_type
285
+ CURRENCY: :currency
286
+ PRICING_UNIT_ID: :pricing_unit_id
287
+
288
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::field]
289
+ end
290
+
291
+ type operator = :includes | :excludes
292
+
293
+ module Operator
294
+ extend Orb::Internal::Type::Enum
295
+
296
+ INCLUDES: :includes
297
+ EXCLUDES: :excludes
298
+
299
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::operator]
300
+ end
301
+ end
235
302
  end
236
303
 
237
304
  type amount_discount =
@@ -240,6 +307,7 @@ module Orb
240
307
  adjustment_type: :amount_discount,
241
308
  amount_discount: String,
242
309
  applies_to_price_ids: ::Array[String],
310
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter],
243
311
  is_invoice_level: bool,
244
312
  plan_phase_order: Integer?,
245
313
  reason: String?
@@ -254,6 +322,8 @@ module Orb
254
322
 
255
323
  attr_accessor applies_to_price_ids: ::Array[String]
256
324
 
325
+ attr_accessor filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter]
326
+
257
327
  attr_accessor is_invoice_level: bool
258
328
 
259
329
  attr_accessor plan_phase_order: Integer?
@@ -264,6 +334,7 @@ module Orb
264
334
  id: String,
265
335
  amount_discount: String,
266
336
  applies_to_price_ids: ::Array[String],
337
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter],
267
338
  is_invoice_level: bool,
268
339
  plan_phase_order: Integer?,
269
340
  reason: String?,
@@ -275,10 +346,68 @@ module Orb
275
346
  adjustment_type: :amount_discount,
276
347
  amount_discount: String,
277
348
  applies_to_price_ids: ::Array[String],
349
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter],
278
350
  is_invoice_level: bool,
279
351
  plan_phase_order: Integer?,
280
352
  reason: String?
281
353
  }
354
+
355
+ type filter =
356
+ {
357
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::field,
358
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::operator,
359
+ values: ::Array[String]
360
+ }
361
+
362
+ class Filter < Orb::Internal::Type::BaseModel
363
+ attr_accessor field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::field
364
+
365
+ attr_accessor operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::operator
366
+
367
+ attr_accessor values: ::Array[String]
368
+
369
+ def initialize: (
370
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::field,
371
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::operator,
372
+ values: ::Array[String]
373
+ ) -> void
374
+
375
+ def to_hash: -> {
376
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::field,
377
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::operator,
378
+ values: ::Array[String]
379
+ }
380
+
381
+ type field =
382
+ :price_id
383
+ | :item_id
384
+ | :price_type
385
+ | :currency
386
+ | :pricing_unit_id
387
+
388
+ module Field
389
+ extend Orb::Internal::Type::Enum
390
+
391
+ PRICE_ID: :price_id
392
+ ITEM_ID: :item_id
393
+ PRICE_TYPE: :price_type
394
+ CURRENCY: :currency
395
+ PRICING_UNIT_ID: :pricing_unit_id
396
+
397
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::field]
398
+ end
399
+
400
+ type operator = :includes | :excludes
401
+
402
+ module Operator
403
+ extend Orb::Internal::Type::Enum
404
+
405
+ INCLUDES: :includes
406
+ EXCLUDES: :excludes
407
+
408
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::operator]
409
+ end
410
+ end
282
411
  end
283
412
 
284
413
  type percentage_discount =
@@ -286,6 +415,7 @@ module Orb
286
415
  id: String,
287
416
  adjustment_type: :percentage_discount,
288
417
  applies_to_price_ids: ::Array[String],
418
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter],
289
419
  is_invoice_level: bool,
290
420
  percentage_discount: Float,
291
421
  plan_phase_order: Integer?,
@@ -299,6 +429,8 @@ module Orb
299
429
 
300
430
  attr_accessor applies_to_price_ids: ::Array[String]
301
431
 
432
+ attr_accessor filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter]
433
+
302
434
  attr_accessor is_invoice_level: bool
303
435
 
304
436
  attr_accessor percentage_discount: Float
@@ -310,6 +442,7 @@ module Orb
310
442
  def initialize: (
311
443
  id: String,
312
444
  applies_to_price_ids: ::Array[String],
445
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter],
313
446
  is_invoice_level: bool,
314
447
  percentage_discount: Float,
315
448
  plan_phase_order: Integer?,
@@ -321,11 +454,69 @@ module Orb
321
454
  id: String,
322
455
  adjustment_type: :percentage_discount,
323
456
  applies_to_price_ids: ::Array[String],
457
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter],
324
458
  is_invoice_level: bool,
325
459
  percentage_discount: Float,
326
460
  plan_phase_order: Integer?,
327
461
  reason: String?
328
462
  }
463
+
464
+ type filter =
465
+ {
466
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::field,
467
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::operator,
468
+ values: ::Array[String]
469
+ }
470
+
471
+ class Filter < Orb::Internal::Type::BaseModel
472
+ attr_accessor field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::field
473
+
474
+ attr_accessor operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::operator
475
+
476
+ attr_accessor values: ::Array[String]
477
+
478
+ def initialize: (
479
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::field,
480
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::operator,
481
+ values: ::Array[String]
482
+ ) -> void
483
+
484
+ def to_hash: -> {
485
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::field,
486
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::operator,
487
+ values: ::Array[String]
488
+ }
489
+
490
+ type field =
491
+ :price_id
492
+ | :item_id
493
+ | :price_type
494
+ | :currency
495
+ | :pricing_unit_id
496
+
497
+ module Field
498
+ extend Orb::Internal::Type::Enum
499
+
500
+ PRICE_ID: :price_id
501
+ ITEM_ID: :item_id
502
+ PRICE_TYPE: :price_type
503
+ CURRENCY: :currency
504
+ PRICING_UNIT_ID: :pricing_unit_id
505
+
506
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::field]
507
+ end
508
+
509
+ type operator = :includes | :excludes
510
+
511
+ module Operator
512
+ extend Orb::Internal::Type::Enum
513
+
514
+ INCLUDES: :includes
515
+ EXCLUDES: :excludes
516
+
517
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::operator]
518
+ end
519
+ end
329
520
  end
330
521
 
331
522
  type minimum =
@@ -333,6 +524,7 @@ module Orb
333
524
  id: String,
334
525
  adjustment_type: :minimum,
335
526
  applies_to_price_ids: ::Array[String],
527
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter],
336
528
  is_invoice_level: bool,
337
529
  item_id: String,
338
530
  minimum_amount: String,
@@ -347,6 +539,8 @@ module Orb
347
539
 
348
540
  attr_accessor applies_to_price_ids: ::Array[String]
349
541
 
542
+ attr_accessor filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter]
543
+
350
544
  attr_accessor is_invoice_level: bool
351
545
 
352
546
  attr_accessor item_id: String
@@ -360,6 +554,7 @@ module Orb
360
554
  def initialize: (
361
555
  id: String,
362
556
  applies_to_price_ids: ::Array[String],
557
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter],
363
558
  is_invoice_level: bool,
364
559
  item_id: String,
365
560
  minimum_amount: String,
@@ -372,12 +567,70 @@ module Orb
372
567
  id: String,
373
568
  adjustment_type: :minimum,
374
569
  applies_to_price_ids: ::Array[String],
570
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter],
375
571
  is_invoice_level: bool,
376
572
  item_id: String,
377
573
  minimum_amount: String,
378
574
  plan_phase_order: Integer?,
379
575
  reason: String?
380
576
  }
577
+
578
+ type filter =
579
+ {
580
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::field,
581
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::operator,
582
+ values: ::Array[String]
583
+ }
584
+
585
+ class Filter < Orb::Internal::Type::BaseModel
586
+ attr_accessor field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::field
587
+
588
+ attr_accessor operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::operator
589
+
590
+ attr_accessor values: ::Array[String]
591
+
592
+ def initialize: (
593
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::field,
594
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::operator,
595
+ values: ::Array[String]
596
+ ) -> void
597
+
598
+ def to_hash: -> {
599
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::field,
600
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::operator,
601
+ values: ::Array[String]
602
+ }
603
+
604
+ type field =
605
+ :price_id
606
+ | :item_id
607
+ | :price_type
608
+ | :currency
609
+ | :pricing_unit_id
610
+
611
+ module Field
612
+ extend Orb::Internal::Type::Enum
613
+
614
+ PRICE_ID: :price_id
615
+ ITEM_ID: :item_id
616
+ PRICE_TYPE: :price_type
617
+ CURRENCY: :currency
618
+ PRICING_UNIT_ID: :pricing_unit_id
619
+
620
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::field]
621
+ end
622
+
623
+ type operator = :includes | :excludes
624
+
625
+ module Operator
626
+ extend Orb::Internal::Type::Enum
627
+
628
+ INCLUDES: :includes
629
+ EXCLUDES: :excludes
630
+
631
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::operator]
632
+ end
633
+ end
381
634
  end
382
635
 
383
636
  type maximum =
@@ -385,6 +638,7 @@ module Orb
385
638
  id: String,
386
639
  adjustment_type: :maximum,
387
640
  applies_to_price_ids: ::Array[String],
641
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter],
388
642
  is_invoice_level: bool,
389
643
  maximum_amount: String,
390
644
  plan_phase_order: Integer?,
@@ -398,6 +652,8 @@ module Orb
398
652
 
399
653
  attr_accessor applies_to_price_ids: ::Array[String]
400
654
 
655
+ attr_accessor filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter]
656
+
401
657
  attr_accessor is_invoice_level: bool
402
658
 
403
659
  attr_accessor maximum_amount: String
@@ -409,6 +665,7 @@ module Orb
409
665
  def initialize: (
410
666
  id: String,
411
667
  applies_to_price_ids: ::Array[String],
668
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter],
412
669
  is_invoice_level: bool,
413
670
  maximum_amount: String,
414
671
  plan_phase_order: Integer?,
@@ -420,11 +677,69 @@ module Orb
420
677
  id: String,
421
678
  adjustment_type: :maximum,
422
679
  applies_to_price_ids: ::Array[String],
680
+ filters: ::Array[Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter],
423
681
  is_invoice_level: bool,
424
682
  maximum_amount: String,
425
683
  plan_phase_order: Integer?,
426
684
  reason: String?
427
685
  }
686
+
687
+ type filter =
688
+ {
689
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::field,
690
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::operator,
691
+ values: ::Array[String]
692
+ }
693
+
694
+ class Filter < Orb::Internal::Type::BaseModel
695
+ attr_accessor field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::field
696
+
697
+ attr_accessor operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::operator
698
+
699
+ attr_accessor values: ::Array[String]
700
+
701
+ def initialize: (
702
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::field,
703
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::operator,
704
+ values: ::Array[String]
705
+ ) -> void
706
+
707
+ def to_hash: -> {
708
+ field: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::field,
709
+ operator: Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::operator,
710
+ values: ::Array[String]
711
+ }
712
+
713
+ type field =
714
+ :price_id
715
+ | :item_id
716
+ | :price_type
717
+ | :currency
718
+ | :pricing_unit_id
719
+
720
+ module Field
721
+ extend Orb::Internal::Type::Enum
722
+
723
+ PRICE_ID: :price_id
724
+ ITEM_ID: :item_id
725
+ PRICE_TYPE: :price_type
726
+ CURRENCY: :currency
727
+ PRICING_UNIT_ID: :pricing_unit_id
728
+
729
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::field]
730
+ end
731
+
732
+ type operator = :includes | :excludes
733
+
734
+ module Operator
735
+ extend Orb::Internal::Type::Enum
736
+
737
+ INCLUDES: :includes
738
+ EXCLUDES: :excludes
739
+
740
+ def self?.values: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::operator]
741
+ end
742
+ end
428
743
  end
429
744
 
430
745
  def self?.variants: -> ::Array[Orb::Models::Subscription::AdjustmentInterval::adjustment]
@@ -461,127 +776,286 @@ module Orb
461
776
  type amount =
462
777
  {
463
778
  amount_discount: String,
464
- applies_to_price_ids: ::Array[String],
465
779
  applies_to_price_interval_ids: ::Array[String],
466
780
  discount_type: :amount,
467
781
  end_date: Time?,
782
+ filters: ::Array[Orb::Subscription::DiscountInterval::Amount::Filter],
468
783
  start_date: Time
469
784
  }
470
785
 
471
786
  class Amount < Orb::Internal::Type::BaseModel
472
787
  attr_accessor amount_discount: String
473
788
 
474
- attr_accessor applies_to_price_ids: ::Array[String]
475
-
476
789
  attr_accessor applies_to_price_interval_ids: ::Array[String]
477
790
 
478
791
  attr_accessor discount_type: :amount
479
792
 
480
793
  attr_accessor end_date: Time?
481
794
 
795
+ attr_accessor filters: ::Array[Orb::Subscription::DiscountInterval::Amount::Filter]
796
+
482
797
  attr_accessor start_date: Time
483
798
 
484
799
  def initialize: (
485
800
  amount_discount: String,
486
- applies_to_price_ids: ::Array[String],
487
801
  applies_to_price_interval_ids: ::Array[String],
488
802
  end_date: Time?,
803
+ filters: ::Array[Orb::Subscription::DiscountInterval::Amount::Filter],
489
804
  start_date: Time,
490
805
  ?discount_type: :amount
491
806
  ) -> void
492
807
 
493
808
  def to_hash: -> {
494
809
  amount_discount: String,
495
- applies_to_price_ids: ::Array[String],
496
810
  applies_to_price_interval_ids: ::Array[String],
497
811
  discount_type: :amount,
498
812
  end_date: Time?,
813
+ filters: ::Array[Orb::Subscription::DiscountInterval::Amount::Filter],
499
814
  start_date: Time
500
815
  }
816
+
817
+ type filter =
818
+ {
819
+ field: Orb::Models::Subscription::DiscountInterval::Amount::Filter::field,
820
+ operator: Orb::Models::Subscription::DiscountInterval::Amount::Filter::operator,
821
+ values: ::Array[String]
822
+ }
823
+
824
+ class Filter < Orb::Internal::Type::BaseModel
825
+ attr_accessor field: Orb::Models::Subscription::DiscountInterval::Amount::Filter::field
826
+
827
+ attr_accessor operator: Orb::Models::Subscription::DiscountInterval::Amount::Filter::operator
828
+
829
+ attr_accessor values: ::Array[String]
830
+
831
+ def initialize: (
832
+ field: Orb::Models::Subscription::DiscountInterval::Amount::Filter::field,
833
+ operator: Orb::Models::Subscription::DiscountInterval::Amount::Filter::operator,
834
+ values: ::Array[String]
835
+ ) -> void
836
+
837
+ def to_hash: -> {
838
+ field: Orb::Models::Subscription::DiscountInterval::Amount::Filter::field,
839
+ operator: Orb::Models::Subscription::DiscountInterval::Amount::Filter::operator,
840
+ values: ::Array[String]
841
+ }
842
+
843
+ type field =
844
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
845
+
846
+ module Field
847
+ extend Orb::Internal::Type::Enum
848
+
849
+ PRICE_ID: :price_id
850
+ ITEM_ID: :item_id
851
+ PRICE_TYPE: :price_type
852
+ CURRENCY: :currency
853
+ PRICING_UNIT_ID: :pricing_unit_id
854
+
855
+ def self?.values: -> ::Array[Orb::Models::Subscription::DiscountInterval::Amount::Filter::field]
856
+ end
857
+
858
+ type operator = :includes | :excludes
859
+
860
+ module Operator
861
+ extend Orb::Internal::Type::Enum
862
+
863
+ INCLUDES: :includes
864
+ EXCLUDES: :excludes
865
+
866
+ def self?.values: -> ::Array[Orb::Models::Subscription::DiscountInterval::Amount::Filter::operator]
867
+ end
868
+ end
501
869
  end
502
870
 
503
871
  type percentage =
504
872
  {
505
- applies_to_price_ids: ::Array[String],
506
873
  applies_to_price_interval_ids: ::Array[String],
507
874
  discount_type: :percentage,
508
875
  end_date: Time?,
876
+ filters: ::Array[Orb::Subscription::DiscountInterval::Percentage::Filter],
509
877
  percentage_discount: Float,
510
878
  start_date: Time
511
879
  }
512
880
 
513
881
  class Percentage < Orb::Internal::Type::BaseModel
514
- attr_accessor applies_to_price_ids: ::Array[String]
515
-
516
882
  attr_accessor applies_to_price_interval_ids: ::Array[String]
517
883
 
518
884
  attr_accessor discount_type: :percentage
519
885
 
520
886
  attr_accessor end_date: Time?
521
887
 
888
+ attr_accessor filters: ::Array[Orb::Subscription::DiscountInterval::Percentage::Filter]
889
+
522
890
  attr_accessor percentage_discount: Float
523
891
 
524
892
  attr_accessor start_date: Time
525
893
 
526
894
  def initialize: (
527
- applies_to_price_ids: ::Array[String],
528
895
  applies_to_price_interval_ids: ::Array[String],
529
896
  end_date: Time?,
897
+ filters: ::Array[Orb::Subscription::DiscountInterval::Percentage::Filter],
530
898
  percentage_discount: Float,
531
899
  start_date: Time,
532
900
  ?discount_type: :percentage
533
901
  ) -> void
534
902
 
535
903
  def to_hash: -> {
536
- applies_to_price_ids: ::Array[String],
537
904
  applies_to_price_interval_ids: ::Array[String],
538
905
  discount_type: :percentage,
539
906
  end_date: Time?,
907
+ filters: ::Array[Orb::Subscription::DiscountInterval::Percentage::Filter],
540
908
  percentage_discount: Float,
541
909
  start_date: Time
542
910
  }
911
+
912
+ type filter =
913
+ {
914
+ field: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::field,
915
+ operator: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::operator,
916
+ values: ::Array[String]
917
+ }
918
+
919
+ class Filter < Orb::Internal::Type::BaseModel
920
+ attr_accessor field: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::field
921
+
922
+ attr_accessor operator: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::operator
923
+
924
+ attr_accessor values: ::Array[String]
925
+
926
+ def initialize: (
927
+ field: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::field,
928
+ operator: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::operator,
929
+ values: ::Array[String]
930
+ ) -> void
931
+
932
+ def to_hash: -> {
933
+ field: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::field,
934
+ operator: Orb::Models::Subscription::DiscountInterval::Percentage::Filter::operator,
935
+ values: ::Array[String]
936
+ }
937
+
938
+ type field =
939
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
940
+
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
+ def self?.values: -> ::Array[Orb::Models::Subscription::DiscountInterval::Percentage::Filter::field]
951
+ end
952
+
953
+ type operator = :includes | :excludes
954
+
955
+ module Operator
956
+ extend Orb::Internal::Type::Enum
957
+
958
+ INCLUDES: :includes
959
+ EXCLUDES: :excludes
960
+
961
+ def self?.values: -> ::Array[Orb::Models::Subscription::DiscountInterval::Percentage::Filter::operator]
962
+ end
963
+ end
543
964
  end
544
965
 
545
966
  type usage =
546
967
  {
547
- applies_to_price_ids: ::Array[String],
548
968
  applies_to_price_interval_ids: ::Array[String],
549
969
  discount_type: :usage,
550
970
  end_date: Time?,
971
+ filters: ::Array[Orb::Subscription::DiscountInterval::Usage::Filter],
551
972
  start_date: Time,
552
973
  usage_discount: Float
553
974
  }
554
975
 
555
976
  class Usage < Orb::Internal::Type::BaseModel
556
- attr_accessor applies_to_price_ids: ::Array[String]
557
-
558
977
  attr_accessor applies_to_price_interval_ids: ::Array[String]
559
978
 
560
979
  attr_accessor discount_type: :usage
561
980
 
562
981
  attr_accessor end_date: Time?
563
982
 
983
+ attr_accessor filters: ::Array[Orb::Subscription::DiscountInterval::Usage::Filter]
984
+
564
985
  attr_accessor start_date: Time
565
986
 
566
987
  attr_accessor usage_discount: Float
567
988
 
568
989
  def initialize: (
569
- applies_to_price_ids: ::Array[String],
570
990
  applies_to_price_interval_ids: ::Array[String],
571
991
  end_date: Time?,
992
+ filters: ::Array[Orb::Subscription::DiscountInterval::Usage::Filter],
572
993
  start_date: Time,
573
994
  usage_discount: Float,
574
995
  ?discount_type: :usage
575
996
  ) -> void
576
997
 
577
998
  def to_hash: -> {
578
- applies_to_price_ids: ::Array[String],
579
999
  applies_to_price_interval_ids: ::Array[String],
580
1000
  discount_type: :usage,
581
1001
  end_date: Time?,
1002
+ filters: ::Array[Orb::Subscription::DiscountInterval::Usage::Filter],
582
1003
  start_date: Time,
583
1004
  usage_discount: Float
584
1005
  }
1006
+
1007
+ type filter =
1008
+ {
1009
+ field: Orb::Models::Subscription::DiscountInterval::Usage::Filter::field,
1010
+ operator: Orb::Models::Subscription::DiscountInterval::Usage::Filter::operator,
1011
+ values: ::Array[String]
1012
+ }
1013
+
1014
+ class Filter < Orb::Internal::Type::BaseModel
1015
+ attr_accessor field: Orb::Models::Subscription::DiscountInterval::Usage::Filter::field
1016
+
1017
+ attr_accessor operator: Orb::Models::Subscription::DiscountInterval::Usage::Filter::operator
1018
+
1019
+ attr_accessor values: ::Array[String]
1020
+
1021
+ def initialize: (
1022
+ field: Orb::Models::Subscription::DiscountInterval::Usage::Filter::field,
1023
+ operator: Orb::Models::Subscription::DiscountInterval::Usage::Filter::operator,
1024
+ values: ::Array[String]
1025
+ ) -> void
1026
+
1027
+ def to_hash: -> {
1028
+ field: Orb::Models::Subscription::DiscountInterval::Usage::Filter::field,
1029
+ operator: Orb::Models::Subscription::DiscountInterval::Usage::Filter::operator,
1030
+ values: ::Array[String]
1031
+ }
1032
+
1033
+ type field =
1034
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
1035
+
1036
+ module Field
1037
+ extend Orb::Internal::Type::Enum
1038
+
1039
+ PRICE_ID: :price_id
1040
+ ITEM_ID: :item_id
1041
+ PRICE_TYPE: :price_type
1042
+ CURRENCY: :currency
1043
+ PRICING_UNIT_ID: :pricing_unit_id
1044
+
1045
+ def self?.values: -> ::Array[Orb::Models::Subscription::DiscountInterval::Usage::Filter::field]
1046
+ end
1047
+
1048
+ type operator = :includes | :excludes
1049
+
1050
+ module Operator
1051
+ extend Orb::Internal::Type::Enum
1052
+
1053
+ INCLUDES: :includes
1054
+ EXCLUDES: :excludes
1055
+
1056
+ def self?.values: -> ::Array[Orb::Models::Subscription::DiscountInterval::Usage::Filter::operator]
1057
+ end
1058
+ end
585
1059
  end
586
1060
 
587
1061
  def self?.variants: -> ::Array[Orb::Models::Subscription::discount_interval]
@@ -616,76 +1090,182 @@ module Orb
616
1090
 
617
1091
  type maximum_interval =
618
1092
  {
619
- applies_to_price_ids: ::Array[String],
620
1093
  applies_to_price_interval_ids: ::Array[String],
621
1094
  end_date: Time?,
1095
+ filters: ::Array[Orb::Subscription::MaximumInterval::Filter],
622
1096
  maximum_amount: String,
623
1097
  start_date: Time
624
1098
  }
625
1099
 
626
1100
  class MaximumInterval < Orb::Internal::Type::BaseModel
627
- attr_accessor applies_to_price_ids: ::Array[String]
628
-
629
1101
  attr_accessor applies_to_price_interval_ids: ::Array[String]
630
1102
 
631
1103
  attr_accessor end_date: Time?
632
1104
 
1105
+ attr_accessor filters: ::Array[Orb::Subscription::MaximumInterval::Filter]
1106
+
633
1107
  attr_accessor maximum_amount: String
634
1108
 
635
1109
  attr_accessor start_date: Time
636
1110
 
637
1111
  def initialize: (
638
- applies_to_price_ids: ::Array[String],
639
1112
  applies_to_price_interval_ids: ::Array[String],
640
1113
  end_date: Time?,
1114
+ filters: ::Array[Orb::Subscription::MaximumInterval::Filter],
641
1115
  maximum_amount: String,
642
1116
  start_date: Time
643
1117
  ) -> void
644
1118
 
645
1119
  def to_hash: -> {
646
- applies_to_price_ids: ::Array[String],
647
1120
  applies_to_price_interval_ids: ::Array[String],
648
1121
  end_date: Time?,
1122
+ filters: ::Array[Orb::Subscription::MaximumInterval::Filter],
649
1123
  maximum_amount: String,
650
1124
  start_date: Time
651
1125
  }
1126
+
1127
+ type filter =
1128
+ {
1129
+ field: Orb::Models::Subscription::MaximumInterval::Filter::field,
1130
+ operator: Orb::Models::Subscription::MaximumInterval::Filter::operator,
1131
+ values: ::Array[String]
1132
+ }
1133
+
1134
+ class Filter < Orb::Internal::Type::BaseModel
1135
+ attr_accessor field: Orb::Models::Subscription::MaximumInterval::Filter::field
1136
+
1137
+ attr_accessor operator: Orb::Models::Subscription::MaximumInterval::Filter::operator
1138
+
1139
+ attr_accessor values: ::Array[String]
1140
+
1141
+ def initialize: (
1142
+ field: Orb::Models::Subscription::MaximumInterval::Filter::field,
1143
+ operator: Orb::Models::Subscription::MaximumInterval::Filter::operator,
1144
+ values: ::Array[String]
1145
+ ) -> void
1146
+
1147
+ def to_hash: -> {
1148
+ field: Orb::Models::Subscription::MaximumInterval::Filter::field,
1149
+ operator: Orb::Models::Subscription::MaximumInterval::Filter::operator,
1150
+ values: ::Array[String]
1151
+ }
1152
+
1153
+ type field =
1154
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
1155
+
1156
+ module Field
1157
+ extend Orb::Internal::Type::Enum
1158
+
1159
+ PRICE_ID: :price_id
1160
+ ITEM_ID: :item_id
1161
+ PRICE_TYPE: :price_type
1162
+ CURRENCY: :currency
1163
+ PRICING_UNIT_ID: :pricing_unit_id
1164
+
1165
+ def self?.values: -> ::Array[Orb::Models::Subscription::MaximumInterval::Filter::field]
1166
+ end
1167
+
1168
+ type operator = :includes | :excludes
1169
+
1170
+ module Operator
1171
+ extend Orb::Internal::Type::Enum
1172
+
1173
+ INCLUDES: :includes
1174
+ EXCLUDES: :excludes
1175
+
1176
+ def self?.values: -> ::Array[Orb::Models::Subscription::MaximumInterval::Filter::operator]
1177
+ end
1178
+ end
652
1179
  end
653
1180
 
654
1181
  type minimum_interval =
655
1182
  {
656
- applies_to_price_ids: ::Array[String],
657
1183
  applies_to_price_interval_ids: ::Array[String],
658
1184
  end_date: Time?,
1185
+ filters: ::Array[Orb::Subscription::MinimumInterval::Filter],
659
1186
  minimum_amount: String,
660
1187
  start_date: Time
661
1188
  }
662
1189
 
663
1190
  class MinimumInterval < Orb::Internal::Type::BaseModel
664
- attr_accessor applies_to_price_ids: ::Array[String]
665
-
666
1191
  attr_accessor applies_to_price_interval_ids: ::Array[String]
667
1192
 
668
1193
  attr_accessor end_date: Time?
669
1194
 
1195
+ attr_accessor filters: ::Array[Orb::Subscription::MinimumInterval::Filter]
1196
+
670
1197
  attr_accessor minimum_amount: String
671
1198
 
672
1199
  attr_accessor start_date: Time
673
1200
 
674
1201
  def initialize: (
675
- applies_to_price_ids: ::Array[String],
676
1202
  applies_to_price_interval_ids: ::Array[String],
677
1203
  end_date: Time?,
1204
+ filters: ::Array[Orb::Subscription::MinimumInterval::Filter],
678
1205
  minimum_amount: String,
679
1206
  start_date: Time
680
1207
  ) -> void
681
1208
 
682
1209
  def to_hash: -> {
683
- applies_to_price_ids: ::Array[String],
684
1210
  applies_to_price_interval_ids: ::Array[String],
685
1211
  end_date: Time?,
1212
+ filters: ::Array[Orb::Subscription::MinimumInterval::Filter],
686
1213
  minimum_amount: String,
687
1214
  start_date: Time
688
1215
  }
1216
+
1217
+ type filter =
1218
+ {
1219
+ field: Orb::Models::Subscription::MinimumInterval::Filter::field,
1220
+ operator: Orb::Models::Subscription::MinimumInterval::Filter::operator,
1221
+ values: ::Array[String]
1222
+ }
1223
+
1224
+ class Filter < Orb::Internal::Type::BaseModel
1225
+ attr_accessor field: Orb::Models::Subscription::MinimumInterval::Filter::field
1226
+
1227
+ attr_accessor operator: Orb::Models::Subscription::MinimumInterval::Filter::operator
1228
+
1229
+ attr_accessor values: ::Array[String]
1230
+
1231
+ def initialize: (
1232
+ field: Orb::Models::Subscription::MinimumInterval::Filter::field,
1233
+ operator: Orb::Models::Subscription::MinimumInterval::Filter::operator,
1234
+ values: ::Array[String]
1235
+ ) -> void
1236
+
1237
+ def to_hash: -> {
1238
+ field: Orb::Models::Subscription::MinimumInterval::Filter::field,
1239
+ operator: Orb::Models::Subscription::MinimumInterval::Filter::operator,
1240
+ values: ::Array[String]
1241
+ }
1242
+
1243
+ type field =
1244
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
1245
+
1246
+ module Field
1247
+ extend Orb::Internal::Type::Enum
1248
+
1249
+ PRICE_ID: :price_id
1250
+ ITEM_ID: :item_id
1251
+ PRICE_TYPE: :price_type
1252
+ CURRENCY: :currency
1253
+ PRICING_UNIT_ID: :pricing_unit_id
1254
+
1255
+ def self?.values: -> ::Array[Orb::Models::Subscription::MinimumInterval::Filter::field]
1256
+ end
1257
+
1258
+ type operator = :includes | :excludes
1259
+
1260
+ module Operator
1261
+ extend Orb::Internal::Type::Enum
1262
+
1263
+ INCLUDES: :includes
1264
+ EXCLUDES: :excludes
1265
+
1266
+ def self?.values: -> ::Array[Orb::Models::Subscription::MinimumInterval::Filter::operator]
1267
+ end
1268
+ end
689
1269
  end
690
1270
 
691
1271
  type pending_subscription_change = { id: String }