orb-billing 0.11.0 → 0.12.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 +19 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/union.rb +3 -8
- data/lib/orb/internal/util.rb +8 -9
- data/lib/orb/models/amount_discount.rb +65 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
- data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
- data/lib/orb/models/percentage_discount.rb +65 -1
- data/lib/orb/models/subscription_create_params.rb +1435 -15
- data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
- data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
- data/lib/orb/models/trial_discount.rb +65 -1
- data/lib/orb/models/usage_discount.rb +65 -1
- data/lib/orb/resources/subscriptions.rb +5 -3
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/internal/util.rbi +2 -0
- data/rbi/orb/models/amount_discount.rbi +117 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
- data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
- data/rbi/orb/models/percentage_discount.rbi +131 -0
- data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
- data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
- data/rbi/orb/models/trial_discount.rbi +109 -0
- data/rbi/orb/models/usage_discount.rbi +109 -0
- data/rbi/orb/resources/subscriptions.rbi +6 -3
- data/sig/orb/models/amount_discount.rbs +58 -0
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/percentage_discount.rbs +58 -0
- data/sig/orb/models/subscription_create_params.rbs +1130 -20
- data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
- data/sig/orb/models/trial_discount.rbs +58 -0
- data/sig/orb/models/usage_discount.rbs +58 -0
- data/sig/orb/resources/subscriptions.rbs +2 -1
- metadata +2 -2
@@ -398,12 +398,44 @@ module Orb
|
|
398
398
|
# @return [Float]
|
399
399
|
required :percentage_discount, Float
|
400
400
|
|
401
|
+
# @!attribute applies_to_all
|
402
|
+
# If set, the adjustment will apply to every price on the subscription.
|
403
|
+
#
|
404
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
|
405
|
+
optional :applies_to_all,
|
406
|
+
enum: -> {
|
407
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll
|
408
|
+
},
|
409
|
+
nil?: true
|
410
|
+
|
411
|
+
# @!attribute applies_to_item_ids
|
412
|
+
# The set of item IDs to which this adjustment applies.
|
413
|
+
#
|
414
|
+
# @return [Array<String>, nil]
|
415
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
416
|
+
|
401
417
|
# @!attribute applies_to_price_ids
|
402
418
|
# The set of price IDs to which this adjustment applies.
|
403
419
|
#
|
404
420
|
# @return [Array<String>, nil]
|
405
421
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
406
422
|
|
423
|
+
# @!attribute currency
|
424
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
425
|
+
#
|
426
|
+
# @return [String, nil]
|
427
|
+
optional :currency, String, nil?: true
|
428
|
+
|
429
|
+
# @!attribute filters
|
430
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
431
|
+
#
|
432
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
|
433
|
+
optional :filters,
|
434
|
+
-> {
|
435
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]
|
436
|
+
},
|
437
|
+
nil?: true
|
438
|
+
|
407
439
|
# @!attribute is_invoice_level
|
408
440
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
409
441
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -411,18 +443,128 @@ module Orb
|
|
411
443
|
# @return [Boolean, nil]
|
412
444
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
413
445
|
|
414
|
-
# @!
|
446
|
+
# @!attribute price_type
|
447
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
448
|
+
#
|
449
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
|
450
|
+
optional :price_type,
|
451
|
+
enum: -> {
|
452
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType
|
453
|
+
},
|
454
|
+
nil?: true
|
455
|
+
|
456
|
+
# @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
|
415
457
|
# Some parameter documentations has been truncated, see
|
416
458
|
# {Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount}
|
417
459
|
# for more details.
|
418
460
|
#
|
419
461
|
# @param percentage_discount [Float]
|
420
462
|
#
|
463
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
464
|
+
#
|
465
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
466
|
+
#
|
421
467
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
422
468
|
#
|
469
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
470
|
+
#
|
471
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
472
|
+
#
|
423
473
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
424
474
|
#
|
475
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
476
|
+
#
|
425
477
|
# @param adjustment_type [Symbol, :percentage_discount]
|
478
|
+
|
479
|
+
# If set, the adjustment will apply to every price on the subscription.
|
480
|
+
#
|
481
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount#applies_to_all
|
482
|
+
module AppliesToAll
|
483
|
+
extend Orb::Internal::Type::Enum
|
484
|
+
|
485
|
+
TRUE = true
|
486
|
+
|
487
|
+
# @!method self.values
|
488
|
+
# @return [Array<Boolean>]
|
489
|
+
end
|
490
|
+
|
491
|
+
class Filter < Orb::Internal::Type::BaseModel
|
492
|
+
# @!attribute field
|
493
|
+
# The property of the price to filter on.
|
494
|
+
#
|
495
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field]
|
496
|
+
required :field,
|
497
|
+
enum: -> {
|
498
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field
|
499
|
+
}
|
500
|
+
|
501
|
+
# @!attribute operator
|
502
|
+
# Should prices that match the filter be included or excluded.
|
503
|
+
#
|
504
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
|
505
|
+
required :operator,
|
506
|
+
enum: -> {
|
507
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator
|
508
|
+
}
|
509
|
+
|
510
|
+
# @!attribute values
|
511
|
+
# The IDs or values that match this filter.
|
512
|
+
#
|
513
|
+
# @return [Array<String>]
|
514
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
515
|
+
|
516
|
+
# @!method initialize(field:, operator:, values:)
|
517
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
518
|
+
#
|
519
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
520
|
+
#
|
521
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
522
|
+
|
523
|
+
# The property of the price to filter on.
|
524
|
+
#
|
525
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#field
|
526
|
+
module Field
|
527
|
+
extend Orb::Internal::Type::Enum
|
528
|
+
|
529
|
+
PRICE_ID = :price_id
|
530
|
+
ITEM_ID = :item_id
|
531
|
+
PRICE_TYPE = :price_type
|
532
|
+
CURRENCY = :currency
|
533
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
534
|
+
|
535
|
+
# @!method self.values
|
536
|
+
# @return [Array<Symbol>]
|
537
|
+
end
|
538
|
+
|
539
|
+
# Should prices that match the filter be included or excluded.
|
540
|
+
#
|
541
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#operator
|
542
|
+
module Operator
|
543
|
+
extend Orb::Internal::Type::Enum
|
544
|
+
|
545
|
+
INCLUDES = :includes
|
546
|
+
EXCLUDES = :excludes
|
547
|
+
|
548
|
+
# @!method self.values
|
549
|
+
# @return [Array<Symbol>]
|
550
|
+
end
|
551
|
+
end
|
552
|
+
|
553
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
554
|
+
#
|
555
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::PercentageDiscount#price_type
|
556
|
+
module PriceType
|
557
|
+
extend Orb::Internal::Type::Enum
|
558
|
+
|
559
|
+
USAGE = :usage
|
560
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
561
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
562
|
+
FIXED = :fixed
|
563
|
+
IN_ARREARS = :in_arrears
|
564
|
+
|
565
|
+
# @!method self.values
|
566
|
+
# @return [Array<Symbol>]
|
567
|
+
end
|
426
568
|
end
|
427
569
|
|
428
570
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
@@ -436,12 +578,44 @@ module Orb
|
|
436
578
|
# @return [Float]
|
437
579
|
required :usage_discount, Float
|
438
580
|
|
581
|
+
# @!attribute applies_to_all
|
582
|
+
# If set, the adjustment will apply to every price on the subscription.
|
583
|
+
#
|
584
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
|
585
|
+
optional :applies_to_all,
|
586
|
+
enum: -> {
|
587
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll
|
588
|
+
},
|
589
|
+
nil?: true
|
590
|
+
|
591
|
+
# @!attribute applies_to_item_ids
|
592
|
+
# The set of item IDs to which this adjustment applies.
|
593
|
+
#
|
594
|
+
# @return [Array<String>, nil]
|
595
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
596
|
+
|
439
597
|
# @!attribute applies_to_price_ids
|
440
598
|
# The set of price IDs to which this adjustment applies.
|
441
599
|
#
|
442
600
|
# @return [Array<String>, nil]
|
443
601
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
444
602
|
|
603
|
+
# @!attribute currency
|
604
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
605
|
+
#
|
606
|
+
# @return [String, nil]
|
607
|
+
optional :currency, String, nil?: true
|
608
|
+
|
609
|
+
# @!attribute filters
|
610
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
611
|
+
#
|
612
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil]
|
613
|
+
optional :filters,
|
614
|
+
-> {
|
615
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter]
|
616
|
+
},
|
617
|
+
nil?: true
|
618
|
+
|
445
619
|
# @!attribute is_invoice_level
|
446
620
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
447
621
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -449,18 +623,128 @@ module Orb
|
|
449
623
|
# @return [Boolean, nil]
|
450
624
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
451
625
|
|
452
|
-
# @!
|
626
|
+
# @!attribute price_type
|
627
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
628
|
+
#
|
629
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil]
|
630
|
+
optional :price_type,
|
631
|
+
enum: -> {
|
632
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::PriceType
|
633
|
+
},
|
634
|
+
nil?: true
|
635
|
+
|
636
|
+
# @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
|
453
637
|
# Some parameter documentations has been truncated, see
|
454
638
|
# {Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount}
|
455
639
|
# for more details.
|
456
640
|
#
|
457
641
|
# @param usage_discount [Float]
|
458
642
|
#
|
643
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
644
|
+
#
|
645
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
646
|
+
#
|
459
647
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
460
648
|
#
|
649
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
650
|
+
#
|
651
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
652
|
+
#
|
461
653
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
462
654
|
#
|
655
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
656
|
+
#
|
463
657
|
# @param adjustment_type [Symbol, :usage_discount]
|
658
|
+
|
659
|
+
# If set, the adjustment will apply to every price on the subscription.
|
660
|
+
#
|
661
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount#applies_to_all
|
662
|
+
module AppliesToAll
|
663
|
+
extend Orb::Internal::Type::Enum
|
664
|
+
|
665
|
+
TRUE = true
|
666
|
+
|
667
|
+
# @!method self.values
|
668
|
+
# @return [Array<Boolean>]
|
669
|
+
end
|
670
|
+
|
671
|
+
class Filter < Orb::Internal::Type::BaseModel
|
672
|
+
# @!attribute field
|
673
|
+
# The property of the price to filter on.
|
674
|
+
#
|
675
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field]
|
676
|
+
required :field,
|
677
|
+
enum: -> {
|
678
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field
|
679
|
+
}
|
680
|
+
|
681
|
+
# @!attribute operator
|
682
|
+
# Should prices that match the filter be included or excluded.
|
683
|
+
#
|
684
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator]
|
685
|
+
required :operator,
|
686
|
+
enum: -> {
|
687
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator
|
688
|
+
}
|
689
|
+
|
690
|
+
# @!attribute values
|
691
|
+
# The IDs or values that match this filter.
|
692
|
+
#
|
693
|
+
# @return [Array<String>]
|
694
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
695
|
+
|
696
|
+
# @!method initialize(field:, operator:, values:)
|
697
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
698
|
+
#
|
699
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
700
|
+
#
|
701
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
702
|
+
|
703
|
+
# The property of the price to filter on.
|
704
|
+
#
|
705
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter#field
|
706
|
+
module Field
|
707
|
+
extend Orb::Internal::Type::Enum
|
708
|
+
|
709
|
+
PRICE_ID = :price_id
|
710
|
+
ITEM_ID = :item_id
|
711
|
+
PRICE_TYPE = :price_type
|
712
|
+
CURRENCY = :currency
|
713
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
714
|
+
|
715
|
+
# @!method self.values
|
716
|
+
# @return [Array<Symbol>]
|
717
|
+
end
|
718
|
+
|
719
|
+
# Should prices that match the filter be included or excluded.
|
720
|
+
#
|
721
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount::Filter#operator
|
722
|
+
module Operator
|
723
|
+
extend Orb::Internal::Type::Enum
|
724
|
+
|
725
|
+
INCLUDES = :includes
|
726
|
+
EXCLUDES = :excludes
|
727
|
+
|
728
|
+
# @!method self.values
|
729
|
+
# @return [Array<Symbol>]
|
730
|
+
end
|
731
|
+
end
|
732
|
+
|
733
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
734
|
+
#
|
735
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::UsageDiscount#price_type
|
736
|
+
module PriceType
|
737
|
+
extend Orb::Internal::Type::Enum
|
738
|
+
|
739
|
+
USAGE = :usage
|
740
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
741
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
742
|
+
FIXED = :fixed
|
743
|
+
IN_ARREARS = :in_arrears
|
744
|
+
|
745
|
+
# @!method self.values
|
746
|
+
# @return [Array<Symbol>]
|
747
|
+
end
|
464
748
|
end
|
465
749
|
|
466
750
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -474,12 +758,44 @@ module Orb
|
|
474
758
|
# @return [String]
|
475
759
|
required :amount_discount, String
|
476
760
|
|
761
|
+
# @!attribute applies_to_all
|
762
|
+
# If set, the adjustment will apply to every price on the subscription.
|
763
|
+
#
|
764
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
|
765
|
+
optional :applies_to_all,
|
766
|
+
enum: -> {
|
767
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll
|
768
|
+
},
|
769
|
+
nil?: true
|
770
|
+
|
771
|
+
# @!attribute applies_to_item_ids
|
772
|
+
# The set of item IDs to which this adjustment applies.
|
773
|
+
#
|
774
|
+
# @return [Array<String>, nil]
|
775
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
776
|
+
|
477
777
|
# @!attribute applies_to_price_ids
|
478
778
|
# The set of price IDs to which this adjustment applies.
|
479
779
|
#
|
480
780
|
# @return [Array<String>, nil]
|
481
781
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
482
782
|
|
783
|
+
# @!attribute currency
|
784
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
785
|
+
#
|
786
|
+
# @return [String, nil]
|
787
|
+
optional :currency, String, nil?: true
|
788
|
+
|
789
|
+
# @!attribute filters
|
790
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
791
|
+
#
|
792
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil]
|
793
|
+
optional :filters,
|
794
|
+
-> {
|
795
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter]
|
796
|
+
},
|
797
|
+
nil?: true
|
798
|
+
|
483
799
|
# @!attribute is_invoice_level
|
484
800
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
485
801
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -487,18 +803,128 @@ module Orb
|
|
487
803
|
# @return [Boolean, nil]
|
488
804
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
489
805
|
|
490
|
-
# @!
|
806
|
+
# @!attribute price_type
|
807
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
808
|
+
#
|
809
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil]
|
810
|
+
optional :price_type,
|
811
|
+
enum: -> {
|
812
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::PriceType
|
813
|
+
},
|
814
|
+
nil?: true
|
815
|
+
|
816
|
+
# @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
|
491
817
|
# Some parameter documentations has been truncated, see
|
492
818
|
# {Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount}
|
493
819
|
# for more details.
|
494
820
|
#
|
495
821
|
# @param amount_discount [String]
|
496
822
|
#
|
823
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
824
|
+
#
|
825
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
826
|
+
#
|
497
827
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
498
828
|
#
|
829
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
830
|
+
#
|
831
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
832
|
+
#
|
499
833
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
500
834
|
#
|
835
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
836
|
+
#
|
501
837
|
# @param adjustment_type [Symbol, :amount_discount]
|
838
|
+
|
839
|
+
# If set, the adjustment will apply to every price on the subscription.
|
840
|
+
#
|
841
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount#applies_to_all
|
842
|
+
module AppliesToAll
|
843
|
+
extend Orb::Internal::Type::Enum
|
844
|
+
|
845
|
+
TRUE = true
|
846
|
+
|
847
|
+
# @!method self.values
|
848
|
+
# @return [Array<Boolean>]
|
849
|
+
end
|
850
|
+
|
851
|
+
class Filter < Orb::Internal::Type::BaseModel
|
852
|
+
# @!attribute field
|
853
|
+
# The property of the price to filter on.
|
854
|
+
#
|
855
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field]
|
856
|
+
required :field,
|
857
|
+
enum: -> {
|
858
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field
|
859
|
+
}
|
860
|
+
|
861
|
+
# @!attribute operator
|
862
|
+
# Should prices that match the filter be included or excluded.
|
863
|
+
#
|
864
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator]
|
865
|
+
required :operator,
|
866
|
+
enum: -> {
|
867
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator
|
868
|
+
}
|
869
|
+
|
870
|
+
# @!attribute values
|
871
|
+
# The IDs or values that match this filter.
|
872
|
+
#
|
873
|
+
# @return [Array<String>]
|
874
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
875
|
+
|
876
|
+
# @!method initialize(field:, operator:, values:)
|
877
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
878
|
+
#
|
879
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
880
|
+
#
|
881
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
882
|
+
|
883
|
+
# The property of the price to filter on.
|
884
|
+
#
|
885
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter#field
|
886
|
+
module Field
|
887
|
+
extend Orb::Internal::Type::Enum
|
888
|
+
|
889
|
+
PRICE_ID = :price_id
|
890
|
+
ITEM_ID = :item_id
|
891
|
+
PRICE_TYPE = :price_type
|
892
|
+
CURRENCY = :currency
|
893
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
894
|
+
|
895
|
+
# @!method self.values
|
896
|
+
# @return [Array<Symbol>]
|
897
|
+
end
|
898
|
+
|
899
|
+
# Should prices that match the filter be included or excluded.
|
900
|
+
#
|
901
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount::Filter#operator
|
902
|
+
module Operator
|
903
|
+
extend Orb::Internal::Type::Enum
|
904
|
+
|
905
|
+
INCLUDES = :includes
|
906
|
+
EXCLUDES = :excludes
|
907
|
+
|
908
|
+
# @!method self.values
|
909
|
+
# @return [Array<Symbol>]
|
910
|
+
end
|
911
|
+
end
|
912
|
+
|
913
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
914
|
+
#
|
915
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::AmountDiscount#price_type
|
916
|
+
module PriceType
|
917
|
+
extend Orb::Internal::Type::Enum
|
918
|
+
|
919
|
+
USAGE = :usage
|
920
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
921
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
922
|
+
FIXED = :fixed
|
923
|
+
IN_ARREARS = :in_arrears
|
924
|
+
|
925
|
+
# @!method self.values
|
926
|
+
# @return [Array<Symbol>]
|
927
|
+
end
|
502
928
|
end
|
503
929
|
|
504
930
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -518,12 +944,44 @@ module Orb
|
|
518
944
|
# @return [String]
|
519
945
|
required :minimum_amount, String
|
520
946
|
|
947
|
+
# @!attribute applies_to_all
|
948
|
+
# If set, the adjustment will apply to every price on the subscription.
|
949
|
+
#
|
950
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil]
|
951
|
+
optional :applies_to_all,
|
952
|
+
enum: -> {
|
953
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::AppliesToAll
|
954
|
+
},
|
955
|
+
nil?: true
|
956
|
+
|
957
|
+
# @!attribute applies_to_item_ids
|
958
|
+
# The set of item IDs to which this adjustment applies.
|
959
|
+
#
|
960
|
+
# @return [Array<String>, nil]
|
961
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
962
|
+
|
521
963
|
# @!attribute applies_to_price_ids
|
522
964
|
# The set of price IDs to which this adjustment applies.
|
523
965
|
#
|
524
966
|
# @return [Array<String>, nil]
|
525
967
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
526
968
|
|
969
|
+
# @!attribute currency
|
970
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
971
|
+
#
|
972
|
+
# @return [String, nil]
|
973
|
+
optional :currency, String, nil?: true
|
974
|
+
|
975
|
+
# @!attribute filters
|
976
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
977
|
+
#
|
978
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter>, nil]
|
979
|
+
optional :filters,
|
980
|
+
-> {
|
981
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter]
|
982
|
+
},
|
983
|
+
nil?: true
|
984
|
+
|
527
985
|
# @!attribute is_invoice_level
|
528
986
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
529
987
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -531,7 +989,17 @@ module Orb
|
|
531
989
|
# @return [Boolean, nil]
|
532
990
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
533
991
|
|
534
|
-
# @!
|
992
|
+
# @!attribute price_type
|
993
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
994
|
+
#
|
995
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::PriceType, nil]
|
996
|
+
optional :price_type,
|
997
|
+
enum: -> {
|
998
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::PriceType
|
999
|
+
},
|
1000
|
+
nil?: true
|
1001
|
+
|
1002
|
+
# @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
|
535
1003
|
# Some parameter documentations has been truncated, see
|
536
1004
|
# {Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum} for
|
537
1005
|
# more details.
|
@@ -540,30 +1008,162 @@ module Orb
|
|
540
1008
|
#
|
541
1009
|
# @param minimum_amount [String]
|
542
1010
|
#
|
1011
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
1012
|
+
#
|
1013
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
1014
|
+
#
|
543
1015
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
544
1016
|
#
|
1017
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
1018
|
+
#
|
1019
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
1020
|
+
#
|
545
1021
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
546
1022
|
#
|
1023
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
1024
|
+
#
|
547
1025
|
# @param adjustment_type [Symbol, :minimum]
|
548
|
-
end
|
549
1026
|
|
550
|
-
|
551
|
-
# @!attribute adjustment_type
|
1027
|
+
# If set, the adjustment will apply to every price on the subscription.
|
552
1028
|
#
|
553
|
-
#
|
554
|
-
|
1029
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum#applies_to_all
|
1030
|
+
module AppliesToAll
|
1031
|
+
extend Orb::Internal::Type::Enum
|
1032
|
+
|
1033
|
+
TRUE = true
|
1034
|
+
|
1035
|
+
# @!method self.values
|
1036
|
+
# @return [Array<Boolean>]
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1040
|
+
# @!attribute field
|
1041
|
+
# The property of the price to filter on.
|
1042
|
+
#
|
1043
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter::Field]
|
1044
|
+
required :field,
|
1045
|
+
enum: -> {
|
1046
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter::Field
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
# @!attribute operator
|
1050
|
+
# Should prices that match the filter be included or excluded.
|
1051
|
+
#
|
1052
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter::Operator]
|
1053
|
+
required :operator,
|
1054
|
+
enum: -> {
|
1055
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter::Operator
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
# @!attribute values
|
1059
|
+
# The IDs or values that match this filter.
|
1060
|
+
#
|
1061
|
+
# @return [Array<String>]
|
1062
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1063
|
+
|
1064
|
+
# @!method initialize(field:, operator:, values:)
|
1065
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
1066
|
+
#
|
1067
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1068
|
+
#
|
1069
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1070
|
+
|
1071
|
+
# The property of the price to filter on.
|
1072
|
+
#
|
1073
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter#field
|
1074
|
+
module Field
|
1075
|
+
extend Orb::Internal::Type::Enum
|
1076
|
+
|
1077
|
+
PRICE_ID = :price_id
|
1078
|
+
ITEM_ID = :item_id
|
1079
|
+
PRICE_TYPE = :price_type
|
1080
|
+
CURRENCY = :currency
|
1081
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1082
|
+
|
1083
|
+
# @!method self.values
|
1084
|
+
# @return [Array<Symbol>]
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Should prices that match the filter be included or excluded.
|
1088
|
+
#
|
1089
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum::Filter#operator
|
1090
|
+
module Operator
|
1091
|
+
extend Orb::Internal::Type::Enum
|
1092
|
+
|
1093
|
+
INCLUDES = :includes
|
1094
|
+
EXCLUDES = :excludes
|
1095
|
+
|
1096
|
+
# @!method self.values
|
1097
|
+
# @return [Array<Symbol>]
|
1098
|
+
end
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
1102
|
+
#
|
1103
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Minimum#price_type
|
1104
|
+
module PriceType
|
1105
|
+
extend Orb::Internal::Type::Enum
|
1106
|
+
|
1107
|
+
USAGE = :usage
|
1108
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
1109
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
1110
|
+
FIXED = :fixed
|
1111
|
+
IN_ARREARS = :in_arrears
|
1112
|
+
|
1113
|
+
# @!method self.values
|
1114
|
+
# @return [Array<Symbol>]
|
1115
|
+
end
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
class Maximum < Orb::Internal::Type::BaseModel
|
1119
|
+
# @!attribute adjustment_type
|
1120
|
+
#
|
1121
|
+
# @return [Symbol, :maximum]
|
1122
|
+
required :adjustment_type, const: :maximum
|
555
1123
|
|
556
1124
|
# @!attribute maximum_amount
|
557
1125
|
#
|
558
1126
|
# @return [String]
|
559
1127
|
required :maximum_amount, String
|
560
1128
|
|
1129
|
+
# @!attribute applies_to_all
|
1130
|
+
# If set, the adjustment will apply to every price on the subscription.
|
1131
|
+
#
|
1132
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil]
|
1133
|
+
optional :applies_to_all,
|
1134
|
+
enum: -> {
|
1135
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::AppliesToAll
|
1136
|
+
},
|
1137
|
+
nil?: true
|
1138
|
+
|
1139
|
+
# @!attribute applies_to_item_ids
|
1140
|
+
# The set of item IDs to which this adjustment applies.
|
1141
|
+
#
|
1142
|
+
# @return [Array<String>, nil]
|
1143
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
1144
|
+
|
561
1145
|
# @!attribute applies_to_price_ids
|
562
1146
|
# The set of price IDs to which this adjustment applies.
|
563
1147
|
#
|
564
1148
|
# @return [Array<String>, nil]
|
565
1149
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
566
1150
|
|
1151
|
+
# @!attribute currency
|
1152
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
1153
|
+
#
|
1154
|
+
# @return [String, nil]
|
1155
|
+
optional :currency, String, nil?: true
|
1156
|
+
|
1157
|
+
# @!attribute filters
|
1158
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
1159
|
+
#
|
1160
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter>, nil]
|
1161
|
+
optional :filters,
|
1162
|
+
-> {
|
1163
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter]
|
1164
|
+
},
|
1165
|
+
nil?: true
|
1166
|
+
|
567
1167
|
# @!attribute is_invoice_level
|
568
1168
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
569
1169
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -571,18 +1171,128 @@ module Orb
|
|
571
1171
|
# @return [Boolean, nil]
|
572
1172
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
573
1173
|
|
574
|
-
# @!
|
1174
|
+
# @!attribute price_type
|
1175
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
1176
|
+
#
|
1177
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::PriceType, nil]
|
1178
|
+
optional :price_type,
|
1179
|
+
enum: -> {
|
1180
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::PriceType
|
1181
|
+
},
|
1182
|
+
nil?: true
|
1183
|
+
|
1184
|
+
# @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
|
575
1185
|
# Some parameter documentations has been truncated, see
|
576
1186
|
# {Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum} for
|
577
1187
|
# more details.
|
578
1188
|
#
|
579
1189
|
# @param maximum_amount [String]
|
580
1190
|
#
|
1191
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
1192
|
+
#
|
1193
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
1194
|
+
#
|
581
1195
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
582
1196
|
#
|
1197
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
1198
|
+
#
|
1199
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
1200
|
+
#
|
583
1201
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
584
1202
|
#
|
1203
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
1204
|
+
#
|
585
1205
|
# @param adjustment_type [Symbol, :maximum]
|
1206
|
+
|
1207
|
+
# If set, the adjustment will apply to every price on the subscription.
|
1208
|
+
#
|
1209
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum#applies_to_all
|
1210
|
+
module AppliesToAll
|
1211
|
+
extend Orb::Internal::Type::Enum
|
1212
|
+
|
1213
|
+
TRUE = true
|
1214
|
+
|
1215
|
+
# @!method self.values
|
1216
|
+
# @return [Array<Boolean>]
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1220
|
+
# @!attribute field
|
1221
|
+
# The property of the price to filter on.
|
1222
|
+
#
|
1223
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter::Field]
|
1224
|
+
required :field,
|
1225
|
+
enum: -> {
|
1226
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter::Field
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
# @!attribute operator
|
1230
|
+
# Should prices that match the filter be included or excluded.
|
1231
|
+
#
|
1232
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter::Operator]
|
1233
|
+
required :operator,
|
1234
|
+
enum: -> {
|
1235
|
+
Orb::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter::Operator
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
# @!attribute values
|
1239
|
+
# The IDs or values that match this filter.
|
1240
|
+
#
|
1241
|
+
# @return [Array<String>]
|
1242
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1243
|
+
|
1244
|
+
# @!method initialize(field:, operator:, values:)
|
1245
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
1246
|
+
#
|
1247
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1248
|
+
#
|
1249
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1250
|
+
|
1251
|
+
# The property of the price to filter on.
|
1252
|
+
#
|
1253
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter#field
|
1254
|
+
module Field
|
1255
|
+
extend Orb::Internal::Type::Enum
|
1256
|
+
|
1257
|
+
PRICE_ID = :price_id
|
1258
|
+
ITEM_ID = :item_id
|
1259
|
+
PRICE_TYPE = :price_type
|
1260
|
+
CURRENCY = :currency
|
1261
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1262
|
+
|
1263
|
+
# @!method self.values
|
1264
|
+
# @return [Array<Symbol>]
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Should prices that match the filter be included or excluded.
|
1268
|
+
#
|
1269
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum::Filter#operator
|
1270
|
+
module Operator
|
1271
|
+
extend Orb::Internal::Type::Enum
|
1272
|
+
|
1273
|
+
INCLUDES = :includes
|
1274
|
+
EXCLUDES = :excludes
|
1275
|
+
|
1276
|
+
# @!method self.values
|
1277
|
+
# @return [Array<Symbol>]
|
1278
|
+
end
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
1282
|
+
#
|
1283
|
+
# @see Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::Maximum#price_type
|
1284
|
+
module PriceType
|
1285
|
+
extend Orb::Internal::Type::Enum
|
1286
|
+
|
1287
|
+
USAGE = :usage
|
1288
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
1289
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
1290
|
+
FIXED = :fixed
|
1291
|
+
IN_ARREARS = :in_arrears
|
1292
|
+
|
1293
|
+
# @!method self.values
|
1294
|
+
# @return [Array<Symbol>]
|
1295
|
+
end
|
586
1296
|
end
|
587
1297
|
|
588
1298
|
# @!method self.variants
|
@@ -9674,12 +10384,44 @@ module Orb
|
|
9674
10384
|
# @return [Float]
|
9675
10385
|
required :percentage_discount, Float
|
9676
10386
|
|
10387
|
+
# @!attribute applies_to_all
|
10388
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10389
|
+
#
|
10390
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
|
10391
|
+
optional :applies_to_all,
|
10392
|
+
enum: -> {
|
10393
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll
|
10394
|
+
},
|
10395
|
+
nil?: true
|
10396
|
+
|
10397
|
+
# @!attribute applies_to_item_ids
|
10398
|
+
# The set of item IDs to which this adjustment applies.
|
10399
|
+
#
|
10400
|
+
# @return [Array<String>, nil]
|
10401
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10402
|
+
|
9677
10403
|
# @!attribute applies_to_price_ids
|
9678
10404
|
# The set of price IDs to which this adjustment applies.
|
9679
10405
|
#
|
9680
10406
|
# @return [Array<String>, nil]
|
9681
10407
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9682
10408
|
|
10409
|
+
# @!attribute currency
|
10410
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10411
|
+
#
|
10412
|
+
# @return [String, nil]
|
10413
|
+
optional :currency, String, nil?: true
|
10414
|
+
|
10415
|
+
# @!attribute filters
|
10416
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10417
|
+
#
|
10418
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
|
10419
|
+
optional :filters,
|
10420
|
+
-> {
|
10421
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter]
|
10422
|
+
},
|
10423
|
+
nil?: true
|
10424
|
+
|
9683
10425
|
# @!attribute is_invoice_level
|
9684
10426
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9685
10427
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9687,18 +10429,128 @@ module Orb
|
|
9687
10429
|
# @return [Boolean, nil]
|
9688
10430
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9689
10431
|
|
9690
|
-
# @!
|
10432
|
+
# @!attribute price_type
|
10433
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10434
|
+
#
|
10435
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
|
10436
|
+
optional :price_type,
|
10437
|
+
enum: -> {
|
10438
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType
|
10439
|
+
},
|
10440
|
+
nil?: true
|
10441
|
+
|
10442
|
+
# @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
|
9691
10443
|
# Some parameter documentations has been truncated, see
|
9692
10444
|
# {Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount}
|
9693
10445
|
# for more details.
|
9694
10446
|
#
|
9695
10447
|
# @param percentage_discount [Float]
|
9696
10448
|
#
|
10449
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10450
|
+
#
|
10451
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10452
|
+
#
|
9697
10453
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9698
10454
|
#
|
10455
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10456
|
+
#
|
10457
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10458
|
+
#
|
9699
10459
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9700
10460
|
#
|
10461
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10462
|
+
#
|
9701
10463
|
# @param adjustment_type [Symbol, :percentage_discount]
|
10464
|
+
|
10465
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10466
|
+
#
|
10467
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount#applies_to_all
|
10468
|
+
module AppliesToAll
|
10469
|
+
extend Orb::Internal::Type::Enum
|
10470
|
+
|
10471
|
+
TRUE = true
|
10472
|
+
|
10473
|
+
# @!method self.values
|
10474
|
+
# @return [Array<Boolean>]
|
10475
|
+
end
|
10476
|
+
|
10477
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10478
|
+
# @!attribute field
|
10479
|
+
# The property of the price to filter on.
|
10480
|
+
#
|
10481
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field]
|
10482
|
+
required :field,
|
10483
|
+
enum: -> {
|
10484
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field
|
10485
|
+
}
|
10486
|
+
|
10487
|
+
# @!attribute operator
|
10488
|
+
# Should prices that match the filter be included or excluded.
|
10489
|
+
#
|
10490
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
|
10491
|
+
required :operator,
|
10492
|
+
enum: -> {
|
10493
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator
|
10494
|
+
}
|
10495
|
+
|
10496
|
+
# @!attribute values
|
10497
|
+
# The IDs or values that match this filter.
|
10498
|
+
#
|
10499
|
+
# @return [Array<String>]
|
10500
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10501
|
+
|
10502
|
+
# @!method initialize(field:, operator:, values:)
|
10503
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
10504
|
+
#
|
10505
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
10506
|
+
#
|
10507
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10508
|
+
|
10509
|
+
# The property of the price to filter on.
|
10510
|
+
#
|
10511
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter#field
|
10512
|
+
module Field
|
10513
|
+
extend Orb::Internal::Type::Enum
|
10514
|
+
|
10515
|
+
PRICE_ID = :price_id
|
10516
|
+
ITEM_ID = :item_id
|
10517
|
+
PRICE_TYPE = :price_type
|
10518
|
+
CURRENCY = :currency
|
10519
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10520
|
+
|
10521
|
+
# @!method self.values
|
10522
|
+
# @return [Array<Symbol>]
|
10523
|
+
end
|
10524
|
+
|
10525
|
+
# Should prices that match the filter be included or excluded.
|
10526
|
+
#
|
10527
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter#operator
|
10528
|
+
module Operator
|
10529
|
+
extend Orb::Internal::Type::Enum
|
10530
|
+
|
10531
|
+
INCLUDES = :includes
|
10532
|
+
EXCLUDES = :excludes
|
10533
|
+
|
10534
|
+
# @!method self.values
|
10535
|
+
# @return [Array<Symbol>]
|
10536
|
+
end
|
10537
|
+
end
|
10538
|
+
|
10539
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10540
|
+
#
|
10541
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::PercentageDiscount#price_type
|
10542
|
+
module PriceType
|
10543
|
+
extend Orb::Internal::Type::Enum
|
10544
|
+
|
10545
|
+
USAGE = :usage
|
10546
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10547
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10548
|
+
FIXED = :fixed
|
10549
|
+
IN_ARREARS = :in_arrears
|
10550
|
+
|
10551
|
+
# @!method self.values
|
10552
|
+
# @return [Array<Symbol>]
|
10553
|
+
end
|
9702
10554
|
end
|
9703
10555
|
|
9704
10556
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
@@ -9712,12 +10564,44 @@ module Orb
|
|
9712
10564
|
# @return [Float]
|
9713
10565
|
required :usage_discount, Float
|
9714
10566
|
|
10567
|
+
# @!attribute applies_to_all
|
10568
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10569
|
+
#
|
10570
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
|
10571
|
+
optional :applies_to_all,
|
10572
|
+
enum: -> {
|
10573
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll
|
10574
|
+
},
|
10575
|
+
nil?: true
|
10576
|
+
|
10577
|
+
# @!attribute applies_to_item_ids
|
10578
|
+
# The set of item IDs to which this adjustment applies.
|
10579
|
+
#
|
10580
|
+
# @return [Array<String>, nil]
|
10581
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10582
|
+
|
9715
10583
|
# @!attribute applies_to_price_ids
|
9716
10584
|
# The set of price IDs to which this adjustment applies.
|
9717
10585
|
#
|
9718
10586
|
# @return [Array<String>, nil]
|
9719
10587
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9720
10588
|
|
10589
|
+
# @!attribute currency
|
10590
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10591
|
+
#
|
10592
|
+
# @return [String, nil]
|
10593
|
+
optional :currency, String, nil?: true
|
10594
|
+
|
10595
|
+
# @!attribute filters
|
10596
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10597
|
+
#
|
10598
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter>, nil]
|
10599
|
+
optional :filters,
|
10600
|
+
-> {
|
10601
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter]
|
10602
|
+
},
|
10603
|
+
nil?: true
|
10604
|
+
|
9721
10605
|
# @!attribute is_invoice_level
|
9722
10606
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9723
10607
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9725,18 +10609,128 @@ module Orb
|
|
9725
10609
|
# @return [Boolean, nil]
|
9726
10610
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9727
10611
|
|
9728
|
-
# @!
|
10612
|
+
# @!attribute price_type
|
10613
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10614
|
+
#
|
10615
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType, nil]
|
10616
|
+
optional :price_type,
|
10617
|
+
enum: -> {
|
10618
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType
|
10619
|
+
},
|
10620
|
+
nil?: true
|
10621
|
+
|
10622
|
+
# @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
|
9729
10623
|
# Some parameter documentations has been truncated, see
|
9730
10624
|
# {Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount}
|
9731
10625
|
# for more details.
|
9732
10626
|
#
|
9733
10627
|
# @param usage_discount [Float]
|
9734
10628
|
#
|
10629
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10630
|
+
#
|
10631
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10632
|
+
#
|
9735
10633
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9736
10634
|
#
|
10635
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10636
|
+
#
|
10637
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10638
|
+
#
|
9737
10639
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9738
10640
|
#
|
10641
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10642
|
+
#
|
9739
10643
|
# @param adjustment_type [Symbol, :usage_discount]
|
10644
|
+
|
10645
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10646
|
+
#
|
10647
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount#applies_to_all
|
10648
|
+
module AppliesToAll
|
10649
|
+
extend Orb::Internal::Type::Enum
|
10650
|
+
|
10651
|
+
TRUE = true
|
10652
|
+
|
10653
|
+
# @!method self.values
|
10654
|
+
# @return [Array<Boolean>]
|
10655
|
+
end
|
10656
|
+
|
10657
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10658
|
+
# @!attribute field
|
10659
|
+
# The property of the price to filter on.
|
10660
|
+
#
|
10661
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field]
|
10662
|
+
required :field,
|
10663
|
+
enum: -> {
|
10664
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field
|
10665
|
+
}
|
10666
|
+
|
10667
|
+
# @!attribute operator
|
10668
|
+
# Should prices that match the filter be included or excluded.
|
10669
|
+
#
|
10670
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator]
|
10671
|
+
required :operator,
|
10672
|
+
enum: -> {
|
10673
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator
|
10674
|
+
}
|
10675
|
+
|
10676
|
+
# @!attribute values
|
10677
|
+
# The IDs or values that match this filter.
|
10678
|
+
#
|
10679
|
+
# @return [Array<String>]
|
10680
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10681
|
+
|
10682
|
+
# @!method initialize(field:, operator:, values:)
|
10683
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
10684
|
+
#
|
10685
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
10686
|
+
#
|
10687
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10688
|
+
|
10689
|
+
# The property of the price to filter on.
|
10690
|
+
#
|
10691
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter#field
|
10692
|
+
module Field
|
10693
|
+
extend Orb::Internal::Type::Enum
|
10694
|
+
|
10695
|
+
PRICE_ID = :price_id
|
10696
|
+
ITEM_ID = :item_id
|
10697
|
+
PRICE_TYPE = :price_type
|
10698
|
+
CURRENCY = :currency
|
10699
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10700
|
+
|
10701
|
+
# @!method self.values
|
10702
|
+
# @return [Array<Symbol>]
|
10703
|
+
end
|
10704
|
+
|
10705
|
+
# Should prices that match the filter be included or excluded.
|
10706
|
+
#
|
10707
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter#operator
|
10708
|
+
module Operator
|
10709
|
+
extend Orb::Internal::Type::Enum
|
10710
|
+
|
10711
|
+
INCLUDES = :includes
|
10712
|
+
EXCLUDES = :excludes
|
10713
|
+
|
10714
|
+
# @!method self.values
|
10715
|
+
# @return [Array<Symbol>]
|
10716
|
+
end
|
10717
|
+
end
|
10718
|
+
|
10719
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10720
|
+
#
|
10721
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::UsageDiscount#price_type
|
10722
|
+
module PriceType
|
10723
|
+
extend Orb::Internal::Type::Enum
|
10724
|
+
|
10725
|
+
USAGE = :usage
|
10726
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10727
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10728
|
+
FIXED = :fixed
|
10729
|
+
IN_ARREARS = :in_arrears
|
10730
|
+
|
10731
|
+
# @!method self.values
|
10732
|
+
# @return [Array<Symbol>]
|
10733
|
+
end
|
9740
10734
|
end
|
9741
10735
|
|
9742
10736
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -9750,12 +10744,44 @@ module Orb
|
|
9750
10744
|
# @return [String]
|
9751
10745
|
required :amount_discount, String
|
9752
10746
|
|
10747
|
+
# @!attribute applies_to_all
|
10748
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10749
|
+
#
|
10750
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
|
10751
|
+
optional :applies_to_all,
|
10752
|
+
enum: -> {
|
10753
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll
|
10754
|
+
},
|
10755
|
+
nil?: true
|
10756
|
+
|
10757
|
+
# @!attribute applies_to_item_ids
|
10758
|
+
# The set of item IDs to which this adjustment applies.
|
10759
|
+
#
|
10760
|
+
# @return [Array<String>, nil]
|
10761
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10762
|
+
|
9753
10763
|
# @!attribute applies_to_price_ids
|
9754
10764
|
# The set of price IDs to which this adjustment applies.
|
9755
10765
|
#
|
9756
10766
|
# @return [Array<String>, nil]
|
9757
10767
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9758
10768
|
|
10769
|
+
# @!attribute currency
|
10770
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10771
|
+
#
|
10772
|
+
# @return [String, nil]
|
10773
|
+
optional :currency, String, nil?: true
|
10774
|
+
|
10775
|
+
# @!attribute filters
|
10776
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10777
|
+
#
|
10778
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter>, nil]
|
10779
|
+
optional :filters,
|
10780
|
+
-> {
|
10781
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter]
|
10782
|
+
},
|
10783
|
+
nil?: true
|
10784
|
+
|
9759
10785
|
# @!attribute is_invoice_level
|
9760
10786
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9761
10787
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9763,18 +10789,128 @@ module Orb
|
|
9763
10789
|
# @return [Boolean, nil]
|
9764
10790
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9765
10791
|
|
9766
|
-
# @!
|
10792
|
+
# @!attribute price_type
|
10793
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10794
|
+
#
|
10795
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType, nil]
|
10796
|
+
optional :price_type,
|
10797
|
+
enum: -> {
|
10798
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType
|
10799
|
+
},
|
10800
|
+
nil?: true
|
10801
|
+
|
10802
|
+
# @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
|
9767
10803
|
# Some parameter documentations has been truncated, see
|
9768
10804
|
# {Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount}
|
9769
10805
|
# for more details.
|
9770
10806
|
#
|
9771
10807
|
# @param amount_discount [String]
|
9772
10808
|
#
|
10809
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10810
|
+
#
|
10811
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10812
|
+
#
|
9773
10813
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9774
10814
|
#
|
10815
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10816
|
+
#
|
10817
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10818
|
+
#
|
9775
10819
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9776
10820
|
#
|
10821
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10822
|
+
#
|
9777
10823
|
# @param adjustment_type [Symbol, :amount_discount]
|
10824
|
+
|
10825
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10826
|
+
#
|
10827
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount#applies_to_all
|
10828
|
+
module AppliesToAll
|
10829
|
+
extend Orb::Internal::Type::Enum
|
10830
|
+
|
10831
|
+
TRUE = true
|
10832
|
+
|
10833
|
+
# @!method self.values
|
10834
|
+
# @return [Array<Boolean>]
|
10835
|
+
end
|
10836
|
+
|
10837
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10838
|
+
# @!attribute field
|
10839
|
+
# The property of the price to filter on.
|
10840
|
+
#
|
10841
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field]
|
10842
|
+
required :field,
|
10843
|
+
enum: -> {
|
10844
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field
|
10845
|
+
}
|
10846
|
+
|
10847
|
+
# @!attribute operator
|
10848
|
+
# Should prices that match the filter be included or excluded.
|
10849
|
+
#
|
10850
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator]
|
10851
|
+
required :operator,
|
10852
|
+
enum: -> {
|
10853
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator
|
10854
|
+
}
|
10855
|
+
|
10856
|
+
# @!attribute values
|
10857
|
+
# The IDs or values that match this filter.
|
10858
|
+
#
|
10859
|
+
# @return [Array<String>]
|
10860
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10861
|
+
|
10862
|
+
# @!method initialize(field:, operator:, values:)
|
10863
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
10864
|
+
#
|
10865
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
10866
|
+
#
|
10867
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10868
|
+
|
10869
|
+
# The property of the price to filter on.
|
10870
|
+
#
|
10871
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter#field
|
10872
|
+
module Field
|
10873
|
+
extend Orb::Internal::Type::Enum
|
10874
|
+
|
10875
|
+
PRICE_ID = :price_id
|
10876
|
+
ITEM_ID = :item_id
|
10877
|
+
PRICE_TYPE = :price_type
|
10878
|
+
CURRENCY = :currency
|
10879
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10880
|
+
|
10881
|
+
# @!method self.values
|
10882
|
+
# @return [Array<Symbol>]
|
10883
|
+
end
|
10884
|
+
|
10885
|
+
# Should prices that match the filter be included or excluded.
|
10886
|
+
#
|
10887
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter#operator
|
10888
|
+
module Operator
|
10889
|
+
extend Orb::Internal::Type::Enum
|
10890
|
+
|
10891
|
+
INCLUDES = :includes
|
10892
|
+
EXCLUDES = :excludes
|
10893
|
+
|
10894
|
+
# @!method self.values
|
10895
|
+
# @return [Array<Symbol>]
|
10896
|
+
end
|
10897
|
+
end
|
10898
|
+
|
10899
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10900
|
+
#
|
10901
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::AmountDiscount#price_type
|
10902
|
+
module PriceType
|
10903
|
+
extend Orb::Internal::Type::Enum
|
10904
|
+
|
10905
|
+
USAGE = :usage
|
10906
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10907
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10908
|
+
FIXED = :fixed
|
10909
|
+
IN_ARREARS = :in_arrears
|
10910
|
+
|
10911
|
+
# @!method self.values
|
10912
|
+
# @return [Array<Symbol>]
|
10913
|
+
end
|
9778
10914
|
end
|
9779
10915
|
|
9780
10916
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -9794,12 +10930,44 @@ module Orb
|
|
9794
10930
|
# @return [String]
|
9795
10931
|
required :minimum_amount, String
|
9796
10932
|
|
10933
|
+
# @!attribute applies_to_all
|
10934
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10935
|
+
#
|
10936
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll, nil]
|
10937
|
+
optional :applies_to_all,
|
10938
|
+
enum: -> {
|
10939
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll
|
10940
|
+
},
|
10941
|
+
nil?: true
|
10942
|
+
|
10943
|
+
# @!attribute applies_to_item_ids
|
10944
|
+
# The set of item IDs to which this adjustment applies.
|
10945
|
+
#
|
10946
|
+
# @return [Array<String>, nil]
|
10947
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10948
|
+
|
9797
10949
|
# @!attribute applies_to_price_ids
|
9798
10950
|
# The set of price IDs to which this adjustment applies.
|
9799
10951
|
#
|
9800
10952
|
# @return [Array<String>, nil]
|
9801
10953
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9802
10954
|
|
10955
|
+
# @!attribute currency
|
10956
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10957
|
+
#
|
10958
|
+
# @return [String, nil]
|
10959
|
+
optional :currency, String, nil?: true
|
10960
|
+
|
10961
|
+
# @!attribute filters
|
10962
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10963
|
+
#
|
10964
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter>, nil]
|
10965
|
+
optional :filters,
|
10966
|
+
-> {
|
10967
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter]
|
10968
|
+
},
|
10969
|
+
nil?: true
|
10970
|
+
|
9803
10971
|
# @!attribute is_invoice_level
|
9804
10972
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9805
10973
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9807,7 +10975,17 @@ module Orb
|
|
9807
10975
|
# @return [Boolean, nil]
|
9808
10976
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9809
10977
|
|
9810
|
-
# @!
|
10978
|
+
# @!attribute price_type
|
10979
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10980
|
+
#
|
10981
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::PriceType, nil]
|
10982
|
+
optional :price_type,
|
10983
|
+
enum: -> {
|
10984
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::PriceType
|
10985
|
+
},
|
10986
|
+
nil?: true
|
10987
|
+
|
10988
|
+
# @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
|
9811
10989
|
# Some parameter documentations has been truncated, see
|
9812
10990
|
# {Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum}
|
9813
10991
|
# for more details.
|
@@ -9816,11 +10994,111 @@ module Orb
|
|
9816
10994
|
#
|
9817
10995
|
# @param minimum_amount [String]
|
9818
10996
|
#
|
10997
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10998
|
+
#
|
10999
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
11000
|
+
#
|
9819
11001
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9820
11002
|
#
|
11003
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
11004
|
+
#
|
11005
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
11006
|
+
#
|
9821
11007
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9822
11008
|
#
|
11009
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
11010
|
+
#
|
9823
11011
|
# @param adjustment_type [Symbol, :minimum]
|
11012
|
+
|
11013
|
+
# If set, the adjustment will apply to every price on the subscription.
|
11014
|
+
#
|
11015
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum#applies_to_all
|
11016
|
+
module AppliesToAll
|
11017
|
+
extend Orb::Internal::Type::Enum
|
11018
|
+
|
11019
|
+
TRUE = true
|
11020
|
+
|
11021
|
+
# @!method self.values
|
11022
|
+
# @return [Array<Boolean>]
|
11023
|
+
end
|
11024
|
+
|
11025
|
+
class Filter < Orb::Internal::Type::BaseModel
|
11026
|
+
# @!attribute field
|
11027
|
+
# The property of the price to filter on.
|
11028
|
+
#
|
11029
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field]
|
11030
|
+
required :field,
|
11031
|
+
enum: -> {
|
11032
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field
|
11033
|
+
}
|
11034
|
+
|
11035
|
+
# @!attribute operator
|
11036
|
+
# Should prices that match the filter be included or excluded.
|
11037
|
+
#
|
11038
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator]
|
11039
|
+
required :operator,
|
11040
|
+
enum: -> {
|
11041
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator
|
11042
|
+
}
|
11043
|
+
|
11044
|
+
# @!attribute values
|
11045
|
+
# The IDs or values that match this filter.
|
11046
|
+
#
|
11047
|
+
# @return [Array<String>]
|
11048
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
11049
|
+
|
11050
|
+
# @!method initialize(field:, operator:, values:)
|
11051
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
11052
|
+
#
|
11053
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
11054
|
+
#
|
11055
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
11056
|
+
|
11057
|
+
# The property of the price to filter on.
|
11058
|
+
#
|
11059
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter#field
|
11060
|
+
module Field
|
11061
|
+
extend Orb::Internal::Type::Enum
|
11062
|
+
|
11063
|
+
PRICE_ID = :price_id
|
11064
|
+
ITEM_ID = :item_id
|
11065
|
+
PRICE_TYPE = :price_type
|
11066
|
+
CURRENCY = :currency
|
11067
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
11068
|
+
|
11069
|
+
# @!method self.values
|
11070
|
+
# @return [Array<Symbol>]
|
11071
|
+
end
|
11072
|
+
|
11073
|
+
# Should prices that match the filter be included or excluded.
|
11074
|
+
#
|
11075
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum::Filter#operator
|
11076
|
+
module Operator
|
11077
|
+
extend Orb::Internal::Type::Enum
|
11078
|
+
|
11079
|
+
INCLUDES = :includes
|
11080
|
+
EXCLUDES = :excludes
|
11081
|
+
|
11082
|
+
# @!method self.values
|
11083
|
+
# @return [Array<Symbol>]
|
11084
|
+
end
|
11085
|
+
end
|
11086
|
+
|
11087
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
11088
|
+
#
|
11089
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Minimum#price_type
|
11090
|
+
module PriceType
|
11091
|
+
extend Orb::Internal::Type::Enum
|
11092
|
+
|
11093
|
+
USAGE = :usage
|
11094
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
11095
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
11096
|
+
FIXED = :fixed
|
11097
|
+
IN_ARREARS = :in_arrears
|
11098
|
+
|
11099
|
+
# @!method self.values
|
11100
|
+
# @return [Array<Symbol>]
|
11101
|
+
end
|
9824
11102
|
end
|
9825
11103
|
|
9826
11104
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -9834,12 +11112,44 @@ module Orb
|
|
9834
11112
|
# @return [String]
|
9835
11113
|
required :maximum_amount, String
|
9836
11114
|
|
11115
|
+
# @!attribute applies_to_all
|
11116
|
+
# If set, the adjustment will apply to every price on the subscription.
|
11117
|
+
#
|
11118
|
+
# @return [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll, nil]
|
11119
|
+
optional :applies_to_all,
|
11120
|
+
enum: -> {
|
11121
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll
|
11122
|
+
},
|
11123
|
+
nil?: true
|
11124
|
+
|
11125
|
+
# @!attribute applies_to_item_ids
|
11126
|
+
# The set of item IDs to which this adjustment applies.
|
11127
|
+
#
|
11128
|
+
# @return [Array<String>, nil]
|
11129
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
11130
|
+
|
9837
11131
|
# @!attribute applies_to_price_ids
|
9838
11132
|
# The set of price IDs to which this adjustment applies.
|
9839
11133
|
#
|
9840
11134
|
# @return [Array<String>, nil]
|
9841
11135
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9842
11136
|
|
11137
|
+
# @!attribute currency
|
11138
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
11139
|
+
#
|
11140
|
+
# @return [String, nil]
|
11141
|
+
optional :currency, String, nil?: true
|
11142
|
+
|
11143
|
+
# @!attribute filters
|
11144
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
11145
|
+
#
|
11146
|
+
# @return [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter>, nil]
|
11147
|
+
optional :filters,
|
11148
|
+
-> {
|
11149
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter]
|
11150
|
+
},
|
11151
|
+
nil?: true
|
11152
|
+
|
9843
11153
|
# @!attribute is_invoice_level
|
9844
11154
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9845
11155
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9847,18 +11157,128 @@ module Orb
|
|
9847
11157
|
# @return [Boolean, nil]
|
9848
11158
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9849
11159
|
|
9850
|
-
# @!
|
11160
|
+
# @!attribute price_type
|
11161
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
11162
|
+
#
|
11163
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::PriceType, nil]
|
11164
|
+
optional :price_type,
|
11165
|
+
enum: -> {
|
11166
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::PriceType
|
11167
|
+
},
|
11168
|
+
nil?: true
|
11169
|
+
|
11170
|
+
# @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
|
9851
11171
|
# Some parameter documentations has been truncated, see
|
9852
11172
|
# {Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum}
|
9853
11173
|
# for more details.
|
9854
11174
|
#
|
9855
11175
|
# @param maximum_amount [String]
|
9856
11176
|
#
|
11177
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
11178
|
+
#
|
11179
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
11180
|
+
#
|
9857
11181
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9858
11182
|
#
|
11183
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
11184
|
+
#
|
11185
|
+
# @param filters [Array<Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
11186
|
+
#
|
9859
11187
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9860
11188
|
#
|
11189
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
11190
|
+
#
|
9861
11191
|
# @param adjustment_type [Symbol, :maximum]
|
11192
|
+
|
11193
|
+
# If set, the adjustment will apply to every price on the subscription.
|
11194
|
+
#
|
11195
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum#applies_to_all
|
11196
|
+
module AppliesToAll
|
11197
|
+
extend Orb::Internal::Type::Enum
|
11198
|
+
|
11199
|
+
TRUE = true
|
11200
|
+
|
11201
|
+
# @!method self.values
|
11202
|
+
# @return [Array<Boolean>]
|
11203
|
+
end
|
11204
|
+
|
11205
|
+
class Filter < Orb::Internal::Type::BaseModel
|
11206
|
+
# @!attribute field
|
11207
|
+
# The property of the price to filter on.
|
11208
|
+
#
|
11209
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field]
|
11210
|
+
required :field,
|
11211
|
+
enum: -> {
|
11212
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field
|
11213
|
+
}
|
11214
|
+
|
11215
|
+
# @!attribute operator
|
11216
|
+
# Should prices that match the filter be included or excluded.
|
11217
|
+
#
|
11218
|
+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator]
|
11219
|
+
required :operator,
|
11220
|
+
enum: -> {
|
11221
|
+
Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator
|
11222
|
+
}
|
11223
|
+
|
11224
|
+
# @!attribute values
|
11225
|
+
# The IDs or values that match this filter.
|
11226
|
+
#
|
11227
|
+
# @return [Array<String>]
|
11228
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
11229
|
+
|
11230
|
+
# @!method initialize(field:, operator:, values:)
|
11231
|
+
# @param field [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
11232
|
+
#
|
11233
|
+
# @param operator [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
11234
|
+
#
|
11235
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
11236
|
+
|
11237
|
+
# The property of the price to filter on.
|
11238
|
+
#
|
11239
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter#field
|
11240
|
+
module Field
|
11241
|
+
extend Orb::Internal::Type::Enum
|
11242
|
+
|
11243
|
+
PRICE_ID = :price_id
|
11244
|
+
ITEM_ID = :item_id
|
11245
|
+
PRICE_TYPE = :price_type
|
11246
|
+
CURRENCY = :currency
|
11247
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
11248
|
+
|
11249
|
+
# @!method self.values
|
11250
|
+
# @return [Array<Symbol>]
|
11251
|
+
end
|
11252
|
+
|
11253
|
+
# Should prices that match the filter be included or excluded.
|
11254
|
+
#
|
11255
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum::Filter#operator
|
11256
|
+
module Operator
|
11257
|
+
extend Orb::Internal::Type::Enum
|
11258
|
+
|
11259
|
+
INCLUDES = :includes
|
11260
|
+
EXCLUDES = :excludes
|
11261
|
+
|
11262
|
+
# @!method self.values
|
11263
|
+
# @return [Array<Symbol>]
|
11264
|
+
end
|
11265
|
+
end
|
11266
|
+
|
11267
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
11268
|
+
#
|
11269
|
+
# @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Maximum#price_type
|
11270
|
+
module PriceType
|
11271
|
+
extend Orb::Internal::Type::Enum
|
11272
|
+
|
11273
|
+
USAGE = :usage
|
11274
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
11275
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
11276
|
+
FIXED = :fixed
|
11277
|
+
IN_ARREARS = :in_arrears
|
11278
|
+
|
11279
|
+
# @!method self.values
|
11280
|
+
# @return [Array<Symbol>]
|
11281
|
+
end
|
9862
11282
|
end
|
9863
11283
|
|
9864
11284
|
# @!method self.variants
|