orb-billing 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +95 -55
  4. data/lib/orb/client.rb +4 -4
  5. data/lib/orb/errors.rb +1 -1
  6. data/lib/orb/internal/transport/base_client.rb +74 -5
  7. data/lib/orb/internal/transport/pooled_net_requester.rb +17 -1
  8. data/lib/orb/internal/type/array_of.rb +1 -1
  9. data/lib/orb/internal/type/base_model.rb +70 -30
  10. data/lib/orb/internal/type/converter.rb +18 -0
  11. data/lib/orb/internal/type/enum.rb +1 -0
  12. data/lib/orb/internal/type/hash_of.rb +1 -1
  13. data/lib/orb/internal/type/union.rb +1 -0
  14. data/lib/orb/internal/util.rb +56 -0
  15. data/lib/orb/internal.rb +6 -0
  16. data/lib/orb/models/coupon.rb +4 -0
  17. data/lib/orb/models/coupon_create_params.rb +6 -0
  18. data/lib/orb/models/customer_create_params.rb +9 -0
  19. data/lib/orb/models/customer_update_by_external_id_params.rb +9 -0
  20. data/lib/orb/models/customer_update_params.rb +9 -0
  21. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -0
  22. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -0
  23. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -0
  24. data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -0
  25. data/lib/orb/models/discount.rb +6 -0
  26. data/lib/orb/models/evaluate_price_group.rb +4 -0
  27. data/lib/orb/models/invoice.rb +22 -0
  28. data/lib/orb/models/invoice_fetch_upcoming_response.rb +22 -0
  29. data/lib/orb/models/invoice_level_discount.rb +4 -0
  30. data/lib/orb/models/invoice_line_item_create_response.rb +22 -0
  31. data/lib/orb/models/plan.rb +12 -0
  32. data/lib/orb/models/plan_create_params.rb +32 -0
  33. data/lib/orb/models/price.rb +35 -0
  34. data/lib/orb/models/subscription.rb +22 -0
  35. data/lib/orb/models/subscription_cancel_response.rb +22 -0
  36. data/lib/orb/models/subscription_change_apply_response.rb +22 -0
  37. data/lib/orb/models/subscription_change_cancel_response.rb +22 -0
  38. data/lib/orb/models/subscription_change_retrieve_response.rb +22 -0
  39. data/lib/orb/models/subscription_create_params.rb +88 -0
  40. data/lib/orb/models/subscription_create_response.rb +22 -0
  41. data/lib/orb/models/subscription_price_intervals_params.rb +89 -0
  42. data/lib/orb/models/subscription_price_intervals_response.rb +22 -0
  43. data/lib/orb/models/subscription_schedule_plan_change_params.rb +88 -0
  44. data/lib/orb/models/subscription_schedule_plan_change_response.rb +22 -0
  45. data/lib/orb/models/subscription_trigger_phase_response.rb +22 -0
  46. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +22 -0
  47. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +22 -0
  48. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +22 -0
  49. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +22 -0
  50. data/lib/orb/models/subscription_update_trial_params.rb +4 -0
  51. data/lib/orb/models/subscription_update_trial_response.rb +22 -0
  52. data/lib/orb/models/subscription_usage.rb +9 -0
  53. data/lib/orb/models.rb +24 -0
  54. data/lib/orb/request_options.rb +4 -0
  55. data/lib/orb/version.rb +1 -1
  56. data/lib/orb.rb +2 -0
  57. data/rbi/orb/internal/page.rbi +2 -1
  58. data/rbi/orb/internal/transport/base_client.rbi +31 -8
  59. data/rbi/orb/internal/transport/pooled_net_requester.rbi +10 -5
  60. data/rbi/orb/internal/type/base_model.rbi +31 -15
  61. data/rbi/orb/internal/type/base_page.rbi +1 -1
  62. data/rbi/orb/internal/type/converter.rbi +2 -0
  63. data/rbi/orb/internal/type/enum.rbi +1 -0
  64. data/rbi/orb/internal/type/union.rbi +1 -0
  65. data/rbi/orb/internal/util.rbi +28 -7
  66. data/rbi/orb/internal.rbi +2 -0
  67. data/rbi/orb/models/alert.rbi +13 -6
  68. data/rbi/orb/models/alert_create_for_customer_params.rbi +11 -2
  69. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +14 -2
  70. data/rbi/orb/models/alert_create_for_subscription_params.rbi +11 -2
  71. data/rbi/orb/models/alert_disable_params.rbi +2 -1
  72. data/rbi/orb/models/alert_enable_params.rbi +2 -1
  73. data/rbi/orb/models/alert_list_params.rbi +2 -1
  74. data/rbi/orb/models/alert_retrieve_params.rbi +2 -1
  75. data/rbi/orb/models/alert_update_params.rbi +6 -2
  76. data/rbi/orb/models/amount_discount.rbi +2 -1
  77. data/rbi/orb/models/billable_metric.rbi +2 -1
  78. data/rbi/orb/models/coupon.rbi +1 -1
  79. data/rbi/orb/models/coupon_archive_params.rbi +2 -1
  80. data/rbi/orb/models/coupon_create_params.rbi +16 -3
  81. data/rbi/orb/models/coupon_fetch_params.rbi +2 -1
  82. data/rbi/orb/models/coupon_list_params.rbi +2 -1
  83. data/rbi/orb/models/coupons/subscription_list_params.rbi +4 -1
  84. data/rbi/orb/models/credit_note.rbi +45 -9
  85. data/rbi/orb/models/credit_note_create_params.rbi +8 -2
  86. data/rbi/orb/models/credit_note_fetch_params.rbi +4 -1
  87. data/rbi/orb/models/credit_note_list_params.rbi +4 -1
  88. data/rbi/orb/models/customer.rbi +41 -10
  89. data/rbi/orb/models/customer_create_params.rbi +61 -10
  90. data/rbi/orb/models/customer_delete_params.rbi +4 -1
  91. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +4 -1
  92. data/rbi/orb/models/customer_fetch_params.rbi +2 -1
  93. data/rbi/orb/models/customer_list_params.rbi +2 -1
  94. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +7 -1
  95. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +7 -1
  96. data/rbi/orb/models/customer_update_by_external_id_params.rbi +67 -10
  97. data/rbi/orb/models/customer_update_params.rbi +61 -10
  98. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +7 -1
  99. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +21 -3
  100. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +7 -1
  101. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +21 -3
  102. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +7 -1
  103. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +21 -3
  104. data/rbi/orb/models/customers/cost_list_params.rbi +4 -1
  105. data/rbi/orb/models/customers/cost_list_response.rbi +21 -3
  106. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +7 -1
  107. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +7 -1
  108. data/rbi/orb/models/customers/credit_list_params.rbi +4 -1
  109. data/rbi/orb/models/customers/credit_list_response.rbi +7 -1
  110. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +14 -2
  111. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +133 -21
  112. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +14 -2
  113. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +133 -21
  114. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +7 -1
  115. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +133 -21
  116. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +7 -1
  117. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +133 -21
  118. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +14 -2
  119. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +14 -2
  120. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +14 -2
  121. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +14 -2
  122. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +7 -1
  123. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +7 -1
  124. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +7 -1
  125. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +14 -2
  126. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +7 -1
  127. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +14 -2
  128. data/rbi/orb/models/dimensional_price_group.rbi +4 -1
  129. data/rbi/orb/models/dimensional_price_group_create_params.rbi +4 -1
  130. data/rbi/orb/models/dimensional_price_group_list_params.rbi +4 -1
  131. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +7 -1
  132. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +7 -1
  133. data/rbi/orb/models/dimensional_price_groups.rbi +4 -1
  134. data/rbi/orb/models/evaluate_price_group.rbi +2 -1
  135. data/rbi/orb/models/event_deprecate_params.rbi +4 -1
  136. data/rbi/orb/models/event_deprecate_response.rbi +4 -1
  137. data/rbi/orb/models/event_ingest_params.rbi +6 -2
  138. data/rbi/orb/models/event_ingest_response.rbi +18 -3
  139. data/rbi/orb/models/event_search_params.rbi +2 -1
  140. data/rbi/orb/models/event_search_response.rbi +11 -2
  141. data/rbi/orb/models/event_update_params.rbi +2 -1
  142. data/rbi/orb/models/event_update_response.rbi +4 -1
  143. data/rbi/orb/models/events/backfill_close_params.rbi +4 -1
  144. data/rbi/orb/models/events/backfill_close_response.rbi +7 -1
  145. data/rbi/orb/models/events/backfill_create_params.rbi +4 -1
  146. data/rbi/orb/models/events/backfill_create_response.rbi +7 -1
  147. data/rbi/orb/models/events/backfill_fetch_params.rbi +4 -1
  148. data/rbi/orb/models/events/backfill_fetch_response.rbi +7 -1
  149. data/rbi/orb/models/events/backfill_list_params.rbi +4 -1
  150. data/rbi/orb/models/events/backfill_list_response.rbi +7 -1
  151. data/rbi/orb/models/events/backfill_revert_params.rbi +4 -1
  152. data/rbi/orb/models/events/backfill_revert_response.rbi +7 -1
  153. data/rbi/orb/models/events/event_volumes.rbi +8 -2
  154. data/rbi/orb/models/events/volume_list_params.rbi +4 -1
  155. data/rbi/orb/models/invoice.rbi +156 -31
  156. data/rbi/orb/models/invoice_create_params.rbi +13 -3
  157. data/rbi/orb/models/invoice_fetch_params.rbi +2 -1
  158. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +4 -1
  159. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +212 -31
  160. data/rbi/orb/models/invoice_issue_params.rbi +2 -1
  161. data/rbi/orb/models/invoice_line_item_create_params.rbi +4 -1
  162. data/rbi/orb/models/invoice_line_item_create_response.rbi +119 -17
  163. data/rbi/orb/models/invoice_list_params.rbi +2 -1
  164. data/rbi/orb/models/invoice_mark_paid_params.rbi +4 -1
  165. data/rbi/orb/models/invoice_pay_params.rbi +2 -1
  166. data/rbi/orb/models/invoice_update_params.rbi +2 -1
  167. data/rbi/orb/models/invoice_void_params.rbi +2 -1
  168. data/rbi/orb/models/item.rbi +5 -2
  169. data/rbi/orb/models/item_create_params.rbi +2 -1
  170. data/rbi/orb/models/item_fetch_params.rbi +2 -1
  171. data/rbi/orb/models/item_list_params.rbi +2 -1
  172. data/rbi/orb/models/item_update_params.rbi +9 -2
  173. data/rbi/orb/models/metric_create_params.rbi +2 -1
  174. data/rbi/orb/models/metric_fetch_params.rbi +2 -1
  175. data/rbi/orb/models/metric_list_params.rbi +2 -1
  176. data/rbi/orb/models/metric_update_params.rbi +2 -1
  177. data/rbi/orb/models/pagination_metadata.rbi +2 -1
  178. data/rbi/orb/models/percentage_discount.rbi +2 -1
  179. data/rbi/orb/models/plan.rbi +50 -14
  180. data/rbi/orb/models/plan_create_params.rbi +604 -89
  181. data/rbi/orb/models/plan_fetch_params.rbi +2 -1
  182. data/rbi/orb/models/plan_list_params.rbi +2 -1
  183. data/rbi/orb/models/plan_update_params.rbi +2 -1
  184. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +4 -1
  185. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +7 -1
  186. data/rbi/orb/models/price.rbi +1624 -270
  187. data/rbi/orb/models/price_create_params.rbi +100 -18
  188. data/rbi/orb/models/price_evaluate_params.rbi +2 -1
  189. data/rbi/orb/models/price_evaluate_response.rbi +4 -1
  190. data/rbi/orb/models/price_fetch_params.rbi +2 -1
  191. data/rbi/orb/models/price_list_params.rbi +2 -1
  192. data/rbi/orb/models/price_update_params.rbi +2 -1
  193. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +7 -1
  194. data/rbi/orb/models/prices/external_price_id_update_params.rbi +7 -1
  195. data/rbi/orb/models/subscription.rbi +109 -19
  196. data/rbi/orb/models/subscription_cancel_params.rbi +4 -1
  197. data/rbi/orb/models/subscription_cancel_response.rbi +137 -20
  198. data/rbi/orb/models/subscription_change_apply_params.rbi +4 -1
  199. data/rbi/orb/models/subscription_change_apply_response.rbi +142 -21
  200. data/rbi/orb/models/subscription_change_cancel_params.rbi +4 -1
  201. data/rbi/orb/models/subscription_change_cancel_response.rbi +142 -21
  202. data/rbi/orb/models/subscription_change_retrieve_params.rbi +4 -1
  203. data/rbi/orb/models/subscription_change_retrieve_response.rbi +142 -21
  204. data/rbi/orb/models/subscription_create_params.rbi +1257 -198
  205. data/rbi/orb/models/subscription_create_response.rbi +137 -20
  206. data/rbi/orb/models/subscription_fetch_costs_params.rbi +4 -1
  207. data/rbi/orb/models/subscription_fetch_costs_response.rbi +21 -3
  208. data/rbi/orb/models/subscription_fetch_params.rbi +4 -1
  209. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +4 -1
  210. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +14 -2
  211. data/rbi/orb/models/subscription_fetch_usage_params.rbi +4 -1
  212. data/rbi/orb/models/subscription_list_params.rbi +4 -1
  213. data/rbi/orb/models/subscription_price_intervals_params.rbi +731 -115
  214. data/rbi/orb/models/subscription_price_intervals_response.rbi +140 -20
  215. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +1260 -198
  216. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +140 -20
  217. data/rbi/orb/models/subscription_trigger_phase_params.rbi +4 -1
  218. data/rbi/orb/models/subscription_trigger_phase_response.rbi +140 -20
  219. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +7 -1
  220. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +140 -20
  221. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +7 -1
  222. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +140 -20
  223. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +7 -1
  224. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +140 -20
  225. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +7 -1
  226. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +140 -20
  227. data/rbi/orb/models/subscription_update_params.rbi +4 -1
  228. data/rbi/orb/models/subscription_update_trial_params.rbi +4 -1
  229. data/rbi/orb/models/subscription_update_trial_response.rbi +140 -20
  230. data/rbi/orb/models/subscription_usage.rbi +63 -9
  231. data/rbi/orb/models/subscriptions.rbi +2 -1
  232. data/rbi/orb/models/top_level_ping_params.rbi +2 -1
  233. data/rbi/orb/models/top_level_ping_response.rbi +4 -1
  234. data/rbi/orb/models/trial_discount.rbi +2 -1
  235. data/rbi/orb/models/usage_discount.rbi +2 -1
  236. data/rbi/orb/request_options.rbi +1 -1
  237. data/sig/orb/internal/transport/base_client.rbs +16 -1
  238. data/sig/orb/internal/transport/pooled_net_requester.rbs +4 -0
  239. data/sig/orb/internal/type/base_model.rbs +11 -5
  240. data/sig/orb/internal/type/base_page.rbs +1 -1
  241. data/sig/orb/internal/type/converter.rbs +2 -0
  242. data/sig/orb/internal/type/enum.rbs +1 -0
  243. data/sig/orb/internal/type/union.rbs +1 -0
  244. data/sig/orb/internal/util.rbs +13 -0
  245. data/sig/orb/internal.rbs +2 -0
  246. metadata +2 -2
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionUnscheduleCancellationResponse < 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::SubscriptionUnscheduleCancellationResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(String) }
9
15
  attr_accessor :id
@@ -493,7 +499,13 @@ module Orb
493
499
  end
494
500
 
495
501
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
496
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
502
+ OrHash =
503
+ T.type_alias do
504
+ T.any(
505
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval,
506
+ Orb::Internal::AnyHash
507
+ )
508
+ end
497
509
 
498
510
  sig { returns(String) }
499
511
  attr_accessor :id
@@ -587,7 +599,13 @@ module Orb
587
599
  end
588
600
 
589
601
  class UsageDiscount < Orb::Internal::Type::BaseModel
590
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
602
+ OrHash =
603
+ T.type_alias do
604
+ T.any(
605
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::UsageDiscount,
606
+ Orb::Internal::AnyHash
607
+ )
608
+ end
591
609
 
592
610
  sig { returns(String) }
593
611
  attr_accessor :id
@@ -664,7 +682,13 @@ module Orb
664
682
  end
665
683
 
666
684
  class AmountDiscount < Orb::Internal::Type::BaseModel
667
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
685
+ OrHash =
686
+ T.type_alias do
687
+ T.any(
688
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::AmountDiscount,
689
+ Orb::Internal::AnyHash
690
+ )
691
+ end
668
692
 
669
693
  sig { returns(String) }
670
694
  attr_accessor :id
@@ -741,7 +765,13 @@ module Orb
741
765
  end
742
766
 
743
767
  class PercentageDiscount < Orb::Internal::Type::BaseModel
744
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
768
+ OrHash =
769
+ T.type_alias do
770
+ T.any(
771
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
772
+ Orb::Internal::AnyHash
773
+ )
774
+ end
745
775
 
746
776
  sig { returns(String) }
747
777
  attr_accessor :id
@@ -818,7 +848,13 @@ module Orb
818
848
  end
819
849
 
820
850
  class Minimum < Orb::Internal::Type::BaseModel
821
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
851
+ OrHash =
852
+ T.type_alias do
853
+ T.any(
854
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::Minimum,
855
+ Orb::Internal::AnyHash
856
+ )
857
+ end
822
858
 
823
859
  sig { returns(String) }
824
860
  attr_accessor :id
@@ -903,7 +939,13 @@ module Orb
903
939
  end
904
940
 
905
941
  class Maximum < Orb::Internal::Type::BaseModel
906
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
942
+ OrHash =
943
+ T.type_alias do
944
+ T.any(
945
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::Maximum,
946
+ Orb::Internal::AnyHash
947
+ )
948
+ end
907
949
 
908
950
  sig { returns(String) }
909
951
  attr_accessor :id
@@ -992,7 +1034,13 @@ module Orb
992
1034
  end
993
1035
 
994
1036
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
995
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1037
+ OrHash =
1038
+ T.type_alias do
1039
+ T.any(
1040
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration,
1041
+ Orb::Internal::AnyHash
1042
+ )
1043
+ end
996
1044
 
997
1045
  # The day of the month on which the billing cycle is anchored. If the maximum
998
1046
  # number of days in a month is greater than this value, the last day of the month
@@ -1061,7 +1109,13 @@ module Orb
1061
1109
  end
1062
1110
 
1063
1111
  class Amount < Orb::Internal::Type::BaseModel
1064
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1112
+ OrHash =
1113
+ T.type_alias do
1114
+ T.any(
1115
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Amount,
1116
+ Orb::Internal::AnyHash
1117
+ )
1118
+ end
1065
1119
 
1066
1120
  # Only available if discount_type is `amount`.
1067
1121
  sig { returns(String) }
@@ -1128,7 +1182,13 @@ module Orb
1128
1182
  end
1129
1183
 
1130
1184
  class Percentage < Orb::Internal::Type::BaseModel
1131
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1185
+ OrHash =
1186
+ T.type_alias do
1187
+ T.any(
1188
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Percentage,
1189
+ Orb::Internal::AnyHash
1190
+ )
1191
+ end
1132
1192
 
1133
1193
  # The price ids that this discount interval applies to.
1134
1194
  sig { returns(T::Array[String]) }
@@ -1197,7 +1257,13 @@ module Orb
1197
1257
  end
1198
1258
 
1199
1259
  class Usage < Orb::Internal::Type::BaseModel
1200
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1260
+ OrHash =
1261
+ T.type_alias do
1262
+ T.any(
1263
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::Usage,
1264
+ Orb::Internal::AnyHash
1265
+ )
1266
+ end
1201
1267
 
1202
1268
  # The price ids that this discount interval applies to.
1203
1269
  sig { returns(T::Array[String]) }
@@ -1277,7 +1343,13 @@ module Orb
1277
1343
  end
1278
1344
 
1279
1345
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1280
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1346
+ OrHash =
1347
+ T.type_alias do
1348
+ T.any(
1349
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule,
1350
+ Orb::Internal::AnyHash
1351
+ )
1352
+ end
1281
1353
 
1282
1354
  sig { returns(T.nilable(Time)) }
1283
1355
  attr_accessor :end_date
@@ -1317,7 +1389,13 @@ module Orb
1317
1389
  end
1318
1390
 
1319
1391
  class MaximumInterval < Orb::Internal::Type::BaseModel
1320
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1392
+ OrHash =
1393
+ T.type_alias do
1394
+ T.any(
1395
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval,
1396
+ Orb::Internal::AnyHash
1397
+ )
1398
+ end
1321
1399
 
1322
1400
  # The price ids that this maximum interval applies to.
1323
1401
  sig { returns(T::Array[String]) }
@@ -1380,7 +1458,13 @@ module Orb
1380
1458
  end
1381
1459
 
1382
1460
  class MinimumInterval < Orb::Internal::Type::BaseModel
1383
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1461
+ OrHash =
1462
+ T.type_alias do
1463
+ T.any(
1464
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval,
1465
+ Orb::Internal::AnyHash
1466
+ )
1467
+ end
1384
1468
 
1385
1469
  # The price ids that this minimum interval applies to.
1386
1470
  sig { returns(T::Array[String]) }
@@ -1443,7 +1527,13 @@ module Orb
1443
1527
  end
1444
1528
 
1445
1529
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1446
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1530
+ OrHash =
1531
+ T.type_alias do
1532
+ T.any(
1533
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::PendingSubscriptionChange,
1534
+ Orb::Internal::AnyHash
1535
+ )
1536
+ end
1447
1537
 
1448
1538
  sig { returns(String) }
1449
1539
  attr_accessor :id
@@ -1459,7 +1549,13 @@ module Orb
1459
1549
  end
1460
1550
 
1461
1551
  class PriceInterval < Orb::Internal::Type::BaseModel
1462
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1552
+ OrHash =
1553
+ T.type_alias do
1554
+ T.any(
1555
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval,
1556
+ Orb::Internal::AnyHash
1557
+ )
1558
+ end
1463
1559
 
1464
1560
  sig { returns(String) }
1465
1561
  attr_accessor :id
@@ -1705,7 +1801,13 @@ module Orb
1705
1801
  end
1706
1802
 
1707
1803
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1708
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1804
+ OrHash =
1805
+ T.type_alias do
1806
+ T.any(
1807
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition,
1808
+ Orb::Internal::AnyHash
1809
+ )
1810
+ end
1709
1811
 
1710
1812
  sig { returns(Time) }
1711
1813
  attr_accessor :effective_date
@@ -1737,7 +1839,13 @@ module Orb
1737
1839
  end
1738
1840
 
1739
1841
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1740
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1842
+ OrHash =
1843
+ T.type_alias do
1844
+ T.any(
1845
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon,
1846
+ Orb::Internal::AnyHash
1847
+ )
1848
+ end
1741
1849
 
1742
1850
  sig { returns(String) }
1743
1851
  attr_accessor :coupon_id
@@ -1807,7 +1915,13 @@ module Orb
1807
1915
  end
1808
1916
 
1809
1917
  class TrialInfo < Orb::Internal::Type::BaseModel
1810
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1918
+ OrHash =
1919
+ T.type_alias do
1920
+ T.any(
1921
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo,
1922
+ Orb::Internal::AnyHash
1923
+ )
1924
+ end
1811
1925
 
1812
1926
  sig { returns(T.nilable(Time)) }
1813
1927
  attr_accessor :end_date
@@ -1822,7 +1936,13 @@ module Orb
1822
1936
  end
1823
1937
 
1824
1938
  class ChangedResources < Orb::Internal::Type::BaseModel
1825
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1939
+ OrHash =
1940
+ T.type_alias do
1941
+ T.any(
1942
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::ChangedResources,
1943
+ Orb::Internal::AnyHash
1944
+ )
1945
+ end
1826
1946
 
1827
1947
  # The credit notes that were created as part of this operation.
1828
1948
  sig { returns(T::Array[Orb::CreditNote]) }
@@ -6,7 +6,13 @@ 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(
12
+ Orb::SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
13
+ Orb::Internal::AnyHash
14
+ )
15
+ end
10
16
 
11
17
  # Price for which the updates should be cleared. Must be a fixed fee.
12
18
  sig { returns(String) }
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse < 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::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(String) }
9
15
  attr_accessor :id
@@ -493,7 +499,13 @@ module Orb
493
499
  end
494
500
 
495
501
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
496
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
502
+ OrHash =
503
+ T.type_alias do
504
+ T.any(
505
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval,
506
+ Orb::Internal::AnyHash
507
+ )
508
+ end
497
509
 
498
510
  sig { returns(String) }
499
511
  attr_accessor :id
@@ -587,7 +599,13 @@ module Orb
587
599
  end
588
600
 
589
601
  class UsageDiscount < Orb::Internal::Type::BaseModel
590
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
602
+ OrHash =
603
+ T.type_alias do
604
+ T.any(
605
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::UsageDiscount,
606
+ Orb::Internal::AnyHash
607
+ )
608
+ end
591
609
 
592
610
  sig { returns(String) }
593
611
  attr_accessor :id
@@ -664,7 +682,13 @@ module Orb
664
682
  end
665
683
 
666
684
  class AmountDiscount < Orb::Internal::Type::BaseModel
667
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
685
+ OrHash =
686
+ T.type_alias do
687
+ T.any(
688
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::AmountDiscount,
689
+ Orb::Internal::AnyHash
690
+ )
691
+ end
668
692
 
669
693
  sig { returns(String) }
670
694
  attr_accessor :id
@@ -741,7 +765,13 @@ module Orb
741
765
  end
742
766
 
743
767
  class PercentageDiscount < Orb::Internal::Type::BaseModel
744
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
768
+ OrHash =
769
+ T.type_alias do
770
+ T.any(
771
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
772
+ Orb::Internal::AnyHash
773
+ )
774
+ end
745
775
 
746
776
  sig { returns(String) }
747
777
  attr_accessor :id
@@ -818,7 +848,13 @@ module Orb
818
848
  end
819
849
 
820
850
  class Minimum < Orb::Internal::Type::BaseModel
821
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
851
+ OrHash =
852
+ T.type_alias do
853
+ T.any(
854
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::Minimum,
855
+ Orb::Internal::AnyHash
856
+ )
857
+ end
822
858
 
823
859
  sig { returns(String) }
824
860
  attr_accessor :id
@@ -903,7 +939,13 @@ module Orb
903
939
  end
904
940
 
905
941
  class Maximum < Orb::Internal::Type::BaseModel
906
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
942
+ OrHash =
943
+ T.type_alias do
944
+ T.any(
945
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::Maximum,
946
+ Orb::Internal::AnyHash
947
+ )
948
+ end
907
949
 
908
950
  sig { returns(String) }
909
951
  attr_accessor :id
@@ -992,7 +1034,13 @@ module Orb
992
1034
  end
993
1035
 
994
1036
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
995
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1037
+ OrHash =
1038
+ T.type_alias do
1039
+ T.any(
1040
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration,
1041
+ Orb::Internal::AnyHash
1042
+ )
1043
+ end
996
1044
 
997
1045
  # The day of the month on which the billing cycle is anchored. If the maximum
998
1046
  # number of days in a month is greater than this value, the last day of the month
@@ -1061,7 +1109,13 @@ module Orb
1061
1109
  end
1062
1110
 
1063
1111
  class Amount < Orb::Internal::Type::BaseModel
1064
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1112
+ OrHash =
1113
+ T.type_alias do
1114
+ T.any(
1115
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Amount,
1116
+ Orb::Internal::AnyHash
1117
+ )
1118
+ end
1065
1119
 
1066
1120
  # Only available if discount_type is `amount`.
1067
1121
  sig { returns(String) }
@@ -1128,7 +1182,13 @@ module Orb
1128
1182
  end
1129
1183
 
1130
1184
  class Percentage < Orb::Internal::Type::BaseModel
1131
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1185
+ OrHash =
1186
+ T.type_alias do
1187
+ T.any(
1188
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Percentage,
1189
+ Orb::Internal::AnyHash
1190
+ )
1191
+ end
1132
1192
 
1133
1193
  # The price ids that this discount interval applies to.
1134
1194
  sig { returns(T::Array[String]) }
@@ -1197,7 +1257,13 @@ module Orb
1197
1257
  end
1198
1258
 
1199
1259
  class Usage < Orb::Internal::Type::BaseModel
1200
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1260
+ OrHash =
1261
+ T.type_alias do
1262
+ T.any(
1263
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::Usage,
1264
+ Orb::Internal::AnyHash
1265
+ )
1266
+ end
1201
1267
 
1202
1268
  # The price ids that this discount interval applies to.
1203
1269
  sig { returns(T::Array[String]) }
@@ -1277,7 +1343,13 @@ module Orb
1277
1343
  end
1278
1344
 
1279
1345
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1280
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1346
+ OrHash =
1347
+ T.type_alias do
1348
+ T.any(
1349
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule,
1350
+ Orb::Internal::AnyHash
1351
+ )
1352
+ end
1281
1353
 
1282
1354
  sig { returns(T.nilable(Time)) }
1283
1355
  attr_accessor :end_date
@@ -1317,7 +1389,13 @@ module Orb
1317
1389
  end
1318
1390
 
1319
1391
  class MaximumInterval < Orb::Internal::Type::BaseModel
1320
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1392
+ OrHash =
1393
+ T.type_alias do
1394
+ T.any(
1395
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval,
1396
+ Orb::Internal::AnyHash
1397
+ )
1398
+ end
1321
1399
 
1322
1400
  # The price ids that this maximum interval applies to.
1323
1401
  sig { returns(T::Array[String]) }
@@ -1380,7 +1458,13 @@ module Orb
1380
1458
  end
1381
1459
 
1382
1460
  class MinimumInterval < Orb::Internal::Type::BaseModel
1383
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1461
+ OrHash =
1462
+ T.type_alias do
1463
+ T.any(
1464
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval,
1465
+ Orb::Internal::AnyHash
1466
+ )
1467
+ end
1384
1468
 
1385
1469
  # The price ids that this minimum interval applies to.
1386
1470
  sig { returns(T::Array[String]) }
@@ -1443,7 +1527,13 @@ module Orb
1443
1527
  end
1444
1528
 
1445
1529
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1446
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1530
+ OrHash =
1531
+ T.type_alias do
1532
+ T.any(
1533
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PendingSubscriptionChange,
1534
+ Orb::Internal::AnyHash
1535
+ )
1536
+ end
1447
1537
 
1448
1538
  sig { returns(String) }
1449
1539
  attr_accessor :id
@@ -1459,7 +1549,13 @@ module Orb
1459
1549
  end
1460
1550
 
1461
1551
  class PriceInterval < Orb::Internal::Type::BaseModel
1462
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1552
+ OrHash =
1553
+ T.type_alias do
1554
+ T.any(
1555
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval,
1556
+ Orb::Internal::AnyHash
1557
+ )
1558
+ end
1463
1559
 
1464
1560
  sig { returns(String) }
1465
1561
  attr_accessor :id
@@ -1705,7 +1801,13 @@ module Orb
1705
1801
  end
1706
1802
 
1707
1803
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1708
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1804
+ OrHash =
1805
+ T.type_alias do
1806
+ T.any(
1807
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition,
1808
+ Orb::Internal::AnyHash
1809
+ )
1810
+ end
1709
1811
 
1710
1812
  sig { returns(Time) }
1711
1813
  attr_accessor :effective_date
@@ -1737,7 +1839,13 @@ module Orb
1737
1839
  end
1738
1840
 
1739
1841
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1740
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1842
+ OrHash =
1843
+ T.type_alias do
1844
+ T.any(
1845
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon,
1846
+ Orb::Internal::AnyHash
1847
+ )
1848
+ end
1741
1849
 
1742
1850
  sig { returns(String) }
1743
1851
  attr_accessor :coupon_id
@@ -1807,7 +1915,13 @@ module Orb
1807
1915
  end
1808
1916
 
1809
1917
  class TrialInfo < Orb::Internal::Type::BaseModel
1810
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1918
+ OrHash =
1919
+ T.type_alias do
1920
+ T.any(
1921
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo,
1922
+ Orb::Internal::AnyHash
1923
+ )
1924
+ end
1811
1925
 
1812
1926
  sig { returns(T.nilable(Time)) }
1813
1927
  attr_accessor :end_date
@@ -1822,7 +1936,13 @@ module Orb
1822
1936
  end
1823
1937
 
1824
1938
  class ChangedResources < Orb::Internal::Type::BaseModel
1825
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1939
+ OrHash =
1940
+ T.type_alias do
1941
+ T.any(
1942
+ Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::ChangedResources,
1943
+ Orb::Internal::AnyHash
1944
+ )
1945
+ end
1826
1946
 
1827
1947
  # The credit notes that were created as part of this operation.
1828
1948
  sig { returns(T::Array[Orb::CreditNote]) }
@@ -6,7 +6,13 @@ 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(
12
+ Orb::SubscriptionUnschedulePendingPlanChangesParams,
13
+ Orb::Internal::AnyHash
14
+ )
15
+ end
10
16
 
11
17
  sig do
12
18
  params(request_options: Orb::RequestOptions::OrHash).returns(