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.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/orb/errors.rb +1 -1
  5. data/lib/orb/internal/transport/base_client.rb +74 -5
  6. data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
  7. data/lib/orb/internal/type/array_of.rb +1 -1
  8. data/lib/orb/internal/type/base_model.rb +62 -30
  9. data/lib/orb/internal/type/converter.rb +18 -0
  10. data/lib/orb/internal/type/enum.rb +1 -0
  11. data/lib/orb/internal/type/hash_of.rb +1 -1
  12. data/lib/orb/internal/type/union.rb +1 -0
  13. data/lib/orb/internal/util.rb +56 -0
  14. data/lib/orb/internal.rb +6 -0
  15. data/lib/orb/models/coupon.rb +4 -0
  16. data/lib/orb/models/coupon_create_params.rb +6 -0
  17. data/lib/orb/models/customer_create_params.rb +9 -0
  18. data/lib/orb/models/customer_update_by_external_id_params.rb +9 -0
  19. data/lib/orb/models/customer_update_params.rb +9 -0
  20. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -0
  21. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -0
  22. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -0
  23. data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -0
  24. data/lib/orb/models/discount.rb +6 -0
  25. data/lib/orb/models/evaluate_price_group.rb +4 -0
  26. data/lib/orb/models/invoice.rb +22 -0
  27. data/lib/orb/models/invoice_fetch_upcoming_response.rb +22 -0
  28. data/lib/orb/models/invoice_level_discount.rb +4 -0
  29. data/lib/orb/models/invoice_line_item_create_response.rb +22 -0
  30. data/lib/orb/models/plan.rb +12 -0
  31. data/lib/orb/models/plan_create_params.rb +32 -0
  32. data/lib/orb/models/price.rb +35 -0
  33. data/lib/orb/models/subscription.rb +22 -0
  34. data/lib/orb/models/subscription_cancel_response.rb +22 -0
  35. data/lib/orb/models/subscription_change_apply_response.rb +22 -0
  36. data/lib/orb/models/subscription_change_cancel_response.rb +22 -0
  37. data/lib/orb/models/subscription_change_retrieve_response.rb +22 -0
  38. data/lib/orb/models/subscription_create_params.rb +88 -0
  39. data/lib/orb/models/subscription_create_response.rb +22 -0
  40. data/lib/orb/models/subscription_price_intervals_params.rb +89 -0
  41. data/lib/orb/models/subscription_price_intervals_response.rb +22 -0
  42. data/lib/orb/models/subscription_schedule_plan_change_params.rb +88 -0
  43. data/lib/orb/models/subscription_schedule_plan_change_response.rb +22 -0
  44. data/lib/orb/models/subscription_trigger_phase_response.rb +22 -0
  45. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +22 -0
  46. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +22 -0
  47. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +22 -0
  48. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +22 -0
  49. data/lib/orb/models/subscription_update_trial_params.rb +4 -0
  50. data/lib/orb/models/subscription_update_trial_response.rb +22 -0
  51. data/lib/orb/models/subscription_usage.rb +9 -0
  52. data/lib/orb/models.rb +24 -0
  53. data/lib/orb/request_options.rb +4 -0
  54. data/lib/orb/version.rb +1 -1
  55. data/lib/orb.rb +2 -0
  56. data/rbi/orb/internal/page.rbi +2 -1
  57. data/rbi/orb/internal/transport/base_client.rbi +31 -8
  58. data/rbi/orb/internal/transport/pooled_net_requester.rbi +5 -4
  59. data/rbi/orb/internal/type/base_model.rbi +31 -15
  60. data/rbi/orb/internal/type/base_page.rbi +1 -1
  61. data/rbi/orb/internal/type/converter.rbi +2 -0
  62. data/rbi/orb/internal/type/enum.rbi +1 -0
  63. data/rbi/orb/internal/type/union.rbi +1 -0
  64. data/rbi/orb/internal/util.rbi +28 -7
  65. data/rbi/orb/internal.rbi +2 -0
  66. data/rbi/orb/models/alert.rbi +13 -6
  67. data/rbi/orb/models/alert_create_for_customer_params.rbi +11 -2
  68. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +14 -2
  69. data/rbi/orb/models/alert_create_for_subscription_params.rbi +11 -2
  70. data/rbi/orb/models/alert_disable_params.rbi +2 -1
  71. data/rbi/orb/models/alert_enable_params.rbi +2 -1
  72. data/rbi/orb/models/alert_list_params.rbi +2 -1
  73. data/rbi/orb/models/alert_retrieve_params.rbi +2 -1
  74. data/rbi/orb/models/alert_update_params.rbi +6 -2
  75. data/rbi/orb/models/amount_discount.rbi +2 -1
  76. data/rbi/orb/models/billable_metric.rbi +2 -1
  77. data/rbi/orb/models/coupon.rbi +1 -1
  78. data/rbi/orb/models/coupon_archive_params.rbi +2 -1
  79. data/rbi/orb/models/coupon_create_params.rbi +16 -3
  80. data/rbi/orb/models/coupon_fetch_params.rbi +2 -1
  81. data/rbi/orb/models/coupon_list_params.rbi +2 -1
  82. data/rbi/orb/models/coupons/subscription_list_params.rbi +4 -1
  83. data/rbi/orb/models/credit_note.rbi +45 -9
  84. data/rbi/orb/models/credit_note_create_params.rbi +8 -2
  85. data/rbi/orb/models/credit_note_fetch_params.rbi +4 -1
  86. data/rbi/orb/models/credit_note_list_params.rbi +4 -1
  87. data/rbi/orb/models/customer.rbi +41 -10
  88. data/rbi/orb/models/customer_create_params.rbi +61 -10
  89. data/rbi/orb/models/customer_delete_params.rbi +4 -1
  90. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +4 -1
  91. data/rbi/orb/models/customer_fetch_params.rbi +2 -1
  92. data/rbi/orb/models/customer_list_params.rbi +2 -1
  93. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +7 -1
  94. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +7 -1
  95. data/rbi/orb/models/customer_update_by_external_id_params.rbi +67 -10
  96. data/rbi/orb/models/customer_update_params.rbi +61 -10
  97. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +7 -1
  98. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +21 -3
  99. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +7 -1
  100. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +21 -3
  101. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +7 -1
  102. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +21 -3
  103. data/rbi/orb/models/customers/cost_list_params.rbi +4 -1
  104. data/rbi/orb/models/customers/cost_list_response.rbi +21 -3
  105. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +7 -1
  106. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +7 -1
  107. data/rbi/orb/models/customers/credit_list_params.rbi +4 -1
  108. data/rbi/orb/models/customers/credit_list_response.rbi +7 -1
  109. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +14 -2
  110. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +133 -21
  111. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +14 -2
  112. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +133 -21
  113. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +7 -1
  114. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +133 -21
  115. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +7 -1
  116. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +133 -21
  117. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +14 -2
  118. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +14 -2
  119. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +14 -2
  120. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +14 -2
  121. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +7 -1
  122. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +7 -1
  123. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +7 -1
  124. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +14 -2
  125. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +7 -1
  126. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +14 -2
  127. data/rbi/orb/models/dimensional_price_group.rbi +4 -1
  128. data/rbi/orb/models/dimensional_price_group_create_params.rbi +4 -1
  129. data/rbi/orb/models/dimensional_price_group_list_params.rbi +4 -1
  130. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +7 -1
  131. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +7 -1
  132. data/rbi/orb/models/dimensional_price_groups.rbi +4 -1
  133. data/rbi/orb/models/evaluate_price_group.rbi +2 -1
  134. data/rbi/orb/models/event_deprecate_params.rbi +4 -1
  135. data/rbi/orb/models/event_deprecate_response.rbi +4 -1
  136. data/rbi/orb/models/event_ingest_params.rbi +6 -2
  137. data/rbi/orb/models/event_ingest_response.rbi +18 -3
  138. data/rbi/orb/models/event_search_params.rbi +2 -1
  139. data/rbi/orb/models/event_search_response.rbi +11 -2
  140. data/rbi/orb/models/event_update_params.rbi +2 -1
  141. data/rbi/orb/models/event_update_response.rbi +4 -1
  142. data/rbi/orb/models/events/backfill_close_params.rbi +4 -1
  143. data/rbi/orb/models/events/backfill_close_response.rbi +7 -1
  144. data/rbi/orb/models/events/backfill_create_params.rbi +4 -1
  145. data/rbi/orb/models/events/backfill_create_response.rbi +7 -1
  146. data/rbi/orb/models/events/backfill_fetch_params.rbi +4 -1
  147. data/rbi/orb/models/events/backfill_fetch_response.rbi +7 -1
  148. data/rbi/orb/models/events/backfill_list_params.rbi +4 -1
  149. data/rbi/orb/models/events/backfill_list_response.rbi +7 -1
  150. data/rbi/orb/models/events/backfill_revert_params.rbi +4 -1
  151. data/rbi/orb/models/events/backfill_revert_response.rbi +7 -1
  152. data/rbi/orb/models/events/event_volumes.rbi +8 -2
  153. data/rbi/orb/models/events/volume_list_params.rbi +4 -1
  154. data/rbi/orb/models/invoice.rbi +156 -31
  155. data/rbi/orb/models/invoice_create_params.rbi +13 -3
  156. data/rbi/orb/models/invoice_fetch_params.rbi +2 -1
  157. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +4 -1
  158. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +212 -31
  159. data/rbi/orb/models/invoice_issue_params.rbi +2 -1
  160. data/rbi/orb/models/invoice_line_item_create_params.rbi +4 -1
  161. data/rbi/orb/models/invoice_line_item_create_response.rbi +119 -17
  162. data/rbi/orb/models/invoice_list_params.rbi +2 -1
  163. data/rbi/orb/models/invoice_mark_paid_params.rbi +4 -1
  164. data/rbi/orb/models/invoice_pay_params.rbi +2 -1
  165. data/rbi/orb/models/invoice_update_params.rbi +2 -1
  166. data/rbi/orb/models/invoice_void_params.rbi +2 -1
  167. data/rbi/orb/models/item.rbi +5 -2
  168. data/rbi/orb/models/item_create_params.rbi +2 -1
  169. data/rbi/orb/models/item_fetch_params.rbi +2 -1
  170. data/rbi/orb/models/item_list_params.rbi +2 -1
  171. data/rbi/orb/models/item_update_params.rbi +9 -2
  172. data/rbi/orb/models/metric_create_params.rbi +2 -1
  173. data/rbi/orb/models/metric_fetch_params.rbi +2 -1
  174. data/rbi/orb/models/metric_list_params.rbi +2 -1
  175. data/rbi/orb/models/metric_update_params.rbi +2 -1
  176. data/rbi/orb/models/pagination_metadata.rbi +2 -1
  177. data/rbi/orb/models/percentage_discount.rbi +2 -1
  178. data/rbi/orb/models/plan.rbi +50 -14
  179. data/rbi/orb/models/plan_create_params.rbi +604 -89
  180. data/rbi/orb/models/plan_fetch_params.rbi +2 -1
  181. data/rbi/orb/models/plan_list_params.rbi +2 -1
  182. data/rbi/orb/models/plan_update_params.rbi +2 -1
  183. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +4 -1
  184. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +7 -1
  185. data/rbi/orb/models/price.rbi +1624 -270
  186. data/rbi/orb/models/price_create_params.rbi +100 -18
  187. data/rbi/orb/models/price_evaluate_params.rbi +2 -1
  188. data/rbi/orb/models/price_evaluate_response.rbi +4 -1
  189. data/rbi/orb/models/price_fetch_params.rbi +2 -1
  190. data/rbi/orb/models/price_list_params.rbi +2 -1
  191. data/rbi/orb/models/price_update_params.rbi +2 -1
  192. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +7 -1
  193. data/rbi/orb/models/prices/external_price_id_update_params.rbi +7 -1
  194. data/rbi/orb/models/subscription.rbi +109 -19
  195. data/rbi/orb/models/subscription_cancel_params.rbi +4 -1
  196. data/rbi/orb/models/subscription_cancel_response.rbi +137 -20
  197. data/rbi/orb/models/subscription_change_apply_params.rbi +4 -1
  198. data/rbi/orb/models/subscription_change_apply_response.rbi +142 -21
  199. data/rbi/orb/models/subscription_change_cancel_params.rbi +4 -1
  200. data/rbi/orb/models/subscription_change_cancel_response.rbi +142 -21
  201. data/rbi/orb/models/subscription_change_retrieve_params.rbi +4 -1
  202. data/rbi/orb/models/subscription_change_retrieve_response.rbi +142 -21
  203. data/rbi/orb/models/subscription_create_params.rbi +1257 -198
  204. data/rbi/orb/models/subscription_create_response.rbi +137 -20
  205. data/rbi/orb/models/subscription_fetch_costs_params.rbi +4 -1
  206. data/rbi/orb/models/subscription_fetch_costs_response.rbi +21 -3
  207. data/rbi/orb/models/subscription_fetch_params.rbi +4 -1
  208. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +4 -1
  209. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +14 -2
  210. data/rbi/orb/models/subscription_fetch_usage_params.rbi +4 -1
  211. data/rbi/orb/models/subscription_list_params.rbi +4 -1
  212. data/rbi/orb/models/subscription_price_intervals_params.rbi +731 -115
  213. data/rbi/orb/models/subscription_price_intervals_response.rbi +140 -20
  214. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +1260 -198
  215. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +140 -20
  216. data/rbi/orb/models/subscription_trigger_phase_params.rbi +4 -1
  217. data/rbi/orb/models/subscription_trigger_phase_response.rbi +140 -20
  218. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +7 -1
  219. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +140 -20
  220. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +7 -1
  221. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +140 -20
  222. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +7 -1
  223. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +140 -20
  224. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +7 -1
  225. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +140 -20
  226. data/rbi/orb/models/subscription_update_params.rbi +4 -1
  227. data/rbi/orb/models/subscription_update_trial_params.rbi +4 -1
  228. data/rbi/orb/models/subscription_update_trial_response.rbi +140 -20
  229. data/rbi/orb/models/subscription_usage.rbi +63 -9
  230. data/rbi/orb/models/subscriptions.rbi +2 -1
  231. data/rbi/orb/models/top_level_ping_params.rbi +2 -1
  232. data/rbi/orb/models/top_level_ping_response.rbi +4 -1
  233. data/rbi/orb/models/trial_discount.rbi +2 -1
  234. data/rbi/orb/models/usage_discount.rbi +2 -1
  235. data/rbi/orb/request_options.rbi +1 -1
  236. data/sig/orb/internal/transport/base_client.rbs +16 -1
  237. data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
  238. data/sig/orb/internal/type/base_model.rbs +11 -5
  239. data/sig/orb/internal/type/base_page.rbs +1 -1
  240. data/sig/orb/internal/type/converter.rbs +2 -0
  241. data/sig/orb/internal/type/enum.rbs +1 -0
  242. data/sig/orb/internal/type/union.rbs +1 -0
  243. data/sig/orb/internal/util.rbs +13 -0
  244. data/sig/orb/internal.rbs +2 -0
  245. metadata +2 -2
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionCreateResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::Models::SubscriptionCreateResponse, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  sig { returns(String) }
9
12
  attr_accessor :id
@@ -470,7 +473,13 @@ module Orb
470
473
  end
471
474
 
472
475
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
473
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
476
+ OrHash =
477
+ T.type_alias do
478
+ T.any(
479
+ Orb::Models::SubscriptionCreateResponse::AdjustmentInterval,
480
+ Orb::Internal::AnyHash
481
+ )
482
+ end
474
483
 
475
484
  sig { returns(String) }
476
485
  attr_accessor :id
@@ -564,7 +573,13 @@ module Orb
564
573
  end
565
574
 
566
575
  class UsageDiscount < Orb::Internal::Type::BaseModel
567
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
576
+ OrHash =
577
+ T.type_alias do
578
+ T.any(
579
+ Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::UsageDiscount,
580
+ Orb::Internal::AnyHash
581
+ )
582
+ end
568
583
 
569
584
  sig { returns(String) }
570
585
  attr_accessor :id
@@ -641,7 +656,13 @@ module Orb
641
656
  end
642
657
 
643
658
  class AmountDiscount < Orb::Internal::Type::BaseModel
644
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
659
+ OrHash =
660
+ T.type_alias do
661
+ T.any(
662
+ Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::AmountDiscount,
663
+ Orb::Internal::AnyHash
664
+ )
665
+ end
645
666
 
646
667
  sig { returns(String) }
647
668
  attr_accessor :id
@@ -718,7 +739,13 @@ module Orb
718
739
  end
719
740
 
720
741
  class PercentageDiscount < Orb::Internal::Type::BaseModel
721
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
742
+ OrHash =
743
+ T.type_alias do
744
+ T.any(
745
+ Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
746
+ Orb::Internal::AnyHash
747
+ )
748
+ end
722
749
 
723
750
  sig { returns(String) }
724
751
  attr_accessor :id
@@ -795,7 +822,13 @@ module Orb
795
822
  end
796
823
 
797
824
  class Minimum < Orb::Internal::Type::BaseModel
798
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
825
+ OrHash =
826
+ T.type_alias do
827
+ T.any(
828
+ Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::Minimum,
829
+ Orb::Internal::AnyHash
830
+ )
831
+ end
799
832
 
800
833
  sig { returns(String) }
801
834
  attr_accessor :id
@@ -880,7 +913,13 @@ module Orb
880
913
  end
881
914
 
882
915
  class Maximum < Orb::Internal::Type::BaseModel
883
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
916
+ OrHash =
917
+ T.type_alias do
918
+ T.any(
919
+ Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::Maximum,
920
+ Orb::Internal::AnyHash
921
+ )
922
+ end
884
923
 
885
924
  sig { returns(String) }
886
925
  attr_accessor :id
@@ -969,7 +1008,13 @@ module Orb
969
1008
  end
970
1009
 
971
1010
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
972
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1011
+ OrHash =
1012
+ T.type_alias do
1013
+ T.any(
1014
+ Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration,
1015
+ Orb::Internal::AnyHash
1016
+ )
1017
+ end
973
1018
 
974
1019
  # The day of the month on which the billing cycle is anchored. If the maximum
975
1020
  # number of days in a month is greater than this value, the last day of the month
@@ -1038,7 +1083,13 @@ module Orb
1038
1083
  end
1039
1084
 
1040
1085
  class Amount < Orb::Internal::Type::BaseModel
1041
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1086
+ OrHash =
1087
+ T.type_alias do
1088
+ T.any(
1089
+ Orb::Models::SubscriptionCreateResponse::DiscountInterval::Amount,
1090
+ Orb::Internal::AnyHash
1091
+ )
1092
+ end
1042
1093
 
1043
1094
  # Only available if discount_type is `amount`.
1044
1095
  sig { returns(String) }
@@ -1105,7 +1156,13 @@ module Orb
1105
1156
  end
1106
1157
 
1107
1158
  class Percentage < Orb::Internal::Type::BaseModel
1108
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1159
+ OrHash =
1160
+ T.type_alias do
1161
+ T.any(
1162
+ Orb::Models::SubscriptionCreateResponse::DiscountInterval::Percentage,
1163
+ Orb::Internal::AnyHash
1164
+ )
1165
+ end
1109
1166
 
1110
1167
  # The price ids that this discount interval applies to.
1111
1168
  sig { returns(T::Array[String]) }
@@ -1174,7 +1231,13 @@ module Orb
1174
1231
  end
1175
1232
 
1176
1233
  class Usage < Orb::Internal::Type::BaseModel
1177
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1234
+ OrHash =
1235
+ T.type_alias do
1236
+ T.any(
1237
+ Orb::Models::SubscriptionCreateResponse::DiscountInterval::Usage,
1238
+ Orb::Internal::AnyHash
1239
+ )
1240
+ end
1178
1241
 
1179
1242
  # The price ids that this discount interval applies to.
1180
1243
  sig { returns(T::Array[String]) }
@@ -1254,7 +1317,13 @@ module Orb
1254
1317
  end
1255
1318
 
1256
1319
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1257
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1320
+ OrHash =
1321
+ T.type_alias do
1322
+ T.any(
1323
+ Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule,
1324
+ Orb::Internal::AnyHash
1325
+ )
1326
+ end
1258
1327
 
1259
1328
  sig { returns(T.nilable(Time)) }
1260
1329
  attr_accessor :end_date
@@ -1294,7 +1363,13 @@ module Orb
1294
1363
  end
1295
1364
 
1296
1365
  class MaximumInterval < Orb::Internal::Type::BaseModel
1297
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1366
+ OrHash =
1367
+ T.type_alias do
1368
+ T.any(
1369
+ Orb::Models::SubscriptionCreateResponse::MaximumInterval,
1370
+ Orb::Internal::AnyHash
1371
+ )
1372
+ end
1298
1373
 
1299
1374
  # The price ids that this maximum interval applies to.
1300
1375
  sig { returns(T::Array[String]) }
@@ -1357,7 +1432,13 @@ module Orb
1357
1432
  end
1358
1433
 
1359
1434
  class MinimumInterval < Orb::Internal::Type::BaseModel
1360
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1435
+ OrHash =
1436
+ T.type_alias do
1437
+ T.any(
1438
+ Orb::Models::SubscriptionCreateResponse::MinimumInterval,
1439
+ Orb::Internal::AnyHash
1440
+ )
1441
+ end
1361
1442
 
1362
1443
  # The price ids that this minimum interval applies to.
1363
1444
  sig { returns(T::Array[String]) }
@@ -1420,7 +1501,13 @@ module Orb
1420
1501
  end
1421
1502
 
1422
1503
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1423
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1504
+ OrHash =
1505
+ T.type_alias do
1506
+ T.any(
1507
+ Orb::Models::SubscriptionCreateResponse::PendingSubscriptionChange,
1508
+ Orb::Internal::AnyHash
1509
+ )
1510
+ end
1424
1511
 
1425
1512
  sig { returns(String) }
1426
1513
  attr_accessor :id
@@ -1436,7 +1523,13 @@ module Orb
1436
1523
  end
1437
1524
 
1438
1525
  class PriceInterval < Orb::Internal::Type::BaseModel
1439
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1526
+ OrHash =
1527
+ T.type_alias do
1528
+ T.any(
1529
+ Orb::Models::SubscriptionCreateResponse::PriceInterval,
1530
+ Orb::Internal::AnyHash
1531
+ )
1532
+ end
1440
1533
 
1441
1534
  sig { returns(String) }
1442
1535
  attr_accessor :id
@@ -1682,7 +1775,13 @@ module Orb
1682
1775
  end
1683
1776
 
1684
1777
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1685
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1778
+ OrHash =
1779
+ T.type_alias do
1780
+ T.any(
1781
+ Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition,
1782
+ Orb::Internal::AnyHash
1783
+ )
1784
+ end
1686
1785
 
1687
1786
  sig { returns(Time) }
1688
1787
  attr_accessor :effective_date
@@ -1714,7 +1813,13 @@ module Orb
1714
1813
  end
1715
1814
 
1716
1815
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1717
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1816
+ OrHash =
1817
+ T.type_alias do
1818
+ T.any(
1819
+ Orb::Models::SubscriptionCreateResponse::RedeemedCoupon,
1820
+ Orb::Internal::AnyHash
1821
+ )
1822
+ end
1718
1823
 
1719
1824
  sig { returns(String) }
1720
1825
  attr_accessor :coupon_id
@@ -1781,7 +1886,13 @@ module Orb
1781
1886
  end
1782
1887
 
1783
1888
  class TrialInfo < Orb::Internal::Type::BaseModel
1784
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1889
+ OrHash =
1890
+ T.type_alias do
1891
+ T.any(
1892
+ Orb::Models::SubscriptionCreateResponse::TrialInfo,
1893
+ Orb::Internal::AnyHash
1894
+ )
1895
+ end
1785
1896
 
1786
1897
  sig { returns(T.nilable(Time)) }
1787
1898
  attr_accessor :end_date
@@ -1796,7 +1907,13 @@ module Orb
1796
1907
  end
1797
1908
 
1798
1909
  class ChangedResources < Orb::Internal::Type::BaseModel
1799
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1910
+ OrHash =
1911
+ T.type_alias do
1912
+ T.any(
1913
+ Orb::Models::SubscriptionCreateResponse::ChangedResources,
1914
+ Orb::Internal::AnyHash
1915
+ )
1916
+ end
1800
1917
 
1801
1918
  # The credit notes that were created as part of this operation.
1802
1919
  sig { returns(T::Array[Orb::CreditNote]) }
@@ -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 = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::SubscriptionFetchCostsParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  # The currency or custom pricing unit to use.
12
15
  sig { returns(T.nilable(String)) }
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionFetchCostsResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Orb::Models::SubscriptionFetchCostsResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig do
9
15
  returns(T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data])
@@ -28,7 +34,13 @@ module Orb
28
34
  end
29
35
 
30
36
  class Data < Orb::Internal::Type::BaseModel
31
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
37
+ OrHash =
38
+ T.type_alias do
39
+ T.any(
40
+ Orb::Models::SubscriptionFetchCostsResponse::Data,
41
+ Orb::Internal::AnyHash
42
+ )
43
+ end
32
44
 
33
45
  sig do
34
46
  returns(
@@ -94,7 +106,13 @@ module Orb
94
106
  end
95
107
 
96
108
  class PerPriceCost < Orb::Internal::Type::BaseModel
97
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
109
+ OrHash =
110
+ T.type_alias do
111
+ T.any(
112
+ Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost,
113
+ Orb::Internal::AnyHash
114
+ )
115
+ end
98
116
 
99
117
  # The price object
100
118
  sig do
@@ -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 = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::SubscriptionFetchParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig do
12
15
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -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 = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::SubscriptionFetchScheduleParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
12
15
  # from the initial request.
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionFetchScheduleResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Orb::Models::SubscriptionFetchScheduleResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(Time) }
9
15
  attr_accessor :created_at
@@ -49,7 +55,13 @@ module Orb
49
55
  end
50
56
 
51
57
  class Plan < Orb::Internal::Type::BaseModel
52
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
58
+ OrHash =
59
+ T.type_alias do
60
+ T.any(
61
+ Orb::Models::SubscriptionFetchScheduleResponse::Plan,
62
+ Orb::Internal::AnyHash
63
+ )
64
+ end
53
65
 
54
66
  sig { returns(T.nilable(String)) }
55
67
  attr_accessor :id
@@ -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 = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::SubscriptionFetchUsageParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  # When specified in conjunction with `group_by`, this parameter filters usage to a
12
15
  # single billable metric. Note that both `group_by` and `billable_metric_id` must
@@ -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 = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::SubscriptionListParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig { returns(T.nilable(Time)) }
12
15
  attr_accessor :created_at_gt