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
@@ -245,11 +245,20 @@ module Orb
|
|
245
245
|
required :amount, String
|
246
246
|
|
247
247
|
# @!attribute applies_to_price_ids
|
248
|
+
# @deprecated
|
249
|
+
#
|
248
250
|
# The price IDs that this adjustment applies to.
|
249
251
|
#
|
250
252
|
# @return [Array<String>]
|
251
253
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
252
254
|
|
255
|
+
# @!attribute filters
|
256
|
+
# The filters that determine which prices to apply this adjustment to.
|
257
|
+
#
|
258
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter>]
|
259
|
+
required :filters,
|
260
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter] }
|
261
|
+
|
253
262
|
# @!attribute is_invoice_level
|
254
263
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
255
264
|
# that apply to only one price.
|
@@ -270,7 +279,7 @@ module Orb
|
|
270
279
|
# @return [Float]
|
271
280
|
required :usage_discount, Float
|
272
281
|
|
273
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
282
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
274
283
|
# Some parameter documentations has been truncated, see
|
275
284
|
# {Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount} for more
|
276
285
|
# details.
|
@@ -281,6 +290,8 @@ module Orb
|
|
281
290
|
#
|
282
291
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
283
292
|
#
|
293
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
294
|
+
#
|
284
295
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
285
296
|
#
|
286
297
|
# @param reason [String, nil] The reason for the adjustment.
|
@@ -288,6 +299,64 @@ module Orb
|
|
288
299
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
289
300
|
#
|
290
301
|
# @param adjustment_type [Symbol, :usage_discount]
|
302
|
+
|
303
|
+
class Filter < Orb::Internal::Type::BaseModel
|
304
|
+
# @!attribute field
|
305
|
+
# The property of the price to filter on.
|
306
|
+
#
|
307
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field]
|
308
|
+
required :field,
|
309
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field }
|
310
|
+
|
311
|
+
# @!attribute operator
|
312
|
+
# Should prices that match the filter be included or excluded.
|
313
|
+
#
|
314
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator]
|
315
|
+
required :operator,
|
316
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator }
|
317
|
+
|
318
|
+
# @!attribute values
|
319
|
+
# The IDs or values that match this filter.
|
320
|
+
#
|
321
|
+
# @return [Array<String>]
|
322
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
323
|
+
|
324
|
+
# @!method initialize(field:, operator:, values:)
|
325
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
326
|
+
#
|
327
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
328
|
+
#
|
329
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
330
|
+
|
331
|
+
# The property of the price to filter on.
|
332
|
+
#
|
333
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter#field
|
334
|
+
module Field
|
335
|
+
extend Orb::Internal::Type::Enum
|
336
|
+
|
337
|
+
PRICE_ID = :price_id
|
338
|
+
ITEM_ID = :item_id
|
339
|
+
PRICE_TYPE = :price_type
|
340
|
+
CURRENCY = :currency
|
341
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
342
|
+
|
343
|
+
# @!method self.values
|
344
|
+
# @return [Array<Symbol>]
|
345
|
+
end
|
346
|
+
|
347
|
+
# Should prices that match the filter be included or excluded.
|
348
|
+
#
|
349
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter#operator
|
350
|
+
module Operator
|
351
|
+
extend Orb::Internal::Type::Enum
|
352
|
+
|
353
|
+
INCLUDES = :includes
|
354
|
+
EXCLUDES = :excludes
|
355
|
+
|
356
|
+
# @!method self.values
|
357
|
+
# @return [Array<Symbol>]
|
358
|
+
end
|
359
|
+
end
|
291
360
|
end
|
292
361
|
|
293
362
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -315,11 +384,20 @@ module Orb
|
|
315
384
|
required :amount_discount, String
|
316
385
|
|
317
386
|
# @!attribute applies_to_price_ids
|
387
|
+
# @deprecated
|
388
|
+
#
|
318
389
|
# The price IDs that this adjustment applies to.
|
319
390
|
#
|
320
391
|
# @return [Array<String>]
|
321
392
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
322
393
|
|
394
|
+
# @!attribute filters
|
395
|
+
# The filters that determine which prices to apply this adjustment to.
|
396
|
+
#
|
397
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter>]
|
398
|
+
required :filters,
|
399
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter] }
|
400
|
+
|
323
401
|
# @!attribute is_invoice_level
|
324
402
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
325
403
|
# that apply to only one price.
|
@@ -333,7 +411,7 @@ module Orb
|
|
333
411
|
# @return [String, nil]
|
334
412
|
required :reason, String, nil?: true
|
335
413
|
|
336
|
-
# @!method initialize(id:, amount:, amount_discount:, applies_to_price_ids:, is_invoice_level:, reason:, adjustment_type: :amount_discount)
|
414
|
+
# @!method initialize(id:, amount:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, adjustment_type: :amount_discount)
|
337
415
|
# Some parameter documentations has been truncated, see
|
338
416
|
# {Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount} for
|
339
417
|
# more details.
|
@@ -346,11 +424,71 @@ module Orb
|
|
346
424
|
#
|
347
425
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
348
426
|
#
|
427
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
428
|
+
#
|
349
429
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
350
430
|
#
|
351
431
|
# @param reason [String, nil] The reason for the adjustment.
|
352
432
|
#
|
353
433
|
# @param adjustment_type [Symbol, :amount_discount]
|
434
|
+
|
435
|
+
class Filter < Orb::Internal::Type::BaseModel
|
436
|
+
# @!attribute field
|
437
|
+
# The property of the price to filter on.
|
438
|
+
#
|
439
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field]
|
440
|
+
required :field,
|
441
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field }
|
442
|
+
|
443
|
+
# @!attribute operator
|
444
|
+
# Should prices that match the filter be included or excluded.
|
445
|
+
#
|
446
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator]
|
447
|
+
required :operator,
|
448
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator }
|
449
|
+
|
450
|
+
# @!attribute values
|
451
|
+
# The IDs or values that match this filter.
|
452
|
+
#
|
453
|
+
# @return [Array<String>]
|
454
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
455
|
+
|
456
|
+
# @!method initialize(field:, operator:, values:)
|
457
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
458
|
+
#
|
459
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
460
|
+
#
|
461
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
462
|
+
|
463
|
+
# The property of the price to filter on.
|
464
|
+
#
|
465
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter#field
|
466
|
+
module Field
|
467
|
+
extend Orb::Internal::Type::Enum
|
468
|
+
|
469
|
+
PRICE_ID = :price_id
|
470
|
+
ITEM_ID = :item_id
|
471
|
+
PRICE_TYPE = :price_type
|
472
|
+
CURRENCY = :currency
|
473
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
474
|
+
|
475
|
+
# @!method self.values
|
476
|
+
# @return [Array<Symbol>]
|
477
|
+
end
|
478
|
+
|
479
|
+
# Should prices that match the filter be included or excluded.
|
480
|
+
#
|
481
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter#operator
|
482
|
+
module Operator
|
483
|
+
extend Orb::Internal::Type::Enum
|
484
|
+
|
485
|
+
INCLUDES = :includes
|
486
|
+
EXCLUDES = :excludes
|
487
|
+
|
488
|
+
# @!method self.values
|
489
|
+
# @return [Array<Symbol>]
|
490
|
+
end
|
491
|
+
end
|
354
492
|
end
|
355
493
|
|
356
494
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
@@ -371,11 +509,20 @@ module Orb
|
|
371
509
|
required :amount, String
|
372
510
|
|
373
511
|
# @!attribute applies_to_price_ids
|
512
|
+
# @deprecated
|
513
|
+
#
|
374
514
|
# The price IDs that this adjustment applies to.
|
375
515
|
#
|
376
516
|
# @return [Array<String>]
|
377
517
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
378
518
|
|
519
|
+
# @!attribute filters
|
520
|
+
# The filters that determine which prices to apply this adjustment to.
|
521
|
+
#
|
522
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter>]
|
523
|
+
required :filters,
|
524
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter] }
|
525
|
+
|
379
526
|
# @!attribute is_invoice_level
|
380
527
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
381
528
|
# that apply to only one price.
|
@@ -396,7 +543,7 @@ module Orb
|
|
396
543
|
# @return [String, nil]
|
397
544
|
required :reason, String, nil?: true
|
398
545
|
|
399
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, reason:, adjustment_type: :percentage_discount)
|
546
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, reason:, adjustment_type: :percentage_discount)
|
400
547
|
# Some parameter documentations has been truncated, see
|
401
548
|
# {Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount} for
|
402
549
|
# more details.
|
@@ -407,6 +554,8 @@ module Orb
|
|
407
554
|
#
|
408
555
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
409
556
|
#
|
557
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
558
|
+
#
|
410
559
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
411
560
|
#
|
412
561
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
@@ -414,6 +563,64 @@ module Orb
|
|
414
563
|
# @param reason [String, nil] The reason for the adjustment.
|
415
564
|
#
|
416
565
|
# @param adjustment_type [Symbol, :percentage_discount]
|
566
|
+
|
567
|
+
class Filter < Orb::Internal::Type::BaseModel
|
568
|
+
# @!attribute field
|
569
|
+
# The property of the price to filter on.
|
570
|
+
#
|
571
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field]
|
572
|
+
required :field,
|
573
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field }
|
574
|
+
|
575
|
+
# @!attribute operator
|
576
|
+
# Should prices that match the filter be included or excluded.
|
577
|
+
#
|
578
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator]
|
579
|
+
required :operator,
|
580
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator }
|
581
|
+
|
582
|
+
# @!attribute values
|
583
|
+
# The IDs or values that match this filter.
|
584
|
+
#
|
585
|
+
# @return [Array<String>]
|
586
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
587
|
+
|
588
|
+
# @!method initialize(field:, operator:, values:)
|
589
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
590
|
+
#
|
591
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
592
|
+
#
|
593
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
594
|
+
|
595
|
+
# The property of the price to filter on.
|
596
|
+
#
|
597
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter#field
|
598
|
+
module Field
|
599
|
+
extend Orb::Internal::Type::Enum
|
600
|
+
|
601
|
+
PRICE_ID = :price_id
|
602
|
+
ITEM_ID = :item_id
|
603
|
+
PRICE_TYPE = :price_type
|
604
|
+
CURRENCY = :currency
|
605
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
606
|
+
|
607
|
+
# @!method self.values
|
608
|
+
# @return [Array<Symbol>]
|
609
|
+
end
|
610
|
+
|
611
|
+
# Should prices that match the filter be included or excluded.
|
612
|
+
#
|
613
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter#operator
|
614
|
+
module Operator
|
615
|
+
extend Orb::Internal::Type::Enum
|
616
|
+
|
617
|
+
INCLUDES = :includes
|
618
|
+
EXCLUDES = :excludes
|
619
|
+
|
620
|
+
# @!method self.values
|
621
|
+
# @return [Array<Symbol>]
|
622
|
+
end
|
623
|
+
end
|
417
624
|
end
|
418
625
|
|
419
626
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -434,11 +641,20 @@ module Orb
|
|
434
641
|
required :amount, String
|
435
642
|
|
436
643
|
# @!attribute applies_to_price_ids
|
644
|
+
# @deprecated
|
645
|
+
#
|
437
646
|
# The price IDs that this adjustment applies to.
|
438
647
|
#
|
439
648
|
# @return [Array<String>]
|
440
649
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
441
650
|
|
651
|
+
# @!attribute filters
|
652
|
+
# The filters that determine which prices to apply this adjustment to.
|
653
|
+
#
|
654
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter>]
|
655
|
+
required :filters,
|
656
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter] }
|
657
|
+
|
442
658
|
# @!attribute is_invoice_level
|
443
659
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
444
660
|
# that apply to only one price.
|
@@ -465,7 +681,7 @@ module Orb
|
|
465
681
|
# @return [String, nil]
|
466
682
|
required :reason, String, nil?: true
|
467
683
|
|
468
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, reason:, adjustment_type: :minimum)
|
684
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, reason:, adjustment_type: :minimum)
|
469
685
|
# Some parameter documentations has been truncated, see
|
470
686
|
# {Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum} for more
|
471
687
|
# details.
|
@@ -476,6 +692,8 @@ module Orb
|
|
476
692
|
#
|
477
693
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
478
694
|
#
|
695
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
|
696
|
+
#
|
479
697
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
480
698
|
#
|
481
699
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
@@ -485,6 +703,64 @@ module Orb
|
|
485
703
|
# @param reason [String, nil] The reason for the adjustment.
|
486
704
|
#
|
487
705
|
# @param adjustment_type [Symbol, :minimum]
|
706
|
+
|
707
|
+
class Filter < Orb::Internal::Type::BaseModel
|
708
|
+
# @!attribute field
|
709
|
+
# The property of the price to filter on.
|
710
|
+
#
|
711
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field]
|
712
|
+
required :field,
|
713
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field }
|
714
|
+
|
715
|
+
# @!attribute operator
|
716
|
+
# Should prices that match the filter be included or excluded.
|
717
|
+
#
|
718
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator]
|
719
|
+
required :operator,
|
720
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator }
|
721
|
+
|
722
|
+
# @!attribute values
|
723
|
+
# The IDs or values that match this filter.
|
724
|
+
#
|
725
|
+
# @return [Array<String>]
|
726
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
727
|
+
|
728
|
+
# @!method initialize(field:, operator:, values:)
|
729
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
730
|
+
#
|
731
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
732
|
+
#
|
733
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
734
|
+
|
735
|
+
# The property of the price to filter on.
|
736
|
+
#
|
737
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter#field
|
738
|
+
module Field
|
739
|
+
extend Orb::Internal::Type::Enum
|
740
|
+
|
741
|
+
PRICE_ID = :price_id
|
742
|
+
ITEM_ID = :item_id
|
743
|
+
PRICE_TYPE = :price_type
|
744
|
+
CURRENCY = :currency
|
745
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
746
|
+
|
747
|
+
# @!method self.values
|
748
|
+
# @return [Array<Symbol>]
|
749
|
+
end
|
750
|
+
|
751
|
+
# Should prices that match the filter be included or excluded.
|
752
|
+
#
|
753
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter#operator
|
754
|
+
module Operator
|
755
|
+
extend Orb::Internal::Type::Enum
|
756
|
+
|
757
|
+
INCLUDES = :includes
|
758
|
+
EXCLUDES = :excludes
|
759
|
+
|
760
|
+
# @!method self.values
|
761
|
+
# @return [Array<Symbol>]
|
762
|
+
end
|
763
|
+
end
|
488
764
|
end
|
489
765
|
|
490
766
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -505,11 +781,20 @@ module Orb
|
|
505
781
|
required :amount, String
|
506
782
|
|
507
783
|
# @!attribute applies_to_price_ids
|
784
|
+
# @deprecated
|
785
|
+
#
|
508
786
|
# The price IDs that this adjustment applies to.
|
509
787
|
#
|
510
788
|
# @return [Array<String>]
|
511
789
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
512
790
|
|
791
|
+
# @!attribute filters
|
792
|
+
# The filters that determine which prices to apply this adjustment to.
|
793
|
+
#
|
794
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter>]
|
795
|
+
required :filters,
|
796
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter] }
|
797
|
+
|
513
798
|
# @!attribute is_invoice_level
|
514
799
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
515
800
|
# that apply to only one price.
|
@@ -530,7 +815,7 @@ module Orb
|
|
530
815
|
# @return [String, nil]
|
531
816
|
required :reason, String, nil?: true
|
532
817
|
|
533
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, reason:, adjustment_type: :maximum)
|
818
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, reason:, adjustment_type: :maximum)
|
534
819
|
# Some parameter documentations has been truncated, see
|
535
820
|
# {Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum} for more
|
536
821
|
# details.
|
@@ -541,6 +826,8 @@ module Orb
|
|
541
826
|
#
|
542
827
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
543
828
|
#
|
829
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
|
830
|
+
#
|
544
831
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
545
832
|
#
|
546
833
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
@@ -548,6 +835,64 @@ module Orb
|
|
548
835
|
# @param reason [String, nil] The reason for the adjustment.
|
549
836
|
#
|
550
837
|
# @param adjustment_type [Symbol, :maximum]
|
838
|
+
|
839
|
+
class Filter < Orb::Internal::Type::BaseModel
|
840
|
+
# @!attribute field
|
841
|
+
# The property of the price to filter on.
|
842
|
+
#
|
843
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field]
|
844
|
+
required :field,
|
845
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field }
|
846
|
+
|
847
|
+
# @!attribute operator
|
848
|
+
# Should prices that match the filter be included or excluded.
|
849
|
+
#
|
850
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator]
|
851
|
+
required :operator,
|
852
|
+
enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator }
|
853
|
+
|
854
|
+
# @!attribute values
|
855
|
+
# The IDs or values that match this filter.
|
856
|
+
#
|
857
|
+
# @return [Array<String>]
|
858
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
859
|
+
|
860
|
+
# @!method initialize(field:, operator:, values:)
|
861
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
862
|
+
#
|
863
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
864
|
+
#
|
865
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
866
|
+
|
867
|
+
# The property of the price to filter on.
|
868
|
+
#
|
869
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter#field
|
870
|
+
module Field
|
871
|
+
extend Orb::Internal::Type::Enum
|
872
|
+
|
873
|
+
PRICE_ID = :price_id
|
874
|
+
ITEM_ID = :item_id
|
875
|
+
PRICE_TYPE = :price_type
|
876
|
+
CURRENCY = :currency
|
877
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
878
|
+
|
879
|
+
# @!method self.values
|
880
|
+
# @return [Array<Symbol>]
|
881
|
+
end
|
882
|
+
|
883
|
+
# Should prices that match the filter be included or excluded.
|
884
|
+
#
|
885
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter#operator
|
886
|
+
module Operator
|
887
|
+
extend Orb::Internal::Type::Enum
|
888
|
+
|
889
|
+
INCLUDES = :includes
|
890
|
+
EXCLUDES = :excludes
|
891
|
+
|
892
|
+
# @!method self.values
|
893
|
+
# @return [Array<Symbol>]
|
894
|
+
end
|
895
|
+
end
|
551
896
|
end
|
552
897
|
|
553
898
|
# @!method self.variants
|
@@ -559,19 +904,28 @@ module Orb
|
|
559
904
|
# @see Orb::Models::InvoiceLineItemCreateResponse#maximum
|
560
905
|
class Maximum < Orb::Internal::Type::BaseModel
|
561
906
|
# @!attribute applies_to_price_ids
|
907
|
+
# @deprecated
|
908
|
+
#
|
562
909
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
563
910
|
# maximums, this can be a subset of prices.
|
564
911
|
#
|
565
912
|
# @return [Array<String>]
|
566
913
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
567
914
|
|
915
|
+
# @!attribute filters
|
916
|
+
# The filters that determine which prices to apply this maximum to.
|
917
|
+
#
|
918
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter>]
|
919
|
+
required :filters,
|
920
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter] }
|
921
|
+
|
568
922
|
# @!attribute maximum_amount
|
569
923
|
# Maximum amount applied
|
570
924
|
#
|
571
925
|
# @return [String]
|
572
926
|
required :maximum_amount, String
|
573
927
|
|
574
|
-
# @!method initialize(applies_to_price_ids:, maximum_amount:)
|
928
|
+
# @!method initialize(applies_to_price_ids:, filters:, maximum_amount:)
|
575
929
|
# Some parameter documentations has been truncated, see
|
576
930
|
# {Orb::Models::InvoiceLineItemCreateResponse::Maximum} for more details.
|
577
931
|
#
|
@@ -579,7 +933,65 @@ module Orb
|
|
579
933
|
#
|
580
934
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this maximum amount applies to. For plan/plan phase maxim
|
581
935
|
#
|
936
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter>] The filters that determine which prices to apply this maximum to.
|
937
|
+
#
|
582
938
|
# @param maximum_amount [String] Maximum amount applied
|
939
|
+
|
940
|
+
class Filter < Orb::Internal::Type::BaseModel
|
941
|
+
# @!attribute field
|
942
|
+
# The property of the price to filter on.
|
943
|
+
#
|
944
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field]
|
945
|
+
required :field, enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field }
|
946
|
+
|
947
|
+
# @!attribute operator
|
948
|
+
# Should prices that match the filter be included or excluded.
|
949
|
+
#
|
950
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator]
|
951
|
+
required :operator, enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator }
|
952
|
+
|
953
|
+
# @!attribute values
|
954
|
+
# The IDs or values that match this filter.
|
955
|
+
#
|
956
|
+
# @return [Array<String>]
|
957
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
958
|
+
|
959
|
+
# @!method initialize(field:, operator:, values:)
|
960
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field] The property of the price to filter on.
|
961
|
+
#
|
962
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
963
|
+
#
|
964
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
965
|
+
|
966
|
+
# The property of the price to filter on.
|
967
|
+
#
|
968
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter#field
|
969
|
+
module Field
|
970
|
+
extend Orb::Internal::Type::Enum
|
971
|
+
|
972
|
+
PRICE_ID = :price_id
|
973
|
+
ITEM_ID = :item_id
|
974
|
+
PRICE_TYPE = :price_type
|
975
|
+
CURRENCY = :currency
|
976
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
977
|
+
|
978
|
+
# @!method self.values
|
979
|
+
# @return [Array<Symbol>]
|
980
|
+
end
|
981
|
+
|
982
|
+
# Should prices that match the filter be included or excluded.
|
983
|
+
#
|
984
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter#operator
|
985
|
+
module Operator
|
986
|
+
extend Orb::Internal::Type::Enum
|
987
|
+
|
988
|
+
INCLUDES = :includes
|
989
|
+
EXCLUDES = :excludes
|
990
|
+
|
991
|
+
# @!method self.values
|
992
|
+
# @return [Array<Symbol>]
|
993
|
+
end
|
994
|
+
end
|
583
995
|
end
|
584
996
|
|
585
997
|
# @deprecated
|
@@ -587,19 +999,28 @@ module Orb
|
|
587
999
|
# @see Orb::Models::InvoiceLineItemCreateResponse#minimum
|
588
1000
|
class Minimum < Orb::Internal::Type::BaseModel
|
589
1001
|
# @!attribute applies_to_price_ids
|
1002
|
+
# @deprecated
|
1003
|
+
#
|
590
1004
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
591
1005
|
# minimums, this can be a subset of prices.
|
592
1006
|
#
|
593
1007
|
# @return [Array<String>]
|
594
1008
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
595
1009
|
|
1010
|
+
# @!attribute filters
|
1011
|
+
# The filters that determine which prices to apply this minimum to.
|
1012
|
+
#
|
1013
|
+
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter>]
|
1014
|
+
required :filters,
|
1015
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter] }
|
1016
|
+
|
596
1017
|
# @!attribute minimum_amount
|
597
1018
|
# Minimum amount applied
|
598
1019
|
#
|
599
1020
|
# @return [String]
|
600
1021
|
required :minimum_amount, String
|
601
1022
|
|
602
|
-
# @!method initialize(applies_to_price_ids:, minimum_amount:)
|
1023
|
+
# @!method initialize(applies_to_price_ids:, filters:, minimum_amount:)
|
603
1024
|
# Some parameter documentations has been truncated, see
|
604
1025
|
# {Orb::Models::InvoiceLineItemCreateResponse::Minimum} for more details.
|
605
1026
|
#
|
@@ -607,7 +1028,65 @@ module Orb
|
|
607
1028
|
#
|
608
1029
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this minimum amount applies to. For plan/plan phase minim
|
609
1030
|
#
|
1031
|
+
# @param filters [Array<Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter>] The filters that determine which prices to apply this minimum to.
|
1032
|
+
#
|
610
1033
|
# @param minimum_amount [String] Minimum amount applied
|
1034
|
+
|
1035
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1036
|
+
# @!attribute field
|
1037
|
+
# The property of the price to filter on.
|
1038
|
+
#
|
1039
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field]
|
1040
|
+
required :field, enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field }
|
1041
|
+
|
1042
|
+
# @!attribute operator
|
1043
|
+
# Should prices that match the filter be included or excluded.
|
1044
|
+
#
|
1045
|
+
# @return [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator]
|
1046
|
+
required :operator, enum: -> { Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator }
|
1047
|
+
|
1048
|
+
# @!attribute values
|
1049
|
+
# The IDs or values that match this filter.
|
1050
|
+
#
|
1051
|
+
# @return [Array<String>]
|
1052
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1053
|
+
|
1054
|
+
# @!method initialize(field:, operator:, values:)
|
1055
|
+
# @param field [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field] The property of the price to filter on.
|
1056
|
+
#
|
1057
|
+
# @param operator [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1058
|
+
#
|
1059
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1060
|
+
|
1061
|
+
# The property of the price to filter on.
|
1062
|
+
#
|
1063
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter#field
|
1064
|
+
module Field
|
1065
|
+
extend Orb::Internal::Type::Enum
|
1066
|
+
|
1067
|
+
PRICE_ID = :price_id
|
1068
|
+
ITEM_ID = :item_id
|
1069
|
+
PRICE_TYPE = :price_type
|
1070
|
+
CURRENCY = :currency
|
1071
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1072
|
+
|
1073
|
+
# @!method self.values
|
1074
|
+
# @return [Array<Symbol>]
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
# Should prices that match the filter be included or excluded.
|
1078
|
+
#
|
1079
|
+
# @see Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter#operator
|
1080
|
+
module Operator
|
1081
|
+
extend Orb::Internal::Type::Enum
|
1082
|
+
|
1083
|
+
INCLUDES = :includes
|
1084
|
+
EXCLUDES = :excludes
|
1085
|
+
|
1086
|
+
# @!method self.values
|
1087
|
+
# @return [Array<Symbol>]
|
1088
|
+
end
|
1089
|
+
end
|
611
1090
|
end
|
612
1091
|
|
613
1092
|
module SubLineItem
|