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 SubscriptionSchedulePlanChangeResponse < 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::SubscriptionSchedulePlanChangeResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(String) }
9
15
  attr_accessor :id
@@ -491,7 +497,13 @@ module Orb
491
497
  end
492
498
 
493
499
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
494
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
500
+ OrHash =
501
+ T.type_alias do
502
+ T.any(
503
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval,
504
+ Orb::Internal::AnyHash
505
+ )
506
+ end
495
507
 
496
508
  sig { returns(String) }
497
509
  attr_accessor :id
@@ -585,7 +597,13 @@ module Orb
585
597
  end
586
598
 
587
599
  class UsageDiscount < Orb::Internal::Type::BaseModel
588
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
600
+ OrHash =
601
+ T.type_alias do
602
+ T.any(
603
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::UsageDiscount,
604
+ Orb::Internal::AnyHash
605
+ )
606
+ end
589
607
 
590
608
  sig { returns(String) }
591
609
  attr_accessor :id
@@ -662,7 +680,13 @@ module Orb
662
680
  end
663
681
 
664
682
  class AmountDiscount < Orb::Internal::Type::BaseModel
665
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
683
+ OrHash =
684
+ T.type_alias do
685
+ T.any(
686
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::AmountDiscount,
687
+ Orb::Internal::AnyHash
688
+ )
689
+ end
666
690
 
667
691
  sig { returns(String) }
668
692
  attr_accessor :id
@@ -739,7 +763,13 @@ module Orb
739
763
  end
740
764
 
741
765
  class PercentageDiscount < Orb::Internal::Type::BaseModel
742
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
766
+ OrHash =
767
+ T.type_alias do
768
+ T.any(
769
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
770
+ Orb::Internal::AnyHash
771
+ )
772
+ end
743
773
 
744
774
  sig { returns(String) }
745
775
  attr_accessor :id
@@ -816,7 +846,13 @@ module Orb
816
846
  end
817
847
 
818
848
  class Minimum < Orb::Internal::Type::BaseModel
819
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
849
+ OrHash =
850
+ T.type_alias do
851
+ T.any(
852
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::Minimum,
853
+ Orb::Internal::AnyHash
854
+ )
855
+ end
820
856
 
821
857
  sig { returns(String) }
822
858
  attr_accessor :id
@@ -901,7 +937,13 @@ module Orb
901
937
  end
902
938
 
903
939
  class Maximum < Orb::Internal::Type::BaseModel
904
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
940
+ OrHash =
941
+ T.type_alias do
942
+ T.any(
943
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::Maximum,
944
+ Orb::Internal::AnyHash
945
+ )
946
+ end
905
947
 
906
948
  sig { returns(String) }
907
949
  attr_accessor :id
@@ -990,7 +1032,13 @@ module Orb
990
1032
  end
991
1033
 
992
1034
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
993
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1035
+ OrHash =
1036
+ T.type_alias do
1037
+ T.any(
1038
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration,
1039
+ Orb::Internal::AnyHash
1040
+ )
1041
+ end
994
1042
 
995
1043
  # The day of the month on which the billing cycle is anchored. If the maximum
996
1044
  # number of days in a month is greater than this value, the last day of the month
@@ -1059,7 +1107,13 @@ module Orb
1059
1107
  end
1060
1108
 
1061
1109
  class Amount < Orb::Internal::Type::BaseModel
1062
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1110
+ OrHash =
1111
+ T.type_alias do
1112
+ T.any(
1113
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Amount,
1114
+ Orb::Internal::AnyHash
1115
+ )
1116
+ end
1063
1117
 
1064
1118
  # Only available if discount_type is `amount`.
1065
1119
  sig { returns(String) }
@@ -1126,7 +1180,13 @@ module Orb
1126
1180
  end
1127
1181
 
1128
1182
  class Percentage < Orb::Internal::Type::BaseModel
1129
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1183
+ OrHash =
1184
+ T.type_alias do
1185
+ T.any(
1186
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Percentage,
1187
+ Orb::Internal::AnyHash
1188
+ )
1189
+ end
1130
1190
 
1131
1191
  # The price ids that this discount interval applies to.
1132
1192
  sig { returns(T::Array[String]) }
@@ -1195,7 +1255,13 @@ module Orb
1195
1255
  end
1196
1256
 
1197
1257
  class Usage < Orb::Internal::Type::BaseModel
1198
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1258
+ OrHash =
1259
+ T.type_alias do
1260
+ T.any(
1261
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Usage,
1262
+ Orb::Internal::AnyHash
1263
+ )
1264
+ end
1199
1265
 
1200
1266
  # The price ids that this discount interval applies to.
1201
1267
  sig { returns(T::Array[String]) }
@@ -1275,7 +1341,13 @@ module Orb
1275
1341
  end
1276
1342
 
1277
1343
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1278
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1344
+ OrHash =
1345
+ T.type_alias do
1346
+ T.any(
1347
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule,
1348
+ Orb::Internal::AnyHash
1349
+ )
1350
+ end
1279
1351
 
1280
1352
  sig { returns(T.nilable(Time)) }
1281
1353
  attr_accessor :end_date
@@ -1315,7 +1387,13 @@ module Orb
1315
1387
  end
1316
1388
 
1317
1389
  class MaximumInterval < Orb::Internal::Type::BaseModel
1318
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1390
+ OrHash =
1391
+ T.type_alias do
1392
+ T.any(
1393
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval,
1394
+ Orb::Internal::AnyHash
1395
+ )
1396
+ end
1319
1397
 
1320
1398
  # The price ids that this maximum interval applies to.
1321
1399
  sig { returns(T::Array[String]) }
@@ -1378,7 +1456,13 @@ module Orb
1378
1456
  end
1379
1457
 
1380
1458
  class MinimumInterval < Orb::Internal::Type::BaseModel
1381
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1459
+ OrHash =
1460
+ T.type_alias do
1461
+ T.any(
1462
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval,
1463
+ Orb::Internal::AnyHash
1464
+ )
1465
+ end
1382
1466
 
1383
1467
  # The price ids that this minimum interval applies to.
1384
1468
  sig { returns(T::Array[String]) }
@@ -1441,7 +1525,13 @@ module Orb
1441
1525
  end
1442
1526
 
1443
1527
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1444
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1528
+ OrHash =
1529
+ T.type_alias do
1530
+ T.any(
1531
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::PendingSubscriptionChange,
1532
+ Orb::Internal::AnyHash
1533
+ )
1534
+ end
1445
1535
 
1446
1536
  sig { returns(String) }
1447
1537
  attr_accessor :id
@@ -1457,7 +1547,13 @@ module Orb
1457
1547
  end
1458
1548
 
1459
1549
  class PriceInterval < Orb::Internal::Type::BaseModel
1460
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1550
+ OrHash =
1551
+ T.type_alias do
1552
+ T.any(
1553
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval,
1554
+ Orb::Internal::AnyHash
1555
+ )
1556
+ end
1461
1557
 
1462
1558
  sig { returns(String) }
1463
1559
  attr_accessor :id
@@ -1703,7 +1799,13 @@ module Orb
1703
1799
  end
1704
1800
 
1705
1801
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1706
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1802
+ OrHash =
1803
+ T.type_alias do
1804
+ T.any(
1805
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition,
1806
+ Orb::Internal::AnyHash
1807
+ )
1808
+ end
1707
1809
 
1708
1810
  sig { returns(Time) }
1709
1811
  attr_accessor :effective_date
@@ -1735,7 +1837,13 @@ module Orb
1735
1837
  end
1736
1838
 
1737
1839
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1738
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1840
+ OrHash =
1841
+ T.type_alias do
1842
+ T.any(
1843
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon,
1844
+ Orb::Internal::AnyHash
1845
+ )
1846
+ end
1739
1847
 
1740
1848
  sig { returns(String) }
1741
1849
  attr_accessor :coupon_id
@@ -1805,7 +1913,13 @@ module Orb
1805
1913
  end
1806
1914
 
1807
1915
  class TrialInfo < Orb::Internal::Type::BaseModel
1808
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1916
+ OrHash =
1917
+ T.type_alias do
1918
+ T.any(
1919
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo,
1920
+ Orb::Internal::AnyHash
1921
+ )
1922
+ end
1809
1923
 
1810
1924
  sig { returns(T.nilable(Time)) }
1811
1925
  attr_accessor :end_date
@@ -1820,7 +1934,13 @@ module Orb
1820
1934
  end
1821
1935
 
1822
1936
  class ChangedResources < Orb::Internal::Type::BaseModel
1823
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1937
+ OrHash =
1938
+ T.type_alias do
1939
+ T.any(
1940
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::ChangedResources,
1941
+ Orb::Internal::AnyHash
1942
+ )
1943
+ end
1824
1944
 
1825
1945
  # The credit notes that were created as part of this operation.
1826
1946
  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::SubscriptionTriggerPhaseParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  # If false, this request will fail if it would void an issued invoice or create a
12
15
  # credit note. Consider using this as a safety mechanism if you do not expect
@@ -3,7 +3,13 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionTriggerPhaseResponse < 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::SubscriptionTriggerPhaseResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
7
13
 
8
14
  sig { returns(String) }
9
15
  attr_accessor :id
@@ -487,7 +493,13 @@ module Orb
487
493
  end
488
494
 
489
495
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
490
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
496
+ OrHash =
497
+ T.type_alias do
498
+ T.any(
499
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval,
500
+ Orb::Internal::AnyHash
501
+ )
502
+ end
491
503
 
492
504
  sig { returns(String) }
493
505
  attr_accessor :id
@@ -581,7 +593,13 @@ module Orb
581
593
  end
582
594
 
583
595
  class UsageDiscount < Orb::Internal::Type::BaseModel
584
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
596
+ OrHash =
597
+ T.type_alias do
598
+ T.any(
599
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount,
600
+ Orb::Internal::AnyHash
601
+ )
602
+ end
585
603
 
586
604
  sig { returns(String) }
587
605
  attr_accessor :id
@@ -658,7 +676,13 @@ module Orb
658
676
  end
659
677
 
660
678
  class AmountDiscount < Orb::Internal::Type::BaseModel
661
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
679
+ OrHash =
680
+ T.type_alias do
681
+ T.any(
682
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount,
683
+ Orb::Internal::AnyHash
684
+ )
685
+ end
662
686
 
663
687
  sig { returns(String) }
664
688
  attr_accessor :id
@@ -735,7 +759,13 @@ module Orb
735
759
  end
736
760
 
737
761
  class PercentageDiscount < Orb::Internal::Type::BaseModel
738
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
762
+ OrHash =
763
+ T.type_alias do
764
+ T.any(
765
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
766
+ Orb::Internal::AnyHash
767
+ )
768
+ end
739
769
 
740
770
  sig { returns(String) }
741
771
  attr_accessor :id
@@ -812,7 +842,13 @@ module Orb
812
842
  end
813
843
 
814
844
  class Minimum < Orb::Internal::Type::BaseModel
815
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
845
+ OrHash =
846
+ T.type_alias do
847
+ T.any(
848
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum,
849
+ Orb::Internal::AnyHash
850
+ )
851
+ end
816
852
 
817
853
  sig { returns(String) }
818
854
  attr_accessor :id
@@ -897,7 +933,13 @@ module Orb
897
933
  end
898
934
 
899
935
  class Maximum < Orb::Internal::Type::BaseModel
900
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
936
+ OrHash =
937
+ T.type_alias do
938
+ T.any(
939
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum,
940
+ Orb::Internal::AnyHash
941
+ )
942
+ end
901
943
 
902
944
  sig { returns(String) }
903
945
  attr_accessor :id
@@ -986,7 +1028,13 @@ module Orb
986
1028
  end
987
1029
 
988
1030
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
989
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1031
+ OrHash =
1032
+ T.type_alias do
1033
+ T.any(
1034
+ Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration,
1035
+ Orb::Internal::AnyHash
1036
+ )
1037
+ end
990
1038
 
991
1039
  # The day of the month on which the billing cycle is anchored. If the maximum
992
1040
  # number of days in a month is greater than this value, the last day of the month
@@ -1055,7 +1103,13 @@ module Orb
1055
1103
  end
1056
1104
 
1057
1105
  class Amount < Orb::Internal::Type::BaseModel
1058
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1106
+ OrHash =
1107
+ T.type_alias do
1108
+ T.any(
1109
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount,
1110
+ Orb::Internal::AnyHash
1111
+ )
1112
+ end
1059
1113
 
1060
1114
  # Only available if discount_type is `amount`.
1061
1115
  sig { returns(String) }
@@ -1122,7 +1176,13 @@ module Orb
1122
1176
  end
1123
1177
 
1124
1178
  class Percentage < Orb::Internal::Type::BaseModel
1125
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1179
+ OrHash =
1180
+ T.type_alias do
1181
+ T.any(
1182
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage,
1183
+ Orb::Internal::AnyHash
1184
+ )
1185
+ end
1126
1186
 
1127
1187
  # The price ids that this discount interval applies to.
1128
1188
  sig { returns(T::Array[String]) }
@@ -1191,7 +1251,13 @@ module Orb
1191
1251
  end
1192
1252
 
1193
1253
  class Usage < Orb::Internal::Type::BaseModel
1194
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1254
+ OrHash =
1255
+ T.type_alias do
1256
+ T.any(
1257
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage,
1258
+ Orb::Internal::AnyHash
1259
+ )
1260
+ end
1195
1261
 
1196
1262
  # The price ids that this discount interval applies to.
1197
1263
  sig { returns(T::Array[String]) }
@@ -1271,7 +1337,13 @@ module Orb
1271
1337
  end
1272
1338
 
1273
1339
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1274
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1340
+ OrHash =
1341
+ T.type_alias do
1342
+ T.any(
1343
+ Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule,
1344
+ Orb::Internal::AnyHash
1345
+ )
1346
+ end
1275
1347
 
1276
1348
  sig { returns(T.nilable(Time)) }
1277
1349
  attr_accessor :end_date
@@ -1311,7 +1383,13 @@ module Orb
1311
1383
  end
1312
1384
 
1313
1385
  class MaximumInterval < Orb::Internal::Type::BaseModel
1314
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1386
+ OrHash =
1387
+ T.type_alias do
1388
+ T.any(
1389
+ Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval,
1390
+ Orb::Internal::AnyHash
1391
+ )
1392
+ end
1315
1393
 
1316
1394
  # The price ids that this maximum interval applies to.
1317
1395
  sig { returns(T::Array[String]) }
@@ -1374,7 +1452,13 @@ module Orb
1374
1452
  end
1375
1453
 
1376
1454
  class MinimumInterval < Orb::Internal::Type::BaseModel
1377
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1455
+ OrHash =
1456
+ T.type_alias do
1457
+ T.any(
1458
+ Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval,
1459
+ Orb::Internal::AnyHash
1460
+ )
1461
+ end
1378
1462
 
1379
1463
  # The price ids that this minimum interval applies to.
1380
1464
  sig { returns(T::Array[String]) }
@@ -1437,7 +1521,13 @@ module Orb
1437
1521
  end
1438
1522
 
1439
1523
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1440
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1524
+ OrHash =
1525
+ T.type_alias do
1526
+ T.any(
1527
+ Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange,
1528
+ Orb::Internal::AnyHash
1529
+ )
1530
+ end
1441
1531
 
1442
1532
  sig { returns(String) }
1443
1533
  attr_accessor :id
@@ -1453,7 +1543,13 @@ module Orb
1453
1543
  end
1454
1544
 
1455
1545
  class PriceInterval < Orb::Internal::Type::BaseModel
1456
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1546
+ OrHash =
1547
+ T.type_alias do
1548
+ T.any(
1549
+ Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval,
1550
+ Orb::Internal::AnyHash
1551
+ )
1552
+ end
1457
1553
 
1458
1554
  sig { returns(String) }
1459
1555
  attr_accessor :id
@@ -1699,7 +1795,13 @@ module Orb
1699
1795
  end
1700
1796
 
1701
1797
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1702
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1798
+ OrHash =
1799
+ T.type_alias do
1800
+ T.any(
1801
+ Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition,
1802
+ Orb::Internal::AnyHash
1803
+ )
1804
+ end
1703
1805
 
1704
1806
  sig { returns(Time) }
1705
1807
  attr_accessor :effective_date
@@ -1731,7 +1833,13 @@ module Orb
1731
1833
  end
1732
1834
 
1733
1835
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1734
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1836
+ OrHash =
1837
+ T.type_alias do
1838
+ T.any(
1839
+ Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon,
1840
+ Orb::Internal::AnyHash
1841
+ )
1842
+ end
1735
1843
 
1736
1844
  sig { returns(String) }
1737
1845
  attr_accessor :coupon_id
@@ -1798,7 +1906,13 @@ module Orb
1798
1906
  end
1799
1907
 
1800
1908
  class TrialInfo < Orb::Internal::Type::BaseModel
1801
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1909
+ OrHash =
1910
+ T.type_alias do
1911
+ T.any(
1912
+ Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo,
1913
+ Orb::Internal::AnyHash
1914
+ )
1915
+ end
1802
1916
 
1803
1917
  sig { returns(T.nilable(Time)) }
1804
1918
  attr_accessor :end_date
@@ -1813,7 +1927,13 @@ module Orb
1813
1927
  end
1814
1928
 
1815
1929
  class ChangedResources < Orb::Internal::Type::BaseModel
1816
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1930
+ OrHash =
1931
+ T.type_alias do
1932
+ T.any(
1933
+ Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources,
1934
+ Orb::Internal::AnyHash
1935
+ )
1936
+ end
1817
1937
 
1818
1938
  # The credit notes that were created as part of this operation.
1819
1939
  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::SubscriptionUnscheduleCancellationParams,
13
+ Orb::Internal::AnyHash
14
+ )
15
+ end
10
16
 
11
17
  sig do
12
18
  params(request_options: Orb::RequestOptions::OrHash).returns(