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
@@ -3,7 +3,13 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class SubscriptionUpdateTrialResponse < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash =
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
Orb::Models::SubscriptionUpdateTrialResponse,
|
10
|
+
Orb::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
7
13
|
|
8
14
|
sig { returns(String) }
|
9
15
|
attr_accessor :id
|
@@ -486,7 +492,13 @@ module Orb
|
|
486
492
|
end
|
487
493
|
|
488
494
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
489
|
-
OrHash =
|
495
|
+
OrHash =
|
496
|
+
T.type_alias do
|
497
|
+
T.any(
|
498
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval,
|
499
|
+
Orb::Internal::AnyHash
|
500
|
+
)
|
501
|
+
end
|
490
502
|
|
491
503
|
sig { returns(String) }
|
492
504
|
attr_accessor :id
|
@@ -580,7 +592,13 @@ module Orb
|
|
580
592
|
end
|
581
593
|
|
582
594
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
583
|
-
OrHash =
|
595
|
+
OrHash =
|
596
|
+
T.type_alias do
|
597
|
+
T.any(
|
598
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
599
|
+
Orb::Internal::AnyHash
|
600
|
+
)
|
601
|
+
end
|
584
602
|
|
585
603
|
sig { returns(String) }
|
586
604
|
attr_accessor :id
|
@@ -657,7 +675,13 @@ module Orb
|
|
657
675
|
end
|
658
676
|
|
659
677
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
660
|
-
OrHash =
|
678
|
+
OrHash =
|
679
|
+
T.type_alias do
|
680
|
+
T.any(
|
681
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
682
|
+
Orb::Internal::AnyHash
|
683
|
+
)
|
684
|
+
end
|
661
685
|
|
662
686
|
sig { returns(String) }
|
663
687
|
attr_accessor :id
|
@@ -734,7 +758,13 @@ module Orb
|
|
734
758
|
end
|
735
759
|
|
736
760
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
737
|
-
OrHash =
|
761
|
+
OrHash =
|
762
|
+
T.type_alias do
|
763
|
+
T.any(
|
764
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
765
|
+
Orb::Internal::AnyHash
|
766
|
+
)
|
767
|
+
end
|
738
768
|
|
739
769
|
sig { returns(String) }
|
740
770
|
attr_accessor :id
|
@@ -811,7 +841,13 @@ module Orb
|
|
811
841
|
end
|
812
842
|
|
813
843
|
class Minimum < Orb::Internal::Type::BaseModel
|
814
|
-
OrHash =
|
844
|
+
OrHash =
|
845
|
+
T.type_alias do
|
846
|
+
T.any(
|
847
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
|
848
|
+
Orb::Internal::AnyHash
|
849
|
+
)
|
850
|
+
end
|
815
851
|
|
816
852
|
sig { returns(String) }
|
817
853
|
attr_accessor :id
|
@@ -896,7 +932,13 @@ module Orb
|
|
896
932
|
end
|
897
933
|
|
898
934
|
class Maximum < Orb::Internal::Type::BaseModel
|
899
|
-
OrHash =
|
935
|
+
OrHash =
|
936
|
+
T.type_alias do
|
937
|
+
T.any(
|
938
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum,
|
939
|
+
Orb::Internal::AnyHash
|
940
|
+
)
|
941
|
+
end
|
900
942
|
|
901
943
|
sig { returns(String) }
|
902
944
|
attr_accessor :id
|
@@ -985,7 +1027,13 @@ module Orb
|
|
985
1027
|
end
|
986
1028
|
|
987
1029
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
988
|
-
OrHash =
|
1030
|
+
OrHash =
|
1031
|
+
T.type_alias do
|
1032
|
+
T.any(
|
1033
|
+
Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
|
1034
|
+
Orb::Internal::AnyHash
|
1035
|
+
)
|
1036
|
+
end
|
989
1037
|
|
990
1038
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
991
1039
|
# number of days in a month is greater than this value, the last day of the month
|
@@ -1054,7 +1102,13 @@ module Orb
|
|
1054
1102
|
end
|
1055
1103
|
|
1056
1104
|
class Amount < Orb::Internal::Type::BaseModel
|
1057
|
-
OrHash =
|
1105
|
+
OrHash =
|
1106
|
+
T.type_alias do
|
1107
|
+
T.any(
|
1108
|
+
Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
|
1109
|
+
Orb::Internal::AnyHash
|
1110
|
+
)
|
1111
|
+
end
|
1058
1112
|
|
1059
1113
|
# Only available if discount_type is `amount`.
|
1060
1114
|
sig { returns(String) }
|
@@ -1121,7 +1175,13 @@ module Orb
|
|
1121
1175
|
end
|
1122
1176
|
|
1123
1177
|
class Percentage < Orb::Internal::Type::BaseModel
|
1124
|
-
OrHash =
|
1178
|
+
OrHash =
|
1179
|
+
T.type_alias do
|
1180
|
+
T.any(
|
1181
|
+
Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
|
1182
|
+
Orb::Internal::AnyHash
|
1183
|
+
)
|
1184
|
+
end
|
1125
1185
|
|
1126
1186
|
# The price ids that this discount interval applies to.
|
1127
1187
|
sig { returns(T::Array[String]) }
|
@@ -1190,7 +1250,13 @@ module Orb
|
|
1190
1250
|
end
|
1191
1251
|
|
1192
1252
|
class Usage < Orb::Internal::Type::BaseModel
|
1193
|
-
OrHash =
|
1253
|
+
OrHash =
|
1254
|
+
T.type_alias do
|
1255
|
+
T.any(
|
1256
|
+
Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage,
|
1257
|
+
Orb::Internal::AnyHash
|
1258
|
+
)
|
1259
|
+
end
|
1194
1260
|
|
1195
1261
|
# The price ids that this discount interval applies to.
|
1196
1262
|
sig { returns(T::Array[String]) }
|
@@ -1270,7 +1336,13 @@ module Orb
|
|
1270
1336
|
end
|
1271
1337
|
|
1272
1338
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
1273
|
-
OrHash =
|
1339
|
+
OrHash =
|
1340
|
+
T.type_alias do
|
1341
|
+
T.any(
|
1342
|
+
Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule,
|
1343
|
+
Orb::Internal::AnyHash
|
1344
|
+
)
|
1345
|
+
end
|
1274
1346
|
|
1275
1347
|
sig { returns(T.nilable(Time)) }
|
1276
1348
|
attr_accessor :end_date
|
@@ -1310,7 +1382,13 @@ module Orb
|
|
1310
1382
|
end
|
1311
1383
|
|
1312
1384
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
1313
|
-
OrHash =
|
1385
|
+
OrHash =
|
1386
|
+
T.type_alias do
|
1387
|
+
T.any(
|
1388
|
+
Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval,
|
1389
|
+
Orb::Internal::AnyHash
|
1390
|
+
)
|
1391
|
+
end
|
1314
1392
|
|
1315
1393
|
# The price ids that this maximum interval applies to.
|
1316
1394
|
sig { returns(T::Array[String]) }
|
@@ -1373,7 +1451,13 @@ module Orb
|
|
1373
1451
|
end
|
1374
1452
|
|
1375
1453
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
1376
|
-
OrHash =
|
1454
|
+
OrHash =
|
1455
|
+
T.type_alias do
|
1456
|
+
T.any(
|
1457
|
+
Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval,
|
1458
|
+
Orb::Internal::AnyHash
|
1459
|
+
)
|
1460
|
+
end
|
1377
1461
|
|
1378
1462
|
# The price ids that this minimum interval applies to.
|
1379
1463
|
sig { returns(T::Array[String]) }
|
@@ -1436,7 +1520,13 @@ module Orb
|
|
1436
1520
|
end
|
1437
1521
|
|
1438
1522
|
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1439
|
-
OrHash =
|
1523
|
+
OrHash =
|
1524
|
+
T.type_alias do
|
1525
|
+
T.any(
|
1526
|
+
Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange,
|
1527
|
+
Orb::Internal::AnyHash
|
1528
|
+
)
|
1529
|
+
end
|
1440
1530
|
|
1441
1531
|
sig { returns(String) }
|
1442
1532
|
attr_accessor :id
|
@@ -1452,7 +1542,13 @@ module Orb
|
|
1452
1542
|
end
|
1453
1543
|
|
1454
1544
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
1455
|
-
OrHash =
|
1545
|
+
OrHash =
|
1546
|
+
T.type_alias do
|
1547
|
+
T.any(
|
1548
|
+
Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval,
|
1549
|
+
Orb::Internal::AnyHash
|
1550
|
+
)
|
1551
|
+
end
|
1456
1552
|
|
1457
1553
|
sig { returns(String) }
|
1458
1554
|
attr_accessor :id
|
@@ -1698,7 +1794,13 @@ module Orb
|
|
1698
1794
|
end
|
1699
1795
|
|
1700
1796
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1701
|
-
OrHash =
|
1797
|
+
OrHash =
|
1798
|
+
T.type_alias do
|
1799
|
+
T.any(
|
1800
|
+
Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition,
|
1801
|
+
Orb::Internal::AnyHash
|
1802
|
+
)
|
1803
|
+
end
|
1702
1804
|
|
1703
1805
|
sig { returns(Time) }
|
1704
1806
|
attr_accessor :effective_date
|
@@ -1730,7 +1832,13 @@ module Orb
|
|
1730
1832
|
end
|
1731
1833
|
|
1732
1834
|
class RedeemedCoupon < Orb::Internal::Type::BaseModel
|
1733
|
-
OrHash =
|
1835
|
+
OrHash =
|
1836
|
+
T.type_alias do
|
1837
|
+
T.any(
|
1838
|
+
Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon,
|
1839
|
+
Orb::Internal::AnyHash
|
1840
|
+
)
|
1841
|
+
end
|
1734
1842
|
|
1735
1843
|
sig { returns(String) }
|
1736
1844
|
attr_accessor :coupon_id
|
@@ -1797,7 +1905,13 @@ module Orb
|
|
1797
1905
|
end
|
1798
1906
|
|
1799
1907
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
1800
|
-
OrHash =
|
1908
|
+
OrHash =
|
1909
|
+
T.type_alias do
|
1910
|
+
T.any(
|
1911
|
+
Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo,
|
1912
|
+
Orb::Internal::AnyHash
|
1913
|
+
)
|
1914
|
+
end
|
1801
1915
|
|
1802
1916
|
sig { returns(T.nilable(Time)) }
|
1803
1917
|
attr_accessor :end_date
|
@@ -1812,7 +1926,13 @@ module Orb
|
|
1812
1926
|
end
|
1813
1927
|
|
1814
1928
|
class ChangedResources < Orb::Internal::Type::BaseModel
|
1815
|
-
OrHash =
|
1929
|
+
OrHash =
|
1930
|
+
T.type_alias do
|
1931
|
+
T.any(
|
1932
|
+
Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources,
|
1933
|
+
Orb::Internal::AnyHash
|
1934
|
+
)
|
1935
|
+
end
|
1816
1936
|
|
1817
1937
|
# The credit notes that were created as part of this operation.
|
1818
1938
|
sig { returns(T::Array[Orb::CreditNote]) }
|
@@ -14,7 +14,13 @@ module Orb
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class UngroupedSubscriptionUsage < Orb::Internal::Type::BaseModel
|
17
|
-
OrHash =
|
17
|
+
OrHash =
|
18
|
+
T.type_alias do
|
19
|
+
T.any(
|
20
|
+
Orb::SubscriptionUsage::UngroupedSubscriptionUsage,
|
21
|
+
Orb::Internal::AnyHash
|
22
|
+
)
|
23
|
+
end
|
18
24
|
|
19
25
|
sig do
|
20
26
|
returns(
|
@@ -48,7 +54,13 @@ module Orb
|
|
48
54
|
end
|
49
55
|
|
50
56
|
class Data < Orb::Internal::Type::BaseModel
|
51
|
-
OrHash =
|
57
|
+
OrHash =
|
58
|
+
T.type_alias do
|
59
|
+
T.any(
|
60
|
+
Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data,
|
61
|
+
Orb::Internal::AnyHash
|
62
|
+
)
|
63
|
+
end
|
52
64
|
|
53
65
|
sig do
|
54
66
|
returns(
|
@@ -114,7 +126,13 @@ module Orb
|
|
114
126
|
end
|
115
127
|
|
116
128
|
class BillableMetric < Orb::Internal::Type::BaseModel
|
117
|
-
OrHash =
|
129
|
+
OrHash =
|
130
|
+
T.type_alias do
|
131
|
+
T.any(
|
132
|
+
Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric,
|
133
|
+
Orb::Internal::AnyHash
|
134
|
+
)
|
135
|
+
end
|
118
136
|
|
119
137
|
sig { returns(String) }
|
120
138
|
attr_accessor :id
|
@@ -132,7 +150,13 @@ module Orb
|
|
132
150
|
end
|
133
151
|
|
134
152
|
class Usage < Orb::Internal::Type::BaseModel
|
135
|
-
OrHash =
|
153
|
+
OrHash =
|
154
|
+
T.type_alias do
|
155
|
+
T.any(
|
156
|
+
Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage,
|
157
|
+
Orb::Internal::AnyHash
|
158
|
+
)
|
159
|
+
end
|
136
160
|
|
137
161
|
sig { returns(Float) }
|
138
162
|
attr_accessor :quantity
|
@@ -199,7 +223,13 @@ module Orb
|
|
199
223
|
end
|
200
224
|
|
201
225
|
class GroupedSubscriptionUsage < Orb::Internal::Type::BaseModel
|
202
|
-
OrHash =
|
226
|
+
OrHash =
|
227
|
+
T.type_alias do
|
228
|
+
T.any(
|
229
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage,
|
230
|
+
Orb::Internal::AnyHash
|
231
|
+
)
|
232
|
+
end
|
203
233
|
|
204
234
|
sig do
|
205
235
|
returns(
|
@@ -245,7 +275,13 @@ module Orb
|
|
245
275
|
end
|
246
276
|
|
247
277
|
class Data < Orb::Internal::Type::BaseModel
|
248
|
-
OrHash =
|
278
|
+
OrHash =
|
279
|
+
T.type_alias do
|
280
|
+
T.any(
|
281
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data,
|
282
|
+
Orb::Internal::AnyHash
|
283
|
+
)
|
284
|
+
end
|
249
285
|
|
250
286
|
sig do
|
251
287
|
returns(
|
@@ -330,7 +366,13 @@ module Orb
|
|
330
366
|
end
|
331
367
|
|
332
368
|
class BillableMetric < Orb::Internal::Type::BaseModel
|
333
|
-
OrHash =
|
369
|
+
OrHash =
|
370
|
+
T.type_alias do
|
371
|
+
T.any(
|
372
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric,
|
373
|
+
Orb::Internal::AnyHash
|
374
|
+
)
|
375
|
+
end
|
334
376
|
|
335
377
|
sig { returns(String) }
|
336
378
|
attr_accessor :id
|
@@ -348,7 +390,13 @@ module Orb
|
|
348
390
|
end
|
349
391
|
|
350
392
|
class MetricGroup < Orb::Internal::Type::BaseModel
|
351
|
-
OrHash =
|
393
|
+
OrHash =
|
394
|
+
T.type_alias do
|
395
|
+
T.any(
|
396
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup,
|
397
|
+
Orb::Internal::AnyHash
|
398
|
+
)
|
399
|
+
end
|
352
400
|
|
353
401
|
sig { returns(String) }
|
354
402
|
attr_accessor :property_key
|
@@ -372,7 +420,13 @@ module Orb
|
|
372
420
|
end
|
373
421
|
|
374
422
|
class Usage < Orb::Internal::Type::BaseModel
|
375
|
-
OrHash =
|
423
|
+
OrHash =
|
424
|
+
T.type_alias do
|
425
|
+
T.any(
|
426
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage,
|
427
|
+
Orb::Internal::AnyHash
|
428
|
+
)
|
429
|
+
end
|
376
430
|
|
377
431
|
sig { returns(Float) }
|
378
432
|
attr_accessor :quantity
|
@@ -3,7 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class SubscriptionsAPI < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash =
|
6
|
+
OrHash =
|
7
|
+
T.type_alias { T.any(Orb::SubscriptionsAPI, Orb::Internal::AnyHash) }
|
7
8
|
|
8
9
|
sig { returns(T::Array[Orb::Subscription]) }
|
9
10
|
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::TopLevelPingParams, Orb::Internal::AnyHash) }
|
10
11
|
|
11
12
|
sig do
|
12
13
|
params(request_options: Orb::RequestOptions::OrHash).returns(
|
@@ -3,7 +3,10 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class TopLevelPingResponse < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash =
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(Orb::Models::TopLevelPingResponse, Orb::Internal::AnyHash)
|
9
|
+
end
|
7
10
|
|
8
11
|
sig { returns(String) }
|
9
12
|
attr_accessor :response
|
@@ -3,7 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class TrialDiscount < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash =
|
6
|
+
OrHash =
|
7
|
+
T.type_alias { T.any(Orb::TrialDiscount, Orb::Internal::AnyHash) }
|
7
8
|
|
8
9
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
9
10
|
# this can be a subset of prices.
|
@@ -3,7 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
6
|
-
OrHash =
|
6
|
+
OrHash =
|
7
|
+
T.type_alias { T.any(Orb::UsageDiscount, Orb::Internal::AnyHash) }
|
7
8
|
|
8
9
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
9
10
|
# this can be a subset of prices.
|
data/rbi/orb/request_options.rbi
CHANGED
@@ -7,7 +7,7 @@ module Orb
|
|
7
7
|
# When making a request, you can pass an actual {RequestOptions} instance, or
|
8
8
|
# simply pass a Hash with symbol keys matching the attributes on this class.
|
9
9
|
class RequestOptions < Orb::Internal::Type::BaseModel
|
10
|
-
OrHash = T.type_alias { T.any(
|
10
|
+
OrHash = T.type_alias { T.any(Orb::RequestOptions, Orb::Internal::AnyHash) }
|
11
11
|
|
12
12
|
# @api private
|
13
13
|
sig { params(opts: Orb::RequestOptions::OrHash).void }
|
@@ -2,6 +2,8 @@ module Orb
|
|
2
2
|
module Internal
|
3
3
|
module Transport
|
4
4
|
class BaseClient
|
5
|
+
extend Orb::Internal::Util::SorbetRuntimeSupport
|
6
|
+
|
5
7
|
type request_components =
|
6
8
|
{
|
7
9
|
method: Symbol,
|
@@ -20,7 +22,6 @@ module Orb
|
|
20
22
|
model: Orb::Internal::Type::Converter::input?,
|
21
23
|
options: Orb::request_opts?
|
22
24
|
}
|
23
|
-
|
24
25
|
type request_input =
|
25
26
|
{
|
26
27
|
method: Symbol,
|
@@ -55,6 +56,20 @@ module Orb
|
|
55
56
|
stream: Enumerable[String]?
|
56
57
|
) -> void
|
57
58
|
|
59
|
+
attr_reader base_url: URI::Generic
|
60
|
+
|
61
|
+
attr_reader timeout: Float
|
62
|
+
|
63
|
+
attr_reader max_retries: Integer
|
64
|
+
|
65
|
+
attr_reader initial_retry_delay: Float
|
66
|
+
|
67
|
+
attr_reader max_retry_delay: Float
|
68
|
+
|
69
|
+
attr_reader headers: ::Hash[String, String]
|
70
|
+
|
71
|
+
attr_reader idempotency_header: String?
|
72
|
+
|
58
73
|
# @api private
|
59
74
|
attr_reader requester: Orb::Internal::Transport::PooledNetRequester
|
60
75
|
|
@@ -3,10 +3,13 @@ module Orb
|
|
3
3
|
module Type
|
4
4
|
class BaseModel
|
5
5
|
extend Orb::Internal::Type::Converter
|
6
|
+
extend Orb::Internal::Util::SorbetRuntimeSupport
|
6
7
|
|
7
8
|
type known_field =
|
8
9
|
{ mode: (:coerce | :dump)?, required: bool, nilable: bool }
|
9
10
|
|
11
|
+
def self.inherited: (self child) -> void
|
12
|
+
|
10
13
|
def self.known_fields: -> ::Hash[Symbol, (Orb::Internal::Type::BaseModel::known_field
|
11
14
|
& { type_fn: (^-> Orb::Internal::Type::Converter::input) })]
|
12
15
|
|
@@ -65,23 +68,26 @@ module Orb
|
|
65
68
|
state: Orb::Internal::Type::Converter::dump_state
|
66
69
|
) -> (::Hash[top, top] | top)
|
67
70
|
|
71
|
+
def self.recursively_to_h: (
|
72
|
+
Orb::Internal::Type::BaseModel model,
|
73
|
+
convert: bool
|
74
|
+
) -> ::Hash[Symbol, top]
|
75
|
+
|
68
76
|
def []: (Symbol key) -> top?
|
69
77
|
|
70
78
|
def to_h: -> ::Hash[Symbol, top]
|
71
79
|
|
72
80
|
alias to_hash to_h
|
73
81
|
|
74
|
-
def
|
82
|
+
def deep_to_h: -> ::Hash[Symbol, top]
|
75
83
|
|
76
|
-
def
|
77
|
-
Orb::Internal::Type::BaseModel model
|
78
|
-
) -> ::Hash[Symbol, top]
|
84
|
+
def deconstruct_keys: (::Array[Symbol]? keys) -> ::Hash[Symbol, top]
|
79
85
|
|
80
86
|
def to_json: (*top a) -> String
|
81
87
|
|
82
88
|
def to_yaml: (*top a) -> String
|
83
89
|
|
84
|
-
def initialize: (?::Hash[Symbol, top] |
|
90
|
+
def initialize: (?::Hash[Symbol, top] | instance data) -> void
|
85
91
|
|
86
92
|
def self.inspect: (?depth: Integer) -> String
|
87
93
|
|
data/sig/orb/internal/util.rbs
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Orb
|
2
2
|
module Internal
|
3
3
|
module Util
|
4
|
+
extend Orb::Internal::Util::SorbetRuntimeSupport
|
5
|
+
|
4
6
|
def self?.monotonic_secs: -> Float
|
5
7
|
|
6
8
|
def self?.arch: -> String
|
@@ -155,6 +157,17 @@ module Orb
|
|
155
157
|
def self?.decode_sse: (
|
156
158
|
Enumerable[String] lines
|
157
159
|
) -> Enumerable[Orb::Internal::Util::server_sent_event]
|
160
|
+
|
161
|
+
module SorbetRuntimeSupport
|
162
|
+
class MissingSorbetRuntimeError < ::RuntimeError
|
163
|
+
end
|
164
|
+
|
165
|
+
private def sorbet_runtime_constants: -> ::Hash[Symbol, top]
|
166
|
+
|
167
|
+
def const_missing: (Symbol name) -> void
|
168
|
+
|
169
|
+
def define_sorbet_constant!: (Symbol name) { -> top } -> void
|
170
|
+
end
|
158
171
|
end
|
159
172
|
end
|
160
173
|
end
|
data/sig/orb/internal.rbs
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orb-billing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Orb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|