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,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionChangeCancelResponse < 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::SubscriptionChangeCancelResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(String) }
9
15
  attr_accessor :id
@@ -131,7 +137,13 @@ module Orb
131
137
  end
132
138
 
133
139
  class Subscription < Orb::Internal::Type::BaseModel
134
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
140
+ OrHash =
141
+ T.type_alias do
142
+ T.any(
143
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription,
144
+ Orb::Internal::AnyHash
145
+ )
146
+ end
135
147
 
136
148
  sig { returns(String) }
137
149
  attr_accessor :id
@@ -621,7 +633,13 @@ module Orb
621
633
  end
622
634
 
623
635
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
624
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
636
+ OrHash =
637
+ T.type_alias do
638
+ T.any(
639
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval,
640
+ Orb::Internal::AnyHash
641
+ )
642
+ end
625
643
 
626
644
  sig { returns(String) }
627
645
  attr_accessor :id
@@ -716,7 +734,12 @@ module Orb
716
734
 
717
735
  class UsageDiscount < Orb::Internal::Type::BaseModel
718
736
  OrHash =
719
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
737
+ T.type_alias do
738
+ T.any(
739
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
740
+ Orb::Internal::AnyHash
741
+ )
742
+ end
720
743
 
721
744
  sig { returns(String) }
722
745
  attr_accessor :id
@@ -794,7 +817,12 @@ module Orb
794
817
 
795
818
  class AmountDiscount < Orb::Internal::Type::BaseModel
796
819
  OrHash =
797
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
820
+ T.type_alias do
821
+ T.any(
822
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
823
+ Orb::Internal::AnyHash
824
+ )
825
+ end
798
826
 
799
827
  sig { returns(String) }
800
828
  attr_accessor :id
@@ -872,7 +900,12 @@ module Orb
872
900
 
873
901
  class PercentageDiscount < Orb::Internal::Type::BaseModel
874
902
  OrHash =
875
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
903
+ T.type_alias do
904
+ T.any(
905
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
906
+ Orb::Internal::AnyHash
907
+ )
908
+ end
876
909
 
877
910
  sig { returns(String) }
878
911
  attr_accessor :id
@@ -950,7 +983,12 @@ module Orb
950
983
 
951
984
  class Minimum < Orb::Internal::Type::BaseModel
952
985
  OrHash =
953
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
986
+ T.type_alias do
987
+ T.any(
988
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
989
+ Orb::Internal::AnyHash
990
+ )
991
+ end
954
992
 
955
993
  sig { returns(String) }
956
994
  attr_accessor :id
@@ -1036,7 +1074,12 @@ module Orb
1036
1074
 
1037
1075
  class Maximum < Orb::Internal::Type::BaseModel
1038
1076
  OrHash =
1039
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1077
+ T.type_alias do
1078
+ T.any(
1079
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum,
1080
+ Orb::Internal::AnyHash
1081
+ )
1082
+ end
1040
1083
 
1041
1084
  sig { returns(String) }
1042
1085
  attr_accessor :id
@@ -1125,7 +1168,13 @@ module Orb
1125
1168
  end
1126
1169
 
1127
1170
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
1128
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1171
+ OrHash =
1172
+ T.type_alias do
1173
+ T.any(
1174
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::BillingCycleAnchorConfiguration,
1175
+ Orb::Internal::AnyHash
1176
+ )
1177
+ end
1129
1178
 
1130
1179
  # The day of the month on which the billing cycle is anchored. If the maximum
1131
1180
  # number of days in a month is greater than this value, the last day of the month
@@ -1194,7 +1243,13 @@ module Orb
1194
1243
  end
1195
1244
 
1196
1245
  class Amount < Orb::Internal::Type::BaseModel
1197
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1246
+ OrHash =
1247
+ T.type_alias do
1248
+ T.any(
1249
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount,
1250
+ Orb::Internal::AnyHash
1251
+ )
1252
+ end
1198
1253
 
1199
1254
  # Only available if discount_type is `amount`.
1200
1255
  sig { returns(String) }
@@ -1261,7 +1316,13 @@ module Orb
1261
1316
  end
1262
1317
 
1263
1318
  class Percentage < Orb::Internal::Type::BaseModel
1264
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1319
+ OrHash =
1320
+ T.type_alias do
1321
+ T.any(
1322
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage,
1323
+ Orb::Internal::AnyHash
1324
+ )
1325
+ end
1265
1326
 
1266
1327
  # The price ids that this discount interval applies to.
1267
1328
  sig { returns(T::Array[String]) }
@@ -1330,7 +1391,13 @@ module Orb
1330
1391
  end
1331
1392
 
1332
1393
  class Usage < Orb::Internal::Type::BaseModel
1333
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1394
+ OrHash =
1395
+ T.type_alias do
1396
+ T.any(
1397
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage,
1398
+ Orb::Internal::AnyHash
1399
+ )
1400
+ end
1334
1401
 
1335
1402
  # The price ids that this discount interval applies to.
1336
1403
  sig { returns(T::Array[String]) }
@@ -1410,7 +1477,13 @@ module Orb
1410
1477
  end
1411
1478
 
1412
1479
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1413
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1480
+ OrHash =
1481
+ T.type_alias do
1482
+ T.any(
1483
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::FixedFeeQuantitySchedule,
1484
+ Orb::Internal::AnyHash
1485
+ )
1486
+ end
1414
1487
 
1415
1488
  sig { returns(T.nilable(Time)) }
1416
1489
  attr_accessor :end_date
@@ -1450,7 +1523,13 @@ module Orb
1450
1523
  end
1451
1524
 
1452
1525
  class MaximumInterval < Orb::Internal::Type::BaseModel
1453
- 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::SubscriptionChangeCancelResponse::Subscription::MaximumInterval,
1530
+ Orb::Internal::AnyHash
1531
+ )
1532
+ end
1454
1533
 
1455
1534
  # The price ids that this maximum interval applies to.
1456
1535
  sig { returns(T::Array[String]) }
@@ -1513,7 +1592,13 @@ module Orb
1513
1592
  end
1514
1593
 
1515
1594
  class MinimumInterval < Orb::Internal::Type::BaseModel
1516
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1595
+ OrHash =
1596
+ T.type_alias do
1597
+ T.any(
1598
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval,
1599
+ Orb::Internal::AnyHash
1600
+ )
1601
+ end
1517
1602
 
1518
1603
  # The price ids that this minimum interval applies to.
1519
1604
  sig { returns(T::Array[String]) }
@@ -1576,7 +1661,13 @@ module Orb
1576
1661
  end
1577
1662
 
1578
1663
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1579
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1664
+ OrHash =
1665
+ T.type_alias do
1666
+ T.any(
1667
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::PendingSubscriptionChange,
1668
+ Orb::Internal::AnyHash
1669
+ )
1670
+ end
1580
1671
 
1581
1672
  sig { returns(String) }
1582
1673
  attr_accessor :id
@@ -1592,7 +1683,13 @@ module Orb
1592
1683
  end
1593
1684
 
1594
1685
  class PriceInterval < Orb::Internal::Type::BaseModel
1595
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1686
+ OrHash =
1687
+ T.type_alias do
1688
+ T.any(
1689
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::PriceInterval,
1690
+ Orb::Internal::AnyHash
1691
+ )
1692
+ end
1596
1693
 
1597
1694
  sig { returns(String) }
1598
1695
  attr_accessor :id
@@ -1838,7 +1935,13 @@ module Orb
1838
1935
  end
1839
1936
 
1840
1937
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1841
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1938
+ OrHash =
1939
+ T.type_alias do
1940
+ T.any(
1941
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::PriceInterval::FixedFeeQuantityTransition,
1942
+ Orb::Internal::AnyHash
1943
+ )
1944
+ end
1842
1945
 
1843
1946
  sig { returns(Time) }
1844
1947
  attr_accessor :effective_date
@@ -1870,7 +1973,13 @@ module Orb
1870
1973
  end
1871
1974
 
1872
1975
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1873
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1976
+ OrHash =
1977
+ T.type_alias do
1978
+ T.any(
1979
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::RedeemedCoupon,
1980
+ Orb::Internal::AnyHash
1981
+ )
1982
+ end
1874
1983
 
1875
1984
  sig { returns(String) }
1876
1985
  attr_accessor :coupon_id
@@ -1940,7 +2049,13 @@ module Orb
1940
2049
  end
1941
2050
 
1942
2051
  class TrialInfo < Orb::Internal::Type::BaseModel
1943
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
2052
+ OrHash =
2053
+ T.type_alias do
2054
+ T.any(
2055
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::TrialInfo,
2056
+ Orb::Internal::AnyHash
2057
+ )
2058
+ end
1944
2059
 
1945
2060
  sig { returns(T.nilable(Time)) }
1946
2061
  attr_accessor :end_date
@@ -1955,7 +2070,13 @@ module Orb
1955
2070
  end
1956
2071
 
1957
2072
  class ChangedResources < Orb::Internal::Type::BaseModel
1958
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
2073
+ OrHash =
2074
+ T.type_alias do
2075
+ T.any(
2076
+ Orb::Models::SubscriptionChangeCancelResponse::Subscription::ChangedResources,
2077
+ Orb::Internal::AnyHash
2078
+ )
2079
+ end
1959
2080
 
1960
2081
  # The credit notes that were created as part of this operation.
1961
2082
  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::SubscriptionChangeRetrieveParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig do
12
15
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionChangeRetrieveResponse < 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::SubscriptionChangeRetrieveResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(String) }
9
15
  attr_accessor :id
@@ -136,7 +142,13 @@ module Orb
136
142
  end
137
143
 
138
144
  class Subscription < Orb::Internal::Type::BaseModel
139
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
145
+ OrHash =
146
+ T.type_alias do
147
+ T.any(
148
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription,
149
+ Orb::Internal::AnyHash
150
+ )
151
+ end
140
152
 
141
153
  sig { returns(String) }
142
154
  attr_accessor :id
@@ -626,7 +638,13 @@ module Orb
626
638
  end
627
639
 
628
640
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
629
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
641
+ OrHash =
642
+ T.type_alias do
643
+ T.any(
644
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval,
645
+ Orb::Internal::AnyHash
646
+ )
647
+ end
630
648
 
631
649
  sig { returns(String) }
632
650
  attr_accessor :id
@@ -721,7 +739,12 @@ module Orb
721
739
 
722
740
  class UsageDiscount < Orb::Internal::Type::BaseModel
723
741
  OrHash =
724
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
742
+ T.type_alias do
743
+ T.any(
744
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
745
+ Orb::Internal::AnyHash
746
+ )
747
+ end
725
748
 
726
749
  sig { returns(String) }
727
750
  attr_accessor :id
@@ -799,7 +822,12 @@ module Orb
799
822
 
800
823
  class AmountDiscount < Orb::Internal::Type::BaseModel
801
824
  OrHash =
802
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
825
+ T.type_alias do
826
+ T.any(
827
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
828
+ Orb::Internal::AnyHash
829
+ )
830
+ end
803
831
 
804
832
  sig { returns(String) }
805
833
  attr_accessor :id
@@ -877,7 +905,12 @@ module Orb
877
905
 
878
906
  class PercentageDiscount < Orb::Internal::Type::BaseModel
879
907
  OrHash =
880
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
908
+ T.type_alias do
909
+ T.any(
910
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
911
+ Orb::Internal::AnyHash
912
+ )
913
+ end
881
914
 
882
915
  sig { returns(String) }
883
916
  attr_accessor :id
@@ -955,7 +988,12 @@ module Orb
955
988
 
956
989
  class Minimum < Orb::Internal::Type::BaseModel
957
990
  OrHash =
958
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
991
+ T.type_alias do
992
+ T.any(
993
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
994
+ Orb::Internal::AnyHash
995
+ )
996
+ end
959
997
 
960
998
  sig { returns(String) }
961
999
  attr_accessor :id
@@ -1041,7 +1079,12 @@ module Orb
1041
1079
 
1042
1080
  class Maximum < Orb::Internal::Type::BaseModel
1043
1081
  OrHash =
1044
- T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1082
+ T.type_alias do
1083
+ T.any(
1084
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum,
1085
+ Orb::Internal::AnyHash
1086
+ )
1087
+ end
1045
1088
 
1046
1089
  sig { returns(String) }
1047
1090
  attr_accessor :id
@@ -1130,7 +1173,13 @@ module Orb
1130
1173
  end
1131
1174
 
1132
1175
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
1133
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1176
+ OrHash =
1177
+ T.type_alias do
1178
+ T.any(
1179
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::BillingCycleAnchorConfiguration,
1180
+ Orb::Internal::AnyHash
1181
+ )
1182
+ end
1134
1183
 
1135
1184
  # The day of the month on which the billing cycle is anchored. If the maximum
1136
1185
  # number of days in a month is greater than this value, the last day of the month
@@ -1199,7 +1248,13 @@ module Orb
1199
1248
  end
1200
1249
 
1201
1250
  class Amount < Orb::Internal::Type::BaseModel
1202
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1251
+ OrHash =
1252
+ T.type_alias do
1253
+ T.any(
1254
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount,
1255
+ Orb::Internal::AnyHash
1256
+ )
1257
+ end
1203
1258
 
1204
1259
  # Only available if discount_type is `amount`.
1205
1260
  sig { returns(String) }
@@ -1266,7 +1321,13 @@ module Orb
1266
1321
  end
1267
1322
 
1268
1323
  class Percentage < Orb::Internal::Type::BaseModel
1269
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1324
+ OrHash =
1325
+ T.type_alias do
1326
+ T.any(
1327
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage,
1328
+ Orb::Internal::AnyHash
1329
+ )
1330
+ end
1270
1331
 
1271
1332
  # The price ids that this discount interval applies to.
1272
1333
  sig { returns(T::Array[String]) }
@@ -1335,7 +1396,13 @@ module Orb
1335
1396
  end
1336
1397
 
1337
1398
  class Usage < Orb::Internal::Type::BaseModel
1338
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1399
+ OrHash =
1400
+ T.type_alias do
1401
+ T.any(
1402
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage,
1403
+ Orb::Internal::AnyHash
1404
+ )
1405
+ end
1339
1406
 
1340
1407
  # The price ids that this discount interval applies to.
1341
1408
  sig { returns(T::Array[String]) }
@@ -1415,7 +1482,13 @@ module Orb
1415
1482
  end
1416
1483
 
1417
1484
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1418
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1485
+ OrHash =
1486
+ T.type_alias do
1487
+ T.any(
1488
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::FixedFeeQuantitySchedule,
1489
+ Orb::Internal::AnyHash
1490
+ )
1491
+ end
1419
1492
 
1420
1493
  sig { returns(T.nilable(Time)) }
1421
1494
  attr_accessor :end_date
@@ -1455,7 +1528,13 @@ module Orb
1455
1528
  end
1456
1529
 
1457
1530
  class MaximumInterval < Orb::Internal::Type::BaseModel
1458
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1531
+ OrHash =
1532
+ T.type_alias do
1533
+ T.any(
1534
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval,
1535
+ Orb::Internal::AnyHash
1536
+ )
1537
+ end
1459
1538
 
1460
1539
  # The price ids that this maximum interval applies to.
1461
1540
  sig { returns(T::Array[String]) }
@@ -1518,7 +1597,13 @@ module Orb
1518
1597
  end
1519
1598
 
1520
1599
  class MinimumInterval < Orb::Internal::Type::BaseModel
1521
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1600
+ OrHash =
1601
+ T.type_alias do
1602
+ T.any(
1603
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval,
1604
+ Orb::Internal::AnyHash
1605
+ )
1606
+ end
1522
1607
 
1523
1608
  # The price ids that this minimum interval applies to.
1524
1609
  sig { returns(T::Array[String]) }
@@ -1581,7 +1666,13 @@ module Orb
1581
1666
  end
1582
1667
 
1583
1668
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1584
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1669
+ OrHash =
1670
+ T.type_alias do
1671
+ T.any(
1672
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange,
1673
+ Orb::Internal::AnyHash
1674
+ )
1675
+ end
1585
1676
 
1586
1677
  sig { returns(String) }
1587
1678
  attr_accessor :id
@@ -1597,7 +1688,13 @@ module Orb
1597
1688
  end
1598
1689
 
1599
1690
  class PriceInterval < Orb::Internal::Type::BaseModel
1600
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1691
+ OrHash =
1692
+ T.type_alias do
1693
+ T.any(
1694
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval,
1695
+ Orb::Internal::AnyHash
1696
+ )
1697
+ end
1601
1698
 
1602
1699
  sig { returns(String) }
1603
1700
  attr_accessor :id
@@ -1843,7 +1940,13 @@ module Orb
1843
1940
  end
1844
1941
 
1845
1942
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1846
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1943
+ OrHash =
1944
+ T.type_alias do
1945
+ T.any(
1946
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval::FixedFeeQuantityTransition,
1947
+ Orb::Internal::AnyHash
1948
+ )
1949
+ end
1847
1950
 
1848
1951
  sig { returns(Time) }
1849
1952
  attr_accessor :effective_date
@@ -1875,7 +1978,13 @@ module Orb
1875
1978
  end
1876
1979
 
1877
1980
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1878
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1981
+ OrHash =
1982
+ T.type_alias do
1983
+ T.any(
1984
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::RedeemedCoupon,
1985
+ Orb::Internal::AnyHash
1986
+ )
1987
+ end
1879
1988
 
1880
1989
  sig { returns(String) }
1881
1990
  attr_accessor :coupon_id
@@ -1945,7 +2054,13 @@ module Orb
1945
2054
  end
1946
2055
 
1947
2056
  class TrialInfo < Orb::Internal::Type::BaseModel
1948
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
2057
+ OrHash =
2058
+ T.type_alias do
2059
+ T.any(
2060
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::TrialInfo,
2061
+ Orb::Internal::AnyHash
2062
+ )
2063
+ end
1949
2064
 
1950
2065
  sig { returns(T.nilable(Time)) }
1951
2066
  attr_accessor :end_date
@@ -1960,7 +2075,13 @@ module Orb
1960
2075
  end
1961
2076
 
1962
2077
  class ChangedResources < Orb::Internal::Type::BaseModel
1963
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
2078
+ OrHash =
2079
+ T.type_alias do
2080
+ T.any(
2081
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::ChangedResources,
2082
+ Orb::Internal::AnyHash
2083
+ )
2084
+ end
1964
2085
 
1965
2086
  # The credit notes that were created as part of this operation.
1966
2087
  sig { returns(T::Array[Orb::CreditNote]) }