orb-billing 0.3.1 → 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 (592) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +3 -3
  4. data/lib/orb/errors.rb +1 -1
  5. data/lib/orb/file_part.rb +2 -2
  6. data/lib/orb/internal/transport/base_client.rb +74 -5
  7. data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
  8. data/lib/orb/internal/type/array_of.rb +1 -1
  9. data/lib/orb/internal/type/base_model.rb +62 -30
  10. data/lib/orb/internal/type/converter.rb +18 -0
  11. data/lib/orb/internal/type/enum.rb +4 -3
  12. data/lib/orb/internal/type/hash_of.rb +1 -1
  13. data/lib/orb/internal/type/request_parameters.rb +4 -4
  14. data/lib/orb/internal/type/union.rb +5 -4
  15. data/lib/orb/internal/util.rb +57 -1
  16. data/lib/orb/internal.rb +6 -0
  17. data/lib/orb/models/alert.rb +29 -32
  18. data/lib/orb/models/alert_create_for_customer_params.rb +7 -8
  19. data/lib/orb/models/alert_create_for_external_customer_params.rb +7 -8
  20. data/lib/orb/models/alert_create_for_subscription_params.rb +7 -8
  21. data/lib/orb/models/alert_list_params.rb +0 -1
  22. data/lib/orb/models/alert_update_params.rb +4 -5
  23. data/lib/orb/models/amount_discount.rb +6 -7
  24. data/lib/orb/models/billable_metric.rb +9 -11
  25. data/lib/orb/models/coupon.rb +13 -12
  26. data/lib/orb/models/coupon_create_params.rb +12 -8
  27. data/lib/orb/models/coupon_list_params.rb +0 -2
  28. data/lib/orb/models/coupons/subscription_list_params.rb +0 -1
  29. data/lib/orb/models/credit_note.rb +48 -46
  30. data/lib/orb/models/credit_note_create_params.rb +6 -6
  31. data/lib/orb/models/credit_note_list_params.rb +0 -1
  32. data/lib/orb/models/customer.rb +54 -61
  33. data/lib/orb/models/customer_create_params.rb +50 -53
  34. data/lib/orb/models/customer_list_params.rb +0 -1
  35. data/lib/orb/models/customer_update_by_external_id_params.rb +50 -53
  36. data/lib/orb/models/customer_update_params.rb +50 -51
  37. data/lib/orb/models/customers/balance_transaction_create_params.rb +3 -3
  38. data/lib/orb/models/customers/balance_transaction_create_response.rb +0 -2
  39. data/lib/orb/models/customers/balance_transaction_list_params.rb +0 -1
  40. data/lib/orb/models/customers/balance_transaction_list_response.rb +0 -2
  41. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +3 -4
  42. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -3
  43. data/lib/orb/models/customers/cost_list_params.rb +3 -4
  44. data/lib/orb/models/customers/cost_list_response.rb +3 -3
  45. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +0 -2
  46. data/lib/orb/models/customers/credit_list_params.rb +0 -2
  47. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +12 -21
  48. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -7
  49. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +11 -22
  50. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -7
  51. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +6 -7
  52. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -7
  53. data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -9
  54. data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -7
  55. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -15
  56. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +0 -6
  57. data/lib/orb/models/customers/credits/top_up_create_params.rb +7 -15
  58. data/lib/orb/models/customers/credits/top_up_create_response.rb +0 -6
  59. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +0 -1
  60. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +0 -6
  61. data/lib/orb/models/customers/credits/top_up_list_params.rb +0 -1
  62. data/lib/orb/models/customers/credits/top_up_list_response.rb +0 -6
  63. data/lib/orb/models/dimensional_price_group.rb +1 -3
  64. data/lib/orb/models/dimensional_price_group_create_params.rb +0 -1
  65. data/lib/orb/models/dimensional_price_group_list_params.rb +0 -1
  66. data/lib/orb/models/dimensional_price_groups.rb +6 -6
  67. data/lib/orb/models/discount.rb +11 -5
  68. data/lib/orb/models/evaluate_price_group.rb +5 -1
  69. data/lib/orb/models/event_ingest_params.rb +4 -9
  70. data/lib/orb/models/event_ingest_response.rb +0 -3
  71. data/lib/orb/models/event_search_params.rb +0 -3
  72. data/lib/orb/models/event_search_response.rb +0 -4
  73. data/lib/orb/models/event_update_params.rb +0 -3
  74. data/lib/orb/models/events/backfill_close_response.rb +0 -4
  75. data/lib/orb/models/events/backfill_create_params.rb +0 -7
  76. data/lib/orb/models/events/backfill_create_response.rb +0 -4
  77. data/lib/orb/models/events/backfill_fetch_response.rb +0 -4
  78. data/lib/orb/models/events/backfill_list_params.rb +0 -1
  79. data/lib/orb/models/events/backfill_list_response.rb +0 -4
  80. data/lib/orb/models/events/backfill_revert_response.rb +0 -4
  81. data/lib/orb/models/events/event_volumes.rb +3 -3
  82. data/lib/orb/models/events/volume_list_params.rb +0 -3
  83. data/lib/orb/models/invoice.rb +179 -202
  84. data/lib/orb/models/invoice_create_params.rb +14 -21
  85. data/lib/orb/models/invoice_fetch_upcoming_response.rb +31 -54
  86. data/lib/orb/models/invoice_issue_params.rb +0 -1
  87. data/lib/orb/models/invoice_level_discount.rb +8 -4
  88. data/lib/orb/models/invoice_line_item_create_params.rb +0 -1
  89. data/lib/orb/models/invoice_line_item_create_response.rb +28 -26
  90. data/lib/orb/models/invoice_list_params.rb +6 -10
  91. data/lib/orb/models/invoice_update_params.rb +0 -1
  92. data/lib/orb/models/item.rb +7 -8
  93. data/lib/orb/models/item_list_params.rb +0 -1
  94. data/lib/orb/models/item_update_params.rb +7 -7
  95. data/lib/orb/models/metric_create_params.rb +0 -1
  96. data/lib/orb/models/metric_list_params.rb +0 -1
  97. data/lib/orb/models/metric_update_params.rb +0 -1
  98. data/lib/orb/models/percentage_discount.rb +6 -8
  99. data/lib/orb/models/plan.rb +90 -103
  100. data/lib/orb/models/plan_create_params.rb +759 -800
  101. data/lib/orb/models/plan_list_params.rb +3 -4
  102. data/lib/orb/models/plan_update_params.rb +0 -2
  103. data/lib/orb/models/plans/external_plan_id_update_params.rb +0 -2
  104. data/lib/orb/models/price.rb +1706 -1724
  105. data/lib/orb/models/price_create_params.rb +75 -84
  106. data/lib/orb/models/price_evaluate_params.rb +0 -2
  107. data/lib/orb/models/price_evaluate_response.rb +3 -3
  108. data/lib/orb/models/price_list_params.rb +0 -1
  109. data/lib/orb/models/price_update_params.rb +0 -1
  110. data/lib/orb/models/prices/external_price_id_update_params.rb +0 -1
  111. data/lib/orb/models/subscription.rb +108 -122
  112. data/lib/orb/models/subscription_cancel_params.rb +3 -5
  113. data/lib/orb/models/subscription_cancel_response.rb +43 -57
  114. data/lib/orb/models/subscription_change_apply_response.rb +43 -58
  115. data/lib/orb/models/subscription_change_cancel_response.rb +43 -58
  116. data/lib/orb/models/subscription_change_retrieve_response.rb +43 -58
  117. data/lib/orb/models/subscription_create_params.rb +1953 -1815
  118. data/lib/orb/models/subscription_create_response.rb +43 -57
  119. data/lib/orb/models/subscription_fetch_costs_params.rb +3 -4
  120. data/lib/orb/models/subscription_fetch_costs_response.rb +3 -3
  121. data/lib/orb/models/subscription_fetch_schedule_params.rb +0 -1
  122. data/lib/orb/models/subscription_fetch_schedule_response.rb +0 -1
  123. data/lib/orb/models/subscription_fetch_usage_params.rb +6 -8
  124. data/lib/orb/models/subscription_list_params.rb +3 -4
  125. data/lib/orb/models/subscription_price_intervals_params.rb +1194 -1017
  126. data/lib/orb/models/subscription_price_intervals_response.rb +43 -57
  127. data/lib/orb/models/subscription_schedule_plan_change_params.rb +1994 -1791
  128. data/lib/orb/models/subscription_schedule_plan_change_response.rb +43 -57
  129. data/lib/orb/models/subscription_trigger_phase_params.rb +0 -2
  130. data/lib/orb/models/subscription_trigger_phase_response.rb +43 -57
  131. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +43 -57
  132. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +43 -57
  133. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +43 -57
  134. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +3 -6
  135. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +43 -57
  136. data/lib/orb/models/subscription_update_params.rb +0 -5
  137. data/lib/orb/models/subscription_update_trial_params.rb +8 -6
  138. data/lib/orb/models/subscription_update_trial_response.rb +43 -57
  139. data/lib/orb/models/subscription_usage.rb +55 -39
  140. data/lib/orb/models/subscriptions.rb +6 -6
  141. data/lib/orb/models/trial_discount.rb +6 -7
  142. data/lib/orb/models/usage_discount.rb +6 -8
  143. data/lib/orb/models.rb +24 -0
  144. data/lib/orb/request_options.rb +4 -0
  145. data/lib/orb/resources/alerts.rb +30 -31
  146. data/lib/orb/resources/coupons/subscriptions.rb +3 -4
  147. data/lib/orb/resources/coupons.rb +11 -21
  148. data/lib/orb/resources/credit_notes.rb +10 -11
  149. data/lib/orb/resources/customers/balance_transactions.rb +3 -4
  150. data/lib/orb/resources/customers/costs.rb +4 -6
  151. data/lib/orb/resources/customers/credits/ledger.rb +14 -33
  152. data/lib/orb/resources/customers/credits/top_ups.rb +10 -20
  153. data/lib/orb/resources/customers/credits.rb +2 -6
  154. data/lib/orb/resources/customers.rb +40 -67
  155. data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +2 -2
  156. data/lib/orb/resources/dimensional_price_groups.rb +8 -10
  157. data/lib/orb/resources/events/backfills.rb +2 -10
  158. data/lib/orb/resources/events/volume.rb +3 -6
  159. data/lib/orb/resources/events.rb +4 -12
  160. data/lib/orb/resources/invoice_line_items.rb +1 -2
  161. data/lib/orb/resources/invoices.rb +26 -43
  162. data/lib/orb/resources/items.rb +12 -13
  163. data/lib/orb/resources/metrics.rb +11 -14
  164. data/lib/orb/resources/plans/external_plan_id.rb +5 -7
  165. data/lib/orb/resources/plans.rb +14 -23
  166. data/lib/orb/resources/prices/external_price_id.rb +5 -6
  167. data/lib/orb/resources/prices.rb +25 -35
  168. data/lib/orb/resources/subscription_changes.rb +1 -1
  169. data/lib/orb/resources/subscriptions.rb +49 -107
  170. data/lib/orb/version.rb +1 -1
  171. data/lib/orb.rb +3 -0
  172. data/rbi/orb/client.rbi +5 -4
  173. data/rbi/orb/errors.rbi +59 -28
  174. data/rbi/orb/file_part.rbi +9 -6
  175. data/rbi/orb/internal/page.rbi +20 -6
  176. data/rbi/orb/internal/transport/base_client.rbi +159 -78
  177. data/rbi/orb/internal/transport/pooled_net_requester.rbi +27 -13
  178. data/rbi/orb/internal/type/array_of.rbi +42 -34
  179. data/rbi/orb/internal/type/base_model.rbi +144 -69
  180. data/rbi/orb/internal/type/base_page.rbi +12 -8
  181. data/rbi/orb/internal/type/boolean.rbi +16 -10
  182. data/rbi/orb/internal/type/converter.rbi +68 -31
  183. data/rbi/orb/internal/type/enum.rbi +28 -15
  184. data/rbi/orb/internal/type/file_input.rbi +12 -10
  185. data/rbi/orb/internal/type/hash_of.rbi +34 -24
  186. data/rbi/orb/internal/type/request_parameters.rbi +12 -4
  187. data/rbi/orb/internal/type/union.rbi +61 -25
  188. data/rbi/orb/internal/type/unknown.rbi +20 -12
  189. data/rbi/orb/internal/util.rbi +232 -90
  190. data/rbi/orb/internal.rbi +2 -0
  191. data/rbi/orb/models/alert.rbi +114 -70
  192. data/rbi/orb/models/alert_create_for_customer_params.rbi +69 -27
  193. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +80 -29
  194. data/rbi/orb/models/alert_create_for_subscription_params.rbi +62 -26
  195. data/rbi/orb/models/alert_disable_params.rbi +18 -6
  196. data/rbi/orb/models/alert_enable_params.rbi +18 -6
  197. data/rbi/orb/models/alert_list_params.rbi +24 -20
  198. data/rbi/orb/models/alert_retrieve_params.rbi +11 -4
  199. data/rbi/orb/models/alert_update_params.rbi +29 -14
  200. data/rbi/orb/models/amount_discount.rbi +29 -19
  201. data/rbi/orb/models/billable_metric.rbi +34 -26
  202. data/rbi/orb/models/billing_cycle_relative_date.rbi +11 -5
  203. data/rbi/orb/models/coupon.rbi +28 -20
  204. data/rbi/orb/models/coupon_archive_params.rbi +11 -4
  205. data/rbi/orb/models/coupon_create_params.rbi +85 -38
  206. data/rbi/orb/models/coupon_fetch_params.rbi +11 -4
  207. data/rbi/orb/models/coupon_list_params.rbi +19 -15
  208. data/rbi/orb/models/coupons/subscription_list_params.rbi +19 -6
  209. data/rbi/orb/models/credit_note.rbi +329 -158
  210. data/rbi/orb/models/credit_note_create_params.rbi +64 -29
  211. data/rbi/orb/models/credit_note_fetch_params.rbi +13 -4
  212. data/rbi/orb/models/credit_note_list_params.rbi +23 -17
  213. data/rbi/orb/models/customer.rbi +461 -329
  214. data/rbi/orb/models/customer_create_params.rbi +713 -325
  215. data/rbi/orb/models/customer_delete_params.rbi +13 -4
  216. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -4
  217. data/rbi/orb/models/customer_fetch_params.rbi +11 -4
  218. data/rbi/orb/models/customer_list_params.rbi +21 -17
  219. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +16 -4
  220. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +16 -4
  221. data/rbi/orb/models/customer_update_by_external_id_params.rbi +1193 -336
  222. data/rbi/orb/models/customer_update_params.rbi +712 -324
  223. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +56 -21
  224. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +172 -61
  225. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +26 -17
  226. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +182 -59
  227. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +62 -22
  228. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +180 -124
  229. data/rbi/orb/models/customers/cost_list_params.rbi +48 -22
  230. data/rbi/orb/models/customers/cost_list_response.rbi +172 -123
  231. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +24 -15
  232. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +54 -22
  233. data/rbi/orb/models/customers/credit_list_params.rbi +21 -15
  234. data/rbi/orb/models/customers/credit_list_response.rbi +50 -21
  235. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +118 -68
  236. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +755 -434
  237. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +129 -59
  238. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +812 -425
  239. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +108 -44
  240. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +793 -432
  241. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +129 -40
  242. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +847 -389
  243. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +86 -53
  244. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +77 -48
  245. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +96 -45
  246. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +95 -43
  247. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +22 -6
  248. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +21 -5
  249. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +15 -5
  250. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +82 -49
  251. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +15 -5
  252. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +96 -43
  253. data/rbi/orb/models/dimensional_price_group.rbi +21 -15
  254. data/rbi/orb/models/dimensional_price_group_create_params.rbi +22 -16
  255. data/rbi/orb/models/dimensional_price_group_list_params.rbi +19 -6
  256. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -4
  257. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +15 -8
  258. data/rbi/orb/models/dimensional_price_groups.rbi +21 -13
  259. data/rbi/orb/models/discount.rbi +11 -5
  260. data/rbi/orb/models/evaluate_price_group.rbi +29 -12
  261. data/rbi/orb/models/event_deprecate_params.rbi +13 -4
  262. data/rbi/orb/models/event_deprecate_response.rbi +11 -3
  263. data/rbi/orb/models/event_ingest_params.rbi +41 -31
  264. data/rbi/orb/models/event_ingest_response.rbi +78 -23
  265. data/rbi/orb/models/event_search_params.rbi +18 -14
  266. data/rbi/orb/models/event_search_response.rbi +42 -21
  267. data/rbi/orb/models/event_update_params.rbi +20 -16
  268. data/rbi/orb/models/event_update_response.rbi +11 -3
  269. data/rbi/orb/models/events/backfill_close_params.rbi +13 -9
  270. data/rbi/orb/models/events/backfill_close_response.rbi +70 -29
  271. data/rbi/orb/models/events/backfill_create_params.rbi +24 -18
  272. data/rbi/orb/models/events/backfill_create_response.rbi +69 -29
  273. data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -9
  274. data/rbi/orb/models/events/backfill_fetch_response.rbi +70 -29
  275. data/rbi/orb/models/events/backfill_list_params.rbi +19 -6
  276. data/rbi/orb/models/events/backfill_list_response.rbi +68 -28
  277. data/rbi/orb/models/events/backfill_revert_params.rbi +13 -9
  278. data/rbi/orb/models/events/backfill_revert_response.rbi +69 -29
  279. data/rbi/orb/models/events/event_volumes.rbi +38 -10
  280. data/rbi/orb/models/events/volume_list_params.rbi +21 -15
  281. data/rbi/orb/models/invoice.rbi +1411 -805
  282. data/rbi/orb/models/invoice_create_params.rbi +107 -69
  283. data/rbi/orb/models/invoice_fetch_params.rbi +11 -4
  284. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +18 -5
  285. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2187 -876
  286. data/rbi/orb/models/invoice_issue_params.rbi +17 -5
  287. data/rbi/orb/models/invoice_level_discount.rbi +11 -4
  288. data/rbi/orb/models/invoice_line_item_create_params.rbi +23 -17
  289. data/rbi/orb/models/invoice_line_item_create_response.rbi +675 -376
  290. data/rbi/orb/models/invoice_list_params.rbi +68 -47
  291. data/rbi/orb/models/invoice_mark_paid_params.rbi +20 -14
  292. data/rbi/orb/models/invoice_pay_params.rbi +11 -4
  293. data/rbi/orb/models/invoice_update_params.rbi +16 -10
  294. data/rbi/orb/models/invoice_void_params.rbi +11 -4
  295. data/rbi/orb/models/item.rbi +90 -39
  296. data/rbi/orb/models/item_create_params.rbi +15 -5
  297. data/rbi/orb/models/item_fetch_params.rbi +11 -4
  298. data/rbi/orb/models/item_list_params.rbi +17 -6
  299. data/rbi/orb/models/item_update_params.rbi +86 -39
  300. data/rbi/orb/models/metric_create_params.rbi +20 -16
  301. data/rbi/orb/models/metric_fetch_params.rbi +11 -4
  302. data/rbi/orb/models/metric_list_params.rbi +21 -17
  303. data/rbi/orb/models/metric_update_params.rbi +16 -10
  304. data/rbi/orb/models/pagination_metadata.rbi +17 -4
  305. data/rbi/orb/models/percentage_discount.rbi +33 -19
  306. data/rbi/orb/models/plan.rbi +532 -365
  307. data/rbi/orb/models/plan_create_params.rbi +5295 -2870
  308. data/rbi/orb/models/plan_fetch_params.rbi +11 -4
  309. data/rbi/orb/models/plan_list_params.rbi +35 -27
  310. data/rbi/orb/models/plan_update_params.rbi +17 -13
  311. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -9
  312. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +22 -13
  313. data/rbi/orb/models/price.rbi +11332 -5033
  314. data/rbi/orb/models/price_create_params.rbi +583 -245
  315. data/rbi/orb/models/price_evaluate_params.rbi +21 -17
  316. data/rbi/orb/models/price_evaluate_response.rbi +14 -6
  317. data/rbi/orb/models/price_fetch_params.rbi +11 -4
  318. data/rbi/orb/models/price_list_params.rbi +17 -6
  319. data/rbi/orb/models/price_update_params.rbi +16 -10
  320. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +15 -8
  321. data/rbi/orb/models/prices/external_price_id_update_params.rbi +21 -10
  322. data/rbi/orb/models/subscription.rbi +668 -420
  323. data/rbi/orb/models/subscription_cancel_params.rbi +47 -22
  324. data/rbi/orb/models/subscription_cancel_response.rbi +817 -438
  325. data/rbi/orb/models/subscription_change_apply_params.rbi +19 -13
  326. data/rbi/orb/models/subscription_change_apply_response.rbi +906 -505
  327. data/rbi/orb/models/subscription_change_cancel_params.rbi +13 -4
  328. data/rbi/orb/models/subscription_change_cancel_response.rbi +906 -516
  329. data/rbi/orb/models/subscription_change_retrieve_params.rbi +13 -4
  330. data/rbi/orb/models/subscription_change_retrieve_response.rbi +903 -524
  331. data/rbi/orb/models/subscription_create_params.rbi +10096 -6746
  332. data/rbi/orb/models/subscription_create_response.rbi +817 -438
  333. data/rbi/orb/models/subscription_fetch_costs_params.rbi +50 -22
  334. data/rbi/orb/models/subscription_fetch_costs_response.rbi +172 -123
  335. data/rbi/orb/models/subscription_fetch_params.rbi +13 -4
  336. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +23 -17
  337. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +45 -19
  338. data/rbi/orb/models/subscription_fetch_usage_params.rbi +84 -34
  339. data/rbi/orb/models/subscription_list_params.rbi +42 -28
  340. data/rbi/orb/models/subscription_price_intervals_params.rbi +5798 -3823
  341. data/rbi/orb/models/subscription_price_intervals_response.rbi +840 -453
  342. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +9676 -6922
  343. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +838 -467
  344. data/rbi/orb/models/subscription_trigger_phase_params.rbi +19 -13
  345. data/rbi/orb/models/subscription_trigger_phase_response.rbi +832 -448
  346. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +16 -4
  347. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +839 -467
  348. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +22 -5
  349. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +815 -504
  350. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +16 -4
  351. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +828 -497
  352. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +63 -26
  353. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +839 -467
  354. data/rbi/orb/models/subscription_update_params.rbi +22 -16
  355. data/rbi/orb/models/subscription_update_trial_params.rbi +60 -19
  356. data/rbi/orb/models/subscription_update_trial_response.rbi +832 -447
  357. data/rbi/orb/models/subscription_usage.rbi +325 -121
  358. data/rbi/orb/models/subscriptions.rbi +19 -11
  359. data/rbi/orb/models/top_level_ping_params.rbi +11 -4
  360. data/rbi/orb/models/top_level_ping_response.rbi +10 -3
  361. data/rbi/orb/models/trial_discount.rbi +30 -20
  362. data/rbi/orb/models/usage_discount.rbi +29 -19
  363. data/rbi/orb/models.rbi +22 -11
  364. data/rbi/orb/request_options.rbi +12 -6
  365. data/rbi/orb/resources/alerts.rbi +61 -40
  366. data/rbi/orb/resources/coupons/subscriptions.rbi +7 -5
  367. data/rbi/orb/resources/coupons.rbi +33 -18
  368. data/rbi/orb/resources/credit_notes.rbi +22 -13
  369. data/rbi/orb/resources/customers/balance_transactions.rbi +17 -9
  370. data/rbi/orb/resources/customers/costs.rbi +18 -11
  371. data/rbi/orb/resources/customers/credits/ledger.rbi +98 -74
  372. data/rbi/orb/resources/customers/credits/top_ups.rbi +61 -25
  373. data/rbi/orb/resources/customers/credits.rbi +16 -7
  374. data/rbi/orb/resources/customers.rbi +137 -72
  375. data/rbi/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +8 -4
  376. data/rbi/orb/resources/dimensional_price_groups.rbi +26 -12
  377. data/rbi/orb/resources/events/backfills.rbi +35 -17
  378. data/rbi/orb/resources/events/volume.rbi +7 -5
  379. data/rbi/orb/resources/events.rbi +26 -16
  380. data/rbi/orb/resources/invoice_line_items.rbi +7 -5
  381. data/rbi/orb/resources/invoices.rbi +72 -41
  382. data/rbi/orb/resources/items.rbi +40 -13
  383. data/rbi/orb/resources/metrics.rbi +25 -15
  384. data/rbi/orb/resources/plans/external_plan_id.rbi +15 -7
  385. data/rbi/orb/resources/plans.rbi +57 -47
  386. data/rbi/orb/resources/prices/external_price_id.rbi +73 -68
  387. data/rbi/orb/resources/prices.rbi +176 -156
  388. data/rbi/orb/resources/subscription_changes.rbi +19 -11
  389. data/rbi/orb/resources/subscriptions.rbi +200 -114
  390. data/rbi/orb/resources/top_level.rbi +9 -3
  391. data/sig/orb/internal/page.rbs +0 -2
  392. data/sig/orb/internal/transport/base_client.rbs +16 -1
  393. data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
  394. data/sig/orb/internal/type/base_model.rbs +11 -5
  395. data/sig/orb/internal/type/base_page.rbs +1 -1
  396. data/sig/orb/internal/type/converter.rbs +2 -0
  397. data/sig/orb/internal/type/enum.rbs +1 -0
  398. data/sig/orb/internal/type/request_parameters.rbs +3 -1
  399. data/sig/orb/internal/type/union.rbs +1 -0
  400. data/sig/orb/internal/util.rbs +13 -0
  401. data/sig/orb/internal.rbs +2 -0
  402. data/sig/orb/models/alert.rbs +19 -31
  403. data/sig/orb/models/alert_create_for_customer_params.rbs +3 -7
  404. data/sig/orb/models/alert_create_for_external_customer_params.rbs +3 -7
  405. data/sig/orb/models/alert_create_for_subscription_params.rbs +3 -7
  406. data/sig/orb/models/alert_disable_params.rbs +0 -2
  407. data/sig/orb/models/alert_enable_params.rbs +0 -2
  408. data/sig/orb/models/alert_list_params.rbs +0 -2
  409. data/sig/orb/models/alert_retrieve_params.rbs +0 -2
  410. data/sig/orb/models/alert_update_params.rbs +3 -7
  411. data/sig/orb/models/amount_discount.rbs +4 -6
  412. data/sig/orb/models/billable_metric.rbs +7 -9
  413. data/sig/orb/models/coupon.rbs +5 -8
  414. data/sig/orb/models/coupon_archive_params.rbs +0 -2
  415. data/sig/orb/models/coupon_create_params.rbs +3 -9
  416. data/sig/orb/models/coupon_fetch_params.rbs +0 -2
  417. data/sig/orb/models/coupon_list_params.rbs +0 -2
  418. data/sig/orb/models/coupons/subscription_list_params.rbs +0 -2
  419. data/sig/orb/models/credit_note.rbs +48 -66
  420. data/sig/orb/models/credit_note_create_params.rbs +3 -7
  421. data/sig/orb/models/credit_note_fetch_params.rbs +0 -2
  422. data/sig/orb/models/credit_note_list_params.rbs +0 -2
  423. data/sig/orb/models/customer.rbs +43 -63
  424. data/sig/orb/models/customer_create_params.rbs +32 -52
  425. data/sig/orb/models/customer_delete_params.rbs +0 -2
  426. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +0 -2
  427. data/sig/orb/models/customer_fetch_params.rbs +0 -2
  428. data/sig/orb/models/customer_list_params.rbs +0 -2
  429. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +0 -2
  430. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +0 -2
  431. data/sig/orb/models/customer_update_by_external_id_params.rbs +32 -52
  432. data/sig/orb/models/customer_update_params.rbs +32 -52
  433. data/sig/orb/models/customers/balance_transaction_create_params.rbs +0 -2
  434. data/sig/orb/models/customers/balance_transaction_create_response.rbs +0 -6
  435. data/sig/orb/models/customers/balance_transaction_list_params.rbs +0 -2
  436. data/sig/orb/models/customers/balance_transaction_list_response.rbs +0 -6
  437. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +0 -2
  438. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +0 -6
  439. data/sig/orb/models/customers/cost_list_params.rbs +0 -2
  440. data/sig/orb/models/customers/cost_list_response.rbs +0 -6
  441. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +0 -2
  442. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +0 -2
  443. data/sig/orb/models/customers/credit_list_params.rbs +0 -2
  444. data/sig/orb/models/customers/credit_list_response.rbs +0 -2
  445. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +3 -7
  446. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +1 -43
  447. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +3 -7
  448. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +1 -43
  449. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +0 -2
  450. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +1 -43
  451. data/sig/orb/models/customers/credits/ledger_list_params.rbs +0 -2
  452. data/sig/orb/models/customers/credits/ledger_list_response.rbs +1 -43
  453. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +3 -7
  454. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +0 -4
  455. data/sig/orb/models/customers/credits/top_up_create_params.rbs +3 -7
  456. data/sig/orb/models/customers/credits/top_up_create_response.rbs +0 -4
  457. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +0 -2
  458. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +0 -2
  459. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +0 -2
  460. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +0 -4
  461. data/sig/orb/models/customers/credits/top_up_list_params.rbs +0 -2
  462. data/sig/orb/models/customers/credits/top_up_list_response.rbs +0 -4
  463. data/sig/orb/models/dimensional_price_group.rbs +0 -2
  464. data/sig/orb/models/dimensional_price_group_create_params.rbs +0 -2
  465. data/sig/orb/models/dimensional_price_group_list_params.rbs +0 -2
  466. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +0 -2
  467. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +0 -2
  468. data/sig/orb/models/dimensional_price_groups.rbs +6 -8
  469. data/sig/orb/models/discount.rbs +5 -5
  470. data/sig/orb/models/evaluate_price_group.rbs +4 -6
  471. data/sig/orb/models/event_deprecate_params.rbs +0 -2
  472. data/sig/orb/models/event_deprecate_response.rbs +0 -2
  473. data/sig/orb/models/event_ingest_params.rbs +3 -7
  474. data/sig/orb/models/event_ingest_response.rbs +0 -6
  475. data/sig/orb/models/event_search_params.rbs +0 -2
  476. data/sig/orb/models/event_search_response.rbs +0 -4
  477. data/sig/orb/models/event_update_params.rbs +0 -2
  478. data/sig/orb/models/event_update_response.rbs +0 -2
  479. data/sig/orb/models/events/backfill_close_params.rbs +0 -2
  480. data/sig/orb/models/events/backfill_close_response.rbs +0 -2
  481. data/sig/orb/models/events/backfill_create_params.rbs +0 -2
  482. data/sig/orb/models/events/backfill_create_response.rbs +0 -2
  483. data/sig/orb/models/events/backfill_fetch_params.rbs +0 -2
  484. data/sig/orb/models/events/backfill_fetch_response.rbs +0 -2
  485. data/sig/orb/models/events/backfill_list_params.rbs +0 -2
  486. data/sig/orb/models/events/backfill_list_response.rbs +0 -2
  487. data/sig/orb/models/events/backfill_revert_params.rbs +0 -2
  488. data/sig/orb/models/events/backfill_revert_response.rbs +0 -2
  489. data/sig/orb/models/events/event_volumes.rbs +3 -10
  490. data/sig/orb/models/events/volume_list_params.rbs +0 -2
  491. data/sig/orb/models/invoice.rbs +110 -172
  492. data/sig/orb/models/invoice_create_params.rbs +10 -16
  493. data/sig/orb/models/invoice_fetch_params.rbs +0 -2
  494. data/sig/orb/models/invoice_fetch_upcoming_params.rbs +0 -2
  495. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -64
  496. data/sig/orb/models/invoice_issue_params.rbs +0 -2
  497. data/sig/orb/models/invoice_level_discount.rbs +2 -4
  498. data/sig/orb/models/invoice_line_item_create_params.rbs +0 -2
  499. data/sig/orb/models/invoice_line_item_create_response.rbs +2 -36
  500. data/sig/orb/models/invoice_list_params.rbs +4 -6
  501. data/sig/orb/models/invoice_mark_paid_params.rbs +0 -2
  502. data/sig/orb/models/invoice_pay_params.rbs +0 -2
  503. data/sig/orb/models/invoice_update_params.rbs +0 -2
  504. data/sig/orb/models/invoice_void_params.rbs +0 -2
  505. data/sig/orb/models/item.rbs +7 -11
  506. data/sig/orb/models/item_create_params.rbs +0 -2
  507. data/sig/orb/models/item_fetch_params.rbs +0 -2
  508. data/sig/orb/models/item_list_params.rbs +0 -2
  509. data/sig/orb/models/item_update_params.rbs +7 -11
  510. data/sig/orb/models/metric_create_params.rbs +0 -2
  511. data/sig/orb/models/metric_fetch_params.rbs +0 -2
  512. data/sig/orb/models/metric_list_params.rbs +0 -2
  513. data/sig/orb/models/metric_update_params.rbs +0 -2
  514. data/sig/orb/models/pagination_metadata.rbs +0 -2
  515. data/sig/orb/models/percentage_discount.rbs +4 -6
  516. data/sig/orb/models/plan.rbs +45 -73
  517. data/sig/orb/models/plan_create_params.rbs +518 -696
  518. data/sig/orb/models/plan_fetch_params.rbs +0 -2
  519. data/sig/orb/models/plan_list_params.rbs +0 -2
  520. data/sig/orb/models/plan_update_params.rbs +0 -2
  521. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +0 -2
  522. data/sig/orb/models/plans/external_plan_id_update_params.rbs +0 -2
  523. data/sig/orb/models/price.rbs +1194 -1730
  524. data/sig/orb/models/price_create_params.rbs +59 -97
  525. data/sig/orb/models/price_evaluate_params.rbs +0 -2
  526. data/sig/orb/models/price_evaluate_response.rbs +3 -6
  527. data/sig/orb/models/price_fetch_params.rbs +0 -2
  528. data/sig/orb/models/price_list_params.rbs +0 -2
  529. data/sig/orb/models/price_update_params.rbs +0 -2
  530. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +0 -2
  531. data/sig/orb/models/prices/external_price_id_update_params.rbs +0 -2
  532. data/sig/orb/models/subscription.rbs +56 -94
  533. data/sig/orb/models/subscription_cancel_params.rbs +0 -2
  534. data/sig/orb/models/subscription_cancel_response.rbs +20 -60
  535. data/sig/orb/models/subscription_change_apply_params.rbs +0 -2
  536. data/sig/orb/models/subscription_change_apply_response.rbs +20 -62
  537. data/sig/orb/models/subscription_change_cancel_params.rbs +0 -2
  538. data/sig/orb/models/subscription_change_cancel_response.rbs +20 -62
  539. data/sig/orb/models/subscription_change_retrieve_params.rbs +0 -2
  540. data/sig/orb/models/subscription_change_retrieve_response.rbs +20 -62
  541. data/sig/orb/models/subscription_create_params.rbs +1103 -1499
  542. data/sig/orb/models/subscription_create_response.rbs +20 -60
  543. data/sig/orb/models/subscription_fetch_costs_params.rbs +0 -2
  544. data/sig/orb/models/subscription_fetch_costs_response.rbs +0 -6
  545. data/sig/orb/models/subscription_fetch_params.rbs +0 -2
  546. data/sig/orb/models/subscription_fetch_schedule_params.rbs +0 -2
  547. data/sig/orb/models/subscription_fetch_schedule_response.rbs +0 -4
  548. data/sig/orb/models/subscription_fetch_usage_params.rbs +0 -2
  549. data/sig/orb/models/subscription_list_params.rbs +0 -2
  550. data/sig/orb/models/subscription_price_intervals_params.rbs +666 -896
  551. data/sig/orb/models/subscription_price_intervals_response.rbs +20 -60
  552. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1103 -1499
  553. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +20 -60
  554. data/sig/orb/models/subscription_trigger_phase_params.rbs +0 -2
  555. data/sig/orb/models/subscription_trigger_phase_response.rbs +20 -60
  556. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +0 -2
  557. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +20 -60
  558. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +0 -2
  559. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +20 -60
  560. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +0 -2
  561. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +20 -60
  562. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +0 -2
  563. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +20 -60
  564. data/sig/orb/models/subscription_update_params.rbs +0 -2
  565. data/sig/orb/models/subscription_update_trial_params.rbs +1 -3
  566. data/sig/orb/models/subscription_update_trial_response.rbs +20 -60
  567. data/sig/orb/models/subscription_usage.rbs +35 -53
  568. data/sig/orb/models/subscriptions.rbs +6 -8
  569. data/sig/orb/models/top_level_ping_params.rbs +0 -2
  570. data/sig/orb/models/top_level_ping_response.rbs +0 -2
  571. data/sig/orb/models/trial_discount.rbs +4 -6
  572. data/sig/orb/models/usage_discount.rbs +4 -6
  573. data/sig/orb/request_options.rbs +1 -1
  574. data/sig/orb/resources/alerts.rbs +12 -12
  575. data/sig/orb/resources/coupons/subscriptions.rbs +1 -1
  576. data/sig/orb/resources/coupons.rbs +4 -4
  577. data/sig/orb/resources/credit_notes.rbs +4 -4
  578. data/sig/orb/resources/customers/credits/ledger.rbs +2 -2
  579. data/sig/orb/resources/customers/credits/top_ups.rbs +2 -2
  580. data/sig/orb/resources/customers.rbs +24 -24
  581. data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +1 -1
  582. data/sig/orb/resources/dimensional_price_groups.rbs +3 -3
  583. data/sig/orb/resources/events/volume.rbs +1 -1
  584. data/sig/orb/resources/events.rbs +1 -1
  585. data/sig/orb/resources/invoices.rbs +10 -10
  586. data/sig/orb/resources/items.rbs +5 -5
  587. data/sig/orb/resources/metrics.rbs +4 -4
  588. data/sig/orb/resources/plans/external_plan_id.rbs +2 -2
  589. data/sig/orb/resources/plans.rbs +5 -5
  590. data/sig/orb/resources/prices.rbs +11 -11
  591. data/sig/orb/resources/subscriptions.rbs +21 -21
  592. metadata +2 -2
@@ -3,6 +3,14 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionUpdateTrialResponse < Orb::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Orb::Models::SubscriptionUpdateTrialResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
13
+
6
14
  sig { returns(String) }
7
15
  attr_accessor :id
8
16
 
@@ -13,7 +21,13 @@ module Orb
13
21
 
14
22
  # The adjustment intervals for this subscription sorted by the start_date of the
15
23
  # adjustment interval.
16
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]) }
24
+ sig do
25
+ returns(
26
+ T::Array[
27
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval
28
+ ]
29
+ )
30
+ end
17
31
  attr_accessor :adjustment_intervals
18
32
 
19
33
  # Determines whether issued invoices for this subscription will automatically be
@@ -22,17 +36,18 @@ module Orb
22
36
  sig { returns(T.nilable(T::Boolean)) }
23
37
  attr_accessor :auto_collection
24
38
 
25
- sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration) }
39
+ sig do
40
+ returns(
41
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration
42
+ )
43
+ end
26
44
  attr_reader :billing_cycle_anchor_configuration
27
45
 
28
46
  sig do
29
47
  params(
30
- billing_cycle_anchor_configuration: T.any(
31
- Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
32
- Orb::Internal::AnyHash
33
- )
34
- )
35
- .void
48
+ billing_cycle_anchor_configuration:
49
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration::OrHash
50
+ ).void
36
51
  end
37
52
  attr_writer :billing_cycle_anchor_configuration
38
53
 
@@ -76,10 +91,10 @@ module Orb
76
91
  # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
77
92
  # your account's timezone. See [Timezone localization](/essentials/timezones) for
78
93
  # information on what this timezone parameter influences within Orb.
79
- sig { returns(Orb::Models::Customer) }
94
+ sig { returns(Orb::Customer) }
80
95
  attr_reader :customer
81
96
 
82
- sig { params(customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash)).void }
97
+ sig { params(customer: Orb::Customer::OrHash).void }
83
98
  attr_writer :customer
84
99
 
85
100
  # Determines the default memo on this subscriptions' invoices. Note that if this
@@ -105,14 +120,26 @@ module Orb
105
120
  sig { returns(T.nilable(Time)) }
106
121
  attr_accessor :end_date
107
122
 
108
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule]) }
123
+ sig do
124
+ returns(
125
+ T::Array[
126
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule
127
+ ]
128
+ )
129
+ end
109
130
  attr_accessor :fixed_fee_quantity_schedule
110
131
 
111
132
  sig { returns(T.nilable(String)) }
112
133
  attr_accessor :invoicing_threshold
113
134
 
114
135
  # The maximum intervals for this subscription sorted by the start_date.
115
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]) }
136
+ sig do
137
+ returns(
138
+ T::Array[
139
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval
140
+ ]
141
+ )
142
+ end
116
143
  attr_accessor :maximum_intervals
117
144
 
118
145
  # User specified key-value pairs for the resource. If not present, this defaults
@@ -123,7 +150,13 @@ module Orb
123
150
  attr_accessor :metadata
124
151
 
125
152
  # The minimum intervals for this subscription sorted by the start_date.
126
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]) }
153
+ sig do
154
+ returns(
155
+ T::Array[
156
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval
157
+ ]
158
+ )
159
+ end
127
160
  attr_accessor :minimum_intervals
128
161
 
129
162
  # Determines the difference between the invoice issue date for subscription
@@ -134,16 +167,22 @@ module Orb
134
167
  attr_accessor :net_terms
135
168
 
136
169
  # A pending subscription change if one exists on this subscription.
137
- sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange)) }
170
+ sig do
171
+ returns(
172
+ T.nilable(
173
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange
174
+ )
175
+ )
176
+ end
138
177
  attr_reader :pending_subscription_change
139
178
 
140
179
  sig do
141
180
  params(
142
- pending_subscription_change: T.nilable(
143
- T.any(Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
144
- )
145
- )
146
- .void
181
+ pending_subscription_change:
182
+ T.nilable(
183
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange::OrHash
184
+ )
185
+ ).void
147
186
  end
148
187
  attr_writer :pending_subscription_change
149
188
 
@@ -151,24 +190,36 @@ module Orb
151
190
  # subscribed to by a customer. Plans define the billing behavior of the
152
191
  # subscription. You can see more about how to configure prices in the
153
192
  # [Price resource](/reference/price).
154
- sig { returns(Orb::Models::Plan) }
193
+ sig { returns(Orb::Plan) }
155
194
  attr_reader :plan
156
195
 
157
- sig { params(plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash)).void }
196
+ sig { params(plan: Orb::Plan::OrHash).void }
158
197
  attr_writer :plan
159
198
 
160
199
  # The price intervals for this subscription.
161
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]) }
200
+ sig do
201
+ returns(
202
+ T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]
203
+ )
204
+ end
162
205
  attr_accessor :price_intervals
163
206
 
164
- sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon)) }
207
+ sig do
208
+ returns(
209
+ T.nilable(
210
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon
211
+ )
212
+ )
213
+ end
165
214
  attr_reader :redeemed_coupon
166
215
 
167
216
  sig do
168
217
  params(
169
- redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon, Orb::Internal::AnyHash))
170
- )
171
- .void
218
+ redeemed_coupon:
219
+ T.nilable(
220
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon::OrHash
221
+ )
222
+ ).void
172
223
  end
173
224
  attr_writer :redeemed_coupon
174
225
 
@@ -176,29 +227,43 @@ module Orb
176
227
  sig { returns(Time) }
177
228
  attr_accessor :start_date
178
229
 
179
- sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol) }
230
+ sig do
231
+ returns(
232
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
233
+ )
234
+ end
180
235
  attr_accessor :status
181
236
 
182
237
  sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo) }
183
238
  attr_reader :trial_info
184
239
 
185
240
  sig do
186
- params(trial_info: T.any(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo, Orb::Internal::AnyHash))
187
- .void
241
+ params(
242
+ trial_info:
243
+ Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo::OrHash
244
+ ).void
188
245
  end
189
246
  attr_writer :trial_info
190
247
 
191
248
  # The resources that were changed as part of this operation. Only present when
192
249
  # fetched through the subscription changes API or if the
193
250
  # `include_changed_resources` parameter was passed in the request.
194
- sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources)) }
251
+ sig do
252
+ returns(
253
+ T.nilable(
254
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources
255
+ )
256
+ )
257
+ end
195
258
  attr_reader :changed_resources
196
259
 
197
260
  sig do
198
261
  params(
199
- changed_resources: T.nilable(T.any(Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources, Orb::Internal::AnyHash))
200
- )
201
- .void
262
+ changed_resources:
263
+ T.nilable(
264
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources::OrHash
265
+ )
266
+ ).void
202
267
  end
203
268
  attr_writer :changed_resources
204
269
 
@@ -206,45 +271,66 @@ module Orb
206
271
  params(
207
272
  id: String,
208
273
  active_plan_phase_order: T.nilable(Integer),
209
- adjustment_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval, Orb::Internal::AnyHash)],
274
+ adjustment_intervals:
275
+ T::Array[
276
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::OrHash
277
+ ],
210
278
  auto_collection: T.nilable(T::Boolean),
211
- billing_cycle_anchor_configuration: T.any(
212
- Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
213
- Orb::Internal::AnyHash
214
- ),
279
+ billing_cycle_anchor_configuration:
280
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration::OrHash,
215
281
  billing_cycle_day: Integer,
216
282
  created_at: Time,
217
283
  current_billing_period_end_date: T.nilable(Time),
218
284
  current_billing_period_start_date: T.nilable(Time),
219
- customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
285
+ customer: Orb::Customer::OrHash,
220
286
  default_invoice_memo: T.nilable(String),
221
- discount_intervals: T::Array[
222
- T.any(
223
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
224
- Orb::Internal::AnyHash,
225
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
226
- Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
227
- )
228
- ],
287
+ discount_intervals:
288
+ T::Array[
289
+ T.any(
290
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::OrHash,
291
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::OrHash,
292
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::OrHash
293
+ )
294
+ ],
229
295
  end_date: T.nilable(Time),
230
- fixed_fee_quantity_schedule: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule, Orb::Internal::AnyHash)],
296
+ fixed_fee_quantity_schedule:
297
+ T::Array[
298
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule::OrHash
299
+ ],
231
300
  invoicing_threshold: T.nilable(String),
232
- maximum_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval, Orb::Internal::AnyHash)],
301
+ maximum_intervals:
302
+ T::Array[
303
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::OrHash
304
+ ],
233
305
  metadata: T::Hash[Symbol, String],
234
- minimum_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval, Orb::Internal::AnyHash)],
306
+ minimum_intervals:
307
+ T::Array[
308
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::OrHash
309
+ ],
235
310
  net_terms: Integer,
236
- pending_subscription_change: T.nilable(
237
- T.any(Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
238
- ),
239
- plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash),
240
- price_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval, Orb::Internal::AnyHash)],
241
- redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon, Orb::Internal::AnyHash)),
311
+ pending_subscription_change:
312
+ T.nilable(
313
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange::OrHash
314
+ ),
315
+ plan: Orb::Plan::OrHash,
316
+ price_intervals:
317
+ T::Array[
318
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::OrHash
319
+ ],
320
+ redeemed_coupon:
321
+ T.nilable(
322
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon::OrHash
323
+ ),
242
324
  start_date: Time,
243
- status: Orb::Models::SubscriptionUpdateTrialResponse::Status::OrSymbol,
244
- trial_info: T.any(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo, Orb::Internal::AnyHash),
245
- changed_resources: T.nilable(T.any(Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources, Orb::Internal::AnyHash))
246
- )
247
- .returns(T.attached_class)
325
+ status:
326
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::OrSymbol,
327
+ trial_info:
328
+ Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo::OrHash,
329
+ changed_resources:
330
+ T.nilable(
331
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources::OrHash
332
+ )
333
+ ).returns(T.attached_class)
248
334
  end
249
335
  def self.new(
250
336
  id:,
@@ -333,50 +419,87 @@ module Orb
333
419
  # fetched through the subscription changes API or if the
334
420
  # `include_changed_resources` parameter was passed in the request.
335
421
  changed_resources: nil
336
- ); end
422
+ )
423
+ end
424
+
337
425
  sig do
338
- override
339
- .returns(
340
- {
341
- id: String,
342
- active_plan_phase_order: T.nilable(Integer),
343
- adjustment_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval],
344
- auto_collection: T.nilable(T::Boolean),
345
- billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
346
- billing_cycle_day: Integer,
347
- created_at: Time,
348
- current_billing_period_end_date: T.nilable(Time),
349
- current_billing_period_start_date: T.nilable(Time),
350
- customer: Orb::Models::Customer,
351
- default_invoice_memo: T.nilable(String),
352
- discount_intervals: T::Array[
426
+ override.returns(
427
+ {
428
+ id: String,
429
+ active_plan_phase_order: T.nilable(Integer),
430
+ adjustment_intervals:
431
+ T::Array[
432
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval
433
+ ],
434
+ auto_collection: T.nilable(T::Boolean),
435
+ billing_cycle_anchor_configuration:
436
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
437
+ billing_cycle_day: Integer,
438
+ created_at: Time,
439
+ current_billing_period_end_date: T.nilable(Time),
440
+ current_billing_period_start_date: T.nilable(Time),
441
+ customer: Orb::Customer,
442
+ default_invoice_memo: T.nilable(String),
443
+ discount_intervals:
444
+ T::Array[
353
445
  T.any(
354
446
  Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
355
447
  Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
356
448
  Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
357
449
  )
358
450
  ],
359
- end_date: T.nilable(Time),
360
- fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule],
361
- invoicing_threshold: T.nilable(String),
362
- maximum_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval],
363
- metadata: T::Hash[Symbol, String],
364
- minimum_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval],
365
- net_terms: Integer,
366
- pending_subscription_change: T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange),
367
- plan: Orb::Models::Plan,
368
- price_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval],
369
- redeemed_coupon: T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon),
370
- start_date: Time,
371
- status: Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol,
372
- trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo,
373
- changed_resources: T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources)
374
- }
375
- )
451
+ end_date: T.nilable(Time),
452
+ fixed_fee_quantity_schedule:
453
+ T::Array[
454
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule
455
+ ],
456
+ invoicing_threshold: T.nilable(String),
457
+ maximum_intervals:
458
+ T::Array[
459
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval
460
+ ],
461
+ metadata: T::Hash[Symbol, String],
462
+ minimum_intervals:
463
+ T::Array[
464
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval
465
+ ],
466
+ net_terms: Integer,
467
+ pending_subscription_change:
468
+ T.nilable(
469
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange
470
+ ),
471
+ plan: Orb::Plan,
472
+ price_intervals:
473
+ T::Array[
474
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval
475
+ ],
476
+ redeemed_coupon:
477
+ T.nilable(
478
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon
479
+ ),
480
+ start_date: Time,
481
+ status:
482
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol,
483
+ trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo,
484
+ changed_resources:
485
+ T.nilable(
486
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources
487
+ )
488
+ }
489
+ )
490
+ end
491
+ def to_hash
376
492
  end
377
- def to_hash; end
378
493
 
379
494
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
495
+ OrHash =
496
+ T.type_alias do
497
+ T.any(
498
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval,
499
+ Orb::Internal::AnyHash
500
+ )
501
+ end
502
+
380
503
  sig { returns(String) }
381
504
  attr_accessor :id
382
505
 
@@ -408,19 +531,18 @@ module Orb
408
531
  sig do
409
532
  params(
410
533
  id: String,
411
- adjustment: T.any(
412
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
413
- Orb::Internal::AnyHash,
414
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
415
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
416
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
417
- Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
418
- ),
534
+ adjustment:
535
+ T.any(
536
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
537
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
538
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
539
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::OrHash,
540
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::OrHash
541
+ ),
419
542
  applies_to_price_interval_ids: T::Array[String],
420
543
  end_date: T.nilable(Time),
421
544
  start_date: Time
422
- )
423
- .returns(T.attached_class)
545
+ ).returns(T.attached_class)
424
546
  end
425
547
  def self.new(
426
548
  id:,
@@ -431,31 +553,53 @@ module Orb
431
553
  end_date:,
432
554
  # The start date of the adjustment interval.
433
555
  start_date:
434
- ); end
556
+ )
557
+ end
558
+
435
559
  sig do
436
- override
437
- .returns(
438
- {
439
- id: String,
440
- adjustment: T.any(
560
+ override.returns(
561
+ {
562
+ id: String,
563
+ adjustment:
564
+ T.any(
441
565
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
442
566
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
443
567
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
444
568
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
445
569
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
446
570
  ),
447
- applies_to_price_interval_ids: T::Array[String],
448
- end_date: T.nilable(Time),
449
- start_date: Time
450
- }
451
- )
571
+ applies_to_price_interval_ids: T::Array[String],
572
+ end_date: T.nilable(Time),
573
+ start_date: Time
574
+ }
575
+ )
576
+ end
577
+ def to_hash
452
578
  end
453
- def to_hash; end
454
579
 
455
580
  module Adjustment
456
581
  extend Orb::Internal::Type::Union
457
582
 
583
+ Variants =
584
+ T.type_alias do
585
+ T.any(
586
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
587
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
588
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
589
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
590
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
591
+ )
592
+ end
593
+
458
594
  class UsageDiscount < Orb::Internal::Type::BaseModel
595
+ OrHash =
596
+ T.type_alias do
597
+ T.any(
598
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
599
+ Orb::Internal::AnyHash
600
+ )
601
+ end
602
+
459
603
  sig { returns(String) }
460
604
  attr_accessor :id
461
605
 
@@ -493,8 +637,7 @@ module Orb
493
637
  reason: T.nilable(String),
494
638
  usage_discount: Float,
495
639
  adjustment_type: Symbol
496
- )
497
- .returns(T.attached_class)
640
+ ).returns(T.attached_class)
498
641
  end
499
642
  def self.new(
500
643
  id:,
@@ -511,25 +654,35 @@ module Orb
511
654
  # to in a given billing period.
512
655
  usage_discount:,
513
656
  adjustment_type: :usage_discount
514
- ); end
657
+ )
658
+ end
659
+
515
660
  sig do
516
- override
517
- .returns(
518
- {
519
- id: String,
520
- adjustment_type: Symbol,
521
- applies_to_price_ids: T::Array[String],
522
- is_invoice_level: T::Boolean,
523
- plan_phase_order: T.nilable(Integer),
524
- reason: T.nilable(String),
525
- usage_discount: Float
526
- }
527
- )
661
+ override.returns(
662
+ {
663
+ id: String,
664
+ adjustment_type: Symbol,
665
+ applies_to_price_ids: T::Array[String],
666
+ is_invoice_level: T::Boolean,
667
+ plan_phase_order: T.nilable(Integer),
668
+ reason: T.nilable(String),
669
+ usage_discount: Float
670
+ }
671
+ )
672
+ end
673
+ def to_hash
528
674
  end
529
- def to_hash; end
530
675
  end
531
676
 
532
677
  class AmountDiscount < Orb::Internal::Type::BaseModel
678
+ OrHash =
679
+ T.type_alias do
680
+ T.any(
681
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
682
+ Orb::Internal::AnyHash
683
+ )
684
+ end
685
+
533
686
  sig { returns(String) }
534
687
  attr_accessor :id
535
688
 
@@ -567,8 +720,7 @@ module Orb
567
720
  plan_phase_order: T.nilable(Integer),
568
721
  reason: T.nilable(String),
569
722
  adjustment_type: Symbol
570
- )
571
- .returns(T.attached_class)
723
+ ).returns(T.attached_class)
572
724
  end
573
725
  def self.new(
574
726
  id:,
@@ -585,25 +737,35 @@ module Orb
585
737
  # The reason for the adjustment.
586
738
  reason:,
587
739
  adjustment_type: :amount_discount
588
- ); end
740
+ )
741
+ end
742
+
589
743
  sig do
590
- override
591
- .returns(
592
- {
593
- id: String,
594
- adjustment_type: Symbol,
595
- amount_discount: String,
596
- applies_to_price_ids: T::Array[String],
597
- is_invoice_level: T::Boolean,
598
- plan_phase_order: T.nilable(Integer),
599
- reason: T.nilable(String)
600
- }
601
- )
744
+ override.returns(
745
+ {
746
+ id: String,
747
+ adjustment_type: Symbol,
748
+ amount_discount: String,
749
+ applies_to_price_ids: T::Array[String],
750
+ is_invoice_level: T::Boolean,
751
+ plan_phase_order: T.nilable(Integer),
752
+ reason: T.nilable(String)
753
+ }
754
+ )
755
+ end
756
+ def to_hash
602
757
  end
603
- def to_hash; end
604
758
  end
605
759
 
606
760
  class PercentageDiscount < Orb::Internal::Type::BaseModel
761
+ OrHash =
762
+ T.type_alias do
763
+ T.any(
764
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
765
+ Orb::Internal::AnyHash
766
+ )
767
+ end
768
+
607
769
  sig { returns(String) }
608
770
  attr_accessor :id
609
771
 
@@ -641,8 +803,7 @@ module Orb
641
803
  plan_phase_order: T.nilable(Integer),
642
804
  reason: T.nilable(String),
643
805
  adjustment_type: Symbol
644
- )
645
- .returns(T.attached_class)
806
+ ).returns(T.attached_class)
646
807
  end
647
808
  def self.new(
648
809
  id:,
@@ -659,25 +820,35 @@ module Orb
659
820
  # The reason for the adjustment.
660
821
  reason:,
661
822
  adjustment_type: :percentage_discount
662
- ); end
823
+ )
824
+ end
825
+
663
826
  sig do
664
- override
665
- .returns(
666
- {
667
- id: String,
668
- adjustment_type: Symbol,
669
- applies_to_price_ids: T::Array[String],
670
- is_invoice_level: T::Boolean,
671
- percentage_discount: Float,
672
- plan_phase_order: T.nilable(Integer),
673
- reason: T.nilable(String)
674
- }
675
- )
827
+ override.returns(
828
+ {
829
+ id: String,
830
+ adjustment_type: Symbol,
831
+ applies_to_price_ids: T::Array[String],
832
+ is_invoice_level: T::Boolean,
833
+ percentage_discount: Float,
834
+ plan_phase_order: T.nilable(Integer),
835
+ reason: T.nilable(String)
836
+ }
837
+ )
838
+ end
839
+ def to_hash
676
840
  end
677
- def to_hash; end
678
841
  end
679
842
 
680
843
  class Minimum < Orb::Internal::Type::BaseModel
844
+ OrHash =
845
+ T.type_alias do
846
+ T.any(
847
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
848
+ Orb::Internal::AnyHash
849
+ )
850
+ end
851
+
681
852
  sig { returns(String) }
682
853
  attr_accessor :id
683
854
 
@@ -720,8 +891,7 @@ module Orb
720
891
  plan_phase_order: T.nilable(Integer),
721
892
  reason: T.nilable(String),
722
893
  adjustment_type: Symbol
723
- )
724
- .returns(T.attached_class)
894
+ ).returns(T.attached_class)
725
895
  end
726
896
  def self.new(
727
897
  id:,
@@ -740,26 +910,36 @@ module Orb
740
910
  # The reason for the adjustment.
741
911
  reason:,
742
912
  adjustment_type: :minimum
743
- ); end
913
+ )
914
+ end
915
+
744
916
  sig do
745
- override
746
- .returns(
747
- {
748
- id: String,
749
- adjustment_type: Symbol,
750
- applies_to_price_ids: T::Array[String],
751
- is_invoice_level: T::Boolean,
752
- item_id: String,
753
- minimum_amount: String,
754
- plan_phase_order: T.nilable(Integer),
755
- reason: T.nilable(String)
756
- }
757
- )
917
+ override.returns(
918
+ {
919
+ id: String,
920
+ adjustment_type: Symbol,
921
+ applies_to_price_ids: T::Array[String],
922
+ is_invoice_level: T::Boolean,
923
+ item_id: String,
924
+ minimum_amount: String,
925
+ plan_phase_order: T.nilable(Integer),
926
+ reason: T.nilable(String)
927
+ }
928
+ )
929
+ end
930
+ def to_hash
758
931
  end
759
- def to_hash; end
760
932
  end
761
933
 
762
934
  class Maximum < Orb::Internal::Type::BaseModel
935
+ OrHash =
936
+ T.type_alias do
937
+ T.any(
938
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum,
939
+ Orb::Internal::AnyHash
940
+ )
941
+ end
942
+
763
943
  sig { returns(String) }
764
944
  attr_accessor :id
765
945
 
@@ -797,8 +977,7 @@ module Orb
797
977
  plan_phase_order: T.nilable(Integer),
798
978
  reason: T.nilable(String),
799
979
  adjustment_type: Symbol
800
- )
801
- .returns(T.attached_class)
980
+ ).returns(T.attached_class)
802
981
  end
803
982
  def self.new(
804
983
  id:,
@@ -815,35 +994,47 @@ module Orb
815
994
  # The reason for the adjustment.
816
995
  reason:,
817
996
  adjustment_type: :maximum
818
- ); end
997
+ )
998
+ end
999
+
819
1000
  sig do
820
- override
821
- .returns(
822
- {
823
- id: String,
824
- adjustment_type: Symbol,
825
- applies_to_price_ids: T::Array[String],
826
- is_invoice_level: T::Boolean,
827
- maximum_amount: String,
828
- plan_phase_order: T.nilable(Integer),
829
- reason: T.nilable(String)
830
- }
831
- )
1001
+ override.returns(
1002
+ {
1003
+ id: String,
1004
+ adjustment_type: Symbol,
1005
+ applies_to_price_ids: T::Array[String],
1006
+ is_invoice_level: T::Boolean,
1007
+ maximum_amount: String,
1008
+ plan_phase_order: T.nilable(Integer),
1009
+ reason: T.nilable(String)
1010
+ }
1011
+ )
1012
+ end
1013
+ def to_hash
832
1014
  end
833
- def to_hash; end
834
1015
  end
835
1016
 
836
1017
  sig do
837
- override
838
- .returns(
839
- [Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum]
840
- )
1018
+ override.returns(
1019
+ T::Array[
1020
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Variants
1021
+ ]
1022
+ )
1023
+ end
1024
+ def self.variants
841
1025
  end
842
- def self.variants; end
843
1026
  end
844
1027
  end
845
1028
 
846
1029
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
1030
+ OrHash =
1031
+ T.type_alias do
1032
+ T.any(
1033
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
1034
+ Orb::Internal::AnyHash
1035
+ )
1036
+ end
1037
+
847
1038
  # The day of the month on which the billing cycle is anchored. If the maximum
848
1039
  # number of days in a month is greater than this value, the last day of the month
849
1040
  # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
@@ -863,7 +1054,11 @@ module Orb
863
1054
  attr_accessor :year
864
1055
 
865
1056
  sig do
866
- params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
1057
+ params(
1058
+ day: Integer,
1059
+ month: T.nilable(Integer),
1060
+ year: T.nilable(Integer)
1061
+ ).returns(T.attached_class)
867
1062
  end
868
1063
  def self.new(
869
1064
  # The day of the month on which the billing cycle is anchored. If the maximum
@@ -878,15 +1073,43 @@ module Orb
878
1073
  # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
879
1074
  # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
880
1075
  year: nil
881
- ); end
882
- sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
883
- def to_hash; end
1076
+ )
1077
+ end
1078
+
1079
+ sig do
1080
+ override.returns(
1081
+ {
1082
+ day: Integer,
1083
+ month: T.nilable(Integer),
1084
+ year: T.nilable(Integer)
1085
+ }
1086
+ )
1087
+ end
1088
+ def to_hash
1089
+ end
884
1090
  end
885
1091
 
886
1092
  module DiscountInterval
887
1093
  extend Orb::Internal::Type::Union
888
1094
 
1095
+ Variants =
1096
+ T.type_alias do
1097
+ T.any(
1098
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
1099
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
1100
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
1101
+ )
1102
+ end
1103
+
889
1104
  class Amount < Orb::Internal::Type::BaseModel
1105
+ OrHash =
1106
+ T.type_alias do
1107
+ T.any(
1108
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
1109
+ Orb::Internal::AnyHash
1110
+ )
1111
+ end
1112
+
890
1113
  # Only available if discount_type is `amount`.
891
1114
  sig { returns(String) }
892
1115
  attr_accessor :amount_discount
@@ -918,8 +1141,7 @@ module Orb
918
1141
  end_date: T.nilable(Time),
919
1142
  start_date: Time,
920
1143
  discount_type: Symbol
921
- )
922
- .returns(T.attached_class)
1144
+ ).returns(T.attached_class)
923
1145
  end
924
1146
  def self.new(
925
1147
  # Only available if discount_type is `amount`.
@@ -933,24 +1155,34 @@ module Orb
933
1155
  # The start date of the discount interval.
934
1156
  start_date:,
935
1157
  discount_type: :amount
936
- ); end
1158
+ )
1159
+ end
1160
+
937
1161
  sig do
938
- override
939
- .returns(
940
- {
941
- amount_discount: String,
942
- applies_to_price_ids: T::Array[String],
943
- applies_to_price_interval_ids: T::Array[String],
944
- discount_type: Symbol,
945
- end_date: T.nilable(Time),
946
- start_date: Time
947
- }
948
- )
1162
+ override.returns(
1163
+ {
1164
+ amount_discount: String,
1165
+ applies_to_price_ids: T::Array[String],
1166
+ applies_to_price_interval_ids: T::Array[String],
1167
+ discount_type: Symbol,
1168
+ end_date: T.nilable(Time),
1169
+ start_date: Time
1170
+ }
1171
+ )
1172
+ end
1173
+ def to_hash
949
1174
  end
950
- def to_hash; end
951
1175
  end
952
1176
 
953
1177
  class Percentage < Orb::Internal::Type::BaseModel
1178
+ OrHash =
1179
+ T.type_alias do
1180
+ T.any(
1181
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
1182
+ Orb::Internal::AnyHash
1183
+ )
1184
+ end
1185
+
954
1186
  # The price ids that this discount interval applies to.
955
1187
  sig { returns(T::Array[String]) }
956
1188
  attr_accessor :applies_to_price_ids
@@ -983,8 +1215,7 @@ module Orb
983
1215
  percentage_discount: Float,
984
1216
  start_date: Time,
985
1217
  discount_type: Symbol
986
- )
987
- .returns(T.attached_class)
1218
+ ).returns(T.attached_class)
988
1219
  end
989
1220
  def self.new(
990
1221
  # The price ids that this discount interval applies to.
@@ -999,24 +1230,34 @@ module Orb
999
1230
  # The start date of the discount interval.
1000
1231
  start_date:,
1001
1232
  discount_type: :percentage
1002
- ); end
1233
+ )
1234
+ end
1235
+
1003
1236
  sig do
1004
- override
1005
- .returns(
1006
- {
1007
- applies_to_price_ids: T::Array[String],
1008
- applies_to_price_interval_ids: T::Array[String],
1009
- discount_type: Symbol,
1010
- end_date: T.nilable(Time),
1011
- percentage_discount: Float,
1012
- start_date: Time
1013
- }
1014
- )
1237
+ override.returns(
1238
+ {
1239
+ applies_to_price_ids: T::Array[String],
1240
+ applies_to_price_interval_ids: T::Array[String],
1241
+ discount_type: Symbol,
1242
+ end_date: T.nilable(Time),
1243
+ percentage_discount: Float,
1244
+ start_date: Time
1245
+ }
1246
+ )
1247
+ end
1248
+ def to_hash
1015
1249
  end
1016
- def to_hash; end
1017
1250
  end
1018
1251
 
1019
1252
  class Usage < Orb::Internal::Type::BaseModel
1253
+ OrHash =
1254
+ T.type_alias do
1255
+ T.any(
1256
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage,
1257
+ Orb::Internal::AnyHash
1258
+ )
1259
+ end
1260
+
1020
1261
  # The price ids that this discount interval applies to.
1021
1262
  sig { returns(T::Array[String]) }
1022
1263
  attr_accessor :applies_to_price_ids
@@ -1049,8 +1290,7 @@ module Orb
1049
1290
  start_date: Time,
1050
1291
  usage_discount: Float,
1051
1292
  discount_type: Symbol
1052
- )
1053
- .returns(T.attached_class)
1293
+ ).returns(T.attached_class)
1054
1294
  end
1055
1295
  def self.new(
1056
1296
  # The price ids that this discount interval applies to.
@@ -1065,33 +1305,45 @@ module Orb
1065
1305
  # discount is for
1066
1306
  usage_discount:,
1067
1307
  discount_type: :usage
1068
- ); end
1308
+ )
1309
+ end
1310
+
1069
1311
  sig do
1070
- override
1071
- .returns(
1072
- {
1073
- applies_to_price_ids: T::Array[String],
1074
- applies_to_price_interval_ids: T::Array[String],
1075
- discount_type: Symbol,
1076
- end_date: T.nilable(Time),
1077
- start_date: Time,
1078
- usage_discount: Float
1079
- }
1080
- )
1312
+ override.returns(
1313
+ {
1314
+ applies_to_price_ids: T::Array[String],
1315
+ applies_to_price_interval_ids: T::Array[String],
1316
+ discount_type: Symbol,
1317
+ end_date: T.nilable(Time),
1318
+ start_date: Time,
1319
+ usage_discount: Float
1320
+ }
1321
+ )
1322
+ end
1323
+ def to_hash
1081
1324
  end
1082
- def to_hash; end
1083
1325
  end
1084
1326
 
1085
1327
  sig do
1086
- override
1087
- .returns(
1088
- [Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage]
1089
- )
1328
+ override.returns(
1329
+ T::Array[
1330
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Variants
1331
+ ]
1332
+ )
1333
+ end
1334
+ def self.variants
1090
1335
  end
1091
- def self.variants; end
1092
1336
  end
1093
1337
 
1094
1338
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1339
+ OrHash =
1340
+ T.type_alias do
1341
+ T.any(
1342
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule,
1343
+ Orb::Internal::AnyHash
1344
+ )
1345
+ end
1346
+
1095
1347
  sig { returns(T.nilable(Time)) }
1096
1348
  attr_accessor :end_date
1097
1349
 
@@ -1105,18 +1357,39 @@ module Orb
1105
1357
  attr_accessor :start_date
1106
1358
 
1107
1359
  sig do
1108
- params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
1109
- .returns(T.attached_class)
1360
+ params(
1361
+ end_date: T.nilable(Time),
1362
+ price_id: String,
1363
+ quantity: Float,
1364
+ start_date: Time
1365
+ ).returns(T.attached_class)
1366
+ end
1367
+ def self.new(end_date:, price_id:, quantity:, start_date:)
1110
1368
  end
1111
- def self.new(end_date:, price_id:, quantity:, start_date:); end
1112
1369
 
1113
1370
  sig do
1114
- override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
1371
+ override.returns(
1372
+ {
1373
+ end_date: T.nilable(Time),
1374
+ price_id: String,
1375
+ quantity: Float,
1376
+ start_date: Time
1377
+ }
1378
+ )
1379
+ end
1380
+ def to_hash
1115
1381
  end
1116
- def to_hash; end
1117
1382
  end
1118
1383
 
1119
1384
  class MaximumInterval < Orb::Internal::Type::BaseModel
1385
+ OrHash =
1386
+ T.type_alias do
1387
+ T.any(
1388
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval,
1389
+ Orb::Internal::AnyHash
1390
+ )
1391
+ end
1392
+
1120
1393
  # The price ids that this maximum interval applies to.
1121
1394
  sig { returns(T::Array[String]) }
1122
1395
  attr_accessor :applies_to_price_ids
@@ -1145,8 +1418,7 @@ module Orb
1145
1418
  end_date: T.nilable(Time),
1146
1419
  maximum_amount: String,
1147
1420
  start_date: Time
1148
- )
1149
- .returns(T.attached_class)
1421
+ ).returns(T.attached_class)
1150
1422
  end
1151
1423
  def self.new(
1152
1424
  # The price ids that this maximum interval applies to.
@@ -1160,23 +1432,33 @@ module Orb
1160
1432
  maximum_amount:,
1161
1433
  # The start date of the maximum interval.
1162
1434
  start_date:
1163
- ); end
1435
+ )
1436
+ end
1437
+
1164
1438
  sig do
1165
- override
1166
- .returns(
1167
- {
1168
- applies_to_price_ids: T::Array[String],
1169
- applies_to_price_interval_ids: T::Array[String],
1170
- end_date: T.nilable(Time),
1171
- maximum_amount: String,
1172
- start_date: Time
1173
- }
1174
- )
1439
+ override.returns(
1440
+ {
1441
+ applies_to_price_ids: T::Array[String],
1442
+ applies_to_price_interval_ids: T::Array[String],
1443
+ end_date: T.nilable(Time),
1444
+ maximum_amount: String,
1445
+ start_date: Time
1446
+ }
1447
+ )
1448
+ end
1449
+ def to_hash
1175
1450
  end
1176
- def to_hash; end
1177
1451
  end
1178
1452
 
1179
1453
  class MinimumInterval < Orb::Internal::Type::BaseModel
1454
+ OrHash =
1455
+ T.type_alias do
1456
+ T.any(
1457
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval,
1458
+ Orb::Internal::AnyHash
1459
+ )
1460
+ end
1461
+
1180
1462
  # The price ids that this minimum interval applies to.
1181
1463
  sig { returns(T::Array[String]) }
1182
1464
  attr_accessor :applies_to_price_ids
@@ -1205,8 +1487,7 @@ module Orb
1205
1487
  end_date: T.nilable(Time),
1206
1488
  minimum_amount: String,
1207
1489
  start_date: Time
1208
- )
1209
- .returns(T.attached_class)
1490
+ ).returns(T.attached_class)
1210
1491
  end
1211
1492
  def self.new(
1212
1493
  # The price ids that this minimum interval applies to.
@@ -1220,35 +1501,55 @@ module Orb
1220
1501
  minimum_amount:,
1221
1502
  # The start date of the minimum interval.
1222
1503
  start_date:
1223
- ); end
1504
+ )
1505
+ end
1506
+
1224
1507
  sig do
1225
- override
1226
- .returns(
1227
- {
1228
- applies_to_price_ids: T::Array[String],
1229
- applies_to_price_interval_ids: T::Array[String],
1230
- end_date: T.nilable(Time),
1231
- minimum_amount: String,
1232
- start_date: Time
1233
- }
1234
- )
1508
+ override.returns(
1509
+ {
1510
+ applies_to_price_ids: T::Array[String],
1511
+ applies_to_price_interval_ids: T::Array[String],
1512
+ end_date: T.nilable(Time),
1513
+ minimum_amount: String,
1514
+ start_date: Time
1515
+ }
1516
+ )
1517
+ end
1518
+ def to_hash
1235
1519
  end
1236
- def to_hash; end
1237
1520
  end
1238
1521
 
1239
1522
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1523
+ OrHash =
1524
+ T.type_alias do
1525
+ T.any(
1526
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange,
1527
+ Orb::Internal::AnyHash
1528
+ )
1529
+ end
1530
+
1240
1531
  sig { returns(String) }
1241
1532
  attr_accessor :id
1242
1533
 
1243
1534
  # A pending subscription change if one exists on this subscription.
1244
1535
  sig { params(id: String).returns(T.attached_class) }
1245
- def self.new(id:); end
1536
+ def self.new(id:)
1537
+ end
1246
1538
 
1247
- sig { override.returns({id: String}) }
1248
- def to_hash; end
1539
+ sig { override.returns({ id: String }) }
1540
+ def to_hash
1541
+ end
1249
1542
  end
1250
1543
 
1251
1544
  class PriceInterval < Orb::Internal::Type::BaseModel
1545
+ OrHash =
1546
+ T.type_alias do
1547
+ T.any(
1548
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval,
1549
+ Orb::Internal::AnyHash
1550
+ )
1551
+ end
1552
+
1252
1553
  sig { returns(String) }
1253
1554
  attr_accessor :id
1254
1555
 
@@ -1282,7 +1583,9 @@ module Orb
1282
1583
  sig do
1283
1584
  returns(
1284
1585
  T.nilable(
1285
- T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition]
1586
+ T::Array[
1587
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition
1588
+ ]
1286
1589
  )
1287
1590
  )
1288
1591
  end
@@ -1301,34 +1604,34 @@ module Orb
1301
1604
  sig do
1302
1605
  returns(
1303
1606
  T.any(
1304
- Orb::Models::Price::Unit,
1305
- Orb::Models::Price::Package,
1306
- Orb::Models::Price::Matrix,
1307
- Orb::Models::Price::Tiered,
1308
- Orb::Models::Price::TieredBps,
1309
- Orb::Models::Price::Bps,
1310
- Orb::Models::Price::BulkBps,
1311
- Orb::Models::Price::Bulk,
1312
- Orb::Models::Price::ThresholdTotalAmount,
1313
- Orb::Models::Price::TieredPackage,
1314
- Orb::Models::Price::GroupedTiered,
1315
- Orb::Models::Price::TieredWithMinimum,
1316
- Orb::Models::Price::TieredPackageWithMinimum,
1317
- Orb::Models::Price::PackageWithAllocation,
1318
- Orb::Models::Price::UnitWithPercent,
1319
- Orb::Models::Price::MatrixWithAllocation,
1320
- Orb::Models::Price::TieredWithProration,
1321
- Orb::Models::Price::UnitWithProration,
1322
- Orb::Models::Price::GroupedAllocation,
1323
- Orb::Models::Price::GroupedWithProratedMinimum,
1324
- Orb::Models::Price::GroupedWithMeteredMinimum,
1325
- Orb::Models::Price::MatrixWithDisplayName,
1326
- Orb::Models::Price::BulkWithProration,
1327
- Orb::Models::Price::GroupedTieredPackage,
1328
- Orb::Models::Price::MaxGroupTieredPackage,
1329
- Orb::Models::Price::ScalableMatrixWithUnitPricing,
1330
- Orb::Models::Price::ScalableMatrixWithTieredPricing,
1331
- Orb::Models::Price::CumulativeGroupedBulk
1607
+ Orb::Price::Unit,
1608
+ Orb::Price::Package,
1609
+ Orb::Price::Matrix,
1610
+ Orb::Price::Tiered,
1611
+ Orb::Price::TieredBps,
1612
+ Orb::Price::Bps,
1613
+ Orb::Price::BulkBps,
1614
+ Orb::Price::Bulk,
1615
+ Orb::Price::ThresholdTotalAmount,
1616
+ Orb::Price::TieredPackage,
1617
+ Orb::Price::GroupedTiered,
1618
+ Orb::Price::TieredWithMinimum,
1619
+ Orb::Price::TieredPackageWithMinimum,
1620
+ Orb::Price::PackageWithAllocation,
1621
+ Orb::Price::UnitWithPercent,
1622
+ Orb::Price::MatrixWithAllocation,
1623
+ Orb::Price::TieredWithProration,
1624
+ Orb::Price::UnitWithProration,
1625
+ Orb::Price::GroupedAllocation,
1626
+ Orb::Price::GroupedWithProratedMinimum,
1627
+ Orb::Price::GroupedWithMeteredMinimum,
1628
+ Orb::Price::MatrixWithDisplayName,
1629
+ Orb::Price::BulkWithProration,
1630
+ Orb::Price::GroupedTieredPackage,
1631
+ Orb::Price::MaxGroupTieredPackage,
1632
+ Orb::Price::ScalableMatrixWithUnitPricing,
1633
+ Orb::Price::ScalableMatrixWithTieredPricing,
1634
+ Orb::Price::CumulativeGroupedBulk
1332
1635
  )
1333
1636
  )
1334
1637
  end
@@ -1355,49 +1658,46 @@ module Orb
1355
1658
  current_billing_period_start_date: T.nilable(Time),
1356
1659
  end_date: T.nilable(Time),
1357
1660
  filter: T.nilable(String),
1358
- fixed_fee_quantity_transitions: T.nilable(
1359
- T::Array[
1360
- T.any(
1361
- Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition,
1362
- Orb::Internal::AnyHash
1363
- )
1364
- ]
1365
- ),
1366
- price: T.any(
1367
- Orb::Models::Price::Unit,
1368
- Orb::Internal::AnyHash,
1369
- Orb::Models::Price::Package,
1370
- Orb::Models::Price::Matrix,
1371
- Orb::Models::Price::Tiered,
1372
- Orb::Models::Price::TieredBps,
1373
- Orb::Models::Price::Bps,
1374
- Orb::Models::Price::BulkBps,
1375
- Orb::Models::Price::Bulk,
1376
- Orb::Models::Price::ThresholdTotalAmount,
1377
- Orb::Models::Price::TieredPackage,
1378
- Orb::Models::Price::GroupedTiered,
1379
- Orb::Models::Price::TieredWithMinimum,
1380
- Orb::Models::Price::TieredPackageWithMinimum,
1381
- Orb::Models::Price::PackageWithAllocation,
1382
- Orb::Models::Price::UnitWithPercent,
1383
- Orb::Models::Price::MatrixWithAllocation,
1384
- Orb::Models::Price::TieredWithProration,
1385
- Orb::Models::Price::UnitWithProration,
1386
- Orb::Models::Price::GroupedAllocation,
1387
- Orb::Models::Price::GroupedWithProratedMinimum,
1388
- Orb::Models::Price::GroupedWithMeteredMinimum,
1389
- Orb::Models::Price::MatrixWithDisplayName,
1390
- Orb::Models::Price::BulkWithProration,
1391
- Orb::Models::Price::GroupedTieredPackage,
1392
- Orb::Models::Price::MaxGroupTieredPackage,
1393
- Orb::Models::Price::ScalableMatrixWithUnitPricing,
1394
- Orb::Models::Price::ScalableMatrixWithTieredPricing,
1395
- Orb::Models::Price::CumulativeGroupedBulk
1396
- ),
1661
+ fixed_fee_quantity_transitions:
1662
+ T.nilable(
1663
+ T::Array[
1664
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition::OrHash
1665
+ ]
1666
+ ),
1667
+ price:
1668
+ T.any(
1669
+ Orb::Price::Unit::OrHash,
1670
+ Orb::Price::Package::OrHash,
1671
+ Orb::Price::Matrix::OrHash,
1672
+ Orb::Price::Tiered::OrHash,
1673
+ Orb::Price::TieredBps::OrHash,
1674
+ Orb::Price::Bps::OrHash,
1675
+ Orb::Price::BulkBps::OrHash,
1676
+ Orb::Price::Bulk::OrHash,
1677
+ Orb::Price::ThresholdTotalAmount::OrHash,
1678
+ Orb::Price::TieredPackage::OrHash,
1679
+ Orb::Price::GroupedTiered::OrHash,
1680
+ Orb::Price::TieredWithMinimum::OrHash,
1681
+ Orb::Price::TieredPackageWithMinimum::OrHash,
1682
+ Orb::Price::PackageWithAllocation::OrHash,
1683
+ Orb::Price::UnitWithPercent::OrHash,
1684
+ Orb::Price::MatrixWithAllocation::OrHash,
1685
+ Orb::Price::TieredWithProration::OrHash,
1686
+ Orb::Price::UnitWithProration::OrHash,
1687
+ Orb::Price::GroupedAllocation::OrHash,
1688
+ Orb::Price::GroupedWithProratedMinimum::OrHash,
1689
+ Orb::Price::GroupedWithMeteredMinimum::OrHash,
1690
+ Orb::Price::MatrixWithDisplayName::OrHash,
1691
+ Orb::Price::BulkWithProration::OrHash,
1692
+ Orb::Price::GroupedTieredPackage::OrHash,
1693
+ Orb::Price::MaxGroupTieredPackage::OrHash,
1694
+ Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
1695
+ Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
1696
+ Orb::Price::CumulativeGroupedBulk::OrHash
1697
+ ),
1397
1698
  start_date: Time,
1398
1699
  usage_customer_ids: T.nilable(T::Array[String])
1399
- )
1400
- .returns(T.attached_class)
1700
+ ).returns(T.attached_class)
1401
1701
  end
1402
1702
  def self.new(
1403
1703
  id:,
@@ -1436,58 +1736,72 @@ module Orb
1436
1736
  # A list of customer IDs whose usage events will be aggregated and billed under
1437
1737
  # this price interval.
1438
1738
  usage_customer_ids:
1439
- ); end
1739
+ )
1740
+ end
1741
+
1440
1742
  sig do
1441
- override
1442
- .returns(
1443
- {
1444
- id: String,
1445
- billing_cycle_day: Integer,
1446
- current_billing_period_end_date: T.nilable(Time),
1447
- current_billing_period_start_date: T.nilable(Time),
1448
- end_date: T.nilable(Time),
1449
- filter: T.nilable(String),
1450
- fixed_fee_quantity_transitions: T.nilable(
1451
- T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition]
1743
+ override.returns(
1744
+ {
1745
+ id: String,
1746
+ billing_cycle_day: Integer,
1747
+ current_billing_period_end_date: T.nilable(Time),
1748
+ current_billing_period_start_date: T.nilable(Time),
1749
+ end_date: T.nilable(Time),
1750
+ filter: T.nilable(String),
1751
+ fixed_fee_quantity_transitions:
1752
+ T.nilable(
1753
+ T::Array[
1754
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition
1755
+ ]
1452
1756
  ),
1453
- price: T.any(
1454
- Orb::Models::Price::Unit,
1455
- Orb::Models::Price::Package,
1456
- Orb::Models::Price::Matrix,
1457
- Orb::Models::Price::Tiered,
1458
- Orb::Models::Price::TieredBps,
1459
- Orb::Models::Price::Bps,
1460
- Orb::Models::Price::BulkBps,
1461
- Orb::Models::Price::Bulk,
1462
- Orb::Models::Price::ThresholdTotalAmount,
1463
- Orb::Models::Price::TieredPackage,
1464
- Orb::Models::Price::GroupedTiered,
1465
- Orb::Models::Price::TieredWithMinimum,
1466
- Orb::Models::Price::TieredPackageWithMinimum,
1467
- Orb::Models::Price::PackageWithAllocation,
1468
- Orb::Models::Price::UnitWithPercent,
1469
- Orb::Models::Price::MatrixWithAllocation,
1470
- Orb::Models::Price::TieredWithProration,
1471
- Orb::Models::Price::UnitWithProration,
1472
- Orb::Models::Price::GroupedAllocation,
1473
- Orb::Models::Price::GroupedWithProratedMinimum,
1474
- Orb::Models::Price::GroupedWithMeteredMinimum,
1475
- Orb::Models::Price::MatrixWithDisplayName,
1476
- Orb::Models::Price::BulkWithProration,
1477
- Orb::Models::Price::GroupedTieredPackage,
1478
- Orb::Models::Price::MaxGroupTieredPackage,
1479
- Orb::Models::Price::ScalableMatrixWithUnitPricing,
1480
- Orb::Models::Price::ScalableMatrixWithTieredPricing,
1481
- Orb::Models::Price::CumulativeGroupedBulk
1757
+ price:
1758
+ T.any(
1759
+ Orb::Price::Unit,
1760
+ Orb::Price::Package,
1761
+ Orb::Price::Matrix,
1762
+ Orb::Price::Tiered,
1763
+ Orb::Price::TieredBps,
1764
+ Orb::Price::Bps,
1765
+ Orb::Price::BulkBps,
1766
+ Orb::Price::Bulk,
1767
+ Orb::Price::ThresholdTotalAmount,
1768
+ Orb::Price::TieredPackage,
1769
+ Orb::Price::GroupedTiered,
1770
+ Orb::Price::TieredWithMinimum,
1771
+ Orb::Price::TieredPackageWithMinimum,
1772
+ Orb::Price::PackageWithAllocation,
1773
+ Orb::Price::UnitWithPercent,
1774
+ Orb::Price::MatrixWithAllocation,
1775
+ Orb::Price::TieredWithProration,
1776
+ Orb::Price::UnitWithProration,
1777
+ Orb::Price::GroupedAllocation,
1778
+ Orb::Price::GroupedWithProratedMinimum,
1779
+ Orb::Price::GroupedWithMeteredMinimum,
1780
+ Orb::Price::MatrixWithDisplayName,
1781
+ Orb::Price::BulkWithProration,
1782
+ Orb::Price::GroupedTieredPackage,
1783
+ Orb::Price::MaxGroupTieredPackage,
1784
+ Orb::Price::ScalableMatrixWithUnitPricing,
1785
+ Orb::Price::ScalableMatrixWithTieredPricing,
1786
+ Orb::Price::CumulativeGroupedBulk
1482
1787
  ),
1483
- start_date: Time,
1484
- usage_customer_ids: T.nilable(T::Array[String])
1485
- }
1486
- )
1788
+ start_date: Time,
1789
+ usage_customer_ids: T.nilable(T::Array[String])
1790
+ }
1791
+ )
1792
+ end
1793
+ def to_hash
1487
1794
  end
1488
- def to_hash; end
1489
1795
 
1490
1796
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1797
+ OrHash =
1798
+ T.type_alias do
1799
+ T.any(
1800
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition,
1801
+ Orb::Internal::AnyHash
1802
+ )
1803
+ end
1804
+
1491
1805
  sig { returns(Time) }
1492
1806
  attr_accessor :effective_date
1493
1807
 
@@ -1497,15 +1811,35 @@ module Orb
1497
1811
  sig { returns(Integer) }
1498
1812
  attr_accessor :quantity
1499
1813
 
1500
- sig { params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class) }
1501
- def self.new(effective_date:, price_id:, quantity:); end
1814
+ sig do
1815
+ params(
1816
+ effective_date: Time,
1817
+ price_id: String,
1818
+ quantity: Integer
1819
+ ).returns(T.attached_class)
1820
+ end
1821
+ def self.new(effective_date:, price_id:, quantity:)
1822
+ end
1502
1823
 
1503
- sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
1504
- def to_hash; end
1824
+ sig do
1825
+ override.returns(
1826
+ { effective_date: Time, price_id: String, quantity: Integer }
1827
+ )
1828
+ end
1829
+ def to_hash
1830
+ end
1505
1831
  end
1506
1832
  end
1507
1833
 
1508
1834
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1835
+ OrHash =
1836
+ T.type_alias do
1837
+ T.any(
1838
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon,
1839
+ Orb::Internal::AnyHash
1840
+ )
1841
+ end
1842
+
1509
1843
  sig { returns(String) }
1510
1844
  attr_accessor :coupon_id
1511
1845
 
@@ -1516,54 +1850,104 @@ module Orb
1516
1850
  attr_accessor :start_date
1517
1851
 
1518
1852
  sig do
1519
- params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
1853
+ params(
1854
+ coupon_id: String,
1855
+ end_date: T.nilable(Time),
1856
+ start_date: Time
1857
+ ).returns(T.attached_class)
1858
+ end
1859
+ def self.new(coupon_id:, end_date:, start_date:)
1520
1860
  end
1521
- def self.new(coupon_id:, end_date:, start_date:); end
1522
1861
 
1523
- sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
1524
- def to_hash; end
1862
+ sig do
1863
+ override.returns(
1864
+ { coupon_id: String, end_date: T.nilable(Time), start_date: Time }
1865
+ )
1866
+ end
1867
+ def to_hash
1868
+ end
1525
1869
  end
1526
1870
 
1527
1871
  module Status
1528
1872
  extend Orb::Internal::Type::Enum
1529
1873
 
1530
- TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status) }
1874
+ TaggedSymbol =
1875
+ T.type_alias do
1876
+ T.all(Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status)
1877
+ end
1531
1878
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1532
1879
 
1533
- ACTIVE = T.let(:active, Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol)
1534
- ENDED = T.let(:ended, Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol)
1535
- UPCOMING = T.let(:upcoming, Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol)
1880
+ ACTIVE =
1881
+ T.let(
1882
+ :active,
1883
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1884
+ )
1885
+ ENDED =
1886
+ T.let(
1887
+ :ended,
1888
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1889
+ )
1890
+ UPCOMING =
1891
+ T.let(
1892
+ :upcoming,
1893
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1894
+ )
1536
1895
 
1537
- sig { override.returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol]) }
1538
- def self.values; end
1896
+ sig do
1897
+ override.returns(
1898
+ T::Array[
1899
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1900
+ ]
1901
+ )
1902
+ end
1903
+ def self.values
1904
+ end
1539
1905
  end
1540
1906
 
1541
1907
  class TrialInfo < Orb::Internal::Type::BaseModel
1908
+ OrHash =
1909
+ T.type_alias do
1910
+ T.any(
1911
+ Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo,
1912
+ Orb::Internal::AnyHash
1913
+ )
1914
+ end
1915
+
1542
1916
  sig { returns(T.nilable(Time)) }
1543
1917
  attr_accessor :end_date
1544
1918
 
1545
1919
  sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
1546
- def self.new(end_date:); end
1920
+ def self.new(end_date:)
1921
+ end
1547
1922
 
1548
- sig { override.returns({end_date: T.nilable(Time)}) }
1549
- def to_hash; end
1923
+ sig { override.returns({ end_date: T.nilable(Time) }) }
1924
+ def to_hash
1925
+ end
1550
1926
  end
1551
1927
 
1552
1928
  class ChangedResources < Orb::Internal::Type::BaseModel
1929
+ OrHash =
1930
+ T.type_alias do
1931
+ T.any(
1932
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources,
1933
+ Orb::Internal::AnyHash
1934
+ )
1935
+ end
1936
+
1553
1937
  # The credit notes that were created as part of this operation.
1554
- sig { returns(T::Array[Orb::Models::CreditNote]) }
1938
+ sig { returns(T::Array[Orb::CreditNote]) }
1555
1939
  attr_accessor :created_credit_notes
1556
1940
 
1557
1941
  # The invoices that were created as part of this operation.
1558
- sig { returns(T::Array[Orb::Models::Invoice]) }
1942
+ sig { returns(T::Array[Orb::Invoice]) }
1559
1943
  attr_accessor :created_invoices
1560
1944
 
1561
1945
  # The credit notes that were voided as part of this operation.
1562
- sig { returns(T::Array[Orb::Models::CreditNote]) }
1946
+ sig { returns(T::Array[Orb::CreditNote]) }
1563
1947
  attr_accessor :voided_credit_notes
1564
1948
 
1565
1949
  # The invoices that were voided as part of this operation.
1566
- sig { returns(T::Array[Orb::Models::Invoice]) }
1950
+ sig { returns(T::Array[Orb::Invoice]) }
1567
1951
  attr_accessor :voided_invoices
1568
1952
 
1569
1953
  # The resources that were changed as part of this operation. Only present when
@@ -1571,12 +1955,11 @@ module Orb
1571
1955
  # `include_changed_resources` parameter was passed in the request.
1572
1956
  sig do
1573
1957
  params(
1574
- created_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1575
- created_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)],
1576
- voided_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1577
- voided_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)]
1578
- )
1579
- .returns(T.attached_class)
1958
+ created_credit_notes: T::Array[Orb::CreditNote::OrHash],
1959
+ created_invoices: T::Array[Orb::Invoice::OrHash],
1960
+ voided_credit_notes: T::Array[Orb::CreditNote::OrHash],
1961
+ voided_invoices: T::Array[Orb::Invoice::OrHash]
1962
+ ).returns(T.attached_class)
1580
1963
  end
1581
1964
  def self.new(
1582
1965
  # The credit notes that were created as part of this operation.
@@ -1587,19 +1970,21 @@ module Orb
1587
1970
  voided_credit_notes:,
1588
1971
  # The invoices that were voided as part of this operation.
1589
1972
  voided_invoices:
1590
- ); end
1973
+ )
1974
+ end
1975
+
1591
1976
  sig do
1592
- override
1593
- .returns(
1594
- {
1595
- created_credit_notes: T::Array[Orb::Models::CreditNote],
1596
- created_invoices: T::Array[Orb::Models::Invoice],
1597
- voided_credit_notes: T::Array[Orb::Models::CreditNote],
1598
- voided_invoices: T::Array[Orb::Models::Invoice]
1599
- }
1600
- )
1977
+ override.returns(
1978
+ {
1979
+ created_credit_notes: T::Array[Orb::CreditNote],
1980
+ created_invoices: T::Array[Orb::Invoice],
1981
+ voided_credit_notes: T::Array[Orb::CreditNote],
1982
+ voided_invoices: T::Array[Orb::Invoice]
1983
+ }
1984
+ )
1985
+ end
1986
+ def to_hash
1601
1987
  end
1602
- def to_hash; end
1603
1988
  end
1604
1989
  end
1605
1990
  end