orb-billing 0.3.2 → 0.5.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.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +95 -55
  4. data/lib/orb/client.rb +4 -4
  5. data/lib/orb/errors.rb +1 -1
  6. data/lib/orb/internal/transport/base_client.rb +74 -5
  7. data/lib/orb/internal/transport/pooled_net_requester.rb +17 -1
  8. data/lib/orb/internal/type/array_of.rb +1 -1
  9. data/lib/orb/internal/type/base_model.rb +70 -30
  10. data/lib/orb/internal/type/converter.rb +18 -0
  11. data/lib/orb/internal/type/enum.rb +1 -0
  12. data/lib/orb/internal/type/hash_of.rb +1 -1
  13. data/lib/orb/internal/type/union.rb +1 -0
  14. data/lib/orb/internal/util.rb +56 -0
  15. data/lib/orb/internal.rb +6 -0
  16. data/lib/orb/models/coupon.rb +4 -0
  17. data/lib/orb/models/coupon_create_params.rb +6 -0
  18. data/lib/orb/models/customer_create_params.rb +9 -0
  19. data/lib/orb/models/customer_update_by_external_id_params.rb +9 -0
  20. data/lib/orb/models/customer_update_params.rb +9 -0
  21. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -0
  22. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -0
  23. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -0
  24. data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -0
  25. data/lib/orb/models/discount.rb +6 -0
  26. data/lib/orb/models/evaluate_price_group.rb +4 -0
  27. data/lib/orb/models/invoice.rb +22 -0
  28. data/lib/orb/models/invoice_fetch_upcoming_response.rb +22 -0
  29. data/lib/orb/models/invoice_level_discount.rb +4 -0
  30. data/lib/orb/models/invoice_line_item_create_response.rb +22 -0
  31. data/lib/orb/models/plan.rb +12 -0
  32. data/lib/orb/models/plan_create_params.rb +32 -0
  33. data/lib/orb/models/price.rb +35 -0
  34. data/lib/orb/models/subscription.rb +22 -0
  35. data/lib/orb/models/subscription_cancel_response.rb +22 -0
  36. data/lib/orb/models/subscription_change_apply_response.rb +22 -0
  37. data/lib/orb/models/subscription_change_cancel_response.rb +22 -0
  38. data/lib/orb/models/subscription_change_retrieve_response.rb +22 -0
  39. data/lib/orb/models/subscription_create_params.rb +88 -0
  40. data/lib/orb/models/subscription_create_response.rb +22 -0
  41. data/lib/orb/models/subscription_price_intervals_params.rb +89 -0
  42. data/lib/orb/models/subscription_price_intervals_response.rb +22 -0
  43. data/lib/orb/models/subscription_schedule_plan_change_params.rb +88 -0
  44. data/lib/orb/models/subscription_schedule_plan_change_response.rb +22 -0
  45. data/lib/orb/models/subscription_trigger_phase_response.rb +22 -0
  46. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +22 -0
  47. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +22 -0
  48. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +22 -0
  49. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +22 -0
  50. data/lib/orb/models/subscription_update_trial_params.rb +4 -0
  51. data/lib/orb/models/subscription_update_trial_response.rb +22 -0
  52. data/lib/orb/models/subscription_usage.rb +9 -0
  53. data/lib/orb/models.rb +24 -0
  54. data/lib/orb/request_options.rb +4 -0
  55. data/lib/orb/version.rb +1 -1
  56. data/lib/orb.rb +2 -0
  57. data/rbi/orb/internal/page.rbi +2 -1
  58. data/rbi/orb/internal/transport/base_client.rbi +31 -8
  59. data/rbi/orb/internal/transport/pooled_net_requester.rbi +10 -5
  60. data/rbi/orb/internal/type/base_model.rbi +31 -15
  61. data/rbi/orb/internal/type/base_page.rbi +1 -1
  62. data/rbi/orb/internal/type/converter.rbi +2 -0
  63. data/rbi/orb/internal/type/enum.rbi +1 -0
  64. data/rbi/orb/internal/type/union.rbi +1 -0
  65. data/rbi/orb/internal/util.rbi +28 -7
  66. data/rbi/orb/internal.rbi +2 -0
  67. data/rbi/orb/models/alert.rbi +13 -6
  68. data/rbi/orb/models/alert_create_for_customer_params.rbi +11 -2
  69. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +14 -2
  70. data/rbi/orb/models/alert_create_for_subscription_params.rbi +11 -2
  71. data/rbi/orb/models/alert_disable_params.rbi +2 -1
  72. data/rbi/orb/models/alert_enable_params.rbi +2 -1
  73. data/rbi/orb/models/alert_list_params.rbi +2 -1
  74. data/rbi/orb/models/alert_retrieve_params.rbi +2 -1
  75. data/rbi/orb/models/alert_update_params.rbi +6 -2
  76. data/rbi/orb/models/amount_discount.rbi +2 -1
  77. data/rbi/orb/models/billable_metric.rbi +2 -1
  78. data/rbi/orb/models/coupon.rbi +1 -1
  79. data/rbi/orb/models/coupon_archive_params.rbi +2 -1
  80. data/rbi/orb/models/coupon_create_params.rbi +16 -3
  81. data/rbi/orb/models/coupon_fetch_params.rbi +2 -1
  82. data/rbi/orb/models/coupon_list_params.rbi +2 -1
  83. data/rbi/orb/models/coupons/subscription_list_params.rbi +4 -1
  84. data/rbi/orb/models/credit_note.rbi +45 -9
  85. data/rbi/orb/models/credit_note_create_params.rbi +8 -2
  86. data/rbi/orb/models/credit_note_fetch_params.rbi +4 -1
  87. data/rbi/orb/models/credit_note_list_params.rbi +4 -1
  88. data/rbi/orb/models/customer.rbi +41 -10
  89. data/rbi/orb/models/customer_create_params.rbi +61 -10
  90. data/rbi/orb/models/customer_delete_params.rbi +4 -1
  91. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +4 -1
  92. data/rbi/orb/models/customer_fetch_params.rbi +2 -1
  93. data/rbi/orb/models/customer_list_params.rbi +2 -1
  94. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +7 -1
  95. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +7 -1
  96. data/rbi/orb/models/customer_update_by_external_id_params.rbi +67 -10
  97. data/rbi/orb/models/customer_update_params.rbi +61 -10
  98. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +7 -1
  99. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +21 -3
  100. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +7 -1
  101. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +21 -3
  102. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +7 -1
  103. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +21 -3
  104. data/rbi/orb/models/customers/cost_list_params.rbi +4 -1
  105. data/rbi/orb/models/customers/cost_list_response.rbi +21 -3
  106. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +7 -1
  107. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +7 -1
  108. data/rbi/orb/models/customers/credit_list_params.rbi +4 -1
  109. data/rbi/orb/models/customers/credit_list_response.rbi +7 -1
  110. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +14 -2
  111. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +133 -21
  112. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +14 -2
  113. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +133 -21
  114. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +7 -1
  115. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +133 -21
  116. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +7 -1
  117. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +133 -21
  118. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +14 -2
  119. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +14 -2
  120. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +14 -2
  121. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +14 -2
  122. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +7 -1
  123. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +7 -1
  124. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +7 -1
  125. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +14 -2
  126. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +7 -1
  127. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +14 -2
  128. data/rbi/orb/models/dimensional_price_group.rbi +4 -1
  129. data/rbi/orb/models/dimensional_price_group_create_params.rbi +4 -1
  130. data/rbi/orb/models/dimensional_price_group_list_params.rbi +4 -1
  131. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +7 -1
  132. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +7 -1
  133. data/rbi/orb/models/dimensional_price_groups.rbi +4 -1
  134. data/rbi/orb/models/evaluate_price_group.rbi +2 -1
  135. data/rbi/orb/models/event_deprecate_params.rbi +4 -1
  136. data/rbi/orb/models/event_deprecate_response.rbi +4 -1
  137. data/rbi/orb/models/event_ingest_params.rbi +6 -2
  138. data/rbi/orb/models/event_ingest_response.rbi +18 -3
  139. data/rbi/orb/models/event_search_params.rbi +2 -1
  140. data/rbi/orb/models/event_search_response.rbi +11 -2
  141. data/rbi/orb/models/event_update_params.rbi +2 -1
  142. data/rbi/orb/models/event_update_response.rbi +4 -1
  143. data/rbi/orb/models/events/backfill_close_params.rbi +4 -1
  144. data/rbi/orb/models/events/backfill_close_response.rbi +7 -1
  145. data/rbi/orb/models/events/backfill_create_params.rbi +4 -1
  146. data/rbi/orb/models/events/backfill_create_response.rbi +7 -1
  147. data/rbi/orb/models/events/backfill_fetch_params.rbi +4 -1
  148. data/rbi/orb/models/events/backfill_fetch_response.rbi +7 -1
  149. data/rbi/orb/models/events/backfill_list_params.rbi +4 -1
  150. data/rbi/orb/models/events/backfill_list_response.rbi +7 -1
  151. data/rbi/orb/models/events/backfill_revert_params.rbi +4 -1
  152. data/rbi/orb/models/events/backfill_revert_response.rbi +7 -1
  153. data/rbi/orb/models/events/event_volumes.rbi +8 -2
  154. data/rbi/orb/models/events/volume_list_params.rbi +4 -1
  155. data/rbi/orb/models/invoice.rbi +156 -31
  156. data/rbi/orb/models/invoice_create_params.rbi +13 -3
  157. data/rbi/orb/models/invoice_fetch_params.rbi +2 -1
  158. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +4 -1
  159. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +212 -31
  160. data/rbi/orb/models/invoice_issue_params.rbi +2 -1
  161. data/rbi/orb/models/invoice_line_item_create_params.rbi +4 -1
  162. data/rbi/orb/models/invoice_line_item_create_response.rbi +119 -17
  163. data/rbi/orb/models/invoice_list_params.rbi +2 -1
  164. data/rbi/orb/models/invoice_mark_paid_params.rbi +4 -1
  165. data/rbi/orb/models/invoice_pay_params.rbi +2 -1
  166. data/rbi/orb/models/invoice_update_params.rbi +2 -1
  167. data/rbi/orb/models/invoice_void_params.rbi +2 -1
  168. data/rbi/orb/models/item.rbi +5 -2
  169. data/rbi/orb/models/item_create_params.rbi +2 -1
  170. data/rbi/orb/models/item_fetch_params.rbi +2 -1
  171. data/rbi/orb/models/item_list_params.rbi +2 -1
  172. data/rbi/orb/models/item_update_params.rbi +9 -2
  173. data/rbi/orb/models/metric_create_params.rbi +2 -1
  174. data/rbi/orb/models/metric_fetch_params.rbi +2 -1
  175. data/rbi/orb/models/metric_list_params.rbi +2 -1
  176. data/rbi/orb/models/metric_update_params.rbi +2 -1
  177. data/rbi/orb/models/pagination_metadata.rbi +2 -1
  178. data/rbi/orb/models/percentage_discount.rbi +2 -1
  179. data/rbi/orb/models/plan.rbi +50 -14
  180. data/rbi/orb/models/plan_create_params.rbi +604 -89
  181. data/rbi/orb/models/plan_fetch_params.rbi +2 -1
  182. data/rbi/orb/models/plan_list_params.rbi +2 -1
  183. data/rbi/orb/models/plan_update_params.rbi +2 -1
  184. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +4 -1
  185. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +7 -1
  186. data/rbi/orb/models/price.rbi +1624 -270
  187. data/rbi/orb/models/price_create_params.rbi +100 -18
  188. data/rbi/orb/models/price_evaluate_params.rbi +2 -1
  189. data/rbi/orb/models/price_evaluate_response.rbi +4 -1
  190. data/rbi/orb/models/price_fetch_params.rbi +2 -1
  191. data/rbi/orb/models/price_list_params.rbi +2 -1
  192. data/rbi/orb/models/price_update_params.rbi +2 -1
  193. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +7 -1
  194. data/rbi/orb/models/prices/external_price_id_update_params.rbi +7 -1
  195. data/rbi/orb/models/subscription.rbi +109 -19
  196. data/rbi/orb/models/subscription_cancel_params.rbi +4 -1
  197. data/rbi/orb/models/subscription_cancel_response.rbi +137 -20
  198. data/rbi/orb/models/subscription_change_apply_params.rbi +4 -1
  199. data/rbi/orb/models/subscription_change_apply_response.rbi +142 -21
  200. data/rbi/orb/models/subscription_change_cancel_params.rbi +4 -1
  201. data/rbi/orb/models/subscription_change_cancel_response.rbi +142 -21
  202. data/rbi/orb/models/subscription_change_retrieve_params.rbi +4 -1
  203. data/rbi/orb/models/subscription_change_retrieve_response.rbi +142 -21
  204. data/rbi/orb/models/subscription_create_params.rbi +1257 -198
  205. data/rbi/orb/models/subscription_create_response.rbi +137 -20
  206. data/rbi/orb/models/subscription_fetch_costs_params.rbi +4 -1
  207. data/rbi/orb/models/subscription_fetch_costs_response.rbi +21 -3
  208. data/rbi/orb/models/subscription_fetch_params.rbi +4 -1
  209. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +4 -1
  210. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +14 -2
  211. data/rbi/orb/models/subscription_fetch_usage_params.rbi +4 -1
  212. data/rbi/orb/models/subscription_list_params.rbi +4 -1
  213. data/rbi/orb/models/subscription_price_intervals_params.rbi +731 -115
  214. data/rbi/orb/models/subscription_price_intervals_response.rbi +140 -20
  215. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +1260 -198
  216. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +140 -20
  217. data/rbi/orb/models/subscription_trigger_phase_params.rbi +4 -1
  218. data/rbi/orb/models/subscription_trigger_phase_response.rbi +140 -20
  219. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +7 -1
  220. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +140 -20
  221. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +7 -1
  222. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +140 -20
  223. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +7 -1
  224. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +140 -20
  225. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +7 -1
  226. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +140 -20
  227. data/rbi/orb/models/subscription_update_params.rbi +4 -1
  228. data/rbi/orb/models/subscription_update_trial_params.rbi +4 -1
  229. data/rbi/orb/models/subscription_update_trial_response.rbi +140 -20
  230. data/rbi/orb/models/subscription_usage.rbi +63 -9
  231. data/rbi/orb/models/subscriptions.rbi +2 -1
  232. data/rbi/orb/models/top_level_ping_params.rbi +2 -1
  233. data/rbi/orb/models/top_level_ping_response.rbi +4 -1
  234. data/rbi/orb/models/trial_discount.rbi +2 -1
  235. data/rbi/orb/models/usage_discount.rbi +2 -1
  236. data/rbi/orb/request_options.rbi +1 -1
  237. data/sig/orb/internal/transport/base_client.rbs +16 -1
  238. data/sig/orb/internal/transport/pooled_net_requester.rbs +4 -0
  239. data/sig/orb/internal/type/base_model.rbs +11 -5
  240. data/sig/orb/internal/type/base_page.rbs +1 -1
  241. data/sig/orb/internal/type/converter.rbs +2 -0
  242. data/sig/orb/internal/type/enum.rbs +1 -0
  243. data/sig/orb/internal/type/union.rbs +1 -0
  244. data/sig/orb/internal/util.rbs +13 -0
  245. data/sig/orb/internal.rbs +2 -0
  246. metadata +2 -2
@@ -656,6 +656,18 @@ module Orb
656
656
 
657
657
  # @!method self.variants
658
658
  # @return [Array(Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum)]
659
+
660
+ define_sorbet_constant!(:Variants) do
661
+ T.type_alias do
662
+ T.any(
663
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount,
664
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount,
665
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
666
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum,
667
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum
668
+ )
669
+ end
670
+ end
659
671
  end
660
672
  end
661
673
 
@@ -870,6 +882,16 @@ module Orb
870
882
 
871
883
  # @!method self.variants
872
884
  # @return [Array(Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage)]
885
+
886
+ define_sorbet_constant!(:Variants) do
887
+ T.type_alias do
888
+ T.any(
889
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount,
890
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage,
891
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage
892
+ )
893
+ end
894
+ end
873
895
  end
874
896
 
875
897
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -656,6 +656,18 @@ module Orb
656
656
 
657
657
  # @!method self.variants
658
658
  # @return [Array(Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::Maximum)]
659
+
660
+ define_sorbet_constant!(:Variants) do
661
+ T.type_alias do
662
+ T.any(
663
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::UsageDiscount,
664
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::AmountDiscount,
665
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
666
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::Minimum,
667
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::Maximum
668
+ )
669
+ end
670
+ end
659
671
  end
660
672
  end
661
673
 
@@ -871,6 +883,16 @@ module Orb
871
883
 
872
884
  # @!method self.variants
873
885
  # @return [Array(Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Usage)]
886
+
887
+ define_sorbet_constant!(:Variants) do
888
+ T.type_alias do
889
+ T.any(
890
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Amount,
891
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Percentage,
892
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Usage
893
+ )
894
+ end
895
+ end
874
896
  end
875
897
 
876
898
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -657,6 +657,18 @@ module Orb
657
657
 
658
658
  # @!method self.variants
659
659
  # @return [Array(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::Maximum)]
660
+
661
+ define_sorbet_constant!(:Variants) do
662
+ T.type_alias do
663
+ T.any(
664
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::UsageDiscount,
665
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::AmountDiscount,
666
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
667
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::Minimum,
668
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::Maximum
669
+ )
670
+ end
671
+ end
660
672
  end
661
673
  end
662
674
 
@@ -874,6 +886,16 @@ module Orb
874
886
 
875
887
  # @!method self.variants
876
888
  # @return [Array(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Usage)]
889
+
890
+ define_sorbet_constant!(:Variants) do
891
+ T.type_alias do
892
+ T.any(
893
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Amount,
894
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Percentage,
895
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Usage
896
+ )
897
+ end
898
+ end
877
899
  end
878
900
 
879
901
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -657,6 +657,18 @@ module Orb
657
657
 
658
658
  # @!method self.variants
659
659
  # @return [Array(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Maximum)]
660
+
661
+ define_sorbet_constant!(:Variants) do
662
+ T.type_alias do
663
+ T.any(
664
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::UsageDiscount,
665
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::AmountDiscount,
666
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
667
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Minimum,
668
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::Maximum
669
+ )
670
+ end
671
+ end
660
672
  end
661
673
  end
662
674
 
@@ -874,6 +886,16 @@ module Orb
874
886
 
875
887
  # @!method self.variants
876
888
  # @return [Array(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Usage)]
889
+
890
+ define_sorbet_constant!(:Variants) do
891
+ T.type_alias do
892
+ T.any(
893
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Amount,
894
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Percentage,
895
+ Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::Usage
896
+ )
897
+ end
898
+ end
877
899
  end
878
900
 
879
901
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -656,6 +656,18 @@ module Orb
656
656
 
657
657
  # @!method self.variants
658
658
  # @return [Array(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Maximum)]
659
+
660
+ define_sorbet_constant!(:Variants) do
661
+ T.type_alias do
662
+ T.any(
663
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::UsageDiscount,
664
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::AmountDiscount,
665
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
666
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Minimum,
667
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::Maximum
668
+ )
669
+ end
670
+ end
659
671
  end
660
672
  end
661
673
 
@@ -871,6 +883,16 @@ module Orb
871
883
 
872
884
  # @!method self.variants
873
885
  # @return [Array(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Usage)]
886
+
887
+ define_sorbet_constant!(:Variants) do
888
+ T.type_alias do
889
+ T.any(
890
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Amount,
891
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Percentage,
892
+ Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::Usage
893
+ )
894
+ end
895
+ end
874
896
  end
875
897
 
876
898
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -43,6 +43,10 @@ module Orb
43
43
  # @!method self.variants
44
44
  # @return [Array(Time, Symbol)]
45
45
 
46
+ define_sorbet_constant!(:Variants) do
47
+ T.type_alias { T.any(Time, Orb::SubscriptionUpdateTrialParams::TrialEndDate::TaggedSymbol) }
48
+ end
49
+
46
50
  # @!group
47
51
 
48
52
  IMMEDIATE = :immediate
@@ -654,6 +654,18 @@ module Orb
654
654
 
655
655
  # @!method self.variants
656
656
  # @return [Array(Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum)]
657
+
658
+ define_sorbet_constant!(:Variants) do
659
+ T.type_alias do
660
+ T.any(
661
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
662
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
663
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
664
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
665
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
666
+ )
667
+ end
668
+ end
657
669
  end
658
670
  end
659
671
 
@@ -868,6 +880,16 @@ module Orb
868
880
 
869
881
  # @!method self.variants
870
882
  # @return [Array(Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage)]
883
+
884
+ define_sorbet_constant!(:Variants) do
885
+ T.type_alias do
886
+ T.any(
887
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
888
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
889
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
890
+ )
891
+ end
892
+ end
871
893
  end
872
894
 
873
895
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -219,6 +219,15 @@ module Orb
219
219
 
220
220
  # @!method self.variants
221
221
  # @return [Array(Orb::SubscriptionUsage::UngroupedSubscriptionUsage, Orb::SubscriptionUsage::GroupedSubscriptionUsage)]
222
+
223
+ define_sorbet_constant!(:Variants) do
224
+ T.type_alias do
225
+ T.any(
226
+ Orb::SubscriptionUsage::UngroupedSubscriptionUsage,
227
+ Orb::SubscriptionUsage::GroupedSubscriptionUsage
228
+ )
229
+ end
230
+ end
222
231
  end
223
232
  end
224
233
  end
data/lib/orb/models.rb CHANGED
@@ -1,6 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
+ [Orb::Internal::Type::BaseModel, *Orb::Internal::Type::BaseModel.subclasses].each do |cls|
5
+ cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Orb::Internal::AnyHash) } }
6
+ end
7
+
8
+ [*Orb::Internal::Type::Enum.included_modules, *Orb::Internal::Type::Union.included_modules].each do |cls|
9
+ cls.constants.each do |name|
10
+ case cls.const_get(name)
11
+ in true | false
12
+ cls.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, cls) } }
13
+ cls.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
14
+ in Integer
15
+ cls.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, cls) } }
16
+ cls.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
17
+ in Float
18
+ cls.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, cls) } }
19
+ cls.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
20
+ in Symbol
21
+ cls.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, cls) } }
22
+ cls.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
23
+ else
24
+ end
25
+ end
26
+ end
27
+
4
28
  Alert = Orb::Models::Alert
5
29
 
6
30
  AlertCreateForCustomerParams = Orb::Models::AlertCreateForCustomerParams
@@ -69,5 +69,9 @@ module Orb
69
69
  # Returns a new instance of RequestOptions.
70
70
  #
71
71
  # @param values [Hash{Symbol=>Object}]
72
+
73
+ define_sorbet_constant!(:OrHash) do
74
+ T.type_alias { T.any(Orb::RequestOptions, Orb::Internal::AnyHash) }
75
+ end
72
76
  end
73
77
  end
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "0.3.2"
4
+ VERSION = "0.5.0"
5
5
  end
data/lib/orb.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Standard libraries.
4
+ # rubocop:disable Lint/RedundantRequireStatement
4
5
  require "English"
5
6
  require "cgi"
6
7
  require "date"
@@ -15,6 +16,7 @@ require "set"
15
16
  require "stringio"
16
17
  require "time"
17
18
  require "uri"
19
+ # rubocop:enable Lint/RedundantRequireStatement
18
20
 
19
21
  # We already ship the preferred sorbet manifests in the package itself.
20
22
  # `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
@@ -19,7 +19,8 @@ module Orb
19
19
  end
20
20
 
21
21
  class PaginationMetadata < Orb::Internal::Type::BaseModel
22
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
22
+ OrHash =
23
+ T.type_alias { T.any(PaginationMetadata, Orb::Internal::AnyHash) }
23
24
 
24
25
  sig { returns(T::Boolean) }
25
26
  attr_accessor :has_more
@@ -5,9 +5,11 @@ module Orb
5
5
  module Transport
6
6
  # @api private
7
7
  class BaseClient
8
+ extend Orb::Internal::Util::SorbetRuntimeSupport
9
+
8
10
  abstract!
9
11
 
10
- RequestComponentsShape =
12
+ RequestComponents =
11
13
  T.type_alias do
12
14
  {
13
15
  method: Symbol,
@@ -53,7 +55,7 @@ module Orb
53
55
  }
54
56
  end
55
57
 
56
- RequestInputShape =
58
+ RequestInput =
57
59
  T.type_alias do
58
60
  {
59
61
  method: Symbol,
@@ -74,7 +76,7 @@ module Orb
74
76
  # @api private
75
77
  sig do
76
78
  params(
77
- req: Orb::Internal::Transport::BaseClient::RequestComponentsShape
79
+ req: Orb::Internal::Transport::BaseClient::RequestComponents
78
80
  ).void
79
81
  end
80
82
  def validate!(req)
@@ -93,10 +95,10 @@ module Orb
93
95
  # @api private
94
96
  sig do
95
97
  params(
96
- request: Orb::Internal::Transport::BaseClient::RequestInputShape,
98
+ request: Orb::Internal::Transport::BaseClient::RequestInput,
97
99
  status: Integer,
98
100
  response_headers: T.any(T::Hash[String, String], Net::HTTPHeader)
99
- ).returns(Orb::Internal::Transport::BaseClient::RequestInputShape)
101
+ ).returns(Orb::Internal::Transport::BaseClient::RequestInput)
100
102
  end
101
103
  def follow_redirect(request, status:, response_headers:)
102
104
  end
@@ -112,6 +114,27 @@ module Orb
112
114
  end
113
115
  end
114
116
 
117
+ sig { returns(URI::Generic) }
118
+ attr_reader :base_url
119
+
120
+ sig { returns(Float) }
121
+ attr_reader :timeout
122
+
123
+ sig { returns(Integer) }
124
+ attr_reader :max_retries
125
+
126
+ sig { returns(Float) }
127
+ attr_reader :initial_retry_delay
128
+
129
+ sig { returns(Float) }
130
+ attr_reader :max_retry_delay
131
+
132
+ sig { returns(T::Hash[String, String]) }
133
+ attr_reader :headers
134
+
135
+ sig { returns(T.nilable(String)) }
136
+ attr_reader :idempotency_header
137
+
115
138
  # @api private
116
139
  sig { returns(Orb::Internal::Transport::PooledNetRequester) }
117
140
  attr_reader :requester
@@ -163,10 +186,10 @@ module Orb
163
186
  sig do
164
187
  overridable
165
188
  .params(
166
- req: Orb::Internal::Transport::BaseClient::RequestComponentsShape,
189
+ req: Orb::Internal::Transport::BaseClient::RequestComponents,
167
190
  opts: Orb::Internal::AnyHash
168
191
  )
169
- .returns(Orb::Internal::Transport::BaseClient::RequestInputShape)
192
+ .returns(Orb::Internal::Transport::BaseClient::RequestInput)
170
193
  end
171
194
  private def build_request(req, opts)
172
195
  end
@@ -184,7 +207,7 @@ module Orb
184
207
  # @api private
185
208
  sig do
186
209
  params(
187
- request: Orb::Internal::Transport::BaseClient::RequestInputShape,
210
+ request: Orb::Internal::Transport::BaseClient::RequestInput,
188
211
  redirect_count: Integer,
189
212
  retry_count: Integer,
190
213
  send_retry_header: T::Boolean
@@ -5,7 +5,9 @@ module Orb
5
5
  module Transport
6
6
  # @api private
7
7
  class PooledNetRequester
8
- RequestShape =
8
+ extend Orb::Internal::Util::SorbetRuntimeSupport
9
+
10
+ Request =
9
11
  T.type_alias do
10
12
  {
11
13
  method: Symbol,
@@ -20,6 +22,8 @@ module Orb
20
22
  # https://github.com/golang/go/blob/c8eced8580028328fde7c03cbfcb720ce15b2358/src/net/http/transport.go#L49
21
23
  KEEP_ALIVE_TIMEOUT = 30
22
24
 
25
+ DEFAULT_MAX_CONNECTIONS = T.let(T.unsafe(nil), Integer)
26
+
23
27
  class << self
24
28
  # @api private
25
29
  sig { params(url: URI::Generic).returns(Net::HTTP) }
@@ -34,8 +38,7 @@ module Orb
34
38
  # @api private
35
39
  sig do
36
40
  params(
37
- request:
38
- Orb::Internal::Transport::PooledNetRequester::RequestShape,
41
+ request: Orb::Internal::Transport::PooledNetRequester::Request,
39
42
  blk: T.proc.params(arg0: String).void
40
43
  ).returns([Net::HTTPGenericRequest, T.proc.void])
41
44
  end
@@ -57,7 +60,7 @@ module Orb
57
60
  # @api private
58
61
  sig do
59
62
  params(
60
- request: Orb::Internal::Transport::PooledNetRequester::RequestShape
63
+ request: Orb::Internal::Transport::PooledNetRequester::Request
61
64
  ).returns([Integer, Net::HTTPResponse, T::Enumerable[String]])
62
65
  end
63
66
  def execute(request)
@@ -65,7 +68,9 @@ module Orb
65
68
 
66
69
  # @api private
67
70
  sig { params(size: Integer).returns(T.attached_class) }
68
- def self.new(size: Etc.nprocessors)
71
+ def self.new(
72
+ size: Orb::Internal::Transport::PooledNetRequester::DEFAULT_MAX_CONNECTIONS
73
+ )
69
74
  end
70
75
  end
71
76
  end
@@ -5,10 +5,11 @@ module Orb
5
5
  module Type
6
6
  class BaseModel
7
7
  extend Orb::Internal::Type::Converter
8
+ extend Orb::Internal::Util::SorbetRuntimeSupport
8
9
 
9
10
  abstract!
10
11
 
11
- KnownFieldShape =
12
+ KnownField =
12
13
  T.type_alias do
13
14
  {
14
15
  mode: T.nilable(Symbol),
@@ -17,19 +18,27 @@ module Orb
17
18
  }
18
19
  end
19
20
 
20
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
21
+ OrHash =
22
+ T.type_alias do
23
+ T.any(Orb::Internal::Type::BaseModel, Orb::Internal::AnyHash)
24
+ end
21
25
 
22
26
  class << self
23
27
  # @api private
24
28
  #
25
29
  # Assumes superclass fields are totally defined before fields are accessed /
26
30
  # defined on subclasses.
31
+ sig { params(child: T.self_type).void }
32
+ def inherited(child)
33
+ end
34
+
35
+ # @api private
27
36
  sig do
28
37
  returns(
29
38
  T::Hash[
30
39
  Symbol,
31
40
  T.all(
32
- Orb::Internal::Type::BaseModel::KnownFieldShape,
41
+ Orb::Internal::Type::BaseModel::KnownField,
33
42
  {
34
43
  type_fn:
35
44
  T.proc.returns(Orb::Internal::Type::Converter::Input)
@@ -47,7 +56,7 @@ module Orb
47
56
  T::Hash[
48
57
  Symbol,
49
58
  T.all(
50
- Orb::Internal::Type::BaseModel::KnownFieldShape,
59
+ Orb::Internal::Type::BaseModel::KnownField,
51
60
  { type: Orb::Internal::Type::Converter::Input }
52
61
  )
53
62
  ]
@@ -183,6 +192,18 @@ module Orb
183
192
  end
184
193
  end
185
194
 
195
+ class << self
196
+ # @api private
197
+ sig do
198
+ params(
199
+ model: Orb::Internal::Type::BaseModel,
200
+ convert: T::Boolean
201
+ ).returns(Orb::Internal::AnyHash)
202
+ end
203
+ def recursively_to_h(model, convert:)
204
+ end
205
+ end
206
+
186
207
  # Returns the raw value associated with the given key, if found. Otherwise, nil is
187
208
  # returned.
188
209
  #
@@ -217,6 +238,12 @@ module Orb
217
238
  def to_hash
218
239
  end
219
240
 
241
+ # In addition to the behaviour of `#to_h`, this method will recursively call
242
+ # `#to_h` on nested models.
243
+ sig { overridable.returns(Orb::Internal::AnyHash) }
244
+ def deep_to_h
245
+ end
246
+
220
247
  sig do
221
248
  params(keys: T.nilable(T::Array[Symbol])).returns(
222
249
  Orb::Internal::AnyHash
@@ -225,17 +252,6 @@ module Orb
225
252
  def deconstruct_keys(keys)
226
253
  end
227
254
 
228
- class << self
229
- # @api private
230
- sig do
231
- params(model: Orb::Internal::Type::BaseModel).returns(
232
- Orb::Internal::AnyHash
233
- )
234
- end
235
- def walk(model)
236
- end
237
- end
238
-
239
255
  sig { params(a: T.anything).returns(String) }
240
256
  def to_json(*a)
241
257
  end
@@ -29,7 +29,7 @@ module Orb
29
29
  sig do
30
30
  params(
31
31
  client: Orb::Internal::Transport::BaseClient,
32
- req: Orb::Internal::Transport::BaseClient::RequestComponentsShape,
32
+ req: Orb::Internal::Transport::BaseClient::RequestComponents,
33
33
  headers: T.any(T::Hash[String, String], Net::HTTPHeader),
34
34
  page_data: T.anything
35
35
  ).void
@@ -5,6 +5,8 @@ module Orb
5
5
  module Type
6
6
  # @api private
7
7
  module Converter
8
+ extend Orb::Internal::Util::SorbetRuntimeSupport
9
+
8
10
  Input =
9
11
  T.type_alias do
10
12
  T.any(Orb::Internal::Type::Converter, T::Class[T.anything])
@@ -17,6 +17,7 @@ module Orb
17
17
  # values safely.
18
18
  module Enum
19
19
  include Orb::Internal::Type::Converter
20
+ include Orb::Internal::Util::SorbetRuntimeSupport
20
21
 
21
22
  # All of the valid Symbol values for this enum.
22
23
  sig do
@@ -6,6 +6,7 @@ module Orb
6
6
  # @api private
7
7
  module Union
8
8
  include Orb::Internal::Type::Converter
9
+ include Orb::Internal::Util::SorbetRuntimeSupport
9
10
 
10
11
  # @api private
11
12
  #