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 SubscriptionCancelResponse < 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::SubscriptionCancelResponse, 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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionCancelResponse::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::SubscriptionChangeApplyParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  # Description to apply to the balance transaction representing this credit.
12
15
  sig { returns(T.nilable(String)) }
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionChangeApplyResponse < 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::SubscriptionChangeApplyResponse,
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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeApplyResponse::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::SubscriptionChangeCancelParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig do
12
15
  params(request_options: Orb::RequestOptions::OrHash).returns(