orb-billing 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/base_model.rb +2 -2
- data/lib/orb/internal/type/union.rb +6 -6
- data/lib/orb/internal/util.rb +5 -1
- data/lib/orb/models/alert.rb +33 -1
- data/lib/orb/models/amount_discount.rb +10 -10
- data/lib/orb/models/credit_note_create_params.rb +9 -9
- data/lib/orb/models/customer_create_params.rb +21 -3
- data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
- data/lib/orb/models/customer_update_params.rb +21 -3
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
- data/lib/orb/models/invoice.rb +626 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
- data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
- data/lib/orb/models/item.rb +18 -1
- data/lib/orb/models/item_archive_params.rb +14 -0
- data/lib/orb/models/item_create_params.rb +14 -1
- data/lib/orb/models/item_update_params.rb +16 -1
- data/lib/orb/models/percentage_discount.rb +10 -10
- data/lib/orb/models/plan.rb +618 -9
- data/lib/orb/models/plan_create_params.rb +2066 -30
- data/lib/orb/models/plan_set_default_version_params.rb +22 -0
- data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
- data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
- data/lib/orb/models/plans/version_create_params.rb +17794 -0
- data/lib/orb/models/plans/version_create_response.rb +814 -0
- data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
- data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
- data/lib/orb/models/price.rb +4124 -70
- data/lib/orb/models/price_create_params.rb +45 -1
- data/lib/orb/models/price_evaluate_params.rb +8529 -21
- data/lib/orb/models/price_evaluate_response.rb +38 -3
- data/lib/orb/models/subscription.rb +730 -54
- data/lib/orb/models/subscription_cancel_response.rb +706 -54
- data/lib/orb/models/subscription_change_apply_response.rb +728 -54
- data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
- data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
- data/lib/orb/models/subscription_create_params.rb +5992 -1698
- data/lib/orb/models/subscription_create_response.rb +706 -54
- data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
- data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
- data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
- data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
- data/lib/orb/models/subscription_update_trial_response.rb +706 -54
- data/lib/orb/models/trial_discount.rb +10 -10
- data/lib/orb/models/usage_discount.rb +10 -10
- data/lib/orb/models.rb +4 -0
- data/lib/orb/resources/credit_notes.rb +3 -3
- data/lib/orb/resources/customers/balance_transactions.rb +0 -7
- data/lib/orb/resources/customers.rb +4 -7
- data/lib/orb/resources/dimensional_price_groups.rb +1 -1
- data/lib/orb/resources/items.rb +34 -2
- data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
- data/lib/orb/resources/plans/external_plan_id.rb +32 -1
- data/lib/orb/resources/plans/versions.rb +86 -0
- data/lib/orb/resources/plans.rb +33 -2
- data/lib/orb/resources/prices.rb +23 -17
- data/lib/orb/resources/subscriptions.rb +5 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +16 -1
- data/rbi/orb/models/alert.rbi +50 -3
- data/rbi/orb/models/amount_discount.rbi +8 -8
- data/rbi/orb/models/credit_note_create_params.rbi +8 -8
- data/rbi/orb/models/customer_create_params.rbi +38 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
- data/rbi/orb/models/customer_update_params.rbi +38 -4
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
- data/rbi/orb/models/invoice.rbi +1451 -35
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
- data/rbi/orb/models/item.rbi +20 -1
- data/rbi/orb/models/item_archive_params.rbi +25 -0
- data/rbi/orb/models/item_create_params.rbi +18 -1
- data/rbi/orb/models/item_update_params.rbi +17 -1
- data/rbi/orb/models/percentage_discount.rbi +10 -10
- data/rbi/orb/models/plan.rbi +1339 -4
- data/rbi/orb/models/plan_create_params.rbi +3833 -29
- data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
- data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
- data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
- data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
- data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
- data/rbi/orb/models/price.rbi +9447 -441
- data/rbi/orb/models/price_create_params.rbi +80 -0
- data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
- data/rbi/orb/models/price_evaluate_response.rbi +68 -5
- data/rbi/orb/models/subscription.rbi +1654 -44
- data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
- data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
- data/rbi/orb/models/subscription_create_response.rbi +1692 -44
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
- data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
- data/rbi/orb/models/trial_discount.rbi +8 -8
- data/rbi/orb/models/usage_discount.rbi +10 -10
- data/rbi/orb/models.rbi +4 -0
- data/rbi/orb/resources/credit_notes.rbi +3 -3
- data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
- data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
- data/rbi/orb/resources/customers.rbi +7 -7
- data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
- data/rbi/orb/resources/items.rbi +20 -0
- data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
- data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
- data/rbi/orb/resources/plans/versions.rbi +91 -0
- data/rbi/orb/resources/plans.rbi +27 -2
- data/rbi/orb/resources/prices.rbi +27 -17
- data/rbi/orb/resources/subscriptions.rbi +9 -1
- data/sig/orb/models/alert.rbs +20 -3
- data/sig/orb/models/amount_discount.rbs +5 -5
- data/sig/orb/models/credit_note_create_params.rbs +6 -6
- data/sig/orb/models/customer_create_params.rbs +13 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
- data/sig/orb/models/customer_update_params.rbs +13 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
- data/sig/orb/models/invoice.rbs +558 -4
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
- data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
- data/sig/orb/models/item.rbs +5 -0
- data/sig/orb/models/item_archive_params.rbs +14 -0
- data/sig/orb/models/item_create_params.rbs +10 -2
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/percentage_discount.rbs +5 -5
- data/sig/orb/models/plan.rbs +538 -4
- data/sig/orb/models/plan_create_params.rbs +1460 -3
- data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
- data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
- data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
- data/sig/orb/models/plans/version_create_params.rbs +12898 -0
- data/sig/orb/models/plans/version_create_response.rbs +662 -0
- data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
- data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
- data/sig/orb/models/price.rbs +3512 -96
- data/sig/orb/models/price_create_params.rbs +32 -0
- data/sig/orb/models/price_evaluate_params.rbs +6187 -10
- data/sig/orb/models/price_evaluate_response.rbs +41 -4
- data/sig/orb/models/subscription.rbs +609 -29
- data/sig/orb/models/subscription_cancel_response.rbs +609 -29
- data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
- data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
- data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
- data/sig/orb/models/subscription_create_params.rbs +4450 -1466
- data/sig/orb/models/subscription_create_response.rbs +609 -29
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
- data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
- data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
- data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
- data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
- data/sig/orb/models/trial_discount.rbs +5 -5
- data/sig/orb/models/usage_discount.rbs +5 -5
- data/sig/orb/models.rbs +4 -0
- data/sig/orb/resources/credit_notes.rbs +1 -1
- data/sig/orb/resources/items.rbs +7 -0
- data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
- data/sig/orb/resources/plans/versions.rbs +28 -0
- data/sig/orb/resources/plans.rbs +8 -0
- data/sig/orb/resources/prices.rbs +3 -3
- data/sig/orb/resources/subscriptions.rbs +2 -0
- metadata +41 -2
data/lib/orb/models/plan.rb
CHANGED
@@ -55,6 +55,7 @@ module Orb
|
|
55
55
|
required :description, String
|
56
56
|
|
57
57
|
# @!attribute discount
|
58
|
+
# @deprecated
|
58
59
|
#
|
59
60
|
# @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil]
|
60
61
|
required :discount, union: -> { Orb::Discount }, nil?: true
|
@@ -75,11 +76,13 @@ module Orb
|
|
75
76
|
required :invoicing_currency, String
|
76
77
|
|
77
78
|
# @!attribute maximum
|
79
|
+
# @deprecated
|
78
80
|
#
|
79
81
|
# @return [Orb::Models::Plan::Maximum, nil]
|
80
82
|
required :maximum, -> { Orb::Plan::Maximum }, nil?: true
|
81
83
|
|
82
84
|
# @!attribute maximum_amount
|
85
|
+
# @deprecated
|
83
86
|
#
|
84
87
|
# @return [String, nil]
|
85
88
|
required :maximum_amount, String, nil?: true
|
@@ -94,11 +97,13 @@ module Orb
|
|
94
97
|
required :metadata, Orb::Internal::Type::HashOf[String]
|
95
98
|
|
96
99
|
# @!attribute minimum
|
100
|
+
# @deprecated
|
97
101
|
#
|
98
102
|
# @return [Orb::Models::Plan::Minimum, nil]
|
99
103
|
required :minimum, -> { Orb::Plan::Minimum }, nil?: true
|
100
104
|
|
101
105
|
# @!attribute minimum_amount
|
106
|
+
# @deprecated
|
102
107
|
#
|
103
108
|
# @return [String, nil]
|
104
109
|
required :minimum_amount, String, nil?: true
|
@@ -234,11 +239,19 @@ module Orb
|
|
234
239
|
required :adjustment_type, const: :usage_discount
|
235
240
|
|
236
241
|
# @!attribute applies_to_price_ids
|
242
|
+
# @deprecated
|
243
|
+
#
|
237
244
|
# The price IDs that this adjustment applies to.
|
238
245
|
#
|
239
246
|
# @return [Array<String>]
|
240
247
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
241
248
|
|
249
|
+
# @!attribute filters
|
250
|
+
# The filters that determine which prices to apply this adjustment to.
|
251
|
+
#
|
252
|
+
# @return [Array<Orb::Models::Plan::Adjustment::UsageDiscount::Filter>]
|
253
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::UsageDiscount::Filter] }
|
254
|
+
|
242
255
|
# @!attribute is_invoice_level
|
243
256
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
244
257
|
# that apply to only one price.
|
@@ -265,7 +278,7 @@ module Orb
|
|
265
278
|
# @return [Float]
|
266
279
|
required :usage_discount, Float
|
267
280
|
|
268
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
281
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
269
282
|
# Some parameter documentations has been truncated, see
|
270
283
|
# {Orb::Models::Plan::Adjustment::UsageDiscount} for more details.
|
271
284
|
#
|
@@ -273,6 +286,8 @@ module Orb
|
|
273
286
|
#
|
274
287
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
275
288
|
#
|
289
|
+
# @param filters [Array<Orb::Models::Plan::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
290
|
+
#
|
276
291
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
277
292
|
#
|
278
293
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
@@ -282,6 +297,62 @@ module Orb
|
|
282
297
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
283
298
|
#
|
284
299
|
# @param adjustment_type [Symbol, :usage_discount]
|
300
|
+
|
301
|
+
class Filter < Orb::Internal::Type::BaseModel
|
302
|
+
# @!attribute field
|
303
|
+
# The property of the price to filter on.
|
304
|
+
#
|
305
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::UsageDiscount::Filter::Field]
|
306
|
+
required :field, enum: -> { Orb::Plan::Adjustment::UsageDiscount::Filter::Field }
|
307
|
+
|
308
|
+
# @!attribute operator
|
309
|
+
# Should prices that match the filter be included or excluded.
|
310
|
+
#
|
311
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::UsageDiscount::Filter::Operator]
|
312
|
+
required :operator, enum: -> { Orb::Plan::Adjustment::UsageDiscount::Filter::Operator }
|
313
|
+
|
314
|
+
# @!attribute values
|
315
|
+
# The IDs or values that match this filter.
|
316
|
+
#
|
317
|
+
# @return [Array<String>]
|
318
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
319
|
+
|
320
|
+
# @!method initialize(field:, operator:, values:)
|
321
|
+
# @param field [Symbol, Orb::Models::Plan::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
322
|
+
#
|
323
|
+
# @param operator [Symbol, Orb::Models::Plan::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
324
|
+
#
|
325
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
326
|
+
|
327
|
+
# The property of the price to filter on.
|
328
|
+
#
|
329
|
+
# @see Orb::Models::Plan::Adjustment::UsageDiscount::Filter#field
|
330
|
+
module Field
|
331
|
+
extend Orb::Internal::Type::Enum
|
332
|
+
|
333
|
+
PRICE_ID = :price_id
|
334
|
+
ITEM_ID = :item_id
|
335
|
+
PRICE_TYPE = :price_type
|
336
|
+
CURRENCY = :currency
|
337
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
338
|
+
|
339
|
+
# @!method self.values
|
340
|
+
# @return [Array<Symbol>]
|
341
|
+
end
|
342
|
+
|
343
|
+
# Should prices that match the filter be included or excluded.
|
344
|
+
#
|
345
|
+
# @see Orb::Models::Plan::Adjustment::UsageDiscount::Filter#operator
|
346
|
+
module Operator
|
347
|
+
extend Orb::Internal::Type::Enum
|
348
|
+
|
349
|
+
INCLUDES = :includes
|
350
|
+
EXCLUDES = :excludes
|
351
|
+
|
352
|
+
# @!method self.values
|
353
|
+
# @return [Array<Symbol>]
|
354
|
+
end
|
355
|
+
end
|
285
356
|
end
|
286
357
|
|
287
358
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -303,11 +374,22 @@ module Orb
|
|
303
374
|
required :amount_discount, String
|
304
375
|
|
305
376
|
# @!attribute applies_to_price_ids
|
377
|
+
# @deprecated
|
378
|
+
#
|
306
379
|
# The price IDs that this adjustment applies to.
|
307
380
|
#
|
308
381
|
# @return [Array<String>]
|
309
382
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
310
383
|
|
384
|
+
# @!attribute filters
|
385
|
+
# The filters that determine which prices to apply this adjustment to.
|
386
|
+
#
|
387
|
+
# @return [Array<Orb::Models::Plan::Adjustment::AmountDiscount::Filter>]
|
388
|
+
required :filters,
|
389
|
+
-> {
|
390
|
+
Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::AmountDiscount::Filter]
|
391
|
+
}
|
392
|
+
|
311
393
|
# @!attribute is_invoice_level
|
312
394
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
313
395
|
# that apply to only one price.
|
@@ -327,7 +409,7 @@ module Orb
|
|
327
409
|
# @return [String, nil]
|
328
410
|
required :reason, String, nil?: true
|
329
411
|
|
330
|
-
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
412
|
+
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
331
413
|
# Some parameter documentations has been truncated, see
|
332
414
|
# {Orb::Models::Plan::Adjustment::AmountDiscount} for more details.
|
333
415
|
#
|
@@ -337,6 +419,8 @@ module Orb
|
|
337
419
|
#
|
338
420
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
339
421
|
#
|
422
|
+
# @param filters [Array<Orb::Models::Plan::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
423
|
+
#
|
340
424
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
341
425
|
#
|
342
426
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
@@ -344,6 +428,62 @@ module Orb
|
|
344
428
|
# @param reason [String, nil] The reason for the adjustment.
|
345
429
|
#
|
346
430
|
# @param adjustment_type [Symbol, :amount_discount]
|
431
|
+
|
432
|
+
class Filter < Orb::Internal::Type::BaseModel
|
433
|
+
# @!attribute field
|
434
|
+
# The property of the price to filter on.
|
435
|
+
#
|
436
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::AmountDiscount::Filter::Field]
|
437
|
+
required :field, enum: -> { Orb::Plan::Adjustment::AmountDiscount::Filter::Field }
|
438
|
+
|
439
|
+
# @!attribute operator
|
440
|
+
# Should prices that match the filter be included or excluded.
|
441
|
+
#
|
442
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::AmountDiscount::Filter::Operator]
|
443
|
+
required :operator, enum: -> { Orb::Plan::Adjustment::AmountDiscount::Filter::Operator }
|
444
|
+
|
445
|
+
# @!attribute values
|
446
|
+
# The IDs or values that match this filter.
|
447
|
+
#
|
448
|
+
# @return [Array<String>]
|
449
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
450
|
+
|
451
|
+
# @!method initialize(field:, operator:, values:)
|
452
|
+
# @param field [Symbol, Orb::Models::Plan::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
453
|
+
#
|
454
|
+
# @param operator [Symbol, Orb::Models::Plan::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
455
|
+
#
|
456
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
457
|
+
|
458
|
+
# The property of the price to filter on.
|
459
|
+
#
|
460
|
+
# @see Orb::Models::Plan::Adjustment::AmountDiscount::Filter#field
|
461
|
+
module Field
|
462
|
+
extend Orb::Internal::Type::Enum
|
463
|
+
|
464
|
+
PRICE_ID = :price_id
|
465
|
+
ITEM_ID = :item_id
|
466
|
+
PRICE_TYPE = :price_type
|
467
|
+
CURRENCY = :currency
|
468
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
469
|
+
|
470
|
+
# @!method self.values
|
471
|
+
# @return [Array<Symbol>]
|
472
|
+
end
|
473
|
+
|
474
|
+
# Should prices that match the filter be included or excluded.
|
475
|
+
#
|
476
|
+
# @see Orb::Models::Plan::Adjustment::AmountDiscount::Filter#operator
|
477
|
+
module Operator
|
478
|
+
extend Orb::Internal::Type::Enum
|
479
|
+
|
480
|
+
INCLUDES = :includes
|
481
|
+
EXCLUDES = :excludes
|
482
|
+
|
483
|
+
# @!method self.values
|
484
|
+
# @return [Array<Symbol>]
|
485
|
+
end
|
486
|
+
end
|
347
487
|
end
|
348
488
|
|
349
489
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
@@ -358,11 +498,22 @@ module Orb
|
|
358
498
|
required :adjustment_type, const: :percentage_discount
|
359
499
|
|
360
500
|
# @!attribute applies_to_price_ids
|
501
|
+
# @deprecated
|
502
|
+
#
|
361
503
|
# The price IDs that this adjustment applies to.
|
362
504
|
#
|
363
505
|
# @return [Array<String>]
|
364
506
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
365
507
|
|
508
|
+
# @!attribute filters
|
509
|
+
# The filters that determine which prices to apply this adjustment to.
|
510
|
+
#
|
511
|
+
# @return [Array<Orb::Models::Plan::Adjustment::PercentageDiscount::Filter>]
|
512
|
+
required :filters,
|
513
|
+
-> {
|
514
|
+
Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::PercentageDiscount::Filter]
|
515
|
+
}
|
516
|
+
|
366
517
|
# @!attribute is_invoice_level
|
367
518
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
368
519
|
# that apply to only one price.
|
@@ -389,7 +540,7 @@ module Orb
|
|
389
540
|
# @return [String, nil]
|
390
541
|
required :reason, String, nil?: true
|
391
542
|
|
392
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
543
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
393
544
|
# Some parameter documentations has been truncated, see
|
394
545
|
# {Orb::Models::Plan::Adjustment::PercentageDiscount} for more details.
|
395
546
|
#
|
@@ -397,6 +548,8 @@ module Orb
|
|
397
548
|
#
|
398
549
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
399
550
|
#
|
551
|
+
# @param filters [Array<Orb::Models::Plan::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
552
|
+
#
|
400
553
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
401
554
|
#
|
402
555
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
@@ -406,6 +559,62 @@ module Orb
|
|
406
559
|
# @param reason [String, nil] The reason for the adjustment.
|
407
560
|
#
|
408
561
|
# @param adjustment_type [Symbol, :percentage_discount]
|
562
|
+
|
563
|
+
class Filter < Orb::Internal::Type::BaseModel
|
564
|
+
# @!attribute field
|
565
|
+
# The property of the price to filter on.
|
566
|
+
#
|
567
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::PercentageDiscount::Filter::Field]
|
568
|
+
required :field, enum: -> { Orb::Plan::Adjustment::PercentageDiscount::Filter::Field }
|
569
|
+
|
570
|
+
# @!attribute operator
|
571
|
+
# Should prices that match the filter be included or excluded.
|
572
|
+
#
|
573
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::PercentageDiscount::Filter::Operator]
|
574
|
+
required :operator, enum: -> { Orb::Plan::Adjustment::PercentageDiscount::Filter::Operator }
|
575
|
+
|
576
|
+
# @!attribute values
|
577
|
+
# The IDs or values that match this filter.
|
578
|
+
#
|
579
|
+
# @return [Array<String>]
|
580
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
581
|
+
|
582
|
+
# @!method initialize(field:, operator:, values:)
|
583
|
+
# @param field [Symbol, Orb::Models::Plan::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
584
|
+
#
|
585
|
+
# @param operator [Symbol, Orb::Models::Plan::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
586
|
+
#
|
587
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
588
|
+
|
589
|
+
# The property of the price to filter on.
|
590
|
+
#
|
591
|
+
# @see Orb::Models::Plan::Adjustment::PercentageDiscount::Filter#field
|
592
|
+
module Field
|
593
|
+
extend Orb::Internal::Type::Enum
|
594
|
+
|
595
|
+
PRICE_ID = :price_id
|
596
|
+
ITEM_ID = :item_id
|
597
|
+
PRICE_TYPE = :price_type
|
598
|
+
CURRENCY = :currency
|
599
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
600
|
+
|
601
|
+
# @!method self.values
|
602
|
+
# @return [Array<Symbol>]
|
603
|
+
end
|
604
|
+
|
605
|
+
# Should prices that match the filter be included or excluded.
|
606
|
+
#
|
607
|
+
# @see Orb::Models::Plan::Adjustment::PercentageDiscount::Filter#operator
|
608
|
+
module Operator
|
609
|
+
extend Orb::Internal::Type::Enum
|
610
|
+
|
611
|
+
INCLUDES = :includes
|
612
|
+
EXCLUDES = :excludes
|
613
|
+
|
614
|
+
# @!method self.values
|
615
|
+
# @return [Array<Symbol>]
|
616
|
+
end
|
617
|
+
end
|
409
618
|
end
|
410
619
|
|
411
620
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -420,11 +629,19 @@ module Orb
|
|
420
629
|
required :adjustment_type, const: :minimum
|
421
630
|
|
422
631
|
# @!attribute applies_to_price_ids
|
632
|
+
# @deprecated
|
633
|
+
#
|
423
634
|
# The price IDs that this adjustment applies to.
|
424
635
|
#
|
425
636
|
# @return [Array<String>]
|
426
637
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
427
638
|
|
639
|
+
# @!attribute filters
|
640
|
+
# The filters that determine which prices to apply this adjustment to.
|
641
|
+
#
|
642
|
+
# @return [Array<Orb::Models::Plan::Adjustment::Minimum::Filter>]
|
643
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::Minimum::Filter] }
|
644
|
+
|
428
645
|
# @!attribute is_invoice_level
|
429
646
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
430
647
|
# that apply to only one price.
|
@@ -457,7 +674,7 @@ module Orb
|
|
457
674
|
# @return [String, nil]
|
458
675
|
required :reason, String, nil?: true
|
459
676
|
|
460
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
677
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
461
678
|
# Some parameter documentations has been truncated, see
|
462
679
|
# {Orb::Models::Plan::Adjustment::Minimum} for more details.
|
463
680
|
#
|
@@ -465,6 +682,8 @@ module Orb
|
|
465
682
|
#
|
466
683
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
467
684
|
#
|
685
|
+
# @param filters [Array<Orb::Models::Plan::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
|
686
|
+
#
|
468
687
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
469
688
|
#
|
470
689
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
@@ -476,6 +695,62 @@ module Orb
|
|
476
695
|
# @param reason [String, nil] The reason for the adjustment.
|
477
696
|
#
|
478
697
|
# @param adjustment_type [Symbol, :minimum]
|
698
|
+
|
699
|
+
class Filter < Orb::Internal::Type::BaseModel
|
700
|
+
# @!attribute field
|
701
|
+
# The property of the price to filter on.
|
702
|
+
#
|
703
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::Minimum::Filter::Field]
|
704
|
+
required :field, enum: -> { Orb::Plan::Adjustment::Minimum::Filter::Field }
|
705
|
+
|
706
|
+
# @!attribute operator
|
707
|
+
# Should prices that match the filter be included or excluded.
|
708
|
+
#
|
709
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::Minimum::Filter::Operator]
|
710
|
+
required :operator, enum: -> { Orb::Plan::Adjustment::Minimum::Filter::Operator }
|
711
|
+
|
712
|
+
# @!attribute values
|
713
|
+
# The IDs or values that match this filter.
|
714
|
+
#
|
715
|
+
# @return [Array<String>]
|
716
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
717
|
+
|
718
|
+
# @!method initialize(field:, operator:, values:)
|
719
|
+
# @param field [Symbol, Orb::Models::Plan::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
720
|
+
#
|
721
|
+
# @param operator [Symbol, Orb::Models::Plan::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
722
|
+
#
|
723
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
724
|
+
|
725
|
+
# The property of the price to filter on.
|
726
|
+
#
|
727
|
+
# @see Orb::Models::Plan::Adjustment::Minimum::Filter#field
|
728
|
+
module Field
|
729
|
+
extend Orb::Internal::Type::Enum
|
730
|
+
|
731
|
+
PRICE_ID = :price_id
|
732
|
+
ITEM_ID = :item_id
|
733
|
+
PRICE_TYPE = :price_type
|
734
|
+
CURRENCY = :currency
|
735
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
736
|
+
|
737
|
+
# @!method self.values
|
738
|
+
# @return [Array<Symbol>]
|
739
|
+
end
|
740
|
+
|
741
|
+
# Should prices that match the filter be included or excluded.
|
742
|
+
#
|
743
|
+
# @see Orb::Models::Plan::Adjustment::Minimum::Filter#operator
|
744
|
+
module Operator
|
745
|
+
extend Orb::Internal::Type::Enum
|
746
|
+
|
747
|
+
INCLUDES = :includes
|
748
|
+
EXCLUDES = :excludes
|
749
|
+
|
750
|
+
# @!method self.values
|
751
|
+
# @return [Array<Symbol>]
|
752
|
+
end
|
753
|
+
end
|
479
754
|
end
|
480
755
|
|
481
756
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -490,11 +765,19 @@ module Orb
|
|
490
765
|
required :adjustment_type, const: :maximum
|
491
766
|
|
492
767
|
# @!attribute applies_to_price_ids
|
768
|
+
# @deprecated
|
769
|
+
#
|
493
770
|
# The price IDs that this adjustment applies to.
|
494
771
|
#
|
495
772
|
# @return [Array<String>]
|
496
773
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
497
774
|
|
775
|
+
# @!attribute filters
|
776
|
+
# The filters that determine which prices to apply this adjustment to.
|
777
|
+
#
|
778
|
+
# @return [Array<Orb::Models::Plan::Adjustment::Maximum::Filter>]
|
779
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::Maximum::Filter] }
|
780
|
+
|
498
781
|
# @!attribute is_invoice_level
|
499
782
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
500
783
|
# that apply to only one price.
|
@@ -521,7 +804,7 @@ module Orb
|
|
521
804
|
# @return [String, nil]
|
522
805
|
required :reason, String, nil?: true
|
523
806
|
|
524
|
-
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
807
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
525
808
|
# Some parameter documentations has been truncated, see
|
526
809
|
# {Orb::Models::Plan::Adjustment::Maximum} for more details.
|
527
810
|
#
|
@@ -529,6 +812,8 @@ module Orb
|
|
529
812
|
#
|
530
813
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
531
814
|
#
|
815
|
+
# @param filters [Array<Orb::Models::Plan::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
|
816
|
+
#
|
532
817
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
533
818
|
#
|
534
819
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
@@ -538,6 +823,62 @@ module Orb
|
|
538
823
|
# @param reason [String, nil] The reason for the adjustment.
|
539
824
|
#
|
540
825
|
# @param adjustment_type [Symbol, :maximum]
|
826
|
+
|
827
|
+
class Filter < Orb::Internal::Type::BaseModel
|
828
|
+
# @!attribute field
|
829
|
+
# The property of the price to filter on.
|
830
|
+
#
|
831
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::Maximum::Filter::Field]
|
832
|
+
required :field, enum: -> { Orb::Plan::Adjustment::Maximum::Filter::Field }
|
833
|
+
|
834
|
+
# @!attribute operator
|
835
|
+
# Should prices that match the filter be included or excluded.
|
836
|
+
#
|
837
|
+
# @return [Symbol, Orb::Models::Plan::Adjustment::Maximum::Filter::Operator]
|
838
|
+
required :operator, enum: -> { Orb::Plan::Adjustment::Maximum::Filter::Operator }
|
839
|
+
|
840
|
+
# @!attribute values
|
841
|
+
# The IDs or values that match this filter.
|
842
|
+
#
|
843
|
+
# @return [Array<String>]
|
844
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
845
|
+
|
846
|
+
# @!method initialize(field:, operator:, values:)
|
847
|
+
# @param field [Symbol, Orb::Models::Plan::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
848
|
+
#
|
849
|
+
# @param operator [Symbol, Orb::Models::Plan::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
850
|
+
#
|
851
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
852
|
+
|
853
|
+
# The property of the price to filter on.
|
854
|
+
#
|
855
|
+
# @see Orb::Models::Plan::Adjustment::Maximum::Filter#field
|
856
|
+
module Field
|
857
|
+
extend Orb::Internal::Type::Enum
|
858
|
+
|
859
|
+
PRICE_ID = :price_id
|
860
|
+
ITEM_ID = :item_id
|
861
|
+
PRICE_TYPE = :price_type
|
862
|
+
CURRENCY = :currency
|
863
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
864
|
+
|
865
|
+
# @!method self.values
|
866
|
+
# @return [Array<Symbol>]
|
867
|
+
end
|
868
|
+
|
869
|
+
# Should prices that match the filter be included or excluded.
|
870
|
+
#
|
871
|
+
# @see Orb::Models::Plan::Adjustment::Maximum::Filter#operator
|
872
|
+
module Operator
|
873
|
+
extend Orb::Internal::Type::Enum
|
874
|
+
|
875
|
+
INCLUDES = :includes
|
876
|
+
EXCLUDES = :excludes
|
877
|
+
|
878
|
+
# @!method self.values
|
879
|
+
# @return [Array<Symbol>]
|
880
|
+
end
|
881
|
+
end
|
541
882
|
end
|
542
883
|
|
543
884
|
# @!method self.variants
|
@@ -575,52 +916,188 @@ module Orb
|
|
575
916
|
# @param name [String, nil]
|
576
917
|
end
|
577
918
|
|
919
|
+
# @deprecated
|
920
|
+
#
|
578
921
|
# @see Orb::Models::Plan#maximum
|
579
922
|
class Maximum < Orb::Internal::Type::BaseModel
|
580
923
|
# @!attribute applies_to_price_ids
|
924
|
+
# @deprecated
|
925
|
+
#
|
581
926
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
582
927
|
# maximums, this can be a subset of prices.
|
583
928
|
#
|
584
929
|
# @return [Array<String>]
|
585
930
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
586
931
|
|
932
|
+
# @!attribute filters
|
933
|
+
# The filters that determine which prices to apply this maximum to.
|
934
|
+
#
|
935
|
+
# @return [Array<Orb::Models::Plan::Maximum::Filter>]
|
936
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::Maximum::Filter] }
|
937
|
+
|
587
938
|
# @!attribute maximum_amount
|
588
939
|
# Maximum amount applied
|
589
940
|
#
|
590
941
|
# @return [String]
|
591
942
|
required :maximum_amount, String
|
592
943
|
|
593
|
-
# @!method initialize(applies_to_price_ids:, maximum_amount:)
|
944
|
+
# @!method initialize(applies_to_price_ids:, filters:, maximum_amount:)
|
594
945
|
# Some parameter documentations has been truncated, see
|
595
946
|
# {Orb::Models::Plan::Maximum} for more details.
|
596
947
|
#
|
597
948
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this maximum amount applies to. For plan/plan phase maxim
|
598
949
|
#
|
950
|
+
# @param filters [Array<Orb::Models::Plan::Maximum::Filter>] The filters that determine which prices to apply this maximum to.
|
951
|
+
#
|
599
952
|
# @param maximum_amount [String] Maximum amount applied
|
953
|
+
|
954
|
+
class Filter < Orb::Internal::Type::BaseModel
|
955
|
+
# @!attribute field
|
956
|
+
# The property of the price to filter on.
|
957
|
+
#
|
958
|
+
# @return [Symbol, Orb::Models::Plan::Maximum::Filter::Field]
|
959
|
+
required :field, enum: -> { Orb::Plan::Maximum::Filter::Field }
|
960
|
+
|
961
|
+
# @!attribute operator
|
962
|
+
# Should prices that match the filter be included or excluded.
|
963
|
+
#
|
964
|
+
# @return [Symbol, Orb::Models::Plan::Maximum::Filter::Operator]
|
965
|
+
required :operator, enum: -> { Orb::Plan::Maximum::Filter::Operator }
|
966
|
+
|
967
|
+
# @!attribute values
|
968
|
+
# The IDs or values that match this filter.
|
969
|
+
#
|
970
|
+
# @return [Array<String>]
|
971
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
972
|
+
|
973
|
+
# @!method initialize(field:, operator:, values:)
|
974
|
+
# @param field [Symbol, Orb::Models::Plan::Maximum::Filter::Field] The property of the price to filter on.
|
975
|
+
#
|
976
|
+
# @param operator [Symbol, Orb::Models::Plan::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
977
|
+
#
|
978
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
979
|
+
|
980
|
+
# The property of the price to filter on.
|
981
|
+
#
|
982
|
+
# @see Orb::Models::Plan::Maximum::Filter#field
|
983
|
+
module Field
|
984
|
+
extend Orb::Internal::Type::Enum
|
985
|
+
|
986
|
+
PRICE_ID = :price_id
|
987
|
+
ITEM_ID = :item_id
|
988
|
+
PRICE_TYPE = :price_type
|
989
|
+
CURRENCY = :currency
|
990
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
991
|
+
|
992
|
+
# @!method self.values
|
993
|
+
# @return [Array<Symbol>]
|
994
|
+
end
|
995
|
+
|
996
|
+
# Should prices that match the filter be included or excluded.
|
997
|
+
#
|
998
|
+
# @see Orb::Models::Plan::Maximum::Filter#operator
|
999
|
+
module Operator
|
1000
|
+
extend Orb::Internal::Type::Enum
|
1001
|
+
|
1002
|
+
INCLUDES = :includes
|
1003
|
+
EXCLUDES = :excludes
|
1004
|
+
|
1005
|
+
# @!method self.values
|
1006
|
+
# @return [Array<Symbol>]
|
1007
|
+
end
|
1008
|
+
end
|
600
1009
|
end
|
601
1010
|
|
1011
|
+
# @deprecated
|
1012
|
+
#
|
602
1013
|
# @see Orb::Models::Plan#minimum
|
603
1014
|
class Minimum < Orb::Internal::Type::BaseModel
|
604
1015
|
# @!attribute applies_to_price_ids
|
1016
|
+
# @deprecated
|
1017
|
+
#
|
605
1018
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
606
1019
|
# minimums, this can be a subset of prices.
|
607
1020
|
#
|
608
1021
|
# @return [Array<String>]
|
609
1022
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
610
1023
|
|
1024
|
+
# @!attribute filters
|
1025
|
+
# The filters that determine which prices to apply this minimum to.
|
1026
|
+
#
|
1027
|
+
# @return [Array<Orb::Models::Plan::Minimum::Filter>]
|
1028
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::Minimum::Filter] }
|
1029
|
+
|
611
1030
|
# @!attribute minimum_amount
|
612
1031
|
# Minimum amount applied
|
613
1032
|
#
|
614
1033
|
# @return [String]
|
615
1034
|
required :minimum_amount, String
|
616
1035
|
|
617
|
-
# @!method initialize(applies_to_price_ids:, minimum_amount:)
|
1036
|
+
# @!method initialize(applies_to_price_ids:, filters:, minimum_amount:)
|
618
1037
|
# Some parameter documentations has been truncated, see
|
619
1038
|
# {Orb::Models::Plan::Minimum} for more details.
|
620
1039
|
#
|
621
1040
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this minimum amount applies to. For plan/plan phase minim
|
622
1041
|
#
|
1042
|
+
# @param filters [Array<Orb::Models::Plan::Minimum::Filter>] The filters that determine which prices to apply this minimum to.
|
1043
|
+
#
|
623
1044
|
# @param minimum_amount [String] Minimum amount applied
|
1045
|
+
|
1046
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1047
|
+
# @!attribute field
|
1048
|
+
# The property of the price to filter on.
|
1049
|
+
#
|
1050
|
+
# @return [Symbol, Orb::Models::Plan::Minimum::Filter::Field]
|
1051
|
+
required :field, enum: -> { Orb::Plan::Minimum::Filter::Field }
|
1052
|
+
|
1053
|
+
# @!attribute operator
|
1054
|
+
# Should prices that match the filter be included or excluded.
|
1055
|
+
#
|
1056
|
+
# @return [Symbol, Orb::Models::Plan::Minimum::Filter::Operator]
|
1057
|
+
required :operator, enum: -> { Orb::Plan::Minimum::Filter::Operator }
|
1058
|
+
|
1059
|
+
# @!attribute values
|
1060
|
+
# The IDs or values that match this filter.
|
1061
|
+
#
|
1062
|
+
# @return [Array<String>]
|
1063
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1064
|
+
|
1065
|
+
# @!method initialize(field:, operator:, values:)
|
1066
|
+
# @param field [Symbol, Orb::Models::Plan::Minimum::Filter::Field] The property of the price to filter on.
|
1067
|
+
#
|
1068
|
+
# @param operator [Symbol, Orb::Models::Plan::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1069
|
+
#
|
1070
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1071
|
+
|
1072
|
+
# The property of the price to filter on.
|
1073
|
+
#
|
1074
|
+
# @see Orb::Models::Plan::Minimum::Filter#field
|
1075
|
+
module Field
|
1076
|
+
extend Orb::Internal::Type::Enum
|
1077
|
+
|
1078
|
+
PRICE_ID = :price_id
|
1079
|
+
ITEM_ID = :item_id
|
1080
|
+
PRICE_TYPE = :price_type
|
1081
|
+
CURRENCY = :currency
|
1082
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1083
|
+
|
1084
|
+
# @!method self.values
|
1085
|
+
# @return [Array<Symbol>]
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
# Should prices that match the filter be included or excluded.
|
1089
|
+
#
|
1090
|
+
# @see Orb::Models::Plan::Minimum::Filter#operator
|
1091
|
+
module Operator
|
1092
|
+
extend Orb::Internal::Type::Enum
|
1093
|
+
|
1094
|
+
INCLUDES = :includes
|
1095
|
+
EXCLUDES = :excludes
|
1096
|
+
|
1097
|
+
# @!method self.values
|
1098
|
+
# @return [Array<Symbol>]
|
1099
|
+
end
|
1100
|
+
end
|
624
1101
|
end
|
625
1102
|
|
626
1103
|
class PlanPhase < Orb::Internal::Type::BaseModel
|
@@ -725,49 +1202,181 @@ module Orb
|
|
725
1202
|
# @see Orb::Models::Plan::PlanPhase#maximum
|
726
1203
|
class Maximum < Orb::Internal::Type::BaseModel
|
727
1204
|
# @!attribute applies_to_price_ids
|
1205
|
+
# @deprecated
|
1206
|
+
#
|
728
1207
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
729
1208
|
# maximums, this can be a subset of prices.
|
730
1209
|
#
|
731
1210
|
# @return [Array<String>]
|
732
1211
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
733
1212
|
|
1213
|
+
# @!attribute filters
|
1214
|
+
# The filters that determine which prices to apply this maximum to.
|
1215
|
+
#
|
1216
|
+
# @return [Array<Orb::Models::Plan::PlanPhase::Maximum::Filter>]
|
1217
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::PlanPhase::Maximum::Filter] }
|
1218
|
+
|
734
1219
|
# @!attribute maximum_amount
|
735
1220
|
# Maximum amount applied
|
736
1221
|
#
|
737
1222
|
# @return [String]
|
738
1223
|
required :maximum_amount, String
|
739
1224
|
|
740
|
-
# @!method initialize(applies_to_price_ids:, maximum_amount:)
|
1225
|
+
# @!method initialize(applies_to_price_ids:, filters:, maximum_amount:)
|
741
1226
|
# Some parameter documentations has been truncated, see
|
742
1227
|
# {Orb::Models::Plan::PlanPhase::Maximum} for more details.
|
743
1228
|
#
|
744
1229
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this maximum amount applies to. For plan/plan phase maxim
|
745
1230
|
#
|
1231
|
+
# @param filters [Array<Orb::Models::Plan::PlanPhase::Maximum::Filter>] The filters that determine which prices to apply this maximum to.
|
1232
|
+
#
|
746
1233
|
# @param maximum_amount [String] Maximum amount applied
|
1234
|
+
|
1235
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1236
|
+
# @!attribute field
|
1237
|
+
# The property of the price to filter on.
|
1238
|
+
#
|
1239
|
+
# @return [Symbol, Orb::Models::Plan::PlanPhase::Maximum::Filter::Field]
|
1240
|
+
required :field, enum: -> { Orb::Plan::PlanPhase::Maximum::Filter::Field }
|
1241
|
+
|
1242
|
+
# @!attribute operator
|
1243
|
+
# Should prices that match the filter be included or excluded.
|
1244
|
+
#
|
1245
|
+
# @return [Symbol, Orb::Models::Plan::PlanPhase::Maximum::Filter::Operator]
|
1246
|
+
required :operator, enum: -> { Orb::Plan::PlanPhase::Maximum::Filter::Operator }
|
1247
|
+
|
1248
|
+
# @!attribute values
|
1249
|
+
# The IDs or values that match this filter.
|
1250
|
+
#
|
1251
|
+
# @return [Array<String>]
|
1252
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1253
|
+
|
1254
|
+
# @!method initialize(field:, operator:, values:)
|
1255
|
+
# @param field [Symbol, Orb::Models::Plan::PlanPhase::Maximum::Filter::Field] The property of the price to filter on.
|
1256
|
+
#
|
1257
|
+
# @param operator [Symbol, Orb::Models::Plan::PlanPhase::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1258
|
+
#
|
1259
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1260
|
+
|
1261
|
+
# The property of the price to filter on.
|
1262
|
+
#
|
1263
|
+
# @see Orb::Models::Plan::PlanPhase::Maximum::Filter#field
|
1264
|
+
module Field
|
1265
|
+
extend Orb::Internal::Type::Enum
|
1266
|
+
|
1267
|
+
PRICE_ID = :price_id
|
1268
|
+
ITEM_ID = :item_id
|
1269
|
+
PRICE_TYPE = :price_type
|
1270
|
+
CURRENCY = :currency
|
1271
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1272
|
+
|
1273
|
+
# @!method self.values
|
1274
|
+
# @return [Array<Symbol>]
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
# Should prices that match the filter be included or excluded.
|
1278
|
+
#
|
1279
|
+
# @see Orb::Models::Plan::PlanPhase::Maximum::Filter#operator
|
1280
|
+
module Operator
|
1281
|
+
extend Orb::Internal::Type::Enum
|
1282
|
+
|
1283
|
+
INCLUDES = :includes
|
1284
|
+
EXCLUDES = :excludes
|
1285
|
+
|
1286
|
+
# @!method self.values
|
1287
|
+
# @return [Array<Symbol>]
|
1288
|
+
end
|
1289
|
+
end
|
747
1290
|
end
|
748
1291
|
|
749
1292
|
# @see Orb::Models::Plan::PlanPhase#minimum
|
750
1293
|
class Minimum < Orb::Internal::Type::BaseModel
|
751
1294
|
# @!attribute applies_to_price_ids
|
1295
|
+
# @deprecated
|
1296
|
+
#
|
752
1297
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
753
1298
|
# minimums, this can be a subset of prices.
|
754
1299
|
#
|
755
1300
|
# @return [Array<String>]
|
756
1301
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
757
1302
|
|
1303
|
+
# @!attribute filters
|
1304
|
+
# The filters that determine which prices to apply this minimum to.
|
1305
|
+
#
|
1306
|
+
# @return [Array<Orb::Models::Plan::PlanPhase::Minimum::Filter>]
|
1307
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::PlanPhase::Minimum::Filter] }
|
1308
|
+
|
758
1309
|
# @!attribute minimum_amount
|
759
1310
|
# Minimum amount applied
|
760
1311
|
#
|
761
1312
|
# @return [String]
|
762
1313
|
required :minimum_amount, String
|
763
1314
|
|
764
|
-
# @!method initialize(applies_to_price_ids:, minimum_amount:)
|
1315
|
+
# @!method initialize(applies_to_price_ids:, filters:, minimum_amount:)
|
765
1316
|
# Some parameter documentations has been truncated, see
|
766
1317
|
# {Orb::Models::Plan::PlanPhase::Minimum} for more details.
|
767
1318
|
#
|
768
1319
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this minimum amount applies to. For plan/plan phase minim
|
769
1320
|
#
|
1321
|
+
# @param filters [Array<Orb::Models::Plan::PlanPhase::Minimum::Filter>] The filters that determine which prices to apply this minimum to.
|
1322
|
+
#
|
770
1323
|
# @param minimum_amount [String] Minimum amount applied
|
1324
|
+
|
1325
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1326
|
+
# @!attribute field
|
1327
|
+
# The property of the price to filter on.
|
1328
|
+
#
|
1329
|
+
# @return [Symbol, Orb::Models::Plan::PlanPhase::Minimum::Filter::Field]
|
1330
|
+
required :field, enum: -> { Orb::Plan::PlanPhase::Minimum::Filter::Field }
|
1331
|
+
|
1332
|
+
# @!attribute operator
|
1333
|
+
# Should prices that match the filter be included or excluded.
|
1334
|
+
#
|
1335
|
+
# @return [Symbol, Orb::Models::Plan::PlanPhase::Minimum::Filter::Operator]
|
1336
|
+
required :operator, enum: -> { Orb::Plan::PlanPhase::Minimum::Filter::Operator }
|
1337
|
+
|
1338
|
+
# @!attribute values
|
1339
|
+
# The IDs or values that match this filter.
|
1340
|
+
#
|
1341
|
+
# @return [Array<String>]
|
1342
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1343
|
+
|
1344
|
+
# @!method initialize(field:, operator:, values:)
|
1345
|
+
# @param field [Symbol, Orb::Models::Plan::PlanPhase::Minimum::Filter::Field] The property of the price to filter on.
|
1346
|
+
#
|
1347
|
+
# @param operator [Symbol, Orb::Models::Plan::PlanPhase::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1348
|
+
#
|
1349
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1350
|
+
|
1351
|
+
# The property of the price to filter on.
|
1352
|
+
#
|
1353
|
+
# @see Orb::Models::Plan::PlanPhase::Minimum::Filter#field
|
1354
|
+
module Field
|
1355
|
+
extend Orb::Internal::Type::Enum
|
1356
|
+
|
1357
|
+
PRICE_ID = :price_id
|
1358
|
+
ITEM_ID = :item_id
|
1359
|
+
PRICE_TYPE = :price_type
|
1360
|
+
CURRENCY = :currency
|
1361
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1362
|
+
|
1363
|
+
# @!method self.values
|
1364
|
+
# @return [Array<Symbol>]
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
# Should prices that match the filter be included or excluded.
|
1368
|
+
#
|
1369
|
+
# @see Orb::Models::Plan::PlanPhase::Minimum::Filter#operator
|
1370
|
+
module Operator
|
1371
|
+
extend Orb::Internal::Type::Enum
|
1372
|
+
|
1373
|
+
INCLUDES = :includes
|
1374
|
+
EXCLUDES = :excludes
|
1375
|
+
|
1376
|
+
# @!method self.values
|
1377
|
+
# @return [Array<Symbol>]
|
1378
|
+
end
|
1379
|
+
end
|
771
1380
|
end
|
772
1381
|
end
|
773
1382
|
|