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