orb-billing 0.3.2 → 0.4.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 +21 -0
- data/README.md +1 -1
- data/lib/orb/errors.rb +1 -1
- data/lib/orb/internal/transport/base_client.rb +74 -5
- data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
- data/lib/orb/internal/type/array_of.rb +1 -1
- data/lib/orb/internal/type/base_model.rb +62 -30
- data/lib/orb/internal/type/converter.rb +18 -0
- data/lib/orb/internal/type/enum.rb +1 -0
- data/lib/orb/internal/type/hash_of.rb +1 -1
- data/lib/orb/internal/type/union.rb +1 -0
- data/lib/orb/internal/util.rb +56 -0
- data/lib/orb/internal.rb +6 -0
- data/lib/orb/models/coupon.rb +4 -0
- data/lib/orb/models/coupon_create_params.rb +6 -0
- data/lib/orb/models/customer_create_params.rb +9 -0
- data/lib/orb/models/customer_update_by_external_id_params.rb +9 -0
- data/lib/orb/models/customer_update_params.rb +9 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -0
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -0
- data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -0
- data/lib/orb/models/discount.rb +6 -0
- data/lib/orb/models/evaluate_price_group.rb +4 -0
- data/lib/orb/models/invoice.rb +22 -0
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +22 -0
- data/lib/orb/models/invoice_level_discount.rb +4 -0
- data/lib/orb/models/invoice_line_item_create_response.rb +22 -0
- data/lib/orb/models/plan.rb +12 -0
- data/lib/orb/models/plan_create_params.rb +32 -0
- data/lib/orb/models/price.rb +35 -0
- data/lib/orb/models/subscription.rb +22 -0
- data/lib/orb/models/subscription_cancel_response.rb +22 -0
- data/lib/orb/models/subscription_change_apply_response.rb +22 -0
- data/lib/orb/models/subscription_change_cancel_response.rb +22 -0
- data/lib/orb/models/subscription_change_retrieve_response.rb +22 -0
- data/lib/orb/models/subscription_create_params.rb +88 -0
- data/lib/orb/models/subscription_create_response.rb +22 -0
- data/lib/orb/models/subscription_price_intervals_params.rb +89 -0
- data/lib/orb/models/subscription_price_intervals_response.rb +22 -0
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +88 -0
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +22 -0
- data/lib/orb/models/subscription_trigger_phase_response.rb +22 -0
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +22 -0
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +22 -0
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +22 -0
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +22 -0
- data/lib/orb/models/subscription_update_trial_params.rb +4 -0
- data/lib/orb/models/subscription_update_trial_response.rb +22 -0
- data/lib/orb/models/subscription_usage.rb +9 -0
- data/lib/orb/models.rb +24 -0
- data/lib/orb/request_options.rb +4 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +2 -0
- data/rbi/orb/internal/page.rbi +2 -1
- data/rbi/orb/internal/transport/base_client.rbi +31 -8
- data/rbi/orb/internal/transport/pooled_net_requester.rbi +5 -4
- data/rbi/orb/internal/type/base_model.rbi +31 -15
- data/rbi/orb/internal/type/base_page.rbi +1 -1
- data/rbi/orb/internal/type/converter.rbi +2 -0
- data/rbi/orb/internal/type/enum.rbi +1 -0
- data/rbi/orb/internal/type/union.rbi +1 -0
- data/rbi/orb/internal/util.rbi +28 -7
- data/rbi/orb/internal.rbi +2 -0
- data/rbi/orb/models/alert.rbi +13 -6
- data/rbi/orb/models/alert_create_for_customer_params.rbi +11 -2
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +14 -2
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +11 -2
- data/rbi/orb/models/alert_disable_params.rbi +2 -1
- data/rbi/orb/models/alert_enable_params.rbi +2 -1
- data/rbi/orb/models/alert_list_params.rbi +2 -1
- data/rbi/orb/models/alert_retrieve_params.rbi +2 -1
- data/rbi/orb/models/alert_update_params.rbi +6 -2
- data/rbi/orb/models/amount_discount.rbi +2 -1
- data/rbi/orb/models/billable_metric.rbi +2 -1
- data/rbi/orb/models/coupon.rbi +1 -1
- data/rbi/orb/models/coupon_archive_params.rbi +2 -1
- data/rbi/orb/models/coupon_create_params.rbi +16 -3
- data/rbi/orb/models/coupon_fetch_params.rbi +2 -1
- data/rbi/orb/models/coupon_list_params.rbi +2 -1
- data/rbi/orb/models/coupons/subscription_list_params.rbi +4 -1
- data/rbi/orb/models/credit_note.rbi +45 -9
- data/rbi/orb/models/credit_note_create_params.rbi +8 -2
- data/rbi/orb/models/credit_note_fetch_params.rbi +4 -1
- data/rbi/orb/models/credit_note_list_params.rbi +4 -1
- data/rbi/orb/models/customer.rbi +41 -10
- data/rbi/orb/models/customer_create_params.rbi +61 -10
- data/rbi/orb/models/customer_delete_params.rbi +4 -1
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +4 -1
- data/rbi/orb/models/customer_fetch_params.rbi +2 -1
- data/rbi/orb/models/customer_list_params.rbi +2 -1
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +7 -1
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +7 -1
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +67 -10
- data/rbi/orb/models/customer_update_params.rbi +61 -10
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +7 -1
- data/rbi/orb/models/customers/balance_transaction_create_response.rbi +21 -3
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +7 -1
- data/rbi/orb/models/customers/balance_transaction_list_response.rbi +21 -3
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +7 -1
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +21 -3
- data/rbi/orb/models/customers/cost_list_params.rbi +4 -1
- data/rbi/orb/models/customers/cost_list_response.rbi +21 -3
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +7 -1
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +7 -1
- data/rbi/orb/models/customers/credit_list_params.rbi +4 -1
- data/rbi/orb/models/customers/credit_list_response.rbi +7 -1
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +14 -2
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +133 -21
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +14 -2
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +133 -21
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +7 -1
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +133 -21
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +7 -1
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +133 -21
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +14 -2
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +14 -2
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +14 -2
- data/rbi/orb/models/customers/credits/top_up_create_response.rbi +14 -2
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +7 -1
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +7 -1
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +7 -1
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +14 -2
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +7 -1
- data/rbi/orb/models/customers/credits/top_up_list_response.rbi +14 -2
- data/rbi/orb/models/dimensional_price_group.rbi +4 -1
- data/rbi/orb/models/dimensional_price_group_create_params.rbi +4 -1
- data/rbi/orb/models/dimensional_price_group_list_params.rbi +4 -1
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +7 -1
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +7 -1
- data/rbi/orb/models/dimensional_price_groups.rbi +4 -1
- data/rbi/orb/models/evaluate_price_group.rbi +2 -1
- data/rbi/orb/models/event_deprecate_params.rbi +4 -1
- data/rbi/orb/models/event_deprecate_response.rbi +4 -1
- data/rbi/orb/models/event_ingest_params.rbi +6 -2
- data/rbi/orb/models/event_ingest_response.rbi +18 -3
- data/rbi/orb/models/event_search_params.rbi +2 -1
- data/rbi/orb/models/event_search_response.rbi +11 -2
- data/rbi/orb/models/event_update_params.rbi +2 -1
- data/rbi/orb/models/event_update_response.rbi +4 -1
- data/rbi/orb/models/events/backfill_close_params.rbi +4 -1
- data/rbi/orb/models/events/backfill_close_response.rbi +7 -1
- data/rbi/orb/models/events/backfill_create_params.rbi +4 -1
- data/rbi/orb/models/events/backfill_create_response.rbi +7 -1
- data/rbi/orb/models/events/backfill_fetch_params.rbi +4 -1
- data/rbi/orb/models/events/backfill_fetch_response.rbi +7 -1
- data/rbi/orb/models/events/backfill_list_params.rbi +4 -1
- data/rbi/orb/models/events/backfill_list_response.rbi +7 -1
- data/rbi/orb/models/events/backfill_revert_params.rbi +4 -1
- data/rbi/orb/models/events/backfill_revert_response.rbi +7 -1
- data/rbi/orb/models/events/event_volumes.rbi +8 -2
- data/rbi/orb/models/events/volume_list_params.rbi +4 -1
- data/rbi/orb/models/invoice.rbi +156 -31
- data/rbi/orb/models/invoice_create_params.rbi +13 -3
- data/rbi/orb/models/invoice_fetch_params.rbi +2 -1
- data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +4 -1
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +212 -31
- data/rbi/orb/models/invoice_issue_params.rbi +2 -1
- data/rbi/orb/models/invoice_line_item_create_params.rbi +4 -1
- data/rbi/orb/models/invoice_line_item_create_response.rbi +119 -17
- data/rbi/orb/models/invoice_list_params.rbi +2 -1
- data/rbi/orb/models/invoice_mark_paid_params.rbi +4 -1
- data/rbi/orb/models/invoice_pay_params.rbi +2 -1
- data/rbi/orb/models/invoice_update_params.rbi +2 -1
- data/rbi/orb/models/invoice_void_params.rbi +2 -1
- data/rbi/orb/models/item.rbi +5 -2
- data/rbi/orb/models/item_create_params.rbi +2 -1
- data/rbi/orb/models/item_fetch_params.rbi +2 -1
- data/rbi/orb/models/item_list_params.rbi +2 -1
- data/rbi/orb/models/item_update_params.rbi +9 -2
- data/rbi/orb/models/metric_create_params.rbi +2 -1
- data/rbi/orb/models/metric_fetch_params.rbi +2 -1
- data/rbi/orb/models/metric_list_params.rbi +2 -1
- data/rbi/orb/models/metric_update_params.rbi +2 -1
- data/rbi/orb/models/pagination_metadata.rbi +2 -1
- data/rbi/orb/models/percentage_discount.rbi +2 -1
- data/rbi/orb/models/plan.rbi +50 -14
- data/rbi/orb/models/plan_create_params.rbi +604 -89
- data/rbi/orb/models/plan_fetch_params.rbi +2 -1
- data/rbi/orb/models/plan_list_params.rbi +2 -1
- data/rbi/orb/models/plan_update_params.rbi +2 -1
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +4 -1
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +7 -1
- data/rbi/orb/models/price.rbi +1624 -270
- data/rbi/orb/models/price_create_params.rbi +100 -18
- data/rbi/orb/models/price_evaluate_params.rbi +2 -1
- data/rbi/orb/models/price_evaluate_response.rbi +4 -1
- data/rbi/orb/models/price_fetch_params.rbi +2 -1
- data/rbi/orb/models/price_list_params.rbi +2 -1
- data/rbi/orb/models/price_update_params.rbi +2 -1
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +7 -1
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +7 -1
- data/rbi/orb/models/subscription.rbi +109 -19
- data/rbi/orb/models/subscription_cancel_params.rbi +4 -1
- data/rbi/orb/models/subscription_cancel_response.rbi +137 -20
- data/rbi/orb/models/subscription_change_apply_params.rbi +4 -1
- data/rbi/orb/models/subscription_change_apply_response.rbi +142 -21
- data/rbi/orb/models/subscription_change_cancel_params.rbi +4 -1
- data/rbi/orb/models/subscription_change_cancel_response.rbi +142 -21
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +4 -1
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +142 -21
- data/rbi/orb/models/subscription_create_params.rbi +1257 -198
- data/rbi/orb/models/subscription_create_response.rbi +137 -20
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +4 -1
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +21 -3
- data/rbi/orb/models/subscription_fetch_params.rbi +4 -1
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +4 -1
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +14 -2
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +4 -1
- data/rbi/orb/models/subscription_list_params.rbi +4 -1
- data/rbi/orb/models/subscription_price_intervals_params.rbi +731 -115
- data/rbi/orb/models/subscription_price_intervals_response.rbi +140 -20
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +1260 -198
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +140 -20
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +4 -1
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +140 -20
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +7 -1
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +140 -20
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +7 -1
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +140 -20
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +7 -1
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +140 -20
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +7 -1
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +140 -20
- data/rbi/orb/models/subscription_update_params.rbi +4 -1
- data/rbi/orb/models/subscription_update_trial_params.rbi +4 -1
- data/rbi/orb/models/subscription_update_trial_response.rbi +140 -20
- data/rbi/orb/models/subscription_usage.rbi +63 -9
- data/rbi/orb/models/subscriptions.rbi +2 -1
- data/rbi/orb/models/top_level_ping_params.rbi +2 -1
- data/rbi/orb/models/top_level_ping_response.rbi +4 -1
- data/rbi/orb/models/trial_discount.rbi +2 -1
- data/rbi/orb/models/usage_discount.rbi +2 -1
- data/rbi/orb/request_options.rbi +1 -1
- data/sig/orb/internal/transport/base_client.rbs +16 -1
- data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/orb/internal/type/base_model.rbs +11 -5
- data/sig/orb/internal/type/base_page.rbs +1 -1
- data/sig/orb/internal/type/converter.rbs +2 -0
- data/sig/orb/internal/type/enum.rbs +1 -0
- data/sig/orb/internal/type/union.rbs +1 -0
- data/sig/orb/internal/util.rbs +13 -0
- data/sig/orb/internal.rbs +2 -0
- metadata +2 -2
@@ -6,7 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
-
OrHash =
|
9
|
+
OrHash =
|
10
|
+
T.type_alias { T.any(Orb::PriceCreateParams, Orb::Internal::AnyHash) }
|
10
11
|
|
11
12
|
# The cadence to bill for this price on.
|
12
13
|
sig { returns(Orb::PriceCreateParams::Cadence::OrSymbol) }
|
@@ -457,7 +458,10 @@ module Orb
|
|
457
458
|
end
|
458
459
|
|
459
460
|
class UnitConfig < Orb::Internal::Type::BaseModel
|
460
|
-
OrHash =
|
461
|
+
OrHash =
|
462
|
+
T.type_alias do
|
463
|
+
T.any(Orb::PriceCreateParams::UnitConfig, Orb::Internal::AnyHash)
|
464
|
+
end
|
461
465
|
|
462
466
|
# Rate per unit of usage
|
463
467
|
sig { returns(String) }
|
@@ -476,7 +480,13 @@ module Orb
|
|
476
480
|
end
|
477
481
|
|
478
482
|
class BillingCycleConfiguration < Orb::Internal::Type::BaseModel
|
479
|
-
OrHash =
|
483
|
+
OrHash =
|
484
|
+
T.type_alias do
|
485
|
+
T.any(
|
486
|
+
Orb::PriceCreateParams::BillingCycleConfiguration,
|
487
|
+
Orb::Internal::AnyHash
|
488
|
+
)
|
489
|
+
end
|
480
490
|
|
481
491
|
# The duration of the billing period.
|
482
492
|
sig { returns(Integer) }
|
@@ -556,7 +566,13 @@ module Orb
|
|
556
566
|
end
|
557
567
|
|
558
568
|
class InvoicingCycleConfiguration < Orb::Internal::Type::BaseModel
|
559
|
-
OrHash =
|
569
|
+
OrHash =
|
570
|
+
T.type_alias do
|
571
|
+
T.any(
|
572
|
+
Orb::PriceCreateParams::InvoicingCycleConfiguration,
|
573
|
+
Orb::Internal::AnyHash
|
574
|
+
)
|
575
|
+
end
|
560
576
|
|
561
577
|
# The duration of the billing period.
|
562
578
|
sig { returns(Integer) }
|
@@ -636,7 +652,10 @@ module Orb
|
|
636
652
|
end
|
637
653
|
|
638
654
|
class PackageConfig < Orb::Internal::Type::BaseModel
|
639
|
-
OrHash =
|
655
|
+
OrHash =
|
656
|
+
T.type_alias do
|
657
|
+
T.any(Orb::PriceCreateParams::PackageConfig, Orb::Internal::AnyHash)
|
658
|
+
end
|
640
659
|
|
641
660
|
# A currency amount to rate usage by
|
642
661
|
sig { returns(String) }
|
@@ -669,7 +688,10 @@ module Orb
|
|
669
688
|
end
|
670
689
|
|
671
690
|
class MatrixConfig < Orb::Internal::Type::BaseModel
|
672
|
-
OrHash =
|
691
|
+
OrHash =
|
692
|
+
T.type_alias do
|
693
|
+
T.any(Orb::PriceCreateParams::MatrixConfig, Orb::Internal::AnyHash)
|
694
|
+
end
|
673
695
|
|
674
696
|
# Default per unit rate for any usage not bucketed into a specified matrix_value
|
675
697
|
sig { returns(String) }
|
@@ -719,7 +741,13 @@ module Orb
|
|
719
741
|
end
|
720
742
|
|
721
743
|
class MatrixValue < Orb::Internal::Type::BaseModel
|
722
|
-
OrHash =
|
744
|
+
OrHash =
|
745
|
+
T.type_alias do
|
746
|
+
T.any(
|
747
|
+
Orb::PriceCreateParams::MatrixConfig::MatrixValue,
|
748
|
+
Orb::Internal::AnyHash
|
749
|
+
)
|
750
|
+
end
|
723
751
|
|
724
752
|
# One or two matrix keys to filter usage to this Matrix value by. For example,
|
725
753
|
# ["region", "tier"] could be used to filter cloud usage by a cloud region and an
|
@@ -761,7 +789,13 @@ module Orb
|
|
761
789
|
end
|
762
790
|
|
763
791
|
class MatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
|
764
|
-
OrHash =
|
792
|
+
OrHash =
|
793
|
+
T.type_alias do
|
794
|
+
T.any(
|
795
|
+
Orb::PriceCreateParams::MatrixWithAllocationConfig,
|
796
|
+
Orb::Internal::AnyHash
|
797
|
+
)
|
798
|
+
end
|
765
799
|
|
766
800
|
# Allocation to be used to calculate the price
|
767
801
|
sig { returns(Float) }
|
@@ -825,7 +859,13 @@ module Orb
|
|
825
859
|
end
|
826
860
|
|
827
861
|
class MatrixValue < Orb::Internal::Type::BaseModel
|
828
|
-
OrHash =
|
862
|
+
OrHash =
|
863
|
+
T.type_alias do
|
864
|
+
T.any(
|
865
|
+
Orb::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue,
|
866
|
+
Orb::Internal::AnyHash
|
867
|
+
)
|
868
|
+
end
|
829
869
|
|
830
870
|
# One or two matrix keys to filter usage to this Matrix value by. For example,
|
831
871
|
# ["region", "tier"] could be used to filter cloud usage by a cloud region and an
|
@@ -867,7 +907,10 @@ module Orb
|
|
867
907
|
end
|
868
908
|
|
869
909
|
class TieredConfig < Orb::Internal::Type::BaseModel
|
870
|
-
OrHash =
|
910
|
+
OrHash =
|
911
|
+
T.type_alias do
|
912
|
+
T.any(Orb::PriceCreateParams::TieredConfig, Orb::Internal::AnyHash)
|
913
|
+
end
|
871
914
|
|
872
915
|
# Tiers for rating based on total usage quantities into the specified tier
|
873
916
|
sig { returns(T::Array[Orb::PriceCreateParams::TieredConfig::Tier]) }
|
@@ -893,7 +936,13 @@ module Orb
|
|
893
936
|
end
|
894
937
|
|
895
938
|
class Tier < Orb::Internal::Type::BaseModel
|
896
|
-
OrHash =
|
939
|
+
OrHash =
|
940
|
+
T.type_alias do
|
941
|
+
T.any(
|
942
|
+
Orb::PriceCreateParams::TieredConfig::Tier,
|
943
|
+
Orb::Internal::AnyHash
|
944
|
+
)
|
945
|
+
end
|
897
946
|
|
898
947
|
# Exclusive tier starting value
|
899
948
|
sig { returns(Float) }
|
@@ -939,7 +988,13 @@ module Orb
|
|
939
988
|
end
|
940
989
|
|
941
990
|
class TieredBpsConfig < Orb::Internal::Type::BaseModel
|
942
|
-
OrHash =
|
991
|
+
OrHash =
|
992
|
+
T.type_alias do
|
993
|
+
T.any(
|
994
|
+
Orb::PriceCreateParams::TieredBpsConfig,
|
995
|
+
Orb::Internal::AnyHash
|
996
|
+
)
|
997
|
+
end
|
943
998
|
|
944
999
|
# Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
|
945
1000
|
# tiers
|
@@ -968,7 +1023,13 @@ module Orb
|
|
968
1023
|
end
|
969
1024
|
|
970
1025
|
class Tier < Orb::Internal::Type::BaseModel
|
971
|
-
OrHash =
|
1026
|
+
OrHash =
|
1027
|
+
T.type_alias do
|
1028
|
+
T.any(
|
1029
|
+
Orb::PriceCreateParams::TieredBpsConfig::Tier,
|
1030
|
+
Orb::Internal::AnyHash
|
1031
|
+
)
|
1032
|
+
end
|
972
1033
|
|
973
1034
|
# Per-event basis point rate
|
974
1035
|
sig { returns(Float) }
|
@@ -1022,7 +1083,10 @@ module Orb
|
|
1022
1083
|
end
|
1023
1084
|
|
1024
1085
|
class BpsConfig < Orb::Internal::Type::BaseModel
|
1025
|
-
OrHash =
|
1086
|
+
OrHash =
|
1087
|
+
T.type_alias do
|
1088
|
+
T.any(Orb::PriceCreateParams::BpsConfig, Orb::Internal::AnyHash)
|
1089
|
+
end
|
1026
1090
|
|
1027
1091
|
# Basis point take rate per event
|
1028
1092
|
sig { returns(Float) }
|
@@ -1053,7 +1117,10 @@ module Orb
|
|
1053
1117
|
end
|
1054
1118
|
|
1055
1119
|
class BulkBpsConfig < Orb::Internal::Type::BaseModel
|
1056
|
-
OrHash =
|
1120
|
+
OrHash =
|
1121
|
+
T.type_alias do
|
1122
|
+
T.any(Orb::PriceCreateParams::BulkBpsConfig, Orb::Internal::AnyHash)
|
1123
|
+
end
|
1057
1124
|
|
1058
1125
|
# Tiers for a bulk BPS pricing model where all usage is aggregated to a single
|
1059
1126
|
# tier based on total volume
|
@@ -1081,7 +1148,13 @@ module Orb
|
|
1081
1148
|
end
|
1082
1149
|
|
1083
1150
|
class Tier < Orb::Internal::Type::BaseModel
|
1084
|
-
OrHash =
|
1151
|
+
OrHash =
|
1152
|
+
T.type_alias do
|
1153
|
+
T.any(
|
1154
|
+
Orb::PriceCreateParams::BulkBpsConfig::Tier,
|
1155
|
+
Orb::Internal::AnyHash
|
1156
|
+
)
|
1157
|
+
end
|
1085
1158
|
|
1086
1159
|
# Basis points to rate on
|
1087
1160
|
sig { returns(Float) }
|
@@ -1127,7 +1200,10 @@ module Orb
|
|
1127
1200
|
end
|
1128
1201
|
|
1129
1202
|
class BulkConfig < Orb::Internal::Type::BaseModel
|
1130
|
-
OrHash =
|
1203
|
+
OrHash =
|
1204
|
+
T.type_alias do
|
1205
|
+
T.any(Orb::PriceCreateParams::BulkConfig, Orb::Internal::AnyHash)
|
1206
|
+
end
|
1131
1207
|
|
1132
1208
|
# Bulk tiers for rating based on total usage volume
|
1133
1209
|
sig { returns(T::Array[Orb::PriceCreateParams::BulkConfig::Tier]) }
|
@@ -1153,7 +1229,13 @@ module Orb
|
|
1153
1229
|
end
|
1154
1230
|
|
1155
1231
|
class Tier < Orb::Internal::Type::BaseModel
|
1156
|
-
OrHash =
|
1232
|
+
OrHash =
|
1233
|
+
T.type_alias do
|
1234
|
+
T.any(
|
1235
|
+
Orb::PriceCreateParams::BulkConfig::Tier,
|
1236
|
+
Orb::Internal::AnyHash
|
1237
|
+
)
|
1238
|
+
end
|
1157
1239
|
|
1158
1240
|
# Amount per unit
|
1159
1241
|
sig { returns(String) }
|
@@ -6,7 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
-
OrHash =
|
9
|
+
OrHash =
|
10
|
+
T.type_alias { T.any(Orb::PriceEvaluateParams, Orb::Internal::AnyHash) }
|
10
11
|
|
11
12
|
# The exclusive upper bound for event timestamps
|
12
13
|
sig { returns(Time) }
|
@@ -3,7 +3,10 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class PriceEvaluateResponse < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash =
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(Orb::Models::PriceEvaluateResponse, Orb::Internal::AnyHash)
|
9
|
+
end
|
7
10
|
|
8
11
|
sig { returns(T::Array[Orb::EvaluatePriceGroup]) }
|
9
12
|
attr_accessor :data
|
@@ -6,7 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
-
OrHash =
|
9
|
+
OrHash =
|
10
|
+
T.type_alias { T.any(Orb::PriceFetchParams, Orb::Internal::AnyHash) }
|
10
11
|
|
11
12
|
sig do
|
12
13
|
params(request_options: Orb::RequestOptions::OrHash).returns(
|
@@ -6,7 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
-
OrHash =
|
9
|
+
OrHash =
|
10
|
+
T.type_alias { T.any(Orb::PriceListParams, Orb::Internal::AnyHash) }
|
10
11
|
|
11
12
|
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
12
13
|
# from the initial request.
|
@@ -6,7 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
-
OrHash =
|
9
|
+
OrHash =
|
10
|
+
T.type_alias { T.any(Orb::PriceUpdateParams, Orb::Internal::AnyHash) }
|
10
11
|
|
11
12
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
12
13
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
@@ -7,7 +7,13 @@ module Orb
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
9
9
|
|
10
|
-
OrHash =
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Orb::Prices::ExternalPriceIDFetchParams,
|
14
|
+
Orb::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
11
17
|
|
12
18
|
sig do
|
13
19
|
params(request_options: Orb::RequestOptions::OrHash).returns(
|
@@ -7,7 +7,13 @@ module Orb
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
9
9
|
|
10
|
-
OrHash =
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Orb::Prices::ExternalPriceIDUpdateParams,
|
14
|
+
Orb::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
11
17
|
|
12
18
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
13
19
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class Subscription < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash = T.type_alias { T.any(
|
6
|
+
OrHash = T.type_alias { T.any(Orb::Subscription, Orb::Internal::AnyHash) }
|
7
7
|
|
8
8
|
sig { returns(String) }
|
9
9
|
attr_accessor :id
|
@@ -376,7 +376,10 @@ module Orb
|
|
376
376
|
end
|
377
377
|
|
378
378
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
379
|
-
OrHash =
|
379
|
+
OrHash =
|
380
|
+
T.type_alias do
|
381
|
+
T.any(Orb::Subscription::AdjustmentInterval, Orb::Internal::AnyHash)
|
382
|
+
end
|
380
383
|
|
381
384
|
sig { returns(String) }
|
382
385
|
attr_accessor :id
|
@@ -470,7 +473,13 @@ module Orb
|
|
470
473
|
end
|
471
474
|
|
472
475
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
473
|
-
OrHash =
|
476
|
+
OrHash =
|
477
|
+
T.type_alias do
|
478
|
+
T.any(
|
479
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
480
|
+
Orb::Internal::AnyHash
|
481
|
+
)
|
482
|
+
end
|
474
483
|
|
475
484
|
sig { returns(String) }
|
476
485
|
attr_accessor :id
|
@@ -547,7 +556,13 @@ module Orb
|
|
547
556
|
end
|
548
557
|
|
549
558
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
550
|
-
OrHash =
|
559
|
+
OrHash =
|
560
|
+
T.type_alias do
|
561
|
+
T.any(
|
562
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
563
|
+
Orb::Internal::AnyHash
|
564
|
+
)
|
565
|
+
end
|
551
566
|
|
552
567
|
sig { returns(String) }
|
553
568
|
attr_accessor :id
|
@@ -624,7 +639,13 @@ module Orb
|
|
624
639
|
end
|
625
640
|
|
626
641
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
627
|
-
OrHash =
|
642
|
+
OrHash =
|
643
|
+
T.type_alias do
|
644
|
+
T.any(
|
645
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
646
|
+
Orb::Internal::AnyHash
|
647
|
+
)
|
648
|
+
end
|
628
649
|
|
629
650
|
sig { returns(String) }
|
630
651
|
attr_accessor :id
|
@@ -701,7 +722,13 @@ module Orb
|
|
701
722
|
end
|
702
723
|
|
703
724
|
class Minimum < Orb::Internal::Type::BaseModel
|
704
|
-
OrHash =
|
725
|
+
OrHash =
|
726
|
+
T.type_alias do
|
727
|
+
T.any(
|
728
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
729
|
+
Orb::Internal::AnyHash
|
730
|
+
)
|
731
|
+
end
|
705
732
|
|
706
733
|
sig { returns(String) }
|
707
734
|
attr_accessor :id
|
@@ -786,7 +813,13 @@ module Orb
|
|
786
813
|
end
|
787
814
|
|
788
815
|
class Maximum < Orb::Internal::Type::BaseModel
|
789
|
-
OrHash =
|
816
|
+
OrHash =
|
817
|
+
T.type_alias do
|
818
|
+
T.any(
|
819
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::Maximum,
|
820
|
+
Orb::Internal::AnyHash
|
821
|
+
)
|
822
|
+
end
|
790
823
|
|
791
824
|
sig { returns(String) }
|
792
825
|
attr_accessor :id
|
@@ -875,7 +908,13 @@ module Orb
|
|
875
908
|
end
|
876
909
|
|
877
910
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
878
|
-
OrHash =
|
911
|
+
OrHash =
|
912
|
+
T.type_alias do
|
913
|
+
T.any(
|
914
|
+
Orb::Subscription::BillingCycleAnchorConfiguration,
|
915
|
+
Orb::Internal::AnyHash
|
916
|
+
)
|
917
|
+
end
|
879
918
|
|
880
919
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
881
920
|
# number of days in a month is greater than this value, the last day of the month
|
@@ -944,7 +983,13 @@ module Orb
|
|
944
983
|
end
|
945
984
|
|
946
985
|
class Amount < Orb::Internal::Type::BaseModel
|
947
|
-
OrHash =
|
986
|
+
OrHash =
|
987
|
+
T.type_alias do
|
988
|
+
T.any(
|
989
|
+
Orb::Subscription::DiscountInterval::Amount,
|
990
|
+
Orb::Internal::AnyHash
|
991
|
+
)
|
992
|
+
end
|
948
993
|
|
949
994
|
# Only available if discount_type is `amount`.
|
950
995
|
sig { returns(String) }
|
@@ -1011,7 +1056,13 @@ module Orb
|
|
1011
1056
|
end
|
1012
1057
|
|
1013
1058
|
class Percentage < Orb::Internal::Type::BaseModel
|
1014
|
-
OrHash =
|
1059
|
+
OrHash =
|
1060
|
+
T.type_alias do
|
1061
|
+
T.any(
|
1062
|
+
Orb::Subscription::DiscountInterval::Percentage,
|
1063
|
+
Orb::Internal::AnyHash
|
1064
|
+
)
|
1065
|
+
end
|
1015
1066
|
|
1016
1067
|
# The price ids that this discount interval applies to.
|
1017
1068
|
sig { returns(T::Array[String]) }
|
@@ -1080,7 +1131,13 @@ module Orb
|
|
1080
1131
|
end
|
1081
1132
|
|
1082
1133
|
class Usage < Orb::Internal::Type::BaseModel
|
1083
|
-
OrHash =
|
1134
|
+
OrHash =
|
1135
|
+
T.type_alias do
|
1136
|
+
T.any(
|
1137
|
+
Orb::Subscription::DiscountInterval::Usage,
|
1138
|
+
Orb::Internal::AnyHash
|
1139
|
+
)
|
1140
|
+
end
|
1084
1141
|
|
1085
1142
|
# The price ids that this discount interval applies to.
|
1086
1143
|
sig { returns(T::Array[String]) }
|
@@ -1158,7 +1215,13 @@ module Orb
|
|
1158
1215
|
end
|
1159
1216
|
|
1160
1217
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
1161
|
-
OrHash =
|
1218
|
+
OrHash =
|
1219
|
+
T.type_alias do
|
1220
|
+
T.any(
|
1221
|
+
Orb::Subscription::FixedFeeQuantitySchedule,
|
1222
|
+
Orb::Internal::AnyHash
|
1223
|
+
)
|
1224
|
+
end
|
1162
1225
|
|
1163
1226
|
sig { returns(T.nilable(Time)) }
|
1164
1227
|
attr_accessor :end_date
|
@@ -1198,7 +1261,10 @@ module Orb
|
|
1198
1261
|
end
|
1199
1262
|
|
1200
1263
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
1201
|
-
OrHash =
|
1264
|
+
OrHash =
|
1265
|
+
T.type_alias do
|
1266
|
+
T.any(Orb::Subscription::MaximumInterval, Orb::Internal::AnyHash)
|
1267
|
+
end
|
1202
1268
|
|
1203
1269
|
# The price ids that this maximum interval applies to.
|
1204
1270
|
sig { returns(T::Array[String]) }
|
@@ -1261,7 +1327,10 @@ module Orb
|
|
1261
1327
|
end
|
1262
1328
|
|
1263
1329
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
1264
|
-
OrHash =
|
1330
|
+
OrHash =
|
1331
|
+
T.type_alias do
|
1332
|
+
T.any(Orb::Subscription::MinimumInterval, Orb::Internal::AnyHash)
|
1333
|
+
end
|
1265
1334
|
|
1266
1335
|
# The price ids that this minimum interval applies to.
|
1267
1336
|
sig { returns(T::Array[String]) }
|
@@ -1324,7 +1393,13 @@ module Orb
|
|
1324
1393
|
end
|
1325
1394
|
|
1326
1395
|
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1327
|
-
OrHash =
|
1396
|
+
OrHash =
|
1397
|
+
T.type_alias do
|
1398
|
+
T.any(
|
1399
|
+
Orb::Subscription::PendingSubscriptionChange,
|
1400
|
+
Orb::Internal::AnyHash
|
1401
|
+
)
|
1402
|
+
end
|
1328
1403
|
|
1329
1404
|
sig { returns(String) }
|
1330
1405
|
attr_accessor :id
|
@@ -1340,7 +1415,10 @@ module Orb
|
|
1340
1415
|
end
|
1341
1416
|
|
1342
1417
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
1343
|
-
OrHash =
|
1418
|
+
OrHash =
|
1419
|
+
T.type_alias do
|
1420
|
+
T.any(Orb::Subscription::PriceInterval, Orb::Internal::AnyHash)
|
1421
|
+
end
|
1344
1422
|
|
1345
1423
|
sig { returns(String) }
|
1346
1424
|
attr_accessor :id
|
@@ -1586,7 +1664,13 @@ module Orb
|
|
1586
1664
|
end
|
1587
1665
|
|
1588
1666
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1589
|
-
OrHash =
|
1667
|
+
OrHash =
|
1668
|
+
T.type_alias do
|
1669
|
+
T.any(
|
1670
|
+
Orb::Subscription::PriceInterval::FixedFeeQuantityTransition,
|
1671
|
+
Orb::Internal::AnyHash
|
1672
|
+
)
|
1673
|
+
end
|
1590
1674
|
|
1591
1675
|
sig { returns(Time) }
|
1592
1676
|
attr_accessor :effective_date
|
@@ -1618,7 +1702,10 @@ module Orb
|
|
1618
1702
|
end
|
1619
1703
|
|
1620
1704
|
class RedeemedCoupon < Orb::Internal::Type::BaseModel
|
1621
|
-
OrHash =
|
1705
|
+
OrHash =
|
1706
|
+
T.type_alias do
|
1707
|
+
T.any(Orb::Subscription::RedeemedCoupon, Orb::Internal::AnyHash)
|
1708
|
+
end
|
1622
1709
|
|
1623
1710
|
sig { returns(String) }
|
1624
1711
|
attr_accessor :coupon_id
|
@@ -1666,7 +1753,10 @@ module Orb
|
|
1666
1753
|
end
|
1667
1754
|
|
1668
1755
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
1669
|
-
OrHash =
|
1756
|
+
OrHash =
|
1757
|
+
T.type_alias do
|
1758
|
+
T.any(Orb::Subscription::TrialInfo, Orb::Internal::AnyHash)
|
1759
|
+
end
|
1670
1760
|
|
1671
1761
|
sig { returns(T.nilable(Time)) }
|
1672
1762
|
attr_accessor :end_date
|
@@ -6,7 +6,10 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
-
OrHash =
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(Orb::SubscriptionCancelParams, Orb::Internal::AnyHash)
|
12
|
+
end
|
10
13
|
|
11
14
|
# Determines the timing of subscription cancellation
|
12
15
|
sig { returns(Orb::SubscriptionCancelParams::CancelOption::OrSymbol) }
|