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
@@ -385,6 +385,16 @@ module Orb
|
|
385
385
|
sig { returns(T::Array[String]) }
|
386
386
|
attr_accessor :applies_to_price_ids
|
387
387
|
|
388
|
+
# The filters that determine which prices to apply this adjustment to.
|
389
|
+
sig do
|
390
|
+
returns(
|
391
|
+
T::Array[
|
392
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter
|
393
|
+
]
|
394
|
+
)
|
395
|
+
end
|
396
|
+
attr_accessor :filters
|
397
|
+
|
388
398
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
389
399
|
# that apply to only one price.
|
390
400
|
sig { returns(T::Boolean) }
|
@@ -404,6 +414,10 @@ module Orb
|
|
404
414
|
id: String,
|
405
415
|
amount: String,
|
406
416
|
applies_to_price_ids: T::Array[String],
|
417
|
+
filters:
|
418
|
+
T::Array[
|
419
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::OrHash
|
420
|
+
],
|
407
421
|
is_invoice_level: T::Boolean,
|
408
422
|
reason: T.nilable(String),
|
409
423
|
usage_discount: Float,
|
@@ -416,6 +430,8 @@ module Orb
|
|
416
430
|
amount:,
|
417
431
|
# The price IDs that this adjustment applies to.
|
418
432
|
applies_to_price_ids:,
|
433
|
+
# The filters that determine which prices to apply this adjustment to.
|
434
|
+
filters:,
|
419
435
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
420
436
|
# that apply to only one price.
|
421
437
|
is_invoice_level:,
|
@@ -435,6 +451,10 @@ module Orb
|
|
435
451
|
adjustment_type: Symbol,
|
436
452
|
amount: String,
|
437
453
|
applies_to_price_ids: T::Array[String],
|
454
|
+
filters:
|
455
|
+
T::Array[
|
456
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter
|
457
|
+
],
|
438
458
|
is_invoice_level: T::Boolean,
|
439
459
|
reason: T.nilable(String),
|
440
460
|
usage_discount: Float
|
@@ -443,6 +463,154 @@ module Orb
|
|
443
463
|
end
|
444
464
|
def to_hash
|
445
465
|
end
|
466
|
+
|
467
|
+
class Filter < Orb::Internal::Type::BaseModel
|
468
|
+
OrHash =
|
469
|
+
T.type_alias do
|
470
|
+
T.any(
|
471
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter,
|
472
|
+
Orb::Internal::AnyHash
|
473
|
+
)
|
474
|
+
end
|
475
|
+
|
476
|
+
# The property of the price to filter on.
|
477
|
+
sig do
|
478
|
+
returns(
|
479
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
480
|
+
)
|
481
|
+
end
|
482
|
+
attr_accessor :field
|
483
|
+
|
484
|
+
# Should prices that match the filter be included or excluded.
|
485
|
+
sig do
|
486
|
+
returns(
|
487
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
|
488
|
+
)
|
489
|
+
end
|
490
|
+
attr_accessor :operator
|
491
|
+
|
492
|
+
# The IDs or values that match this filter.
|
493
|
+
sig { returns(T::Array[String]) }
|
494
|
+
attr_accessor :values
|
495
|
+
|
496
|
+
sig do
|
497
|
+
params(
|
498
|
+
field:
|
499
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
|
500
|
+
operator:
|
501
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
|
502
|
+
values: T::Array[String]
|
503
|
+
).returns(T.attached_class)
|
504
|
+
end
|
505
|
+
def self.new(
|
506
|
+
# The property of the price to filter on.
|
507
|
+
field:,
|
508
|
+
# Should prices that match the filter be included or excluded.
|
509
|
+
operator:,
|
510
|
+
# The IDs or values that match this filter.
|
511
|
+
values:
|
512
|
+
)
|
513
|
+
end
|
514
|
+
|
515
|
+
sig do
|
516
|
+
override.returns(
|
517
|
+
{
|
518
|
+
field:
|
519
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol,
|
520
|
+
operator:
|
521
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol,
|
522
|
+
values: T::Array[String]
|
523
|
+
}
|
524
|
+
)
|
525
|
+
end
|
526
|
+
def to_hash
|
527
|
+
end
|
528
|
+
|
529
|
+
# The property of the price to filter on.
|
530
|
+
module Field
|
531
|
+
extend Orb::Internal::Type::Enum
|
532
|
+
|
533
|
+
TaggedSymbol =
|
534
|
+
T.type_alias do
|
535
|
+
T.all(
|
536
|
+
Symbol,
|
537
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field
|
538
|
+
)
|
539
|
+
end
|
540
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
541
|
+
|
542
|
+
PRICE_ID =
|
543
|
+
T.let(
|
544
|
+
:price_id,
|
545
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
546
|
+
)
|
547
|
+
ITEM_ID =
|
548
|
+
T.let(
|
549
|
+
:item_id,
|
550
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
551
|
+
)
|
552
|
+
PRICE_TYPE =
|
553
|
+
T.let(
|
554
|
+
:price_type,
|
555
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
556
|
+
)
|
557
|
+
CURRENCY =
|
558
|
+
T.let(
|
559
|
+
:currency,
|
560
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
561
|
+
)
|
562
|
+
PRICING_UNIT_ID =
|
563
|
+
T.let(
|
564
|
+
:pricing_unit_id,
|
565
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
566
|
+
)
|
567
|
+
|
568
|
+
sig do
|
569
|
+
override.returns(
|
570
|
+
T::Array[
|
571
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
|
572
|
+
]
|
573
|
+
)
|
574
|
+
end
|
575
|
+
def self.values
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
# Should prices that match the filter be included or excluded.
|
580
|
+
module Operator
|
581
|
+
extend Orb::Internal::Type::Enum
|
582
|
+
|
583
|
+
TaggedSymbol =
|
584
|
+
T.type_alias do
|
585
|
+
T.all(
|
586
|
+
Symbol,
|
587
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator
|
588
|
+
)
|
589
|
+
end
|
590
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
591
|
+
|
592
|
+
INCLUDES =
|
593
|
+
T.let(
|
594
|
+
:includes,
|
595
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
|
596
|
+
)
|
597
|
+
EXCLUDES =
|
598
|
+
T.let(
|
599
|
+
:excludes,
|
600
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
|
601
|
+
)
|
602
|
+
|
603
|
+
sig do
|
604
|
+
override.returns(
|
605
|
+
T::Array[
|
606
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
|
607
|
+
]
|
608
|
+
)
|
609
|
+
end
|
610
|
+
def self.values
|
611
|
+
end
|
612
|
+
end
|
613
|
+
end
|
446
614
|
end
|
447
615
|
|
448
616
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -473,6 +641,16 @@ module Orb
|
|
473
641
|
sig { returns(T::Array[String]) }
|
474
642
|
attr_accessor :applies_to_price_ids
|
475
643
|
|
644
|
+
# The filters that determine which prices to apply this adjustment to.
|
645
|
+
sig do
|
646
|
+
returns(
|
647
|
+
T::Array[
|
648
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter
|
649
|
+
]
|
650
|
+
)
|
651
|
+
end
|
652
|
+
attr_accessor :filters
|
653
|
+
|
476
654
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
477
655
|
# that apply to only one price.
|
478
656
|
sig { returns(T::Boolean) }
|
@@ -488,6 +666,10 @@ module Orb
|
|
488
666
|
amount: String,
|
489
667
|
amount_discount: String,
|
490
668
|
applies_to_price_ids: T::Array[String],
|
669
|
+
filters:
|
670
|
+
T::Array[
|
671
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::OrHash
|
672
|
+
],
|
491
673
|
is_invoice_level: T::Boolean,
|
492
674
|
reason: T.nilable(String),
|
493
675
|
adjustment_type: Symbol
|
@@ -502,6 +684,8 @@ module Orb
|
|
502
684
|
amount_discount:,
|
503
685
|
# The price IDs that this adjustment applies to.
|
504
686
|
applies_to_price_ids:,
|
687
|
+
# The filters that determine which prices to apply this adjustment to.
|
688
|
+
filters:,
|
505
689
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
506
690
|
# that apply to only one price.
|
507
691
|
is_invoice_level:,
|
@@ -519,6 +703,10 @@ module Orb
|
|
519
703
|
amount: String,
|
520
704
|
amount_discount: String,
|
521
705
|
applies_to_price_ids: T::Array[String],
|
706
|
+
filters:
|
707
|
+
T::Array[
|
708
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter
|
709
|
+
],
|
522
710
|
is_invoice_level: T::Boolean,
|
523
711
|
reason: T.nilable(String)
|
524
712
|
}
|
@@ -526,6 +714,154 @@ module Orb
|
|
526
714
|
end
|
527
715
|
def to_hash
|
528
716
|
end
|
717
|
+
|
718
|
+
class Filter < Orb::Internal::Type::BaseModel
|
719
|
+
OrHash =
|
720
|
+
T.type_alias do
|
721
|
+
T.any(
|
722
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter,
|
723
|
+
Orb::Internal::AnyHash
|
724
|
+
)
|
725
|
+
end
|
726
|
+
|
727
|
+
# The property of the price to filter on.
|
728
|
+
sig do
|
729
|
+
returns(
|
730
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
731
|
+
)
|
732
|
+
end
|
733
|
+
attr_accessor :field
|
734
|
+
|
735
|
+
# Should prices that match the filter be included or excluded.
|
736
|
+
sig do
|
737
|
+
returns(
|
738
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
|
739
|
+
)
|
740
|
+
end
|
741
|
+
attr_accessor :operator
|
742
|
+
|
743
|
+
# The IDs or values that match this filter.
|
744
|
+
sig { returns(T::Array[String]) }
|
745
|
+
attr_accessor :values
|
746
|
+
|
747
|
+
sig do
|
748
|
+
params(
|
749
|
+
field:
|
750
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
|
751
|
+
operator:
|
752
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
|
753
|
+
values: T::Array[String]
|
754
|
+
).returns(T.attached_class)
|
755
|
+
end
|
756
|
+
def self.new(
|
757
|
+
# The property of the price to filter on.
|
758
|
+
field:,
|
759
|
+
# Should prices that match the filter be included or excluded.
|
760
|
+
operator:,
|
761
|
+
# The IDs or values that match this filter.
|
762
|
+
values:
|
763
|
+
)
|
764
|
+
end
|
765
|
+
|
766
|
+
sig do
|
767
|
+
override.returns(
|
768
|
+
{
|
769
|
+
field:
|
770
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol,
|
771
|
+
operator:
|
772
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol,
|
773
|
+
values: T::Array[String]
|
774
|
+
}
|
775
|
+
)
|
776
|
+
end
|
777
|
+
def to_hash
|
778
|
+
end
|
779
|
+
|
780
|
+
# The property of the price to filter on.
|
781
|
+
module Field
|
782
|
+
extend Orb::Internal::Type::Enum
|
783
|
+
|
784
|
+
TaggedSymbol =
|
785
|
+
T.type_alias do
|
786
|
+
T.all(
|
787
|
+
Symbol,
|
788
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field
|
789
|
+
)
|
790
|
+
end
|
791
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
792
|
+
|
793
|
+
PRICE_ID =
|
794
|
+
T.let(
|
795
|
+
:price_id,
|
796
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
797
|
+
)
|
798
|
+
ITEM_ID =
|
799
|
+
T.let(
|
800
|
+
:item_id,
|
801
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
802
|
+
)
|
803
|
+
PRICE_TYPE =
|
804
|
+
T.let(
|
805
|
+
:price_type,
|
806
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
807
|
+
)
|
808
|
+
CURRENCY =
|
809
|
+
T.let(
|
810
|
+
:currency,
|
811
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
812
|
+
)
|
813
|
+
PRICING_UNIT_ID =
|
814
|
+
T.let(
|
815
|
+
:pricing_unit_id,
|
816
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
817
|
+
)
|
818
|
+
|
819
|
+
sig do
|
820
|
+
override.returns(
|
821
|
+
T::Array[
|
822
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
|
823
|
+
]
|
824
|
+
)
|
825
|
+
end
|
826
|
+
def self.values
|
827
|
+
end
|
828
|
+
end
|
829
|
+
|
830
|
+
# Should prices that match the filter be included or excluded.
|
831
|
+
module Operator
|
832
|
+
extend Orb::Internal::Type::Enum
|
833
|
+
|
834
|
+
TaggedSymbol =
|
835
|
+
T.type_alias do
|
836
|
+
T.all(
|
837
|
+
Symbol,
|
838
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator
|
839
|
+
)
|
840
|
+
end
|
841
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
842
|
+
|
843
|
+
INCLUDES =
|
844
|
+
T.let(
|
845
|
+
:includes,
|
846
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
|
847
|
+
)
|
848
|
+
EXCLUDES =
|
849
|
+
T.let(
|
850
|
+
:excludes,
|
851
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
|
852
|
+
)
|
853
|
+
|
854
|
+
sig do
|
855
|
+
override.returns(
|
856
|
+
T::Array[
|
857
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
|
858
|
+
]
|
859
|
+
)
|
860
|
+
end
|
861
|
+
def self.values
|
862
|
+
end
|
863
|
+
end
|
864
|
+
end
|
529
865
|
end
|
530
866
|
|
531
867
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
@@ -551,6 +887,16 @@ module Orb
|
|
551
887
|
sig { returns(T::Array[String]) }
|
552
888
|
attr_accessor :applies_to_price_ids
|
553
889
|
|
890
|
+
# The filters that determine which prices to apply this adjustment to.
|
891
|
+
sig do
|
892
|
+
returns(
|
893
|
+
T::Array[
|
894
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter
|
895
|
+
]
|
896
|
+
)
|
897
|
+
end
|
898
|
+
attr_accessor :filters
|
899
|
+
|
554
900
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
555
901
|
# that apply to only one price.
|
556
902
|
sig { returns(T::Boolean) }
|
@@ -570,6 +916,10 @@ module Orb
|
|
570
916
|
id: String,
|
571
917
|
amount: String,
|
572
918
|
applies_to_price_ids: T::Array[String],
|
919
|
+
filters:
|
920
|
+
T::Array[
|
921
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::OrHash
|
922
|
+
],
|
573
923
|
is_invoice_level: T::Boolean,
|
574
924
|
percentage_discount: Float,
|
575
925
|
reason: T.nilable(String),
|
@@ -582,6 +932,8 @@ module Orb
|
|
582
932
|
amount:,
|
583
933
|
# The price IDs that this adjustment applies to.
|
584
934
|
applies_to_price_ids:,
|
935
|
+
# The filters that determine which prices to apply this adjustment to.
|
936
|
+
filters:,
|
585
937
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
586
938
|
# that apply to only one price.
|
587
939
|
is_invoice_level:,
|
@@ -601,6 +953,10 @@ module Orb
|
|
601
953
|
adjustment_type: Symbol,
|
602
954
|
amount: String,
|
603
955
|
applies_to_price_ids: T::Array[String],
|
956
|
+
filters:
|
957
|
+
T::Array[
|
958
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter
|
959
|
+
],
|
604
960
|
is_invoice_level: T::Boolean,
|
605
961
|
percentage_discount: Float,
|
606
962
|
reason: T.nilable(String)
|
@@ -609,6 +965,154 @@ module Orb
|
|
609
965
|
end
|
610
966
|
def to_hash
|
611
967
|
end
|
968
|
+
|
969
|
+
class Filter < Orb::Internal::Type::BaseModel
|
970
|
+
OrHash =
|
971
|
+
T.type_alias do
|
972
|
+
T.any(
|
973
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter,
|
974
|
+
Orb::Internal::AnyHash
|
975
|
+
)
|
976
|
+
end
|
977
|
+
|
978
|
+
# The property of the price to filter on.
|
979
|
+
sig do
|
980
|
+
returns(
|
981
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
982
|
+
)
|
983
|
+
end
|
984
|
+
attr_accessor :field
|
985
|
+
|
986
|
+
# Should prices that match the filter be included or excluded.
|
987
|
+
sig do
|
988
|
+
returns(
|
989
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
|
990
|
+
)
|
991
|
+
end
|
992
|
+
attr_accessor :operator
|
993
|
+
|
994
|
+
# The IDs or values that match this filter.
|
995
|
+
sig { returns(T::Array[String]) }
|
996
|
+
attr_accessor :values
|
997
|
+
|
998
|
+
sig do
|
999
|
+
params(
|
1000
|
+
field:
|
1001
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
|
1002
|
+
operator:
|
1003
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
|
1004
|
+
values: T::Array[String]
|
1005
|
+
).returns(T.attached_class)
|
1006
|
+
end
|
1007
|
+
def self.new(
|
1008
|
+
# The property of the price to filter on.
|
1009
|
+
field:,
|
1010
|
+
# Should prices that match the filter be included or excluded.
|
1011
|
+
operator:,
|
1012
|
+
# The IDs or values that match this filter.
|
1013
|
+
values:
|
1014
|
+
)
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
sig do
|
1018
|
+
override.returns(
|
1019
|
+
{
|
1020
|
+
field:
|
1021
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol,
|
1022
|
+
operator:
|
1023
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol,
|
1024
|
+
values: T::Array[String]
|
1025
|
+
}
|
1026
|
+
)
|
1027
|
+
end
|
1028
|
+
def to_hash
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# The property of the price to filter on.
|
1032
|
+
module Field
|
1033
|
+
extend Orb::Internal::Type::Enum
|
1034
|
+
|
1035
|
+
TaggedSymbol =
|
1036
|
+
T.type_alias do
|
1037
|
+
T.all(
|
1038
|
+
Symbol,
|
1039
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field
|
1040
|
+
)
|
1041
|
+
end
|
1042
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1043
|
+
|
1044
|
+
PRICE_ID =
|
1045
|
+
T.let(
|
1046
|
+
:price_id,
|
1047
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
1048
|
+
)
|
1049
|
+
ITEM_ID =
|
1050
|
+
T.let(
|
1051
|
+
:item_id,
|
1052
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
1053
|
+
)
|
1054
|
+
PRICE_TYPE =
|
1055
|
+
T.let(
|
1056
|
+
:price_type,
|
1057
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
1058
|
+
)
|
1059
|
+
CURRENCY =
|
1060
|
+
T.let(
|
1061
|
+
:currency,
|
1062
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
1063
|
+
)
|
1064
|
+
PRICING_UNIT_ID =
|
1065
|
+
T.let(
|
1066
|
+
:pricing_unit_id,
|
1067
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
1068
|
+
)
|
1069
|
+
|
1070
|
+
sig do
|
1071
|
+
override.returns(
|
1072
|
+
T::Array[
|
1073
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
|
1074
|
+
]
|
1075
|
+
)
|
1076
|
+
end
|
1077
|
+
def self.values
|
1078
|
+
end
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Should prices that match the filter be included or excluded.
|
1082
|
+
module Operator
|
1083
|
+
extend Orb::Internal::Type::Enum
|
1084
|
+
|
1085
|
+
TaggedSymbol =
|
1086
|
+
T.type_alias do
|
1087
|
+
T.all(
|
1088
|
+
Symbol,
|
1089
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator
|
1090
|
+
)
|
1091
|
+
end
|
1092
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1093
|
+
|
1094
|
+
INCLUDES =
|
1095
|
+
T.let(
|
1096
|
+
:includes,
|
1097
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
|
1098
|
+
)
|
1099
|
+
EXCLUDES =
|
1100
|
+
T.let(
|
1101
|
+
:excludes,
|
1102
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
|
1103
|
+
)
|
1104
|
+
|
1105
|
+
sig do
|
1106
|
+
override.returns(
|
1107
|
+
T::Array[
|
1108
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
|
1109
|
+
]
|
1110
|
+
)
|
1111
|
+
end
|
1112
|
+
def self.values
|
1113
|
+
end
|
1114
|
+
end
|
1115
|
+
end
|
612
1116
|
end
|
613
1117
|
|
614
1118
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -634,6 +1138,16 @@ module Orb
|
|
634
1138
|
sig { returns(T::Array[String]) }
|
635
1139
|
attr_accessor :applies_to_price_ids
|
636
1140
|
|
1141
|
+
# The filters that determine which prices to apply this adjustment to.
|
1142
|
+
sig do
|
1143
|
+
returns(
|
1144
|
+
T::Array[
|
1145
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter
|
1146
|
+
]
|
1147
|
+
)
|
1148
|
+
end
|
1149
|
+
attr_accessor :filters
|
1150
|
+
|
637
1151
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
638
1152
|
# that apply to only one price.
|
639
1153
|
sig { returns(T::Boolean) }
|
@@ -657,6 +1171,10 @@ module Orb
|
|
657
1171
|
id: String,
|
658
1172
|
amount: String,
|
659
1173
|
applies_to_price_ids: T::Array[String],
|
1174
|
+
filters:
|
1175
|
+
T::Array[
|
1176
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::OrHash
|
1177
|
+
],
|
660
1178
|
is_invoice_level: T::Boolean,
|
661
1179
|
item_id: String,
|
662
1180
|
minimum_amount: String,
|
@@ -670,6 +1188,8 @@ module Orb
|
|
670
1188
|
amount:,
|
671
1189
|
# The price IDs that this adjustment applies to.
|
672
1190
|
applies_to_price_ids:,
|
1191
|
+
# The filters that determine which prices to apply this adjustment to.
|
1192
|
+
filters:,
|
673
1193
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
674
1194
|
# that apply to only one price.
|
675
1195
|
is_invoice_level:,
|
@@ -691,6 +1211,10 @@ module Orb
|
|
691
1211
|
adjustment_type: Symbol,
|
692
1212
|
amount: String,
|
693
1213
|
applies_to_price_ids: T::Array[String],
|
1214
|
+
filters:
|
1215
|
+
T::Array[
|
1216
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter
|
1217
|
+
],
|
694
1218
|
is_invoice_level: T::Boolean,
|
695
1219
|
item_id: String,
|
696
1220
|
minimum_amount: String,
|
@@ -700,6 +1224,154 @@ module Orb
|
|
700
1224
|
end
|
701
1225
|
def to_hash
|
702
1226
|
end
|
1227
|
+
|
1228
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1229
|
+
OrHash =
|
1230
|
+
T.type_alias do
|
1231
|
+
T.any(
|
1232
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter,
|
1233
|
+
Orb::Internal::AnyHash
|
1234
|
+
)
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
# The property of the price to filter on.
|
1238
|
+
sig do
|
1239
|
+
returns(
|
1240
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1241
|
+
)
|
1242
|
+
end
|
1243
|
+
attr_accessor :field
|
1244
|
+
|
1245
|
+
# Should prices that match the filter be included or excluded.
|
1246
|
+
sig do
|
1247
|
+
returns(
|
1248
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
|
1249
|
+
)
|
1250
|
+
end
|
1251
|
+
attr_accessor :operator
|
1252
|
+
|
1253
|
+
# The IDs or values that match this filter.
|
1254
|
+
sig { returns(T::Array[String]) }
|
1255
|
+
attr_accessor :values
|
1256
|
+
|
1257
|
+
sig do
|
1258
|
+
params(
|
1259
|
+
field:
|
1260
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::OrSymbol,
|
1261
|
+
operator:
|
1262
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator::OrSymbol,
|
1263
|
+
values: T::Array[String]
|
1264
|
+
).returns(T.attached_class)
|
1265
|
+
end
|
1266
|
+
def self.new(
|
1267
|
+
# The property of the price to filter on.
|
1268
|
+
field:,
|
1269
|
+
# Should prices that match the filter be included or excluded.
|
1270
|
+
operator:,
|
1271
|
+
# The IDs or values that match this filter.
|
1272
|
+
values:
|
1273
|
+
)
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
sig do
|
1277
|
+
override.returns(
|
1278
|
+
{
|
1279
|
+
field:
|
1280
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol,
|
1281
|
+
operator:
|
1282
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol,
|
1283
|
+
values: T::Array[String]
|
1284
|
+
}
|
1285
|
+
)
|
1286
|
+
end
|
1287
|
+
def to_hash
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
# The property of the price to filter on.
|
1291
|
+
module Field
|
1292
|
+
extend Orb::Internal::Type::Enum
|
1293
|
+
|
1294
|
+
TaggedSymbol =
|
1295
|
+
T.type_alias do
|
1296
|
+
T.all(
|
1297
|
+
Symbol,
|
1298
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field
|
1299
|
+
)
|
1300
|
+
end
|
1301
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1302
|
+
|
1303
|
+
PRICE_ID =
|
1304
|
+
T.let(
|
1305
|
+
:price_id,
|
1306
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1307
|
+
)
|
1308
|
+
ITEM_ID =
|
1309
|
+
T.let(
|
1310
|
+
:item_id,
|
1311
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1312
|
+
)
|
1313
|
+
PRICE_TYPE =
|
1314
|
+
T.let(
|
1315
|
+
:price_type,
|
1316
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1317
|
+
)
|
1318
|
+
CURRENCY =
|
1319
|
+
T.let(
|
1320
|
+
:currency,
|
1321
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1322
|
+
)
|
1323
|
+
PRICING_UNIT_ID =
|
1324
|
+
T.let(
|
1325
|
+
:pricing_unit_id,
|
1326
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1327
|
+
)
|
1328
|
+
|
1329
|
+
sig do
|
1330
|
+
override.returns(
|
1331
|
+
T::Array[
|
1332
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
|
1333
|
+
]
|
1334
|
+
)
|
1335
|
+
end
|
1336
|
+
def self.values
|
1337
|
+
end
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
# Should prices that match the filter be included or excluded.
|
1341
|
+
module Operator
|
1342
|
+
extend Orb::Internal::Type::Enum
|
1343
|
+
|
1344
|
+
TaggedSymbol =
|
1345
|
+
T.type_alias do
|
1346
|
+
T.all(
|
1347
|
+
Symbol,
|
1348
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator
|
1349
|
+
)
|
1350
|
+
end
|
1351
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1352
|
+
|
1353
|
+
INCLUDES =
|
1354
|
+
T.let(
|
1355
|
+
:includes,
|
1356
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
|
1357
|
+
)
|
1358
|
+
EXCLUDES =
|
1359
|
+
T.let(
|
1360
|
+
:excludes,
|
1361
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
|
1362
|
+
)
|
1363
|
+
|
1364
|
+
sig do
|
1365
|
+
override.returns(
|
1366
|
+
T::Array[
|
1367
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
|
1368
|
+
]
|
1369
|
+
)
|
1370
|
+
end
|
1371
|
+
def self.values
|
1372
|
+
end
|
1373
|
+
end
|
1374
|
+
end
|
703
1375
|
end
|
704
1376
|
|
705
1377
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -725,6 +1397,16 @@ module Orb
|
|
725
1397
|
sig { returns(T::Array[String]) }
|
726
1398
|
attr_accessor :applies_to_price_ids
|
727
1399
|
|
1400
|
+
# The filters that determine which prices to apply this adjustment to.
|
1401
|
+
sig do
|
1402
|
+
returns(
|
1403
|
+
T::Array[
|
1404
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter
|
1405
|
+
]
|
1406
|
+
)
|
1407
|
+
end
|
1408
|
+
attr_accessor :filters
|
1409
|
+
|
728
1410
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
729
1411
|
# that apply to only one price.
|
730
1412
|
sig { returns(T::Boolean) }
|
@@ -744,6 +1426,10 @@ module Orb
|
|
744
1426
|
id: String,
|
745
1427
|
amount: String,
|
746
1428
|
applies_to_price_ids: T::Array[String],
|
1429
|
+
filters:
|
1430
|
+
T::Array[
|
1431
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::OrHash
|
1432
|
+
],
|
747
1433
|
is_invoice_level: T::Boolean,
|
748
1434
|
maximum_amount: String,
|
749
1435
|
reason: T.nilable(String),
|
@@ -756,6 +1442,8 @@ module Orb
|
|
756
1442
|
amount:,
|
757
1443
|
# The price IDs that this adjustment applies to.
|
758
1444
|
applies_to_price_ids:,
|
1445
|
+
# The filters that determine which prices to apply this adjustment to.
|
1446
|
+
filters:,
|
759
1447
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
760
1448
|
# that apply to only one price.
|
761
1449
|
is_invoice_level:,
|
@@ -775,6 +1463,10 @@ module Orb
|
|
775
1463
|
adjustment_type: Symbol,
|
776
1464
|
amount: String,
|
777
1465
|
applies_to_price_ids: T::Array[String],
|
1466
|
+
filters:
|
1467
|
+
T::Array[
|
1468
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter
|
1469
|
+
],
|
778
1470
|
is_invoice_level: T::Boolean,
|
779
1471
|
maximum_amount: String,
|
780
1472
|
reason: T.nilable(String)
|
@@ -783,6 +1475,154 @@ module Orb
|
|
783
1475
|
end
|
784
1476
|
def to_hash
|
785
1477
|
end
|
1478
|
+
|
1479
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1480
|
+
OrHash =
|
1481
|
+
T.type_alias do
|
1482
|
+
T.any(
|
1483
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter,
|
1484
|
+
Orb::Internal::AnyHash
|
1485
|
+
)
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
# The property of the price to filter on.
|
1489
|
+
sig do
|
1490
|
+
returns(
|
1491
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1492
|
+
)
|
1493
|
+
end
|
1494
|
+
attr_accessor :field
|
1495
|
+
|
1496
|
+
# Should prices that match the filter be included or excluded.
|
1497
|
+
sig do
|
1498
|
+
returns(
|
1499
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
|
1500
|
+
)
|
1501
|
+
end
|
1502
|
+
attr_accessor :operator
|
1503
|
+
|
1504
|
+
# The IDs or values that match this filter.
|
1505
|
+
sig { returns(T::Array[String]) }
|
1506
|
+
attr_accessor :values
|
1507
|
+
|
1508
|
+
sig do
|
1509
|
+
params(
|
1510
|
+
field:
|
1511
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::OrSymbol,
|
1512
|
+
operator:
|
1513
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator::OrSymbol,
|
1514
|
+
values: T::Array[String]
|
1515
|
+
).returns(T.attached_class)
|
1516
|
+
end
|
1517
|
+
def self.new(
|
1518
|
+
# The property of the price to filter on.
|
1519
|
+
field:,
|
1520
|
+
# Should prices that match the filter be included or excluded.
|
1521
|
+
operator:,
|
1522
|
+
# The IDs or values that match this filter.
|
1523
|
+
values:
|
1524
|
+
)
|
1525
|
+
end
|
1526
|
+
|
1527
|
+
sig do
|
1528
|
+
override.returns(
|
1529
|
+
{
|
1530
|
+
field:
|
1531
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol,
|
1532
|
+
operator:
|
1533
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol,
|
1534
|
+
values: T::Array[String]
|
1535
|
+
}
|
1536
|
+
)
|
1537
|
+
end
|
1538
|
+
def to_hash
|
1539
|
+
end
|
1540
|
+
|
1541
|
+
# The property of the price to filter on.
|
1542
|
+
module Field
|
1543
|
+
extend Orb::Internal::Type::Enum
|
1544
|
+
|
1545
|
+
TaggedSymbol =
|
1546
|
+
T.type_alias do
|
1547
|
+
T.all(
|
1548
|
+
Symbol,
|
1549
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field
|
1550
|
+
)
|
1551
|
+
end
|
1552
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1553
|
+
|
1554
|
+
PRICE_ID =
|
1555
|
+
T.let(
|
1556
|
+
:price_id,
|
1557
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1558
|
+
)
|
1559
|
+
ITEM_ID =
|
1560
|
+
T.let(
|
1561
|
+
:item_id,
|
1562
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1563
|
+
)
|
1564
|
+
PRICE_TYPE =
|
1565
|
+
T.let(
|
1566
|
+
:price_type,
|
1567
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1568
|
+
)
|
1569
|
+
CURRENCY =
|
1570
|
+
T.let(
|
1571
|
+
:currency,
|
1572
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1573
|
+
)
|
1574
|
+
PRICING_UNIT_ID =
|
1575
|
+
T.let(
|
1576
|
+
:pricing_unit_id,
|
1577
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1578
|
+
)
|
1579
|
+
|
1580
|
+
sig do
|
1581
|
+
override.returns(
|
1582
|
+
T::Array[
|
1583
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
|
1584
|
+
]
|
1585
|
+
)
|
1586
|
+
end
|
1587
|
+
def self.values
|
1588
|
+
end
|
1589
|
+
end
|
1590
|
+
|
1591
|
+
# Should prices that match the filter be included or excluded.
|
1592
|
+
module Operator
|
1593
|
+
extend Orb::Internal::Type::Enum
|
1594
|
+
|
1595
|
+
TaggedSymbol =
|
1596
|
+
T.type_alias do
|
1597
|
+
T.all(
|
1598
|
+
Symbol,
|
1599
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator
|
1600
|
+
)
|
1601
|
+
end
|
1602
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1603
|
+
|
1604
|
+
INCLUDES =
|
1605
|
+
T.let(
|
1606
|
+
:includes,
|
1607
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
|
1608
|
+
)
|
1609
|
+
EXCLUDES =
|
1610
|
+
T.let(
|
1611
|
+
:excludes,
|
1612
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
|
1613
|
+
)
|
1614
|
+
|
1615
|
+
sig do
|
1616
|
+
override.returns(
|
1617
|
+
T::Array[
|
1618
|
+
Orb::Models::InvoiceLineItemCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
|
1619
|
+
]
|
1620
|
+
)
|
1621
|
+
end
|
1622
|
+
def self.values
|
1623
|
+
end
|
1624
|
+
end
|
1625
|
+
end
|
786
1626
|
end
|
787
1627
|
|
788
1628
|
sig do
|
@@ -810,6 +1650,16 @@ module Orb
|
|
810
1650
|
sig { returns(T::Array[String]) }
|
811
1651
|
attr_accessor :applies_to_price_ids
|
812
1652
|
|
1653
|
+
# The filters that determine which prices to apply this maximum to.
|
1654
|
+
sig do
|
1655
|
+
returns(
|
1656
|
+
T::Array[
|
1657
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter
|
1658
|
+
]
|
1659
|
+
)
|
1660
|
+
end
|
1661
|
+
attr_accessor :filters
|
1662
|
+
|
813
1663
|
# Maximum amount applied
|
814
1664
|
sig { returns(String) }
|
815
1665
|
attr_accessor :maximum_amount
|
@@ -818,6 +1668,10 @@ module Orb
|
|
818
1668
|
sig do
|
819
1669
|
params(
|
820
1670
|
applies_to_price_ids: T::Array[String],
|
1671
|
+
filters:
|
1672
|
+
T::Array[
|
1673
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::OrHash
|
1674
|
+
],
|
821
1675
|
maximum_amount: String
|
822
1676
|
).returns(T.attached_class)
|
823
1677
|
end
|
@@ -825,6 +1679,8 @@ module Orb
|
|
825
1679
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
826
1680
|
# maximums, this can be a subset of prices.
|
827
1681
|
applies_to_price_ids:,
|
1682
|
+
# The filters that determine which prices to apply this maximum to.
|
1683
|
+
filters:,
|
828
1684
|
# Maximum amount applied
|
829
1685
|
maximum_amount:
|
830
1686
|
)
|
@@ -832,11 +1688,166 @@ module Orb
|
|
832
1688
|
|
833
1689
|
sig do
|
834
1690
|
override.returns(
|
835
|
-
{
|
1691
|
+
{
|
1692
|
+
applies_to_price_ids: T::Array[String],
|
1693
|
+
filters:
|
1694
|
+
T::Array[
|
1695
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter
|
1696
|
+
],
|
1697
|
+
maximum_amount: String
|
1698
|
+
}
|
836
1699
|
)
|
837
1700
|
end
|
838
1701
|
def to_hash
|
839
1702
|
end
|
1703
|
+
|
1704
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1705
|
+
OrHash =
|
1706
|
+
T.type_alias do
|
1707
|
+
T.any(
|
1708
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter,
|
1709
|
+
Orb::Internal::AnyHash
|
1710
|
+
)
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
# The property of the price to filter on.
|
1714
|
+
sig do
|
1715
|
+
returns(
|
1716
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1717
|
+
)
|
1718
|
+
end
|
1719
|
+
attr_accessor :field
|
1720
|
+
|
1721
|
+
# Should prices that match the filter be included or excluded.
|
1722
|
+
sig do
|
1723
|
+
returns(
|
1724
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator::TaggedSymbol
|
1725
|
+
)
|
1726
|
+
end
|
1727
|
+
attr_accessor :operator
|
1728
|
+
|
1729
|
+
# The IDs or values that match this filter.
|
1730
|
+
sig { returns(T::Array[String]) }
|
1731
|
+
attr_accessor :values
|
1732
|
+
|
1733
|
+
sig do
|
1734
|
+
params(
|
1735
|
+
field:
|
1736
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::OrSymbol,
|
1737
|
+
operator:
|
1738
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator::OrSymbol,
|
1739
|
+
values: T::Array[String]
|
1740
|
+
).returns(T.attached_class)
|
1741
|
+
end
|
1742
|
+
def self.new(
|
1743
|
+
# The property of the price to filter on.
|
1744
|
+
field:,
|
1745
|
+
# Should prices that match the filter be included or excluded.
|
1746
|
+
operator:,
|
1747
|
+
# The IDs or values that match this filter.
|
1748
|
+
values:
|
1749
|
+
)
|
1750
|
+
end
|
1751
|
+
|
1752
|
+
sig do
|
1753
|
+
override.returns(
|
1754
|
+
{
|
1755
|
+
field:
|
1756
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol,
|
1757
|
+
operator:
|
1758
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator::TaggedSymbol,
|
1759
|
+
values: T::Array[String]
|
1760
|
+
}
|
1761
|
+
)
|
1762
|
+
end
|
1763
|
+
def to_hash
|
1764
|
+
end
|
1765
|
+
|
1766
|
+
# The property of the price to filter on.
|
1767
|
+
module Field
|
1768
|
+
extend Orb::Internal::Type::Enum
|
1769
|
+
|
1770
|
+
TaggedSymbol =
|
1771
|
+
T.type_alias do
|
1772
|
+
T.all(
|
1773
|
+
Symbol,
|
1774
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field
|
1775
|
+
)
|
1776
|
+
end
|
1777
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1778
|
+
|
1779
|
+
PRICE_ID =
|
1780
|
+
T.let(
|
1781
|
+
:price_id,
|
1782
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1783
|
+
)
|
1784
|
+
ITEM_ID =
|
1785
|
+
T.let(
|
1786
|
+
:item_id,
|
1787
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1788
|
+
)
|
1789
|
+
PRICE_TYPE =
|
1790
|
+
T.let(
|
1791
|
+
:price_type,
|
1792
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1793
|
+
)
|
1794
|
+
CURRENCY =
|
1795
|
+
T.let(
|
1796
|
+
:currency,
|
1797
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1798
|
+
)
|
1799
|
+
PRICING_UNIT_ID =
|
1800
|
+
T.let(
|
1801
|
+
:pricing_unit_id,
|
1802
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1803
|
+
)
|
1804
|
+
|
1805
|
+
sig do
|
1806
|
+
override.returns(
|
1807
|
+
T::Array[
|
1808
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Field::TaggedSymbol
|
1809
|
+
]
|
1810
|
+
)
|
1811
|
+
end
|
1812
|
+
def self.values
|
1813
|
+
end
|
1814
|
+
end
|
1815
|
+
|
1816
|
+
# Should prices that match the filter be included or excluded.
|
1817
|
+
module Operator
|
1818
|
+
extend Orb::Internal::Type::Enum
|
1819
|
+
|
1820
|
+
TaggedSymbol =
|
1821
|
+
T.type_alias do
|
1822
|
+
T.all(
|
1823
|
+
Symbol,
|
1824
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator
|
1825
|
+
)
|
1826
|
+
end
|
1827
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1828
|
+
|
1829
|
+
INCLUDES =
|
1830
|
+
T.let(
|
1831
|
+
:includes,
|
1832
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator::TaggedSymbol
|
1833
|
+
)
|
1834
|
+
EXCLUDES =
|
1835
|
+
T.let(
|
1836
|
+
:excludes,
|
1837
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator::TaggedSymbol
|
1838
|
+
)
|
1839
|
+
|
1840
|
+
sig do
|
1841
|
+
override.returns(
|
1842
|
+
T::Array[
|
1843
|
+
Orb::Models::InvoiceLineItemCreateResponse::Maximum::Filter::Operator::TaggedSymbol
|
1844
|
+
]
|
1845
|
+
)
|
1846
|
+
end
|
1847
|
+
def self.values
|
1848
|
+
end
|
1849
|
+
end
|
1850
|
+
end
|
840
1851
|
end
|
841
1852
|
|
842
1853
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -853,6 +1864,16 @@ module Orb
|
|
853
1864
|
sig { returns(T::Array[String]) }
|
854
1865
|
attr_accessor :applies_to_price_ids
|
855
1866
|
|
1867
|
+
# The filters that determine which prices to apply this minimum to.
|
1868
|
+
sig do
|
1869
|
+
returns(
|
1870
|
+
T::Array[
|
1871
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter
|
1872
|
+
]
|
1873
|
+
)
|
1874
|
+
end
|
1875
|
+
attr_accessor :filters
|
1876
|
+
|
856
1877
|
# Minimum amount applied
|
857
1878
|
sig { returns(String) }
|
858
1879
|
attr_accessor :minimum_amount
|
@@ -861,6 +1882,10 @@ module Orb
|
|
861
1882
|
sig do
|
862
1883
|
params(
|
863
1884
|
applies_to_price_ids: T::Array[String],
|
1885
|
+
filters:
|
1886
|
+
T::Array[
|
1887
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::OrHash
|
1888
|
+
],
|
864
1889
|
minimum_amount: String
|
865
1890
|
).returns(T.attached_class)
|
866
1891
|
end
|
@@ -868,6 +1893,8 @@ module Orb
|
|
868
1893
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
869
1894
|
# minimums, this can be a subset of prices.
|
870
1895
|
applies_to_price_ids:,
|
1896
|
+
# The filters that determine which prices to apply this minimum to.
|
1897
|
+
filters:,
|
871
1898
|
# Minimum amount applied
|
872
1899
|
minimum_amount:
|
873
1900
|
)
|
@@ -875,11 +1902,166 @@ module Orb
|
|
875
1902
|
|
876
1903
|
sig do
|
877
1904
|
override.returns(
|
878
|
-
{
|
1905
|
+
{
|
1906
|
+
applies_to_price_ids: T::Array[String],
|
1907
|
+
filters:
|
1908
|
+
T::Array[
|
1909
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter
|
1910
|
+
],
|
1911
|
+
minimum_amount: String
|
1912
|
+
}
|
879
1913
|
)
|
880
1914
|
end
|
881
1915
|
def to_hash
|
882
1916
|
end
|
1917
|
+
|
1918
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1919
|
+
OrHash =
|
1920
|
+
T.type_alias do
|
1921
|
+
T.any(
|
1922
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter,
|
1923
|
+
Orb::Internal::AnyHash
|
1924
|
+
)
|
1925
|
+
end
|
1926
|
+
|
1927
|
+
# The property of the price to filter on.
|
1928
|
+
sig do
|
1929
|
+
returns(
|
1930
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
1931
|
+
)
|
1932
|
+
end
|
1933
|
+
attr_accessor :field
|
1934
|
+
|
1935
|
+
# Should prices that match the filter be included or excluded.
|
1936
|
+
sig do
|
1937
|
+
returns(
|
1938
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator::TaggedSymbol
|
1939
|
+
)
|
1940
|
+
end
|
1941
|
+
attr_accessor :operator
|
1942
|
+
|
1943
|
+
# The IDs or values that match this filter.
|
1944
|
+
sig { returns(T::Array[String]) }
|
1945
|
+
attr_accessor :values
|
1946
|
+
|
1947
|
+
sig do
|
1948
|
+
params(
|
1949
|
+
field:
|
1950
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::OrSymbol,
|
1951
|
+
operator:
|
1952
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator::OrSymbol,
|
1953
|
+
values: T::Array[String]
|
1954
|
+
).returns(T.attached_class)
|
1955
|
+
end
|
1956
|
+
def self.new(
|
1957
|
+
# The property of the price to filter on.
|
1958
|
+
field:,
|
1959
|
+
# Should prices that match the filter be included or excluded.
|
1960
|
+
operator:,
|
1961
|
+
# The IDs or values that match this filter.
|
1962
|
+
values:
|
1963
|
+
)
|
1964
|
+
end
|
1965
|
+
|
1966
|
+
sig do
|
1967
|
+
override.returns(
|
1968
|
+
{
|
1969
|
+
field:
|
1970
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol,
|
1971
|
+
operator:
|
1972
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator::TaggedSymbol,
|
1973
|
+
values: T::Array[String]
|
1974
|
+
}
|
1975
|
+
)
|
1976
|
+
end
|
1977
|
+
def to_hash
|
1978
|
+
end
|
1979
|
+
|
1980
|
+
# The property of the price to filter on.
|
1981
|
+
module Field
|
1982
|
+
extend Orb::Internal::Type::Enum
|
1983
|
+
|
1984
|
+
TaggedSymbol =
|
1985
|
+
T.type_alias do
|
1986
|
+
T.all(
|
1987
|
+
Symbol,
|
1988
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field
|
1989
|
+
)
|
1990
|
+
end
|
1991
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1992
|
+
|
1993
|
+
PRICE_ID =
|
1994
|
+
T.let(
|
1995
|
+
:price_id,
|
1996
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
1997
|
+
)
|
1998
|
+
ITEM_ID =
|
1999
|
+
T.let(
|
2000
|
+
:item_id,
|
2001
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
2002
|
+
)
|
2003
|
+
PRICE_TYPE =
|
2004
|
+
T.let(
|
2005
|
+
:price_type,
|
2006
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
2007
|
+
)
|
2008
|
+
CURRENCY =
|
2009
|
+
T.let(
|
2010
|
+
:currency,
|
2011
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
2012
|
+
)
|
2013
|
+
PRICING_UNIT_ID =
|
2014
|
+
T.let(
|
2015
|
+
:pricing_unit_id,
|
2016
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
2017
|
+
)
|
2018
|
+
|
2019
|
+
sig do
|
2020
|
+
override.returns(
|
2021
|
+
T::Array[
|
2022
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Field::TaggedSymbol
|
2023
|
+
]
|
2024
|
+
)
|
2025
|
+
end
|
2026
|
+
def self.values
|
2027
|
+
end
|
2028
|
+
end
|
2029
|
+
|
2030
|
+
# Should prices that match the filter be included or excluded.
|
2031
|
+
module Operator
|
2032
|
+
extend Orb::Internal::Type::Enum
|
2033
|
+
|
2034
|
+
TaggedSymbol =
|
2035
|
+
T.type_alias do
|
2036
|
+
T.all(
|
2037
|
+
Symbol,
|
2038
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator
|
2039
|
+
)
|
2040
|
+
end
|
2041
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2042
|
+
|
2043
|
+
INCLUDES =
|
2044
|
+
T.let(
|
2045
|
+
:includes,
|
2046
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator::TaggedSymbol
|
2047
|
+
)
|
2048
|
+
EXCLUDES =
|
2049
|
+
T.let(
|
2050
|
+
:excludes,
|
2051
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator::TaggedSymbol
|
2052
|
+
)
|
2053
|
+
|
2054
|
+
sig do
|
2055
|
+
override.returns(
|
2056
|
+
T::Array[
|
2057
|
+
Orb::Models::InvoiceLineItemCreateResponse::Minimum::Filter::Operator::TaggedSymbol
|
2058
|
+
]
|
2059
|
+
)
|
2060
|
+
end
|
2061
|
+
def self.values
|
2062
|
+
end
|
2063
|
+
end
|
2064
|
+
end
|
883
2065
|
end
|
884
2066
|
|
885
2067
|
module SubLineItem
|