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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -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/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 +13 -0
- 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 +40 -1
@@ -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::SubscriptionUpdateTrialResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateTrialResponse::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::SubscriptionUpdateTrialResponse::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::SubscriptionUpdateTrialResponse::MinimumInterval>]
|
145
151
|
required :minimum_intervals,
|
146
152
|
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::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.
|
@@ -209,7 +221,7 @@ module Orb
|
|
209
221
|
-> { Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources },
|
210
222
|
nil?: true
|
211
223
|
|
212
|
-
# @!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)
|
224
|
+
# @!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)
|
213
225
|
# Some parameter documentations has been truncated, see
|
214
226
|
# {Orb::Models::SubscriptionUpdateTrialResponse} for more details.
|
215
227
|
#
|
@@ -249,11 +261,13 @@ module Orb
|
|
249
261
|
#
|
250
262
|
# @param minimum_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
251
263
|
#
|
264
|
+
# @param name [String] The name of the subscription.
|
265
|
+
#
|
252
266
|
# @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
|
253
267
|
#
|
254
268
|
# @param pending_subscription_change [Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
|
255
269
|
#
|
256
|
-
# @param plan [Orb::Models::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
270
|
+
# @param plan [Orb::Models::Plan, nil] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
257
271
|
#
|
258
272
|
# @param price_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval>] The price intervals for this subscription.
|
259
273
|
#
|
@@ -341,11 +355,20 @@ module Orb
|
|
341
355
|
required :adjustment_type, const: :usage_discount
|
342
356
|
|
343
357
|
# @!attribute applies_to_price_ids
|
358
|
+
# @deprecated
|
359
|
+
#
|
344
360
|
# The price IDs that this adjustment applies to.
|
345
361
|
#
|
346
362
|
# @return [Array<String>]
|
347
363
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
348
364
|
|
365
|
+
# @!attribute filters
|
366
|
+
# The filters that determine which prices to apply this adjustment to.
|
367
|
+
#
|
368
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter>]
|
369
|
+
required :filters,
|
370
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter] }
|
371
|
+
|
349
372
|
# @!attribute is_invoice_level
|
350
373
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
351
374
|
# that apply to only one price.
|
@@ -372,7 +395,7 @@ module Orb
|
|
372
395
|
# @return [Float]
|
373
396
|
required :usage_discount, Float
|
374
397
|
|
375
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
398
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
376
399
|
# Some parameter documentations has been truncated, see
|
377
400
|
# {Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount}
|
378
401
|
# for more details.
|
@@ -381,6 +404,8 @@ module Orb
|
|
381
404
|
#
|
382
405
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
383
406
|
#
|
407
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
408
|
+
#
|
384
409
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
385
410
|
#
|
386
411
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
@@ -390,6 +415,64 @@ module Orb
|
|
390
415
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
391
416
|
#
|
392
417
|
# @param adjustment_type [Symbol, :usage_discount]
|
418
|
+
|
419
|
+
class Filter < Orb::Internal::Type::BaseModel
|
420
|
+
# @!attribute field
|
421
|
+
# The property of the price to filter on.
|
422
|
+
#
|
423
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field]
|
424
|
+
required :field,
|
425
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field }
|
426
|
+
|
427
|
+
# @!attribute operator
|
428
|
+
# Should prices that match the filter be included or excluded.
|
429
|
+
#
|
430
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator]
|
431
|
+
required :operator,
|
432
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator }
|
433
|
+
|
434
|
+
# @!attribute values
|
435
|
+
# The IDs or values that match this filter.
|
436
|
+
#
|
437
|
+
# @return [Array<String>]
|
438
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
439
|
+
|
440
|
+
# @!method initialize(field:, operator:, values:)
|
441
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
442
|
+
#
|
443
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
444
|
+
#
|
445
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
446
|
+
|
447
|
+
# The property of the price to filter on.
|
448
|
+
#
|
449
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter#field
|
450
|
+
module Field
|
451
|
+
extend Orb::Internal::Type::Enum
|
452
|
+
|
453
|
+
PRICE_ID = :price_id
|
454
|
+
ITEM_ID = :item_id
|
455
|
+
PRICE_TYPE = :price_type
|
456
|
+
CURRENCY = :currency
|
457
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
458
|
+
|
459
|
+
# @!method self.values
|
460
|
+
# @return [Array<Symbol>]
|
461
|
+
end
|
462
|
+
|
463
|
+
# Should prices that match the filter be included or excluded.
|
464
|
+
#
|
465
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::Filter#operator
|
466
|
+
module Operator
|
467
|
+
extend Orb::Internal::Type::Enum
|
468
|
+
|
469
|
+
INCLUDES = :includes
|
470
|
+
EXCLUDES = :excludes
|
471
|
+
|
472
|
+
# @!method self.values
|
473
|
+
# @return [Array<Symbol>]
|
474
|
+
end
|
475
|
+
end
|
393
476
|
end
|
394
477
|
|
395
478
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -411,11 +494,20 @@ module Orb
|
|
411
494
|
required :amount_discount, String
|
412
495
|
|
413
496
|
# @!attribute applies_to_price_ids
|
497
|
+
# @deprecated
|
498
|
+
#
|
414
499
|
# The price IDs that this adjustment applies to.
|
415
500
|
#
|
416
501
|
# @return [Array<String>]
|
417
502
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
418
503
|
|
504
|
+
# @!attribute filters
|
505
|
+
# The filters that determine which prices to apply this adjustment to.
|
506
|
+
#
|
507
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter>]
|
508
|
+
required :filters,
|
509
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter] }
|
510
|
+
|
419
511
|
# @!attribute is_invoice_level
|
420
512
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
421
513
|
# that apply to only one price.
|
@@ -435,7 +527,7 @@ module Orb
|
|
435
527
|
# @return [String, nil]
|
436
528
|
required :reason, String, nil?: true
|
437
529
|
|
438
|
-
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
530
|
+
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
439
531
|
# Some parameter documentations has been truncated, see
|
440
532
|
# {Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount}
|
441
533
|
# for more details.
|
@@ -446,6 +538,8 @@ module Orb
|
|
446
538
|
#
|
447
539
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
448
540
|
#
|
541
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
542
|
+
#
|
449
543
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
450
544
|
#
|
451
545
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
@@ -453,6 +547,64 @@ module Orb
|
|
453
547
|
# @param reason [String, nil] The reason for the adjustment.
|
454
548
|
#
|
455
549
|
# @param adjustment_type [Symbol, :amount_discount]
|
550
|
+
|
551
|
+
class Filter < Orb::Internal::Type::BaseModel
|
552
|
+
# @!attribute field
|
553
|
+
# The property of the price to filter on.
|
554
|
+
#
|
555
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field]
|
556
|
+
required :field,
|
557
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field }
|
558
|
+
|
559
|
+
# @!attribute operator
|
560
|
+
# Should prices that match the filter be included or excluded.
|
561
|
+
#
|
562
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator]
|
563
|
+
required :operator,
|
564
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator }
|
565
|
+
|
566
|
+
# @!attribute values
|
567
|
+
# The IDs or values that match this filter.
|
568
|
+
#
|
569
|
+
# @return [Array<String>]
|
570
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
571
|
+
|
572
|
+
# @!method initialize(field:, operator:, values:)
|
573
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
574
|
+
#
|
575
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
576
|
+
#
|
577
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
578
|
+
|
579
|
+
# The property of the price to filter on.
|
580
|
+
#
|
581
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter#field
|
582
|
+
module Field
|
583
|
+
extend Orb::Internal::Type::Enum
|
584
|
+
|
585
|
+
PRICE_ID = :price_id
|
586
|
+
ITEM_ID = :item_id
|
587
|
+
PRICE_TYPE = :price_type
|
588
|
+
CURRENCY = :currency
|
589
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
590
|
+
|
591
|
+
# @!method self.values
|
592
|
+
# @return [Array<Symbol>]
|
593
|
+
end
|
594
|
+
|
595
|
+
# Should prices that match the filter be included or excluded.
|
596
|
+
#
|
597
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::Filter#operator
|
598
|
+
module Operator
|
599
|
+
extend Orb::Internal::Type::Enum
|
600
|
+
|
601
|
+
INCLUDES = :includes
|
602
|
+
EXCLUDES = :excludes
|
603
|
+
|
604
|
+
# @!method self.values
|
605
|
+
# @return [Array<Symbol>]
|
606
|
+
end
|
607
|
+
end
|
456
608
|
end
|
457
609
|
|
458
610
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
@@ -467,11 +619,20 @@ module Orb
|
|
467
619
|
required :adjustment_type, const: :percentage_discount
|
468
620
|
|
469
621
|
# @!attribute applies_to_price_ids
|
622
|
+
# @deprecated
|
623
|
+
#
|
470
624
|
# The price IDs that this adjustment applies to.
|
471
625
|
#
|
472
626
|
# @return [Array<String>]
|
473
627
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
474
628
|
|
629
|
+
# @!attribute filters
|
630
|
+
# The filters that determine which prices to apply this adjustment to.
|
631
|
+
#
|
632
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>]
|
633
|
+
required :filters,
|
634
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter] }
|
635
|
+
|
475
636
|
# @!attribute is_invoice_level
|
476
637
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
477
638
|
# that apply to only one price.
|
@@ -498,7 +659,7 @@ module Orb
|
|
498
659
|
# @return [String, nil]
|
499
660
|
required :reason, String, nil?: true
|
500
661
|
|
501
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
662
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
502
663
|
# Some parameter documentations has been truncated, see
|
503
664
|
# {Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount}
|
504
665
|
# for more details.
|
@@ -507,6 +668,8 @@ module Orb
|
|
507
668
|
#
|
508
669
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
509
670
|
#
|
671
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
672
|
+
#
|
510
673
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
511
674
|
#
|
512
675
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
@@ -516,6 +679,64 @@ module Orb
|
|
516
679
|
# @param reason [String, nil] The reason for the adjustment.
|
517
680
|
#
|
518
681
|
# @param adjustment_type [Symbol, :percentage_discount]
|
682
|
+
|
683
|
+
class Filter < Orb::Internal::Type::BaseModel
|
684
|
+
# @!attribute field
|
685
|
+
# The property of the price to filter on.
|
686
|
+
#
|
687
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field]
|
688
|
+
required :field,
|
689
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field }
|
690
|
+
|
691
|
+
# @!attribute operator
|
692
|
+
# Should prices that match the filter be included or excluded.
|
693
|
+
#
|
694
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator]
|
695
|
+
required :operator,
|
696
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator }
|
697
|
+
|
698
|
+
# @!attribute values
|
699
|
+
# The IDs or values that match this filter.
|
700
|
+
#
|
701
|
+
# @return [Array<String>]
|
702
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
703
|
+
|
704
|
+
# @!method initialize(field:, operator:, values:)
|
705
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
706
|
+
#
|
707
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
708
|
+
#
|
709
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
710
|
+
|
711
|
+
# The property of the price to filter on.
|
712
|
+
#
|
713
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#field
|
714
|
+
module Field
|
715
|
+
extend Orb::Internal::Type::Enum
|
716
|
+
|
717
|
+
PRICE_ID = :price_id
|
718
|
+
ITEM_ID = :item_id
|
719
|
+
PRICE_TYPE = :price_type
|
720
|
+
CURRENCY = :currency
|
721
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
722
|
+
|
723
|
+
# @!method self.values
|
724
|
+
# @return [Array<Symbol>]
|
725
|
+
end
|
726
|
+
|
727
|
+
# Should prices that match the filter be included or excluded.
|
728
|
+
#
|
729
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::Filter#operator
|
730
|
+
module Operator
|
731
|
+
extend Orb::Internal::Type::Enum
|
732
|
+
|
733
|
+
INCLUDES = :includes
|
734
|
+
EXCLUDES = :excludes
|
735
|
+
|
736
|
+
# @!method self.values
|
737
|
+
# @return [Array<Symbol>]
|
738
|
+
end
|
739
|
+
end
|
519
740
|
end
|
520
741
|
|
521
742
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -530,11 +751,20 @@ module Orb
|
|
530
751
|
required :adjustment_type, const: :minimum
|
531
752
|
|
532
753
|
# @!attribute applies_to_price_ids
|
754
|
+
# @deprecated
|
755
|
+
#
|
533
756
|
# The price IDs that this adjustment applies to.
|
534
757
|
#
|
535
758
|
# @return [Array<String>]
|
536
759
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
537
760
|
|
761
|
+
# @!attribute filters
|
762
|
+
# The filters that determine which prices to apply this adjustment to.
|
763
|
+
#
|
764
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter>]
|
765
|
+
required :filters,
|
766
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter] }
|
767
|
+
|
538
768
|
# @!attribute is_invoice_level
|
539
769
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
540
770
|
# that apply to only one price.
|
@@ -567,7 +797,7 @@ module Orb
|
|
567
797
|
# @return [String, nil]
|
568
798
|
required :reason, String, nil?: true
|
569
799
|
|
570
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
800
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
571
801
|
# Some parameter documentations has been truncated, see
|
572
802
|
# {Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum}
|
573
803
|
# for more details.
|
@@ -576,6 +806,8 @@ module Orb
|
|
576
806
|
#
|
577
807
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
578
808
|
#
|
809
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
|
810
|
+
#
|
579
811
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
580
812
|
#
|
581
813
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
@@ -587,6 +819,64 @@ module Orb
|
|
587
819
|
# @param reason [String, nil] The reason for the adjustment.
|
588
820
|
#
|
589
821
|
# @param adjustment_type [Symbol, :minimum]
|
822
|
+
|
823
|
+
class Filter < Orb::Internal::Type::BaseModel
|
824
|
+
# @!attribute field
|
825
|
+
# The property of the price to filter on.
|
826
|
+
#
|
827
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Field]
|
828
|
+
required :field,
|
829
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Field }
|
830
|
+
|
831
|
+
# @!attribute operator
|
832
|
+
# Should prices that match the filter be included or excluded.
|
833
|
+
#
|
834
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Operator]
|
835
|
+
required :operator,
|
836
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Operator }
|
837
|
+
|
838
|
+
# @!attribute values
|
839
|
+
# The IDs or values that match this filter.
|
840
|
+
#
|
841
|
+
# @return [Array<String>]
|
842
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
843
|
+
|
844
|
+
# @!method initialize(field:, operator:, values:)
|
845
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
846
|
+
#
|
847
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
848
|
+
#
|
849
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
850
|
+
|
851
|
+
# The property of the price to filter on.
|
852
|
+
#
|
853
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter#field
|
854
|
+
module Field
|
855
|
+
extend Orb::Internal::Type::Enum
|
856
|
+
|
857
|
+
PRICE_ID = :price_id
|
858
|
+
ITEM_ID = :item_id
|
859
|
+
PRICE_TYPE = :price_type
|
860
|
+
CURRENCY = :currency
|
861
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
862
|
+
|
863
|
+
# @!method self.values
|
864
|
+
# @return [Array<Symbol>]
|
865
|
+
end
|
866
|
+
|
867
|
+
# Should prices that match the filter be included or excluded.
|
868
|
+
#
|
869
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::Filter#operator
|
870
|
+
module Operator
|
871
|
+
extend Orb::Internal::Type::Enum
|
872
|
+
|
873
|
+
INCLUDES = :includes
|
874
|
+
EXCLUDES = :excludes
|
875
|
+
|
876
|
+
# @!method self.values
|
877
|
+
# @return [Array<Symbol>]
|
878
|
+
end
|
879
|
+
end
|
590
880
|
end
|
591
881
|
|
592
882
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -601,11 +891,20 @@ module Orb
|
|
601
891
|
required :adjustment_type, const: :maximum
|
602
892
|
|
603
893
|
# @!attribute applies_to_price_ids
|
894
|
+
# @deprecated
|
895
|
+
#
|
604
896
|
# The price IDs that this adjustment applies to.
|
605
897
|
#
|
606
898
|
# @return [Array<String>]
|
607
899
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
608
900
|
|
901
|
+
# @!attribute filters
|
902
|
+
# The filters that determine which prices to apply this adjustment to.
|
903
|
+
#
|
904
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter>]
|
905
|
+
required :filters,
|
906
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter] }
|
907
|
+
|
609
908
|
# @!attribute is_invoice_level
|
610
909
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
611
910
|
# that apply to only one price.
|
@@ -632,7 +931,7 @@ module Orb
|
|
632
931
|
# @return [String, nil]
|
633
932
|
required :reason, String, nil?: true
|
634
933
|
|
635
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
934
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
636
935
|
# Some parameter documentations has been truncated, see
|
637
936
|
# {Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum}
|
638
937
|
# for more details.
|
@@ -641,6 +940,8 @@ module Orb
|
|
641
940
|
#
|
642
941
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
643
942
|
#
|
943
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
|
944
|
+
#
|
644
945
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
645
946
|
#
|
646
947
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
@@ -650,6 +951,64 @@ module Orb
|
|
650
951
|
# @param reason [String, nil] The reason for the adjustment.
|
651
952
|
#
|
652
953
|
# @param adjustment_type [Symbol, :maximum]
|
954
|
+
|
955
|
+
class Filter < Orb::Internal::Type::BaseModel
|
956
|
+
# @!attribute field
|
957
|
+
# The property of the price to filter on.
|
958
|
+
#
|
959
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Field]
|
960
|
+
required :field,
|
961
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Field }
|
962
|
+
|
963
|
+
# @!attribute operator
|
964
|
+
# Should prices that match the filter be included or excluded.
|
965
|
+
#
|
966
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Operator]
|
967
|
+
required :operator,
|
968
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Operator }
|
969
|
+
|
970
|
+
# @!attribute values
|
971
|
+
# The IDs or values that match this filter.
|
972
|
+
#
|
973
|
+
# @return [Array<String>]
|
974
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
975
|
+
|
976
|
+
# @!method initialize(field:, operator:, values:)
|
977
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
978
|
+
#
|
979
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
980
|
+
#
|
981
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
982
|
+
|
983
|
+
# The property of the price to filter on.
|
984
|
+
#
|
985
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter#field
|
986
|
+
module Field
|
987
|
+
extend Orb::Internal::Type::Enum
|
988
|
+
|
989
|
+
PRICE_ID = :price_id
|
990
|
+
ITEM_ID = :item_id
|
991
|
+
PRICE_TYPE = :price_type
|
992
|
+
CURRENCY = :currency
|
993
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
994
|
+
|
995
|
+
# @!method self.values
|
996
|
+
# @return [Array<Symbol>]
|
997
|
+
end
|
998
|
+
|
999
|
+
# Should prices that match the filter be included or excluded.
|
1000
|
+
#
|
1001
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::Filter#operator
|
1002
|
+
module Operator
|
1003
|
+
extend Orb::Internal::Type::Enum
|
1004
|
+
|
1005
|
+
INCLUDES = :includes
|
1006
|
+
EXCLUDES = :excludes
|
1007
|
+
|
1008
|
+
# @!method self.values
|
1009
|
+
# @return [Array<Symbol>]
|
1010
|
+
end
|
1011
|
+
end
|
653
1012
|
end
|
654
1013
|
|
655
1014
|
# @!method self.variants
|
@@ -713,12 +1072,6 @@ module Orb
|
|
713
1072
|
# @return [String]
|
714
1073
|
required :amount_discount, String
|
715
1074
|
|
716
|
-
# @!attribute applies_to_price_ids
|
717
|
-
# The price ids that this discount interval applies to.
|
718
|
-
#
|
719
|
-
# @return [Array<String>]
|
720
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
721
|
-
|
722
1075
|
# @!attribute applies_to_price_interval_ids
|
723
1076
|
# The price interval ids that this discount interval applies to.
|
724
1077
|
#
|
@@ -736,33 +1089,92 @@ module Orb
|
|
736
1089
|
# @return [Time, nil]
|
737
1090
|
required :end_date, Time, nil?: true
|
738
1091
|
|
1092
|
+
# @!attribute filters
|
1093
|
+
# The filters that determine which prices this discount interval applies to.
|
1094
|
+
#
|
1095
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter>]
|
1096
|
+
required :filters,
|
1097
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter] }
|
1098
|
+
|
739
1099
|
# @!attribute start_date
|
740
1100
|
# The start date of the discount interval.
|
741
1101
|
#
|
742
1102
|
# @return [Time]
|
743
1103
|
required :start_date, Time
|
744
1104
|
|
745
|
-
# @!method initialize(amount_discount:,
|
1105
|
+
# @!method initialize(amount_discount:, applies_to_price_interval_ids:, end_date:, filters:, start_date:, discount_type: :amount)
|
746
1106
|
# @param amount_discount [String] Only available if discount_type is `amount`.
|
747
1107
|
#
|
748
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
749
|
-
#
|
750
1108
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
|
751
1109
|
#
|
752
1110
|
# @param end_date [Time, nil] The end date of the discount interval.
|
753
1111
|
#
|
1112
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter>] The filters that determine which prices this discount interval applies to.
|
1113
|
+
#
|
754
1114
|
# @param start_date [Time] The start date of the discount interval.
|
755
1115
|
#
|
756
1116
|
# @param discount_type [Symbol, :amount]
|
1117
|
+
|
1118
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1119
|
+
# @!attribute field
|
1120
|
+
# The property of the price to filter on.
|
1121
|
+
#
|
1122
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter::Field]
|
1123
|
+
required :field,
|
1124
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter::Field }
|
1125
|
+
|
1126
|
+
# @!attribute operator
|
1127
|
+
# Should prices that match the filter be included or excluded.
|
1128
|
+
#
|
1129
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter::Operator]
|
1130
|
+
required :operator,
|
1131
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter::Operator }
|
1132
|
+
|
1133
|
+
# @!attribute values
|
1134
|
+
# The IDs or values that match this filter.
|
1135
|
+
#
|
1136
|
+
# @return [Array<String>]
|
1137
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1138
|
+
|
1139
|
+
# @!method initialize(field:, operator:, values:)
|
1140
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter::Field] The property of the price to filter on.
|
1141
|
+
#
|
1142
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter::Operator] Should prices that match the filter be included or excluded.
|
1143
|
+
#
|
1144
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1145
|
+
|
1146
|
+
# The property of the price to filter on.
|
1147
|
+
#
|
1148
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter#field
|
1149
|
+
module Field
|
1150
|
+
extend Orb::Internal::Type::Enum
|
1151
|
+
|
1152
|
+
PRICE_ID = :price_id
|
1153
|
+
ITEM_ID = :item_id
|
1154
|
+
PRICE_TYPE = :price_type
|
1155
|
+
CURRENCY = :currency
|
1156
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1157
|
+
|
1158
|
+
# @!method self.values
|
1159
|
+
# @return [Array<Symbol>]
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
# Should prices that match the filter be included or excluded.
|
1163
|
+
#
|
1164
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::Filter#operator
|
1165
|
+
module Operator
|
1166
|
+
extend Orb::Internal::Type::Enum
|
1167
|
+
|
1168
|
+
INCLUDES = :includes
|
1169
|
+
EXCLUDES = :excludes
|
1170
|
+
|
1171
|
+
# @!method self.values
|
1172
|
+
# @return [Array<Symbol>]
|
1173
|
+
end
|
1174
|
+
end
|
757
1175
|
end
|
758
1176
|
|
759
1177
|
class Percentage < Orb::Internal::Type::BaseModel
|
760
|
-
# @!attribute applies_to_price_ids
|
761
|
-
# The price ids that this discount interval applies to.
|
762
|
-
#
|
763
|
-
# @return [Array<String>]
|
764
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
765
|
-
|
766
1178
|
# @!attribute applies_to_price_interval_ids
|
767
1179
|
# The price interval ids that this discount interval applies to.
|
768
1180
|
#
|
@@ -780,6 +1192,13 @@ module Orb
|
|
780
1192
|
# @return [Time, nil]
|
781
1193
|
required :end_date, Time, nil?: true
|
782
1194
|
|
1195
|
+
# @!attribute filters
|
1196
|
+
# The filters that determine which prices this discount interval applies to.
|
1197
|
+
#
|
1198
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter>]
|
1199
|
+
required :filters,
|
1200
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter] }
|
1201
|
+
|
783
1202
|
# @!attribute percentage_discount
|
784
1203
|
# Only available if discount_type is `percentage`.This is a number between 0
|
785
1204
|
# and 1.
|
@@ -793,31 +1212,83 @@ module Orb
|
|
793
1212
|
# @return [Time]
|
794
1213
|
required :start_date, Time
|
795
1214
|
|
796
|
-
# @!method initialize(
|
1215
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, percentage_discount:, start_date:, discount_type: :percentage)
|
797
1216
|
# Some parameter documentations has been truncated, see
|
798
1217
|
# {Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage} for
|
799
1218
|
# more details.
|
800
1219
|
#
|
801
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
802
|
-
#
|
803
1220
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
|
804
1221
|
#
|
805
1222
|
# @param end_date [Time, nil] The end date of the discount interval.
|
806
1223
|
#
|
1224
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter>] The filters that determine which prices this discount interval applies to.
|
1225
|
+
#
|
807
1226
|
# @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
|
808
1227
|
#
|
809
1228
|
# @param start_date [Time] The start date of the discount interval.
|
810
1229
|
#
|
811
1230
|
# @param discount_type [Symbol, :percentage]
|
1231
|
+
|
1232
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1233
|
+
# @!attribute field
|
1234
|
+
# The property of the price to filter on.
|
1235
|
+
#
|
1236
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter::Field]
|
1237
|
+
required :field,
|
1238
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter::Field }
|
1239
|
+
|
1240
|
+
# @!attribute operator
|
1241
|
+
# Should prices that match the filter be included or excluded.
|
1242
|
+
#
|
1243
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter::Operator]
|
1244
|
+
required :operator,
|
1245
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter::Operator }
|
1246
|
+
|
1247
|
+
# @!attribute values
|
1248
|
+
# The IDs or values that match this filter.
|
1249
|
+
#
|
1250
|
+
# @return [Array<String>]
|
1251
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1252
|
+
|
1253
|
+
# @!method initialize(field:, operator:, values:)
|
1254
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter::Field] The property of the price to filter on.
|
1255
|
+
#
|
1256
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter::Operator] Should prices that match the filter be included or excluded.
|
1257
|
+
#
|
1258
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1259
|
+
|
1260
|
+
# The property of the price to filter on.
|
1261
|
+
#
|
1262
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter#field
|
1263
|
+
module Field
|
1264
|
+
extend Orb::Internal::Type::Enum
|
1265
|
+
|
1266
|
+
PRICE_ID = :price_id
|
1267
|
+
ITEM_ID = :item_id
|
1268
|
+
PRICE_TYPE = :price_type
|
1269
|
+
CURRENCY = :currency
|
1270
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1271
|
+
|
1272
|
+
# @!method self.values
|
1273
|
+
# @return [Array<Symbol>]
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
# Should prices that match the filter be included or excluded.
|
1277
|
+
#
|
1278
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::Filter#operator
|
1279
|
+
module Operator
|
1280
|
+
extend Orb::Internal::Type::Enum
|
1281
|
+
|
1282
|
+
INCLUDES = :includes
|
1283
|
+
EXCLUDES = :excludes
|
1284
|
+
|
1285
|
+
# @!method self.values
|
1286
|
+
# @return [Array<Symbol>]
|
1287
|
+
end
|
1288
|
+
end
|
812
1289
|
end
|
813
1290
|
|
814
1291
|
class Usage < Orb::Internal::Type::BaseModel
|
815
|
-
# @!attribute applies_to_price_ids
|
816
|
-
# The price ids that this discount interval applies to.
|
817
|
-
#
|
818
|
-
# @return [Array<String>]
|
819
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
820
|
-
|
821
1292
|
# @!attribute applies_to_price_interval_ids
|
822
1293
|
# The price interval ids that this discount interval applies to.
|
823
1294
|
#
|
@@ -835,6 +1306,13 @@ module Orb
|
|
835
1306
|
# @return [Time, nil]
|
836
1307
|
required :end_date, Time, nil?: true
|
837
1308
|
|
1309
|
+
# @!attribute filters
|
1310
|
+
# The filters that determine which prices this discount interval applies to.
|
1311
|
+
#
|
1312
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter>]
|
1313
|
+
required :filters,
|
1314
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter] }
|
1315
|
+
|
838
1316
|
# @!attribute start_date
|
839
1317
|
# The start date of the discount interval.
|
840
1318
|
#
|
@@ -848,22 +1326,80 @@ module Orb
|
|
848
1326
|
# @return [Float]
|
849
1327
|
required :usage_discount, Float
|
850
1328
|
|
851
|
-
# @!method initialize(
|
1329
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, start_date:, usage_discount:, discount_type: :usage)
|
852
1330
|
# Some parameter documentations has been truncated, see
|
853
1331
|
# {Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage} for more
|
854
1332
|
# details.
|
855
1333
|
#
|
856
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
857
|
-
#
|
858
1334
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this discount interval applies to.
|
859
1335
|
#
|
860
1336
|
# @param end_date [Time, nil] The end date of the discount interval.
|
861
1337
|
#
|
1338
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter>] The filters that determine which prices this discount interval applies to.
|
1339
|
+
#
|
862
1340
|
# @param start_date [Time] The start date of the discount interval.
|
863
1341
|
#
|
864
1342
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
865
1343
|
#
|
866
1344
|
# @param discount_type [Symbol, :usage]
|
1345
|
+
|
1346
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1347
|
+
# @!attribute field
|
1348
|
+
# The property of the price to filter on.
|
1349
|
+
#
|
1350
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter::Field]
|
1351
|
+
required :field,
|
1352
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter::Field }
|
1353
|
+
|
1354
|
+
# @!attribute operator
|
1355
|
+
# Should prices that match the filter be included or excluded.
|
1356
|
+
#
|
1357
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter::Operator]
|
1358
|
+
required :operator,
|
1359
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter::Operator }
|
1360
|
+
|
1361
|
+
# @!attribute values
|
1362
|
+
# The IDs or values that match this filter.
|
1363
|
+
#
|
1364
|
+
# @return [Array<String>]
|
1365
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1366
|
+
|
1367
|
+
# @!method initialize(field:, operator:, values:)
|
1368
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter::Field] The property of the price to filter on.
|
1369
|
+
#
|
1370
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter::Operator] Should prices that match the filter be included or excluded.
|
1371
|
+
#
|
1372
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1373
|
+
|
1374
|
+
# The property of the price to filter on.
|
1375
|
+
#
|
1376
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter#field
|
1377
|
+
module Field
|
1378
|
+
extend Orb::Internal::Type::Enum
|
1379
|
+
|
1380
|
+
PRICE_ID = :price_id
|
1381
|
+
ITEM_ID = :item_id
|
1382
|
+
PRICE_TYPE = :price_type
|
1383
|
+
CURRENCY = :currency
|
1384
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1385
|
+
|
1386
|
+
# @!method self.values
|
1387
|
+
# @return [Array<Symbol>]
|
1388
|
+
end
|
1389
|
+
|
1390
|
+
# Should prices that match the filter be included or excluded.
|
1391
|
+
#
|
1392
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::Filter#operator
|
1393
|
+
module Operator
|
1394
|
+
extend Orb::Internal::Type::Enum
|
1395
|
+
|
1396
|
+
INCLUDES = :includes
|
1397
|
+
EXCLUDES = :excludes
|
1398
|
+
|
1399
|
+
# @!method self.values
|
1400
|
+
# @return [Array<Symbol>]
|
1401
|
+
end
|
1402
|
+
end
|
867
1403
|
end
|
868
1404
|
|
869
1405
|
# @!method self.variants
|
@@ -899,12 +1435,6 @@ module Orb
|
|
899
1435
|
end
|
900
1436
|
|
901
1437
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
902
|
-
# @!attribute applies_to_price_ids
|
903
|
-
# The price ids that this maximum interval applies to.
|
904
|
-
#
|
905
|
-
# @return [Array<String>]
|
906
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
907
|
-
|
908
1438
|
# @!attribute applies_to_price_interval_ids
|
909
1439
|
# The price interval ids that this maximum interval applies to.
|
910
1440
|
#
|
@@ -917,6 +1447,13 @@ module Orb
|
|
917
1447
|
# @return [Time, nil]
|
918
1448
|
required :end_date, Time, nil?: true
|
919
1449
|
|
1450
|
+
# @!attribute filters
|
1451
|
+
# The filters that determine which prices this maximum interval applies to.
|
1452
|
+
#
|
1453
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter>]
|
1454
|
+
required :filters,
|
1455
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter] }
|
1456
|
+
|
920
1457
|
# @!attribute maximum_amount
|
921
1458
|
# The maximum amount to charge in a given billing period for the price intervals
|
922
1459
|
# this transform applies to.
|
@@ -930,29 +1467,80 @@ module Orb
|
|
930
1467
|
# @return [Time]
|
931
1468
|
required :start_date, Time
|
932
1469
|
|
933
|
-
# @!method initialize(
|
1470
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, maximum_amount:, start_date:)
|
934
1471
|
# Some parameter documentations has been truncated, see
|
935
1472
|
# {Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval} for more
|
936
1473
|
# details.
|
937
1474
|
#
|
938
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this maximum interval applies to.
|
939
|
-
#
|
940
1475
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this maximum interval applies to.
|
941
1476
|
#
|
942
1477
|
# @param end_date [Time, nil] The end date of the maximum interval.
|
943
1478
|
#
|
1479
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter>] The filters that determine which prices this maximum interval applies to.
|
1480
|
+
#
|
944
1481
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
|
945
1482
|
#
|
946
1483
|
# @param start_date [Time] The start date of the maximum interval.
|
1484
|
+
|
1485
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1486
|
+
# @!attribute field
|
1487
|
+
# The property of the price to filter on.
|
1488
|
+
#
|
1489
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter::Field]
|
1490
|
+
required :field, enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter::Field }
|
1491
|
+
|
1492
|
+
# @!attribute operator
|
1493
|
+
# Should prices that match the filter be included or excluded.
|
1494
|
+
#
|
1495
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter::Operator]
|
1496
|
+
required :operator,
|
1497
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter::Operator }
|
1498
|
+
|
1499
|
+
# @!attribute values
|
1500
|
+
# The IDs or values that match this filter.
|
1501
|
+
#
|
1502
|
+
# @return [Array<String>]
|
1503
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1504
|
+
|
1505
|
+
# @!method initialize(field:, operator:, values:)
|
1506
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter::Field] The property of the price to filter on.
|
1507
|
+
#
|
1508
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
|
1509
|
+
#
|
1510
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1511
|
+
|
1512
|
+
# The property of the price to filter on.
|
1513
|
+
#
|
1514
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter#field
|
1515
|
+
module Field
|
1516
|
+
extend Orb::Internal::Type::Enum
|
1517
|
+
|
1518
|
+
PRICE_ID = :price_id
|
1519
|
+
ITEM_ID = :item_id
|
1520
|
+
PRICE_TYPE = :price_type
|
1521
|
+
CURRENCY = :currency
|
1522
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1523
|
+
|
1524
|
+
# @!method self.values
|
1525
|
+
# @return [Array<Symbol>]
|
1526
|
+
end
|
1527
|
+
|
1528
|
+
# Should prices that match the filter be included or excluded.
|
1529
|
+
#
|
1530
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::Filter#operator
|
1531
|
+
module Operator
|
1532
|
+
extend Orb::Internal::Type::Enum
|
1533
|
+
|
1534
|
+
INCLUDES = :includes
|
1535
|
+
EXCLUDES = :excludes
|
1536
|
+
|
1537
|
+
# @!method self.values
|
1538
|
+
# @return [Array<Symbol>]
|
1539
|
+
end
|
1540
|
+
end
|
947
1541
|
end
|
948
1542
|
|
949
1543
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
950
|
-
# @!attribute applies_to_price_ids
|
951
|
-
# The price ids that this minimum interval applies to.
|
952
|
-
#
|
953
|
-
# @return [Array<String>]
|
954
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
955
|
-
|
956
1544
|
# @!attribute applies_to_price_interval_ids
|
957
1545
|
# The price interval ids that this minimum interval applies to.
|
958
1546
|
#
|
@@ -965,6 +1553,13 @@ module Orb
|
|
965
1553
|
# @return [Time, nil]
|
966
1554
|
required :end_date, Time, nil?: true
|
967
1555
|
|
1556
|
+
# @!attribute filters
|
1557
|
+
# The filters that determine which prices this minimum interval applies to.
|
1558
|
+
#
|
1559
|
+
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter>]
|
1560
|
+
required :filters,
|
1561
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter] }
|
1562
|
+
|
968
1563
|
# @!attribute minimum_amount
|
969
1564
|
# The minimum amount to charge in a given billing period for the price intervals
|
970
1565
|
# this minimum applies to.
|
@@ -978,20 +1573,77 @@ module Orb
|
|
978
1573
|
# @return [Time]
|
979
1574
|
required :start_date, Time
|
980
1575
|
|
981
|
-
# @!method initialize(
|
1576
|
+
# @!method initialize(applies_to_price_interval_ids:, end_date:, filters:, minimum_amount:, start_date:)
|
982
1577
|
# Some parameter documentations has been truncated, see
|
983
1578
|
# {Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval} for more
|
984
1579
|
# details.
|
985
1580
|
#
|
986
|
-
# @param applies_to_price_ids [Array<String>] The price ids that this minimum interval applies to.
|
987
|
-
#
|
988
1581
|
# @param applies_to_price_interval_ids [Array<String>] The price interval ids that this minimum interval applies to.
|
989
1582
|
#
|
990
1583
|
# @param end_date [Time, nil] The end date of the minimum interval.
|
991
1584
|
#
|
1585
|
+
# @param filters [Array<Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter>] The filters that determine which prices this minimum interval applies to.
|
1586
|
+
#
|
992
1587
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
|
993
1588
|
#
|
994
1589
|
# @param start_date [Time] The start date of the minimum interval.
|
1590
|
+
|
1591
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1592
|
+
# @!attribute field
|
1593
|
+
# The property of the price to filter on.
|
1594
|
+
#
|
1595
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter::Field]
|
1596
|
+
required :field, enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter::Field }
|
1597
|
+
|
1598
|
+
# @!attribute operator
|
1599
|
+
# Should prices that match the filter be included or excluded.
|
1600
|
+
#
|
1601
|
+
# @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter::Operator]
|
1602
|
+
required :operator,
|
1603
|
+
enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter::Operator }
|
1604
|
+
|
1605
|
+
# @!attribute values
|
1606
|
+
# The IDs or values that match this filter.
|
1607
|
+
#
|
1608
|
+
# @return [Array<String>]
|
1609
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1610
|
+
|
1611
|
+
# @!method initialize(field:, operator:, values:)
|
1612
|
+
# @param field [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter::Field] The property of the price to filter on.
|
1613
|
+
#
|
1614
|
+
# @param operator [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter::Operator] Should prices that match the filter be included or excluded.
|
1615
|
+
#
|
1616
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1617
|
+
|
1618
|
+
# The property of the price to filter on.
|
1619
|
+
#
|
1620
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter#field
|
1621
|
+
module Field
|
1622
|
+
extend Orb::Internal::Type::Enum
|
1623
|
+
|
1624
|
+
PRICE_ID = :price_id
|
1625
|
+
ITEM_ID = :item_id
|
1626
|
+
PRICE_TYPE = :price_type
|
1627
|
+
CURRENCY = :currency
|
1628
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1629
|
+
|
1630
|
+
# @!method self.values
|
1631
|
+
# @return [Array<Symbol>]
|
1632
|
+
end
|
1633
|
+
|
1634
|
+
# Should prices that match the filter be included or excluded.
|
1635
|
+
#
|
1636
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::Filter#operator
|
1637
|
+
module Operator
|
1638
|
+
extend Orb::Internal::Type::Enum
|
1639
|
+
|
1640
|
+
INCLUDES = :includes
|
1641
|
+
EXCLUDES = :excludes
|
1642
|
+
|
1643
|
+
# @!method self.values
|
1644
|
+
# @return [Array<Symbol>]
|
1645
|
+
end
|
1646
|
+
end
|
995
1647
|
end
|
996
1648
|
|
997
1649
|
# @see Orb::Models::SubscriptionUpdateTrialResponse#pending_subscription_change
|