orb-billing 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/base_model.rb +2 -2
- data/lib/orb/internal/type/union.rb +6 -6
- data/lib/orb/internal/util.rb +5 -1
- data/lib/orb/models/alert.rb +33 -1
- data/lib/orb/models/amount_discount.rb +10 -10
- data/lib/orb/models/credit_note_create_params.rb +9 -9
- data/lib/orb/models/customer_create_params.rb +21 -3
- data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
- data/lib/orb/models/customer_update_params.rb +21 -3
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
- data/lib/orb/models/invoice.rb +626 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
- data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
- data/lib/orb/models/item.rb +18 -1
- data/lib/orb/models/item_archive_params.rb +14 -0
- data/lib/orb/models/item_create_params.rb +14 -1
- data/lib/orb/models/item_update_params.rb +16 -1
- data/lib/orb/models/percentage_discount.rb +10 -10
- data/lib/orb/models/plan.rb +618 -9
- data/lib/orb/models/plan_create_params.rb +2066 -30
- data/lib/orb/models/plan_set_default_version_params.rb +22 -0
- data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
- data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
- data/lib/orb/models/plans/version_create_params.rb +17794 -0
- data/lib/orb/models/plans/version_create_response.rb +814 -0
- data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
- data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
- data/lib/orb/models/price.rb +4124 -70
- data/lib/orb/models/price_create_params.rb +45 -1
- data/lib/orb/models/price_evaluate_params.rb +8529 -21
- data/lib/orb/models/price_evaluate_response.rb +38 -3
- data/lib/orb/models/subscription.rb +730 -54
- data/lib/orb/models/subscription_cancel_response.rb +706 -54
- data/lib/orb/models/subscription_change_apply_response.rb +728 -54
- data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
- data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
- data/lib/orb/models/subscription_create_params.rb +5992 -1698
- data/lib/orb/models/subscription_create_response.rb +706 -54
- data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
- data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
- data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
- data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
- data/lib/orb/models/subscription_update_trial_response.rb +706 -54
- data/lib/orb/models/trial_discount.rb +10 -10
- data/lib/orb/models/usage_discount.rb +10 -10
- data/lib/orb/models.rb +4 -0
- data/lib/orb/resources/credit_notes.rb +3 -3
- data/lib/orb/resources/customers/balance_transactions.rb +0 -7
- data/lib/orb/resources/customers.rb +4 -7
- data/lib/orb/resources/dimensional_price_groups.rb +1 -1
- data/lib/orb/resources/items.rb +34 -2
- data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
- data/lib/orb/resources/plans/external_plan_id.rb +32 -1
- data/lib/orb/resources/plans/versions.rb +86 -0
- data/lib/orb/resources/plans.rb +33 -2
- data/lib/orb/resources/prices.rb +23 -17
- data/lib/orb/resources/subscriptions.rb +5 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +16 -1
- data/rbi/orb/models/alert.rbi +50 -3
- data/rbi/orb/models/amount_discount.rbi +8 -8
- data/rbi/orb/models/credit_note_create_params.rbi +8 -8
- data/rbi/orb/models/customer_create_params.rbi +38 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
- data/rbi/orb/models/customer_update_params.rbi +38 -4
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
- data/rbi/orb/models/invoice.rbi +1451 -35
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
- data/rbi/orb/models/item.rbi +20 -1
- data/rbi/orb/models/item_archive_params.rbi +25 -0
- data/rbi/orb/models/item_create_params.rbi +18 -1
- data/rbi/orb/models/item_update_params.rbi +17 -1
- data/rbi/orb/models/percentage_discount.rbi +10 -10
- data/rbi/orb/models/plan.rbi +1339 -4
- data/rbi/orb/models/plan_create_params.rbi +3833 -29
- data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
- data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
- data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
- data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
- data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
- data/rbi/orb/models/price.rbi +9447 -441
- data/rbi/orb/models/price_create_params.rbi +80 -0
- data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
- data/rbi/orb/models/price_evaluate_response.rbi +68 -5
- data/rbi/orb/models/subscription.rbi +1654 -44
- data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
- data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
- data/rbi/orb/models/subscription_create_response.rbi +1692 -44
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
- data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
- data/rbi/orb/models/trial_discount.rbi +8 -8
- data/rbi/orb/models/usage_discount.rbi +10 -10
- data/rbi/orb/models.rbi +4 -0
- data/rbi/orb/resources/credit_notes.rbi +3 -3
- data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
- data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
- data/rbi/orb/resources/customers.rbi +7 -7
- data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
- data/rbi/orb/resources/items.rbi +20 -0
- data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
- data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
- data/rbi/orb/resources/plans/versions.rbi +91 -0
- data/rbi/orb/resources/plans.rbi +27 -2
- data/rbi/orb/resources/prices.rbi +27 -17
- data/rbi/orb/resources/subscriptions.rbi +9 -1
- data/sig/orb/models/alert.rbs +20 -3
- data/sig/orb/models/amount_discount.rbs +5 -5
- data/sig/orb/models/credit_note_create_params.rbs +6 -6
- data/sig/orb/models/customer_create_params.rbs +13 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
- data/sig/orb/models/customer_update_params.rbs +13 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
- data/sig/orb/models/invoice.rbs +558 -4
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
- data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
- data/sig/orb/models/item.rbs +5 -0
- data/sig/orb/models/item_archive_params.rbs +14 -0
- data/sig/orb/models/item_create_params.rbs +10 -2
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/percentage_discount.rbs +5 -5
- data/sig/orb/models/plan.rbs +538 -4
- data/sig/orb/models/plan_create_params.rbs +1460 -3
- data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
- data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
- data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
- data/sig/orb/models/plans/version_create_params.rbs +12898 -0
- data/sig/orb/models/plans/version_create_response.rbs +662 -0
- data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
- data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
- data/sig/orb/models/price.rbs +3512 -96
- data/sig/orb/models/price_create_params.rbs +32 -0
- data/sig/orb/models/price_evaluate_params.rbs +6187 -10
- data/sig/orb/models/price_evaluate_response.rbs +41 -4
- data/sig/orb/models/subscription.rbs +609 -29
- data/sig/orb/models/subscription_cancel_response.rbs +609 -29
- data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
- data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
- data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
- data/sig/orb/models/subscription_create_params.rbs +4450 -1466
- data/sig/orb/models/subscription_create_response.rbs +609 -29
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
- data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
- data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
- data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
- data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
- data/sig/orb/models/trial_discount.rbs +5 -5
- data/sig/orb/models/usage_discount.rbs +5 -5
- data/sig/orb/models.rbs +4 -0
- data/sig/orb/resources/credit_notes.rbs +1 -1
- data/sig/orb/resources/items.rbs +7 -0
- data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
- data/sig/orb/resources/plans/versions.rbs +28 -0
- data/sig/orb/resources/plans.rbs +8 -0
- data/sig/orb/resources/prices.rbs +3 -3
- data/sig/orb/resources/subscriptions.rbs +2 -0
- metadata +41 -2
@@ -99,6 +99,8 @@ module Orb
|
|
99
99
|
required :default_invoice_memo, String, nil?: true
|
100
100
|
|
101
101
|
# @!attribute discount_intervals
|
102
|
+
# @deprecated
|
103
|
+
#
|
102
104
|
# The discount intervals for this subscription sorted by the start_date.
|
103
105
|
#
|
104
106
|
# @return [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage>]
|
@@ -123,6 +125,8 @@ module Orb
|
|
123
125
|
required :invoicing_threshold, String, nil?: true
|
124
126
|
|
125
127
|
# @!attribute maximum_intervals
|
128
|
+
# @deprecated
|
129
|
+
#
|
126
130
|
# The maximum intervals for this subscription sorted by the start_date.
|
127
131
|
#
|
128
132
|
# @return [Array<Orb::Models::SubscriptionCancelResponse::MaximumInterval>]
|
@@ -139,12 +143,20 @@ module Orb
|
|
139
143
|
required :metadata, Orb::Internal::Type::HashOf[String]
|
140
144
|
|
141
145
|
# @!attribute minimum_intervals
|
146
|
+
# @deprecated
|
147
|
+
#
|
142
148
|
# The minimum intervals for this subscription sorted by the start_date.
|
143
149
|
#
|
144
150
|
# @return [Array<Orb::Models::SubscriptionCancelResponse::MinimumInterval>]
|
145
151
|
required :minimum_intervals,
|
146
152
|
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::MinimumInterval] }
|
147
153
|
|
154
|
+
# @!attribute name
|
155
|
+
# The name of the subscription.
|
156
|
+
#
|
157
|
+
# @return [String]
|
158
|
+
required :name, String
|
159
|
+
|
148
160
|
# @!attribute net_terms
|
149
161
|
# Determines the difference between the invoice issue date for subscription
|
150
162
|
# invoices as the date that they are due. A value of `0` here represents that the
|
@@ -168,8 +180,8 @@ module Orb
|
|
168
180
|
# subscription. You can see more about how to configure prices in the
|
169
181
|
# [Price resource](/reference/price).
|
170
182
|
#
|
171
|
-
# @return [Orb::Models::Plan]
|
172
|
-
required :plan, -> { Orb::Plan }
|
183
|
+
# @return [Orb::Models::Plan, nil]
|
184
|
+
required :plan, -> { Orb::Plan }, nil?: true
|
173
185
|
|
174
186
|
# @!attribute price_intervals
|
175
187
|
# The price intervals for this subscription.
|
@@ -207,7 +219,7 @@ module Orb
|
|
207
219
|
# @return [Orb::Models::SubscriptionCancelResponse::ChangedResources, nil]
|
208
220
|
optional :changed_resources, -> { Orb::Models::SubscriptionCancelResponse::ChangedResources }, nil?: true
|
209
221
|
|
210
|
-
# @!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)
|
222
|
+
# @!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)
|
211
223
|
# Some parameter documentations has been truncated, see
|
212
224
|
# {Orb::Models::SubscriptionCancelResponse} for more details.
|
213
225
|
#
|
@@ -247,11 +259,13 @@ module Orb
|
|
247
259
|
#
|
248
260
|
# @param minimum_intervals [Array<Orb::Models::SubscriptionCancelResponse::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
249
261
|
#
|
262
|
+
# @param name [String] The name of the subscription.
|
263
|
+
#
|
250
264
|
# @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
|
251
265
|
#
|
252
266
|
# @param pending_subscription_change [Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
|
253
267
|
#
|
254
|
-
# @param plan [Orb::Models::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
268
|
+
# @param plan [Orb::Models::Plan, nil] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
255
269
|
#
|
256
270
|
# @param price_intervals [Array<Orb::Models::SubscriptionCancelResponse::PriceInterval>] The price intervals for this subscription.
|
257
271
|
#
|
@@ -337,11 +351,20 @@ module Orb
|
|
337
351
|
required :adjustment_type, const: :usage_discount
|
338
352
|
|
339
353
|
# @!attribute applies_to_price_ids
|
354
|
+
# @deprecated
|
355
|
+
#
|
340
356
|
# The price IDs that this adjustment applies to.
|
341
357
|
#
|
342
358
|
# @return [Array<String>]
|
343
359
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
344
360
|
|
361
|
+
# @!attribute filters
|
362
|
+
# The filters that determine which prices to apply this adjustment to.
|
363
|
+
#
|
364
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter>]
|
365
|
+
required :filters,
|
366
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter] }
|
367
|
+
|
345
368
|
# @!attribute is_invoice_level
|
346
369
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
347
370
|
# that apply to only one price.
|
@@ -368,7 +391,7 @@ module Orb
|
|
368
391
|
# @return [Float]
|
369
392
|
required :usage_discount, Float
|
370
393
|
|
371
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
394
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
372
395
|
# Some parameter documentations has been truncated, see
|
373
396
|
# {Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount}
|
374
397
|
# for more details.
|
@@ -377,6 +400,8 @@ module Orb
|
|
377
400
|
#
|
378
401
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
379
402
|
#
|
403
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
404
|
+
#
|
380
405
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
381
406
|
#
|
382
407
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
@@ -386,6 +411,64 @@ module Orb
|
|
386
411
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
387
412
|
#
|
388
413
|
# @param adjustment_type [Symbol, :usage_discount]
|
414
|
+
|
415
|
+
class Filter < Orb::Internal::Type::BaseModel
|
416
|
+
# @!attribute field
|
417
|
+
# The property of the price to filter on.
|
418
|
+
#
|
419
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field]
|
420
|
+
required :field,
|
421
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field }
|
422
|
+
|
423
|
+
# @!attribute operator
|
424
|
+
# Should prices that match the filter be included or excluded.
|
425
|
+
#
|
426
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator]
|
427
|
+
required :operator,
|
428
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator }
|
429
|
+
|
430
|
+
# @!attribute values
|
431
|
+
# The IDs or values that match this filter.
|
432
|
+
#
|
433
|
+
# @return [Array<String>]
|
434
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
435
|
+
|
436
|
+
# @!method initialize(field:, operator:, values:)
|
437
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
438
|
+
#
|
439
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
440
|
+
#
|
441
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
442
|
+
|
443
|
+
# The property of the price to filter on.
|
444
|
+
#
|
445
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter#field
|
446
|
+
module Field
|
447
|
+
extend Orb::Internal::Type::Enum
|
448
|
+
|
449
|
+
PRICE_ID = :price_id
|
450
|
+
ITEM_ID = :item_id
|
451
|
+
PRICE_TYPE = :price_type
|
452
|
+
CURRENCY = :currency
|
453
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
454
|
+
|
455
|
+
# @!method self.values
|
456
|
+
# @return [Array<Symbol>]
|
457
|
+
end
|
458
|
+
|
459
|
+
# Should prices that match the filter be included or excluded.
|
460
|
+
#
|
461
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter#operator
|
462
|
+
module Operator
|
463
|
+
extend Orb::Internal::Type::Enum
|
464
|
+
|
465
|
+
INCLUDES = :includes
|
466
|
+
EXCLUDES = :excludes
|
467
|
+
|
468
|
+
# @!method self.values
|
469
|
+
# @return [Array<Symbol>]
|
470
|
+
end
|
471
|
+
end
|
389
472
|
end
|
390
473
|
|
391
474
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -407,11 +490,20 @@ module Orb
|
|
407
490
|
required :amount_discount, String
|
408
491
|
|
409
492
|
# @!attribute applies_to_price_ids
|
493
|
+
# @deprecated
|
494
|
+
#
|
410
495
|
# The price IDs that this adjustment applies to.
|
411
496
|
#
|
412
497
|
# @return [Array<String>]
|
413
498
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
414
499
|
|
500
|
+
# @!attribute filters
|
501
|
+
# The filters that determine which prices to apply this adjustment to.
|
502
|
+
#
|
503
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter>]
|
504
|
+
required :filters,
|
505
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter] }
|
506
|
+
|
415
507
|
# @!attribute is_invoice_level
|
416
508
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
417
509
|
# that apply to only one price.
|
@@ -431,7 +523,7 @@ module Orb
|
|
431
523
|
# @return [String, nil]
|
432
524
|
required :reason, String, nil?: true
|
433
525
|
|
434
|
-
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
526
|
+
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
435
527
|
# Some parameter documentations has been truncated, see
|
436
528
|
# {Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount}
|
437
529
|
# for more details.
|
@@ -442,6 +534,8 @@ module Orb
|
|
442
534
|
#
|
443
535
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
444
536
|
#
|
537
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
538
|
+
#
|
445
539
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
446
540
|
#
|
447
541
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
@@ -449,6 +543,64 @@ module Orb
|
|
449
543
|
# @param reason [String, nil] The reason for the adjustment.
|
450
544
|
#
|
451
545
|
# @param adjustment_type [Symbol, :amount_discount]
|
546
|
+
|
547
|
+
class Filter < Orb::Internal::Type::BaseModel
|
548
|
+
# @!attribute field
|
549
|
+
# The property of the price to filter on.
|
550
|
+
#
|
551
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field]
|
552
|
+
required :field,
|
553
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field }
|
554
|
+
|
555
|
+
# @!attribute operator
|
556
|
+
# Should prices that match the filter be included or excluded.
|
557
|
+
#
|
558
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator]
|
559
|
+
required :operator,
|
560
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator }
|
561
|
+
|
562
|
+
# @!attribute values
|
563
|
+
# The IDs or values that match this filter.
|
564
|
+
#
|
565
|
+
# @return [Array<String>]
|
566
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
567
|
+
|
568
|
+
# @!method initialize(field:, operator:, values:)
|
569
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
570
|
+
#
|
571
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
572
|
+
#
|
573
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
574
|
+
|
575
|
+
# The property of the price to filter on.
|
576
|
+
#
|
577
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter#field
|
578
|
+
module Field
|
579
|
+
extend Orb::Internal::Type::Enum
|
580
|
+
|
581
|
+
PRICE_ID = :price_id
|
582
|
+
ITEM_ID = :item_id
|
583
|
+
PRICE_TYPE = :price_type
|
584
|
+
CURRENCY = :currency
|
585
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
586
|
+
|
587
|
+
# @!method self.values
|
588
|
+
# @return [Array<Symbol>]
|
589
|
+
end
|
590
|
+
|
591
|
+
# Should prices that match the filter be included or excluded.
|
592
|
+
#
|
593
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter#operator
|
594
|
+
module Operator
|
595
|
+
extend Orb::Internal::Type::Enum
|
596
|
+
|
597
|
+
INCLUDES = :includes
|
598
|
+
EXCLUDES = :excludes
|
599
|
+
|
600
|
+
# @!method self.values
|
601
|
+
# @return [Array<Symbol>]
|
602
|
+
end
|
603
|
+
end
|
452
604
|
end
|
453
605
|
|
454
606
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
@@ -463,11 +615,20 @@ module Orb
|
|
463
615
|
required :adjustment_type, const: :percentage_discount
|
464
616
|
|
465
617
|
# @!attribute applies_to_price_ids
|
618
|
+
# @deprecated
|
619
|
+
#
|
466
620
|
# The price IDs that this adjustment applies to.
|
467
621
|
#
|
468
622
|
# @return [Array<String>]
|
469
623
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
470
624
|
|
625
|
+
# @!attribute filters
|
626
|
+
# The filters that determine which prices to apply this adjustment to.
|
627
|
+
#
|
628
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>]
|
629
|
+
required :filters,
|
630
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter] }
|
631
|
+
|
471
632
|
# @!attribute is_invoice_level
|
472
633
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
473
634
|
# that apply to only one price.
|
@@ -494,7 +655,7 @@ module Orb
|
|
494
655
|
# @return [String, nil]
|
495
656
|
required :reason, String, nil?: true
|
496
657
|
|
497
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
658
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
498
659
|
# Some parameter documentations has been truncated, see
|
499
660
|
# {Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount}
|
500
661
|
# for more details.
|
@@ -503,6 +664,8 @@ module Orb
|
|
503
664
|
#
|
504
665
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
505
666
|
#
|
667
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
668
|
+
#
|
506
669
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
507
670
|
#
|
508
671
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
@@ -512,6 +675,64 @@ module Orb
|
|
512
675
|
# @param reason [String, nil] The reason for the adjustment.
|
513
676
|
#
|
514
677
|
# @param adjustment_type [Symbol, :percentage_discount]
|
678
|
+
|
679
|
+
class Filter < Orb::Internal::Type::BaseModel
|
680
|
+
# @!attribute field
|
681
|
+
# The property of the price to filter on.
|
682
|
+
#
|
683
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field]
|
684
|
+
required :field,
|
685
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field }
|
686
|
+
|
687
|
+
# @!attribute operator
|
688
|
+
# Should prices that match the filter be included or excluded.
|
689
|
+
#
|
690
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator]
|
691
|
+
required :operator,
|
692
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator }
|
693
|
+
|
694
|
+
# @!attribute values
|
695
|
+
# The IDs or values that match this filter.
|
696
|
+
#
|
697
|
+
# @return [Array<String>]
|
698
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
699
|
+
|
700
|
+
# @!method initialize(field:, operator:, values:)
|
701
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
702
|
+
#
|
703
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
704
|
+
#
|
705
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
706
|
+
|
707
|
+
# The property of the price to filter on.
|
708
|
+
#
|
709
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#field
|
710
|
+
module Field
|
711
|
+
extend Orb::Internal::Type::Enum
|
712
|
+
|
713
|
+
PRICE_ID = :price_id
|
714
|
+
ITEM_ID = :item_id
|
715
|
+
PRICE_TYPE = :price_type
|
716
|
+
CURRENCY = :currency
|
717
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
718
|
+
|
719
|
+
# @!method self.values
|
720
|
+
# @return [Array<Symbol>]
|
721
|
+
end
|
722
|
+
|
723
|
+
# Should prices that match the filter be included or excluded.
|
724
|
+
#
|
725
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#operator
|
726
|
+
module Operator
|
727
|
+
extend Orb::Internal::Type::Enum
|
728
|
+
|
729
|
+
INCLUDES = :includes
|
730
|
+
EXCLUDES = :excludes
|
731
|
+
|
732
|
+
# @!method self.values
|
733
|
+
# @return [Array<Symbol>]
|
734
|
+
end
|
735
|
+
end
|
515
736
|
end
|
516
737
|
|
517
738
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -526,11 +747,20 @@ module Orb
|
|
526
747
|
required :adjustment_type, const: :minimum
|
527
748
|
|
528
749
|
# @!attribute applies_to_price_ids
|
750
|
+
# @deprecated
|
751
|
+
#
|
529
752
|
# The price IDs that this adjustment applies to.
|
530
753
|
#
|
531
754
|
# @return [Array<String>]
|
532
755
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
533
756
|
|
757
|
+
# @!attribute filters
|
758
|
+
# The filters that determine which prices to apply this adjustment to.
|
759
|
+
#
|
760
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter>]
|
761
|
+
required :filters,
|
762
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter] }
|
763
|
+
|
534
764
|
# @!attribute is_invoice_level
|
535
765
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
536
766
|
# that apply to only one price.
|
@@ -563,7 +793,7 @@ module Orb
|
|
563
793
|
# @return [String, nil]
|
564
794
|
required :reason, String, nil?: true
|
565
795
|
|
566
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
796
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
567
797
|
# Some parameter documentations has been truncated, see
|
568
798
|
# {Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum}
|
569
799
|
# for more details.
|
@@ -572,6 +802,8 @@ module Orb
|
|
572
802
|
#
|
573
803
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
574
804
|
#
|
805
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
|
806
|
+
#
|
575
807
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
576
808
|
#
|
577
809
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
@@ -583,6 +815,64 @@ module Orb
|
|
583
815
|
# @param reason [String, nil] The reason for the adjustment.
|
584
816
|
#
|
585
817
|
# @param adjustment_type [Symbol, :minimum]
|
818
|
+
|
819
|
+
class Filter < Orb::Internal::Type::BaseModel
|
820
|
+
# @!attribute field
|
821
|
+
# The property of the price to filter on.
|
822
|
+
#
|
823
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Field]
|
824
|
+
required :field,
|
825
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Field }
|
826
|
+
|
827
|
+
# @!attribute operator
|
828
|
+
# Should prices that match the filter be included or excluded.
|
829
|
+
#
|
830
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Operator]
|
831
|
+
required :operator,
|
832
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Operator }
|
833
|
+
|
834
|
+
# @!attribute values
|
835
|
+
# The IDs or values that match this filter.
|
836
|
+
#
|
837
|
+
# @return [Array<String>]
|
838
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
839
|
+
|
840
|
+
# @!method initialize(field:, operator:, values:)
|
841
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
842
|
+
#
|
843
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
844
|
+
#
|
845
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
846
|
+
|
847
|
+
# The property of the price to filter on.
|
848
|
+
#
|
849
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter#field
|
850
|
+
module Field
|
851
|
+
extend Orb::Internal::Type::Enum
|
852
|
+
|
853
|
+
PRICE_ID = :price_id
|
854
|
+
ITEM_ID = :item_id
|
855
|
+
PRICE_TYPE = :price_type
|
856
|
+
CURRENCY = :currency
|
857
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
858
|
+
|
859
|
+
# @!method self.values
|
860
|
+
# @return [Array<Symbol>]
|
861
|
+
end
|
862
|
+
|
863
|
+
# Should prices that match the filter be included or excluded.
|
864
|
+
#
|
865
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::Filter#operator
|
866
|
+
module Operator
|
867
|
+
extend Orb::Internal::Type::Enum
|
868
|
+
|
869
|
+
INCLUDES = :includes
|
870
|
+
EXCLUDES = :excludes
|
871
|
+
|
872
|
+
# @!method self.values
|
873
|
+
# @return [Array<Symbol>]
|
874
|
+
end
|
875
|
+
end
|
586
876
|
end
|
587
877
|
|
588
878
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -597,11 +887,20 @@ module Orb
|
|
597
887
|
required :adjustment_type, const: :maximum
|
598
888
|
|
599
889
|
# @!attribute applies_to_price_ids
|
890
|
+
# @deprecated
|
891
|
+
#
|
600
892
|
# The price IDs that this adjustment applies to.
|
601
893
|
#
|
602
894
|
# @return [Array<String>]
|
603
895
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
604
896
|
|
897
|
+
# @!attribute filters
|
898
|
+
# The filters that determine which prices to apply this adjustment to.
|
899
|
+
#
|
900
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter>]
|
901
|
+
required :filters,
|
902
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter] }
|
903
|
+
|
605
904
|
# @!attribute is_invoice_level
|
606
905
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
607
906
|
# that apply to only one price.
|
@@ -628,7 +927,7 @@ module Orb
|
|
628
927
|
# @return [String, nil]
|
629
928
|
required :reason, String, nil?: true
|
630
929
|
|
631
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
930
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
632
931
|
# Some parameter documentations has been truncated, see
|
633
932
|
# {Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum}
|
634
933
|
# for more details.
|
@@ -637,6 +936,8 @@ module Orb
|
|
637
936
|
#
|
638
937
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
639
938
|
#
|
939
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
|
940
|
+
#
|
640
941
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
641
942
|
#
|
642
943
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
@@ -646,6 +947,64 @@ module Orb
|
|
646
947
|
# @param reason [String, nil] The reason for the adjustment.
|
647
948
|
#
|
648
949
|
# @param adjustment_type [Symbol, :maximum]
|
950
|
+
|
951
|
+
class Filter < Orb::Internal::Type::BaseModel
|
952
|
+
# @!attribute field
|
953
|
+
# The property of the price to filter on.
|
954
|
+
#
|
955
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Field]
|
956
|
+
required :field,
|
957
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Field }
|
958
|
+
|
959
|
+
# @!attribute operator
|
960
|
+
# Should prices that match the filter be included or excluded.
|
961
|
+
#
|
962
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Operator]
|
963
|
+
required :operator,
|
964
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Operator }
|
965
|
+
|
966
|
+
# @!attribute values
|
967
|
+
# The IDs or values that match this filter.
|
968
|
+
#
|
969
|
+
# @return [Array<String>]
|
970
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
971
|
+
|
972
|
+
# @!method initialize(field:, operator:, values:)
|
973
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
974
|
+
#
|
975
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
976
|
+
#
|
977
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
978
|
+
|
979
|
+
# The property of the price to filter on.
|
980
|
+
#
|
981
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter#field
|
982
|
+
module Field
|
983
|
+
extend Orb::Internal::Type::Enum
|
984
|
+
|
985
|
+
PRICE_ID = :price_id
|
986
|
+
ITEM_ID = :item_id
|
987
|
+
PRICE_TYPE = :price_type
|
988
|
+
CURRENCY = :currency
|
989
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
990
|
+
|
991
|
+
# @!method self.values
|
992
|
+
# @return [Array<Symbol>]
|
993
|
+
end
|
994
|
+
|
995
|
+
# Should prices that match the filter be included or excluded.
|
996
|
+
#
|
997
|
+
# @see Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::Filter#operator
|
998
|
+
module Operator
|
999
|
+
extend Orb::Internal::Type::Enum
|
1000
|
+
|
1001
|
+
INCLUDES = :includes
|
1002
|
+
EXCLUDES = :excludes
|
1003
|
+
|
1004
|
+
# @!method self.values
|
1005
|
+
# @return [Array<Symbol>]
|
1006
|
+
end
|
1007
|
+
end
|
649
1008
|
end
|
650
1009
|
|
651
1010
|
# @!method self.variants
|
@@ -709,12 +1068,6 @@ module Orb
|
|
709
1068
|
# @return [String]
|
710
1069
|
required :amount_discount, String
|
711
1070
|
|
712
|
-
# @!attribute applies_to_price_ids
|
713
|
-
# The price ids that this discount interval applies to.
|
714
|
-
#
|
715
|
-
# @return [Array<String>]
|
716
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
717
|
-
|
718
1071
|
# @!attribute applies_to_price_interval_ids
|
719
1072
|
# The price interval ids that this discount interval applies to.
|
720
1073
|
#
|
@@ -732,33 +1085,92 @@ module Orb
|
|
732
1085
|
# @return [Time, nil]
|
733
1086
|
required :end_date, Time, nil?: true
|
734
1087
|
|
1088
|
+
# @!attribute filters
|
1089
|
+
# The filters that determine which prices this discount interval applies to.
|
1090
|
+
#
|
1091
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter>]
|
1092
|
+
required :filters,
|
1093
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter] }
|
1094
|
+
|
735
1095
|
# @!attribute start_date
|
736
1096
|
# The start date of the discount interval.
|
737
1097
|
#
|
738
1098
|
# @return [Time]
|
739
1099
|
required :start_date, Time
|
740
1100
|
|
741
|
-
# @!method initialize(amount_discount:,
|
1101
|
+
# @!method initialize(amount_discount:, applies_to_price_interval_ids:, end_date:, filters:, start_date:, discount_type: :amount)
|
742
1102
|
# @param amount_discount [String] Only available if discount_type is `amount`.
|
743
1103
|
#
|
744
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
745
|
-
#
|
746
1104
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
|
747
1105
|
#
|
748
1106
|
# @param end_date [Time, nil] The end date of the discount interval.
|
749
1107
|
#
|
1108
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter>] The filters that determine which prices this discount interval applies to.
|
1109
|
+
#
|
750
1110
|
# @param start_date [Time] The start date of the discount interval.
|
751
1111
|
#
|
752
1112
|
# @param discount_type [Symbol, :amount]
|
1113
|
+
|
1114
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1115
|
+
# @!attribute field
|
1116
|
+
# The property of the price to filter on.
|
1117
|
+
#
|
1118
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter::Field]
|
1119
|
+
required :field,
|
1120
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter::Field }
|
1121
|
+
|
1122
|
+
# @!attribute operator
|
1123
|
+
# Should prices that match the filter be included or excluded.
|
1124
|
+
#
|
1125
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter::Operator]
|
1126
|
+
required :operator,
|
1127
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter::Operator }
|
1128
|
+
|
1129
|
+
# @!attribute values
|
1130
|
+
# The IDs or values that match this filter.
|
1131
|
+
#
|
1132
|
+
# @return [Array<String>]
|
1133
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1134
|
+
|
1135
|
+
# @!method initialize(field:, operator:, values:)
|
1136
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter::Field] The property of the price to filter on.
|
1137
|
+
#
|
1138
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter::Operator] Should prices that match the filter be included or excluded.
|
1139
|
+
#
|
1140
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1141
|
+
|
1142
|
+
# The property of the price to filter on.
|
1143
|
+
#
|
1144
|
+
# @see Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter#field
|
1145
|
+
module Field
|
1146
|
+
extend Orb::Internal::Type::Enum
|
1147
|
+
|
1148
|
+
PRICE_ID = :price_id
|
1149
|
+
ITEM_ID = :item_id
|
1150
|
+
PRICE_TYPE = :price_type
|
1151
|
+
CURRENCY = :currency
|
1152
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1153
|
+
|
1154
|
+
# @!method self.values
|
1155
|
+
# @return [Array<Symbol>]
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
# Should prices that match the filter be included or excluded.
|
1159
|
+
#
|
1160
|
+
# @see Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::Filter#operator
|
1161
|
+
module Operator
|
1162
|
+
extend Orb::Internal::Type::Enum
|
1163
|
+
|
1164
|
+
INCLUDES = :includes
|
1165
|
+
EXCLUDES = :excludes
|
1166
|
+
|
1167
|
+
# @!method self.values
|
1168
|
+
# @return [Array<Symbol>]
|
1169
|
+
end
|
1170
|
+
end
|
753
1171
|
end
|
754
1172
|
|
755
1173
|
class Percentage < Orb::Internal::Type::BaseModel
|
756
|
-
# @!attribute applies_to_price_ids
|
757
|
-
# The price ids that this discount interval applies to.
|
758
|
-
#
|
759
|
-
# @return [Array<String>]
|
760
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
761
|
-
|
762
1174
|
# @!attribute applies_to_price_interval_ids
|
763
1175
|
# The price interval ids that this discount interval applies to.
|
764
1176
|
#
|
@@ -776,6 +1188,13 @@ module Orb
|
|
776
1188
|
# @return [Time, nil]
|
777
1189
|
required :end_date, Time, nil?: true
|
778
1190
|
|
1191
|
+
# @!attribute filters
|
1192
|
+
# The filters that determine which prices this discount interval applies to.
|
1193
|
+
#
|
1194
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter>]
|
1195
|
+
required :filters,
|
1196
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter] }
|
1197
|
+
|
779
1198
|
# @!attribute percentage_discount
|
780
1199
|
# Only available if discount_type is `percentage`.This is a number between 0
|
781
1200
|
# and 1.
|
@@ -789,31 +1208,83 @@ module Orb
|
|
789
1208
|
# @return [Time]
|
790
1209
|
required :start_date, Time
|
791
1210
|
|
792
|
-
# @!method initialize(
|
1211
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, percentage_discount:, start_date:, discount_type: :percentage)
|
793
1212
|
# Some parameter documentations has been truncated, see
|
794
1213
|
# {Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage} for more
|
795
1214
|
# details.
|
796
1215
|
#
|
797
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
798
|
-
#
|
799
1216
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
|
800
1217
|
#
|
801
1218
|
# @param end_date [Time, nil] The end date of the discount interval.
|
802
1219
|
#
|
1220
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter>] The filters that determine which prices this discount interval applies to.
|
1221
|
+
#
|
803
1222
|
# @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
|
804
1223
|
#
|
805
1224
|
# @param start_date [Time] The start date of the discount interval.
|
806
1225
|
#
|
807
1226
|
# @param discount_type [Symbol, :percentage]
|
1227
|
+
|
1228
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1229
|
+
# @!attribute field
|
1230
|
+
# The property of the price to filter on.
|
1231
|
+
#
|
1232
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter::Field]
|
1233
|
+
required :field,
|
1234
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter::Field }
|
1235
|
+
|
1236
|
+
# @!attribute operator
|
1237
|
+
# Should prices that match the filter be included or excluded.
|
1238
|
+
#
|
1239
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter::Operator]
|
1240
|
+
required :operator,
|
1241
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter::Operator }
|
1242
|
+
|
1243
|
+
# @!attribute values
|
1244
|
+
# The IDs or values that match this filter.
|
1245
|
+
#
|
1246
|
+
# @return [Array<String>]
|
1247
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1248
|
+
|
1249
|
+
# @!method initialize(field:, operator:, values:)
|
1250
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter::Field] The property of the price to filter on.
|
1251
|
+
#
|
1252
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter::Operator] Should prices that match the filter be included or excluded.
|
1253
|
+
#
|
1254
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1255
|
+
|
1256
|
+
# The property of the price to filter on.
|
1257
|
+
#
|
1258
|
+
# @see Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter#field
|
1259
|
+
module Field
|
1260
|
+
extend Orb::Internal::Type::Enum
|
1261
|
+
|
1262
|
+
PRICE_ID = :price_id
|
1263
|
+
ITEM_ID = :item_id
|
1264
|
+
PRICE_TYPE = :price_type
|
1265
|
+
CURRENCY = :currency
|
1266
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1267
|
+
|
1268
|
+
# @!method self.values
|
1269
|
+
# @return [Array<Symbol>]
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
# Should prices that match the filter be included or excluded.
|
1273
|
+
#
|
1274
|
+
# @see Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::Filter#operator
|
1275
|
+
module Operator
|
1276
|
+
extend Orb::Internal::Type::Enum
|
1277
|
+
|
1278
|
+
INCLUDES = :includes
|
1279
|
+
EXCLUDES = :excludes
|
1280
|
+
|
1281
|
+
# @!method self.values
|
1282
|
+
# @return [Array<Symbol>]
|
1283
|
+
end
|
1284
|
+
end
|
808
1285
|
end
|
809
1286
|
|
810
1287
|
class Usage < Orb::Internal::Type::BaseModel
|
811
|
-
# @!attribute applies_to_price_ids
|
812
|
-
# The price ids that this discount interval applies to.
|
813
|
-
#
|
814
|
-
# @return [Array<String>]
|
815
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
816
|
-
|
817
1288
|
# @!attribute applies_to_price_interval_ids
|
818
1289
|
# The price interval ids that this discount interval applies to.
|
819
1290
|
#
|
@@ -831,6 +1302,13 @@ module Orb
|
|
831
1302
|
# @return [Time, nil]
|
832
1303
|
required :end_date, Time, nil?: true
|
833
1304
|
|
1305
|
+
# @!attribute filters
|
1306
|
+
# The filters that determine which prices this discount interval applies to.
|
1307
|
+
#
|
1308
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter>]
|
1309
|
+
required :filters,
|
1310
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter] }
|
1311
|
+
|
834
1312
|
# @!attribute start_date
|
835
1313
|
# The start date of the discount interval.
|
836
1314
|
#
|
@@ -844,22 +1322,80 @@ module Orb
|
|
844
1322
|
# @return [Float]
|
845
1323
|
required :usage_discount, Float
|
846
1324
|
|
847
|
-
# @!method initialize(
|
1325
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, start_date:, usage_discount:, discount_type: :usage)
|
848
1326
|
# Some parameter documentations has been truncated, see
|
849
1327
|
# {Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage} for more
|
850
1328
|
# details.
|
851
1329
|
#
|
852
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
853
|
-
#
|
854
1330
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
|
855
1331
|
#
|
856
1332
|
# @param end_date [Time, nil] The end date of the discount interval.
|
857
1333
|
#
|
1334
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter>] The filters that determine which prices this discount interval applies to.
|
1335
|
+
#
|
858
1336
|
# @param start_date [Time] The start date of the discount interval.
|
859
1337
|
#
|
860
1338
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
861
1339
|
#
|
862
1340
|
# @param discount_type [Symbol, :usage]
|
1341
|
+
|
1342
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1343
|
+
# @!attribute field
|
1344
|
+
# The property of the price to filter on.
|
1345
|
+
#
|
1346
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter::Field]
|
1347
|
+
required :field,
|
1348
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter::Field }
|
1349
|
+
|
1350
|
+
# @!attribute operator
|
1351
|
+
# Should prices that match the filter be included or excluded.
|
1352
|
+
#
|
1353
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter::Operator]
|
1354
|
+
required :operator,
|
1355
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter::Operator }
|
1356
|
+
|
1357
|
+
# @!attribute values
|
1358
|
+
# The IDs or values that match this filter.
|
1359
|
+
#
|
1360
|
+
# @return [Array<String>]
|
1361
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1362
|
+
|
1363
|
+
# @!method initialize(field:, operator:, values:)
|
1364
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter::Field] The property of the price to filter on.
|
1365
|
+
#
|
1366
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter::Operator] Should prices that match the filter be included or excluded.
|
1367
|
+
#
|
1368
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1369
|
+
|
1370
|
+
# The property of the price to filter on.
|
1371
|
+
#
|
1372
|
+
# @see Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter#field
|
1373
|
+
module Field
|
1374
|
+
extend Orb::Internal::Type::Enum
|
1375
|
+
|
1376
|
+
PRICE_ID = :price_id
|
1377
|
+
ITEM_ID = :item_id
|
1378
|
+
PRICE_TYPE = :price_type
|
1379
|
+
CURRENCY = :currency
|
1380
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1381
|
+
|
1382
|
+
# @!method self.values
|
1383
|
+
# @return [Array<Symbol>]
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
# Should prices that match the filter be included or excluded.
|
1387
|
+
#
|
1388
|
+
# @see Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::Filter#operator
|
1389
|
+
module Operator
|
1390
|
+
extend Orb::Internal::Type::Enum
|
1391
|
+
|
1392
|
+
INCLUDES = :includes
|
1393
|
+
EXCLUDES = :excludes
|
1394
|
+
|
1395
|
+
# @!method self.values
|
1396
|
+
# @return [Array<Symbol>]
|
1397
|
+
end
|
1398
|
+
end
|
863
1399
|
end
|
864
1400
|
|
865
1401
|
# @!method self.variants
|
@@ -895,12 +1431,6 @@ module Orb
|
|
895
1431
|
end
|
896
1432
|
|
897
1433
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
898
|
-
# @!attribute applies_to_price_ids
|
899
|
-
# The price ids that this maximum interval applies to.
|
900
|
-
#
|
901
|
-
# @return [Array<String>]
|
902
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
903
|
-
|
904
1434
|
# @!attribute applies_to_price_interval_ids
|
905
1435
|
# The price interval ids that this maximum interval applies to.
|
906
1436
|
#
|
@@ -913,6 +1443,13 @@ module Orb
|
|
913
1443
|
# @return [Time, nil]
|
914
1444
|
required :end_date, Time, nil?: true
|
915
1445
|
|
1446
|
+
# @!attribute filters
|
1447
|
+
# The filters that determine which prices this maximum interval applies to.
|
1448
|
+
#
|
1449
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter>]
|
1450
|
+
required :filters,
|
1451
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter] }
|
1452
|
+
|
916
1453
|
# @!attribute maximum_amount
|
917
1454
|
# The maximum amount to charge in a given billing period for the price intervals
|
918
1455
|
# this transform applies to.
|
@@ -926,28 +1463,79 @@ module Orb
|
|
926
1463
|
# @return [Time]
|
927
1464
|
required :start_date, Time
|
928
1465
|
|
929
|
-
# @!method initialize(
|
1466
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, maximum_amount:, start_date:)
|
930
1467
|
# Some parameter documentations has been truncated, see
|
931
1468
|
# {Orb::Models::SubscriptionCancelResponse::MaximumInterval} for more details.
|
932
1469
|
#
|
933
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this maximum interval applies to.
|
934
|
-
#
|
935
1470
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this maximum interval applies to.
|
936
1471
|
#
|
937
1472
|
# @param end_date [Time, nil] The end date of the maximum interval.
|
938
1473
|
#
|
1474
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter>] The filters that determine which prices this maximum interval applies to.
|
1475
|
+
#
|
939
1476
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
|
940
1477
|
#
|
941
1478
|
# @param start_date [Time] The start date of the maximum interval.
|
1479
|
+
|
1480
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1481
|
+
# @!attribute field
|
1482
|
+
# The property of the price to filter on.
|
1483
|
+
#
|
1484
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter::Field]
|
1485
|
+
required :field, enum: -> { Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter::Field }
|
1486
|
+
|
1487
|
+
# @!attribute operator
|
1488
|
+
# Should prices that match the filter be included or excluded.
|
1489
|
+
#
|
1490
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter::Operator]
|
1491
|
+
required :operator,
|
1492
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter::Operator }
|
1493
|
+
|
1494
|
+
# @!attribute values
|
1495
|
+
# The IDs or values that match this filter.
|
1496
|
+
#
|
1497
|
+
# @return [Array<String>]
|
1498
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1499
|
+
|
1500
|
+
# @!method initialize(field:, operator:, values:)
|
1501
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter::Field] The property of the price to filter on.
|
1502
|
+
#
|
1503
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
|
1504
|
+
#
|
1505
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1506
|
+
|
1507
|
+
# The property of the price to filter on.
|
1508
|
+
#
|
1509
|
+
# @see Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter#field
|
1510
|
+
module Field
|
1511
|
+
extend Orb::Internal::Type::Enum
|
1512
|
+
|
1513
|
+
PRICE_ID = :price_id
|
1514
|
+
ITEM_ID = :item_id
|
1515
|
+
PRICE_TYPE = :price_type
|
1516
|
+
CURRENCY = :currency
|
1517
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1518
|
+
|
1519
|
+
# @!method self.values
|
1520
|
+
# @return [Array<Symbol>]
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
# Should prices that match the filter be included or excluded.
|
1524
|
+
#
|
1525
|
+
# @see Orb::Models::SubscriptionCancelResponse::MaximumInterval::Filter#operator
|
1526
|
+
module Operator
|
1527
|
+
extend Orb::Internal::Type::Enum
|
1528
|
+
|
1529
|
+
INCLUDES = :includes
|
1530
|
+
EXCLUDES = :excludes
|
1531
|
+
|
1532
|
+
# @!method self.values
|
1533
|
+
# @return [Array<Symbol>]
|
1534
|
+
end
|
1535
|
+
end
|
942
1536
|
end
|
943
1537
|
|
944
1538
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
945
|
-
# @!attribute applies_to_price_ids
|
946
|
-
# The price ids that this minimum interval applies to.
|
947
|
-
#
|
948
|
-
# @return [Array<String>]
|
949
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
950
|
-
|
951
1539
|
# @!attribute applies_to_price_interval_ids
|
952
1540
|
# The price interval ids that this minimum interval applies to.
|
953
1541
|
#
|
@@ -960,6 +1548,13 @@ module Orb
|
|
960
1548
|
# @return [Time, nil]
|
961
1549
|
required :end_date, Time, nil?: true
|
962
1550
|
|
1551
|
+
# @!attribute filters
|
1552
|
+
# The filters that determine which prices this minimum interval applies to.
|
1553
|
+
#
|
1554
|
+
# @return [Array<Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter>]
|
1555
|
+
required :filters,
|
1556
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter] }
|
1557
|
+
|
963
1558
|
# @!attribute minimum_amount
|
964
1559
|
# The minimum amount to charge in a given billing period for the price intervals
|
965
1560
|
# this minimum applies to.
|
@@ -973,19 +1568,76 @@ module Orb
|
|
973
1568
|
# @return [Time]
|
974
1569
|
required :start_date, Time
|
975
1570
|
|
976
|
-
# @!method initialize(
|
1571
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, minimum_amount:, start_date:)
|
977
1572
|
# Some parameter documentations has been truncated, see
|
978
1573
|
# {Orb::Models::SubscriptionCancelResponse::MinimumInterval} for more details.
|
979
1574
|
#
|
980
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this minimum interval applies to.
|
981
|
-
#
|
982
1575
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this minimum interval applies to.
|
983
1576
|
#
|
984
1577
|
# @param end_date [Time, nil] The end date of the minimum interval.
|
985
1578
|
#
|
1579
|
+
# @param filters [Array<Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter>] The filters that determine which prices this minimum interval applies to.
|
1580
|
+
#
|
986
1581
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
|
987
1582
|
#
|
988
1583
|
# @param start_date [Time] The start date of the minimum interval.
|
1584
|
+
|
1585
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1586
|
+
# @!attribute field
|
1587
|
+
# The property of the price to filter on.
|
1588
|
+
#
|
1589
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter::Field]
|
1590
|
+
required :field, enum: -> { Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter::Field }
|
1591
|
+
|
1592
|
+
# @!attribute operator
|
1593
|
+
# Should prices that match the filter be included or excluded.
|
1594
|
+
#
|
1595
|
+
# @return [Symbol, Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter::Operator]
|
1596
|
+
required :operator,
|
1597
|
+
enum: -> { Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter::Operator }
|
1598
|
+
|
1599
|
+
# @!attribute values
|
1600
|
+
# The IDs or values that match this filter.
|
1601
|
+
#
|
1602
|
+
# @return [Array<String>]
|
1603
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1604
|
+
|
1605
|
+
# @!method initialize(field:, operator:, values:)
|
1606
|
+
# @param field [Symbol, Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter::Field] The property of the price to filter on.
|
1607
|
+
#
|
1608
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
|
1609
|
+
#
|
1610
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1611
|
+
|
1612
|
+
# The property of the price to filter on.
|
1613
|
+
#
|
1614
|
+
# @see Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter#field
|
1615
|
+
module Field
|
1616
|
+
extend Orb::Internal::Type::Enum
|
1617
|
+
|
1618
|
+
PRICE_ID = :price_id
|
1619
|
+
ITEM_ID = :item_id
|
1620
|
+
PRICE_TYPE = :price_type
|
1621
|
+
CURRENCY = :currency
|
1622
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1623
|
+
|
1624
|
+
# @!method self.values
|
1625
|
+
# @return [Array<Symbol>]
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
# Should prices that match the filter be included or excluded.
|
1629
|
+
#
|
1630
|
+
# @see Orb::Models::SubscriptionCancelResponse::MinimumInterval::Filter#operator
|
1631
|
+
module Operator
|
1632
|
+
extend Orb::Internal::Type::Enum
|
1633
|
+
|
1634
|
+
INCLUDES = :includes
|
1635
|
+
EXCLUDES = :excludes
|
1636
|
+
|
1637
|
+
# @!method self.values
|
1638
|
+
# @return [Array<Symbol>]
|
1639
|
+
end
|
1640
|
+
end
|
989
1641
|
end
|
990
1642
|
|
991
1643
|
# @see Orb::Models::SubscriptionCancelResponse#pending_subscription_change
|