orb-billing 0.3.1 → 0.3.2

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 (572) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +3 -3
  4. data/lib/orb/file_part.rb +2 -2
  5. data/lib/orb/internal/type/enum.rb +3 -3
  6. data/lib/orb/internal/type/request_parameters.rb +4 -4
  7. data/lib/orb/internal/type/union.rb +4 -4
  8. data/lib/orb/internal/util.rb +1 -1
  9. data/lib/orb/models/alert.rb +29 -32
  10. data/lib/orb/models/alert_create_for_customer_params.rb +7 -8
  11. data/lib/orb/models/alert_create_for_external_customer_params.rb +7 -8
  12. data/lib/orb/models/alert_create_for_subscription_params.rb +7 -8
  13. data/lib/orb/models/alert_list_params.rb +0 -1
  14. data/lib/orb/models/alert_update_params.rb +4 -5
  15. data/lib/orb/models/amount_discount.rb +6 -7
  16. data/lib/orb/models/billable_metric.rb +9 -11
  17. data/lib/orb/models/coupon.rb +9 -12
  18. data/lib/orb/models/coupon_create_params.rb +6 -8
  19. data/lib/orb/models/coupon_list_params.rb +0 -2
  20. data/lib/orb/models/coupons/subscription_list_params.rb +0 -1
  21. data/lib/orb/models/credit_note.rb +48 -46
  22. data/lib/orb/models/credit_note_create_params.rb +6 -6
  23. data/lib/orb/models/credit_note_list_params.rb +0 -1
  24. data/lib/orb/models/customer.rb +54 -61
  25. data/lib/orb/models/customer_create_params.rb +41 -53
  26. data/lib/orb/models/customer_list_params.rb +0 -1
  27. data/lib/orb/models/customer_update_by_external_id_params.rb +41 -53
  28. data/lib/orb/models/customer_update_params.rb +41 -51
  29. data/lib/orb/models/customers/balance_transaction_create_params.rb +3 -3
  30. data/lib/orb/models/customers/balance_transaction_create_response.rb +0 -2
  31. data/lib/orb/models/customers/balance_transaction_list_params.rb +0 -1
  32. data/lib/orb/models/customers/balance_transaction_list_response.rb +0 -2
  33. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +3 -4
  34. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -3
  35. data/lib/orb/models/customers/cost_list_params.rb +3 -4
  36. data/lib/orb/models/customers/cost_list_response.rb +3 -3
  37. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +0 -2
  38. data/lib/orb/models/customers/credit_list_params.rb +0 -2
  39. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +12 -21
  40. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +0 -7
  41. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +11 -22
  42. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +0 -7
  43. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +6 -7
  44. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +0 -7
  45. data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -9
  46. data/lib/orb/models/customers/credits/ledger_list_response.rb +0 -7
  47. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -15
  48. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +0 -6
  49. data/lib/orb/models/customers/credits/top_up_create_params.rb +7 -15
  50. data/lib/orb/models/customers/credits/top_up_create_response.rb +0 -6
  51. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +0 -1
  52. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +0 -6
  53. data/lib/orb/models/customers/credits/top_up_list_params.rb +0 -1
  54. data/lib/orb/models/customers/credits/top_up_list_response.rb +0 -6
  55. data/lib/orb/models/dimensional_price_group.rb +1 -3
  56. data/lib/orb/models/dimensional_price_group_create_params.rb +0 -1
  57. data/lib/orb/models/dimensional_price_group_list_params.rb +0 -1
  58. data/lib/orb/models/dimensional_price_groups.rb +6 -6
  59. data/lib/orb/models/discount.rb +5 -5
  60. data/lib/orb/models/evaluate_price_group.rb +1 -1
  61. data/lib/orb/models/event_ingest_params.rb +4 -9
  62. data/lib/orb/models/event_ingest_response.rb +0 -3
  63. data/lib/orb/models/event_search_params.rb +0 -3
  64. data/lib/orb/models/event_search_response.rb +0 -4
  65. data/lib/orb/models/event_update_params.rb +0 -3
  66. data/lib/orb/models/events/backfill_close_response.rb +0 -4
  67. data/lib/orb/models/events/backfill_create_params.rb +0 -7
  68. data/lib/orb/models/events/backfill_create_response.rb +0 -4
  69. data/lib/orb/models/events/backfill_fetch_response.rb +0 -4
  70. data/lib/orb/models/events/backfill_list_params.rb +0 -1
  71. data/lib/orb/models/events/backfill_list_response.rb +0 -4
  72. data/lib/orb/models/events/backfill_revert_response.rb +0 -4
  73. data/lib/orb/models/events/event_volumes.rb +3 -3
  74. data/lib/orb/models/events/volume_list_params.rb +0 -3
  75. data/lib/orb/models/invoice.rb +157 -202
  76. data/lib/orb/models/invoice_create_params.rb +14 -21
  77. data/lib/orb/models/invoice_fetch_upcoming_response.rb +9 -54
  78. data/lib/orb/models/invoice_issue_params.rb +0 -1
  79. data/lib/orb/models/invoice_level_discount.rb +4 -4
  80. data/lib/orb/models/invoice_line_item_create_params.rb +0 -1
  81. data/lib/orb/models/invoice_line_item_create_response.rb +6 -26
  82. data/lib/orb/models/invoice_list_params.rb +6 -10
  83. data/lib/orb/models/invoice_update_params.rb +0 -1
  84. data/lib/orb/models/item.rb +7 -8
  85. data/lib/orb/models/item_list_params.rb +0 -1
  86. data/lib/orb/models/item_update_params.rb +7 -7
  87. data/lib/orb/models/metric_create_params.rb +0 -1
  88. data/lib/orb/models/metric_list_params.rb +0 -1
  89. data/lib/orb/models/metric_update_params.rb +0 -1
  90. data/lib/orb/models/percentage_discount.rb +6 -8
  91. data/lib/orb/models/plan.rb +78 -103
  92. data/lib/orb/models/plan_create_params.rb +727 -800
  93. data/lib/orb/models/plan_list_params.rb +3 -4
  94. data/lib/orb/models/plan_update_params.rb +0 -2
  95. data/lib/orb/models/plans/external_plan_id_update_params.rb +0 -2
  96. data/lib/orb/models/price.rb +1671 -1724
  97. data/lib/orb/models/price_create_params.rb +75 -84
  98. data/lib/orb/models/price_evaluate_params.rb +0 -2
  99. data/lib/orb/models/price_evaluate_response.rb +3 -3
  100. data/lib/orb/models/price_list_params.rb +0 -1
  101. data/lib/orb/models/price_update_params.rb +0 -1
  102. data/lib/orb/models/prices/external_price_id_update_params.rb +0 -1
  103. data/lib/orb/models/subscription.rb +86 -122
  104. data/lib/orb/models/subscription_cancel_params.rb +3 -5
  105. data/lib/orb/models/subscription_cancel_response.rb +21 -57
  106. data/lib/orb/models/subscription_change_apply_response.rb +21 -58
  107. data/lib/orb/models/subscription_change_cancel_response.rb +21 -58
  108. data/lib/orb/models/subscription_change_retrieve_response.rb +21 -58
  109. data/lib/orb/models/subscription_create_params.rb +1865 -1815
  110. data/lib/orb/models/subscription_create_response.rb +21 -57
  111. data/lib/orb/models/subscription_fetch_costs_params.rb +3 -4
  112. data/lib/orb/models/subscription_fetch_costs_response.rb +3 -3
  113. data/lib/orb/models/subscription_fetch_schedule_params.rb +0 -1
  114. data/lib/orb/models/subscription_fetch_schedule_response.rb +0 -1
  115. data/lib/orb/models/subscription_fetch_usage_params.rb +6 -8
  116. data/lib/orb/models/subscription_list_params.rb +3 -4
  117. data/lib/orb/models/subscription_price_intervals_params.rb +1105 -1017
  118. data/lib/orb/models/subscription_price_intervals_response.rb +21 -57
  119. data/lib/orb/models/subscription_schedule_plan_change_params.rb +1906 -1791
  120. data/lib/orb/models/subscription_schedule_plan_change_response.rb +21 -57
  121. data/lib/orb/models/subscription_trigger_phase_params.rb +0 -2
  122. data/lib/orb/models/subscription_trigger_phase_response.rb +21 -57
  123. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +21 -57
  124. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +21 -57
  125. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +21 -57
  126. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +3 -6
  127. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +21 -57
  128. data/lib/orb/models/subscription_update_params.rb +0 -5
  129. data/lib/orb/models/subscription_update_trial_params.rb +4 -6
  130. data/lib/orb/models/subscription_update_trial_response.rb +21 -57
  131. data/lib/orb/models/subscription_usage.rb +46 -39
  132. data/lib/orb/models/subscriptions.rb +6 -6
  133. data/lib/orb/models/trial_discount.rb +6 -7
  134. data/lib/orb/models/usage_discount.rb +6 -8
  135. data/lib/orb/resources/alerts.rb +30 -31
  136. data/lib/orb/resources/coupons/subscriptions.rb +3 -4
  137. data/lib/orb/resources/coupons.rb +11 -21
  138. data/lib/orb/resources/credit_notes.rb +10 -11
  139. data/lib/orb/resources/customers/balance_transactions.rb +3 -4
  140. data/lib/orb/resources/customers/costs.rb +4 -6
  141. data/lib/orb/resources/customers/credits/ledger.rb +14 -33
  142. data/lib/orb/resources/customers/credits/top_ups.rb +10 -20
  143. data/lib/orb/resources/customers/credits.rb +2 -6
  144. data/lib/orb/resources/customers.rb +40 -67
  145. data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +2 -2
  146. data/lib/orb/resources/dimensional_price_groups.rb +8 -10
  147. data/lib/orb/resources/events/backfills.rb +2 -10
  148. data/lib/orb/resources/events/volume.rb +3 -6
  149. data/lib/orb/resources/events.rb +4 -12
  150. data/lib/orb/resources/invoice_line_items.rb +1 -2
  151. data/lib/orb/resources/invoices.rb +26 -43
  152. data/lib/orb/resources/items.rb +12 -13
  153. data/lib/orb/resources/metrics.rb +11 -14
  154. data/lib/orb/resources/plans/external_plan_id.rb +5 -7
  155. data/lib/orb/resources/plans.rb +14 -23
  156. data/lib/orb/resources/prices/external_price_id.rb +5 -6
  157. data/lib/orb/resources/prices.rb +25 -35
  158. data/lib/orb/resources/subscription_changes.rb +1 -1
  159. data/lib/orb/resources/subscriptions.rb +49 -107
  160. data/lib/orb/version.rb +1 -1
  161. data/lib/orb.rb +1 -0
  162. data/rbi/orb/client.rbi +5 -4
  163. data/rbi/orb/errors.rbi +59 -28
  164. data/rbi/orb/file_part.rbi +9 -6
  165. data/rbi/orb/internal/page.rbi +19 -6
  166. data/rbi/orb/internal/transport/base_client.rbi +131 -73
  167. data/rbi/orb/internal/transport/pooled_net_requester.rbi +25 -12
  168. data/rbi/orb/internal/type/array_of.rbi +42 -34
  169. data/rbi/orb/internal/type/base_model.rbi +124 -65
  170. data/rbi/orb/internal/type/base_page.rbi +11 -7
  171. data/rbi/orb/internal/type/boolean.rbi +16 -10
  172. data/rbi/orb/internal/type/converter.rbi +66 -31
  173. data/rbi/orb/internal/type/enum.rbi +27 -15
  174. data/rbi/orb/internal/type/file_input.rbi +12 -10
  175. data/rbi/orb/internal/type/hash_of.rbi +34 -24
  176. data/rbi/orb/internal/type/request_parameters.rbi +12 -4
  177. data/rbi/orb/internal/type/union.rbi +60 -25
  178. data/rbi/orb/internal/type/unknown.rbi +20 -12
  179. data/rbi/orb/internal/util.rbi +210 -89
  180. data/rbi/orb/models/alert.rbi +107 -70
  181. data/rbi/orb/models/alert_create_for_customer_params.rbi +60 -27
  182. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +68 -29
  183. data/rbi/orb/models/alert_create_for_subscription_params.rbi +53 -26
  184. data/rbi/orb/models/alert_disable_params.rbi +17 -6
  185. data/rbi/orb/models/alert_enable_params.rbi +17 -6
  186. data/rbi/orb/models/alert_list_params.rbi +23 -20
  187. data/rbi/orb/models/alert_retrieve_params.rbi +10 -4
  188. data/rbi/orb/models/alert_update_params.rbi +25 -14
  189. data/rbi/orb/models/amount_discount.rbi +28 -19
  190. data/rbi/orb/models/billable_metric.rbi +33 -26
  191. data/rbi/orb/models/billing_cycle_relative_date.rbi +11 -5
  192. data/rbi/orb/models/coupon.rbi +28 -20
  193. data/rbi/orb/models/coupon_archive_params.rbi +10 -4
  194. data/rbi/orb/models/coupon_create_params.rbi +72 -38
  195. data/rbi/orb/models/coupon_fetch_params.rbi +10 -4
  196. data/rbi/orb/models/coupon_list_params.rbi +18 -15
  197. data/rbi/orb/models/coupons/subscription_list_params.rbi +16 -6
  198. data/rbi/orb/models/credit_note.rbi +293 -158
  199. data/rbi/orb/models/credit_note_create_params.rbi +58 -29
  200. data/rbi/orb/models/credit_note_fetch_params.rbi +10 -4
  201. data/rbi/orb/models/credit_note_list_params.rbi +20 -17
  202. data/rbi/orb/models/customer.rbi +430 -329
  203. data/rbi/orb/models/customer_create_params.rbi +662 -325
  204. data/rbi/orb/models/customer_delete_params.rbi +10 -4
  205. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +10 -4
  206. data/rbi/orb/models/customer_fetch_params.rbi +10 -4
  207. data/rbi/orb/models/customer_list_params.rbi +20 -17
  208. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +10 -4
  209. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +10 -4
  210. data/rbi/orb/models/customer_update_by_external_id_params.rbi +1136 -336
  211. data/rbi/orb/models/customer_update_params.rbi +661 -324
  212. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +50 -21
  213. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +154 -61
  214. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +20 -17
  215. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +164 -59
  216. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +56 -22
  217. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +162 -124
  218. data/rbi/orb/models/customers/cost_list_params.rbi +45 -22
  219. data/rbi/orb/models/customers/cost_list_response.rbi +154 -123
  220. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +18 -15
  221. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +48 -22
  222. data/rbi/orb/models/customers/credit_list_params.rbi +18 -15
  223. data/rbi/orb/models/customers/credit_list_response.rbi +44 -21
  224. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +106 -68
  225. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +643 -434
  226. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +117 -59
  227. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +700 -425
  228. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +102 -44
  229. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +681 -432
  230. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +123 -40
  231. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +735 -389
  232. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +74 -53
  233. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +65 -48
  234. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +84 -45
  235. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +83 -43
  236. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +16 -6
  237. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +15 -5
  238. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +9 -5
  239. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +70 -49
  240. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +9 -5
  241. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +84 -43
  242. data/rbi/orb/models/dimensional_price_group.rbi +18 -15
  243. data/rbi/orb/models/dimensional_price_group_create_params.rbi +19 -16
  244. data/rbi/orb/models/dimensional_price_group_list_params.rbi +16 -6
  245. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +10 -4
  246. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +10 -9
  247. data/rbi/orb/models/dimensional_price_groups.rbi +18 -13
  248. data/rbi/orb/models/discount.rbi +11 -5
  249. data/rbi/orb/models/evaluate_price_group.rbi +28 -12
  250. data/rbi/orb/models/event_deprecate_params.rbi +10 -4
  251. data/rbi/orb/models/event_deprecate_response.rbi +8 -3
  252. data/rbi/orb/models/event_ingest_params.rbi +37 -31
  253. data/rbi/orb/models/event_ingest_response.rbi +63 -23
  254. data/rbi/orb/models/event_search_params.rbi +17 -14
  255. data/rbi/orb/models/event_search_response.rbi +33 -21
  256. data/rbi/orb/models/event_update_params.rbi +19 -16
  257. data/rbi/orb/models/event_update_response.rbi +8 -3
  258. data/rbi/orb/models/events/backfill_close_params.rbi +10 -9
  259. data/rbi/orb/models/events/backfill_close_response.rbi +64 -29
  260. data/rbi/orb/models/events/backfill_create_params.rbi +21 -18
  261. data/rbi/orb/models/events/backfill_create_response.rbi +63 -29
  262. data/rbi/orb/models/events/backfill_fetch_params.rbi +10 -9
  263. data/rbi/orb/models/events/backfill_fetch_response.rbi +64 -29
  264. data/rbi/orb/models/events/backfill_list_params.rbi +16 -6
  265. data/rbi/orb/models/events/backfill_list_response.rbi +62 -28
  266. data/rbi/orb/models/events/backfill_revert_params.rbi +10 -9
  267. data/rbi/orb/models/events/backfill_revert_response.rbi +63 -29
  268. data/rbi/orb/models/events/event_volumes.rbi +32 -10
  269. data/rbi/orb/models/events/volume_list_params.rbi +18 -15
  270. data/rbi/orb/models/invoice.rbi +1286 -805
  271. data/rbi/orb/models/invoice_create_params.rbi +97 -69
  272. data/rbi/orb/models/invoice_fetch_params.rbi +10 -4
  273. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +15 -5
  274. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1991 -861
  275. data/rbi/orb/models/invoice_issue_params.rbi +16 -5
  276. data/rbi/orb/models/invoice_level_discount.rbi +11 -4
  277. data/rbi/orb/models/invoice_line_item_create_params.rbi +20 -17
  278. data/rbi/orb/models/invoice_line_item_create_response.rbi +573 -376
  279. data/rbi/orb/models/invoice_list_params.rbi +67 -47
  280. data/rbi/orb/models/invoice_mark_paid_params.rbi +17 -14
  281. data/rbi/orb/models/invoice_pay_params.rbi +10 -4
  282. data/rbi/orb/models/invoice_update_params.rbi +15 -10
  283. data/rbi/orb/models/invoice_void_params.rbi +10 -4
  284. data/rbi/orb/models/item.rbi +87 -39
  285. data/rbi/orb/models/item_create_params.rbi +14 -5
  286. data/rbi/orb/models/item_fetch_params.rbi +10 -4
  287. data/rbi/orb/models/item_list_params.rbi +16 -6
  288. data/rbi/orb/models/item_update_params.rbi +79 -39
  289. data/rbi/orb/models/metric_create_params.rbi +19 -16
  290. data/rbi/orb/models/metric_fetch_params.rbi +10 -4
  291. data/rbi/orb/models/metric_list_params.rbi +20 -17
  292. data/rbi/orb/models/metric_update_params.rbi +15 -10
  293. data/rbi/orb/models/pagination_metadata.rbi +16 -4
  294. data/rbi/orb/models/percentage_discount.rbi +32 -19
  295. data/rbi/orb/models/plan.rbi +496 -365
  296. data/rbi/orb/models/plan_create_params.rbi +4785 -2875
  297. data/rbi/orb/models/plan_fetch_params.rbi +10 -4
  298. data/rbi/orb/models/plan_list_params.rbi +34 -27
  299. data/rbi/orb/models/plan_update_params.rbi +16 -13
  300. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +10 -9
  301. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +16 -13
  302. data/rbi/orb/models/price.rbi +9969 -5024
  303. data/rbi/orb/models/price_create_params.rbi +501 -245
  304. data/rbi/orb/models/price_evaluate_params.rbi +20 -17
  305. data/rbi/orb/models/price_evaluate_response.rbi +11 -6
  306. data/rbi/orb/models/price_fetch_params.rbi +10 -4
  307. data/rbi/orb/models/price_list_params.rbi +16 -6
  308. data/rbi/orb/models/price_update_params.rbi +15 -10
  309. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +10 -9
  310. data/rbi/orb/models/prices/external_price_id_update_params.rbi +15 -10
  311. data/rbi/orb/models/subscription.rbi +578 -420
  312. data/rbi/orb/models/subscription_cancel_params.rbi +44 -22
  313. data/rbi/orb/models/subscription_cancel_response.rbi +700 -438
  314. data/rbi/orb/models/subscription_change_apply_params.rbi +16 -13
  315. data/rbi/orb/models/subscription_change_apply_response.rbi +784 -504
  316. data/rbi/orb/models/subscription_change_cancel_params.rbi +10 -4
  317. data/rbi/orb/models/subscription_change_cancel_response.rbi +783 -514
  318. data/rbi/orb/models/subscription_change_retrieve_params.rbi +10 -4
  319. data/rbi/orb/models/subscription_change_retrieve_response.rbi +782 -524
  320. data/rbi/orb/models/subscription_create_params.rbi +9021 -6730
  321. data/rbi/orb/models/subscription_create_response.rbi +700 -438
  322. data/rbi/orb/models/subscription_fetch_costs_params.rbi +47 -22
  323. data/rbi/orb/models/subscription_fetch_costs_response.rbi +154 -123
  324. data/rbi/orb/models/subscription_fetch_params.rbi +10 -4
  325. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +20 -17
  326. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +33 -19
  327. data/rbi/orb/models/subscription_fetch_usage_params.rbi +81 -34
  328. data/rbi/orb/models/subscription_list_params.rbi +39 -28
  329. data/rbi/orb/models/subscription_price_intervals_params.rbi +5181 -3822
  330. data/rbi/orb/models/subscription_price_intervals_response.rbi +720 -453
  331. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +8602 -6910
  332. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +718 -467
  333. data/rbi/orb/models/subscription_trigger_phase_params.rbi +16 -13
  334. data/rbi/orb/models/subscription_trigger_phase_response.rbi +712 -448
  335. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +10 -4
  336. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +719 -467
  337. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +16 -5
  338. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +693 -502
  339. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +10 -4
  340. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +708 -497
  341. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +57 -26
  342. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +719 -467
  343. data/rbi/orb/models/subscription_update_params.rbi +19 -16
  344. data/rbi/orb/models/subscription_update_trial_params.rbi +57 -19
  345. data/rbi/orb/models/subscription_update_trial_response.rbi +712 -447
  346. data/rbi/orb/models/subscription_usage.rbi +271 -121
  347. data/rbi/orb/models/subscriptions.rbi +18 -11
  348. data/rbi/orb/models/top_level_ping_params.rbi +10 -4
  349. data/rbi/orb/models/top_level_ping_response.rbi +7 -3
  350. data/rbi/orb/models/trial_discount.rbi +29 -20
  351. data/rbi/orb/models/usage_discount.rbi +28 -19
  352. data/rbi/orb/models.rbi +22 -11
  353. data/rbi/orb/request_options.rbi +12 -6
  354. data/rbi/orb/resources/alerts.rbi +61 -40
  355. data/rbi/orb/resources/coupons/subscriptions.rbi +7 -5
  356. data/rbi/orb/resources/coupons.rbi +33 -18
  357. data/rbi/orb/resources/credit_notes.rbi +22 -13
  358. data/rbi/orb/resources/customers/balance_transactions.rbi +17 -9
  359. data/rbi/orb/resources/customers/costs.rbi +18 -11
  360. data/rbi/orb/resources/customers/credits/ledger.rbi +98 -74
  361. data/rbi/orb/resources/customers/credits/top_ups.rbi +61 -25
  362. data/rbi/orb/resources/customers/credits.rbi +16 -7
  363. data/rbi/orb/resources/customers.rbi +137 -72
  364. data/rbi/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +8 -4
  365. data/rbi/orb/resources/dimensional_price_groups.rbi +26 -12
  366. data/rbi/orb/resources/events/backfills.rbi +35 -17
  367. data/rbi/orb/resources/events/volume.rbi +7 -5
  368. data/rbi/orb/resources/events.rbi +26 -16
  369. data/rbi/orb/resources/invoice_line_items.rbi +7 -5
  370. data/rbi/orb/resources/invoices.rbi +72 -41
  371. data/rbi/orb/resources/items.rbi +40 -13
  372. data/rbi/orb/resources/metrics.rbi +25 -15
  373. data/rbi/orb/resources/plans/external_plan_id.rbi +15 -7
  374. data/rbi/orb/resources/plans.rbi +57 -47
  375. data/rbi/orb/resources/prices/external_price_id.rbi +73 -68
  376. data/rbi/orb/resources/prices.rbi +176 -156
  377. data/rbi/orb/resources/subscription_changes.rbi +19 -11
  378. data/rbi/orb/resources/subscriptions.rbi +200 -114
  379. data/rbi/orb/resources/top_level.rbi +9 -3
  380. data/sig/orb/internal/page.rbs +0 -2
  381. data/sig/orb/internal/type/request_parameters.rbs +3 -1
  382. data/sig/orb/models/alert.rbs +19 -31
  383. data/sig/orb/models/alert_create_for_customer_params.rbs +3 -7
  384. data/sig/orb/models/alert_create_for_external_customer_params.rbs +3 -7
  385. data/sig/orb/models/alert_create_for_subscription_params.rbs +3 -7
  386. data/sig/orb/models/alert_disable_params.rbs +0 -2
  387. data/sig/orb/models/alert_enable_params.rbs +0 -2
  388. data/sig/orb/models/alert_list_params.rbs +0 -2
  389. data/sig/orb/models/alert_retrieve_params.rbs +0 -2
  390. data/sig/orb/models/alert_update_params.rbs +3 -7
  391. data/sig/orb/models/amount_discount.rbs +4 -6
  392. data/sig/orb/models/billable_metric.rbs +7 -9
  393. data/sig/orb/models/coupon.rbs +5 -8
  394. data/sig/orb/models/coupon_archive_params.rbs +0 -2
  395. data/sig/orb/models/coupon_create_params.rbs +3 -9
  396. data/sig/orb/models/coupon_fetch_params.rbs +0 -2
  397. data/sig/orb/models/coupon_list_params.rbs +0 -2
  398. data/sig/orb/models/coupons/subscription_list_params.rbs +0 -2
  399. data/sig/orb/models/credit_note.rbs +48 -66
  400. data/sig/orb/models/credit_note_create_params.rbs +3 -7
  401. data/sig/orb/models/credit_note_fetch_params.rbs +0 -2
  402. data/sig/orb/models/credit_note_list_params.rbs +0 -2
  403. data/sig/orb/models/customer.rbs +43 -63
  404. data/sig/orb/models/customer_create_params.rbs +32 -52
  405. data/sig/orb/models/customer_delete_params.rbs +0 -2
  406. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +0 -2
  407. data/sig/orb/models/customer_fetch_params.rbs +0 -2
  408. data/sig/orb/models/customer_list_params.rbs +0 -2
  409. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +0 -2
  410. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +0 -2
  411. data/sig/orb/models/customer_update_by_external_id_params.rbs +32 -52
  412. data/sig/orb/models/customer_update_params.rbs +32 -52
  413. data/sig/orb/models/customers/balance_transaction_create_params.rbs +0 -2
  414. data/sig/orb/models/customers/balance_transaction_create_response.rbs +0 -6
  415. data/sig/orb/models/customers/balance_transaction_list_params.rbs +0 -2
  416. data/sig/orb/models/customers/balance_transaction_list_response.rbs +0 -6
  417. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +0 -2
  418. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +0 -6
  419. data/sig/orb/models/customers/cost_list_params.rbs +0 -2
  420. data/sig/orb/models/customers/cost_list_response.rbs +0 -6
  421. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +0 -2
  422. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +0 -2
  423. data/sig/orb/models/customers/credit_list_params.rbs +0 -2
  424. data/sig/orb/models/customers/credit_list_response.rbs +0 -2
  425. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +3 -7
  426. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +1 -43
  427. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +3 -7
  428. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +1 -43
  429. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +0 -2
  430. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +1 -43
  431. data/sig/orb/models/customers/credits/ledger_list_params.rbs +0 -2
  432. data/sig/orb/models/customers/credits/ledger_list_response.rbs +1 -43
  433. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +3 -7
  434. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +0 -4
  435. data/sig/orb/models/customers/credits/top_up_create_params.rbs +3 -7
  436. data/sig/orb/models/customers/credits/top_up_create_response.rbs +0 -4
  437. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +0 -2
  438. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +0 -2
  439. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +0 -2
  440. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +0 -4
  441. data/sig/orb/models/customers/credits/top_up_list_params.rbs +0 -2
  442. data/sig/orb/models/customers/credits/top_up_list_response.rbs +0 -4
  443. data/sig/orb/models/dimensional_price_group.rbs +0 -2
  444. data/sig/orb/models/dimensional_price_group_create_params.rbs +0 -2
  445. data/sig/orb/models/dimensional_price_group_list_params.rbs +0 -2
  446. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +0 -2
  447. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +0 -2
  448. data/sig/orb/models/dimensional_price_groups.rbs +6 -8
  449. data/sig/orb/models/discount.rbs +5 -5
  450. data/sig/orb/models/evaluate_price_group.rbs +4 -6
  451. data/sig/orb/models/event_deprecate_params.rbs +0 -2
  452. data/sig/orb/models/event_deprecate_response.rbs +0 -2
  453. data/sig/orb/models/event_ingest_params.rbs +3 -7
  454. data/sig/orb/models/event_ingest_response.rbs +0 -6
  455. data/sig/orb/models/event_search_params.rbs +0 -2
  456. data/sig/orb/models/event_search_response.rbs +0 -4
  457. data/sig/orb/models/event_update_params.rbs +0 -2
  458. data/sig/orb/models/event_update_response.rbs +0 -2
  459. data/sig/orb/models/events/backfill_close_params.rbs +0 -2
  460. data/sig/orb/models/events/backfill_close_response.rbs +0 -2
  461. data/sig/orb/models/events/backfill_create_params.rbs +0 -2
  462. data/sig/orb/models/events/backfill_create_response.rbs +0 -2
  463. data/sig/orb/models/events/backfill_fetch_params.rbs +0 -2
  464. data/sig/orb/models/events/backfill_fetch_response.rbs +0 -2
  465. data/sig/orb/models/events/backfill_list_params.rbs +0 -2
  466. data/sig/orb/models/events/backfill_list_response.rbs +0 -2
  467. data/sig/orb/models/events/backfill_revert_params.rbs +0 -2
  468. data/sig/orb/models/events/backfill_revert_response.rbs +0 -2
  469. data/sig/orb/models/events/event_volumes.rbs +3 -10
  470. data/sig/orb/models/events/volume_list_params.rbs +0 -2
  471. data/sig/orb/models/invoice.rbs +110 -172
  472. data/sig/orb/models/invoice_create_params.rbs +10 -16
  473. data/sig/orb/models/invoice_fetch_params.rbs +0 -2
  474. data/sig/orb/models/invoice_fetch_upcoming_params.rbs +0 -2
  475. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -64
  476. data/sig/orb/models/invoice_issue_params.rbs +0 -2
  477. data/sig/orb/models/invoice_level_discount.rbs +2 -4
  478. data/sig/orb/models/invoice_line_item_create_params.rbs +0 -2
  479. data/sig/orb/models/invoice_line_item_create_response.rbs +2 -36
  480. data/sig/orb/models/invoice_list_params.rbs +4 -6
  481. data/sig/orb/models/invoice_mark_paid_params.rbs +0 -2
  482. data/sig/orb/models/invoice_pay_params.rbs +0 -2
  483. data/sig/orb/models/invoice_update_params.rbs +0 -2
  484. data/sig/orb/models/invoice_void_params.rbs +0 -2
  485. data/sig/orb/models/item.rbs +7 -11
  486. data/sig/orb/models/item_create_params.rbs +0 -2
  487. data/sig/orb/models/item_fetch_params.rbs +0 -2
  488. data/sig/orb/models/item_list_params.rbs +0 -2
  489. data/sig/orb/models/item_update_params.rbs +7 -11
  490. data/sig/orb/models/metric_create_params.rbs +0 -2
  491. data/sig/orb/models/metric_fetch_params.rbs +0 -2
  492. data/sig/orb/models/metric_list_params.rbs +0 -2
  493. data/sig/orb/models/metric_update_params.rbs +0 -2
  494. data/sig/orb/models/pagination_metadata.rbs +0 -2
  495. data/sig/orb/models/percentage_discount.rbs +4 -6
  496. data/sig/orb/models/plan.rbs +45 -73
  497. data/sig/orb/models/plan_create_params.rbs +518 -696
  498. data/sig/orb/models/plan_fetch_params.rbs +0 -2
  499. data/sig/orb/models/plan_list_params.rbs +0 -2
  500. data/sig/orb/models/plan_update_params.rbs +0 -2
  501. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +0 -2
  502. data/sig/orb/models/plans/external_plan_id_update_params.rbs +0 -2
  503. data/sig/orb/models/price.rbs +1194 -1730
  504. data/sig/orb/models/price_create_params.rbs +59 -97
  505. data/sig/orb/models/price_evaluate_params.rbs +0 -2
  506. data/sig/orb/models/price_evaluate_response.rbs +3 -6
  507. data/sig/orb/models/price_fetch_params.rbs +0 -2
  508. data/sig/orb/models/price_list_params.rbs +0 -2
  509. data/sig/orb/models/price_update_params.rbs +0 -2
  510. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +0 -2
  511. data/sig/orb/models/prices/external_price_id_update_params.rbs +0 -2
  512. data/sig/orb/models/subscription.rbs +56 -94
  513. data/sig/orb/models/subscription_cancel_params.rbs +0 -2
  514. data/sig/orb/models/subscription_cancel_response.rbs +20 -60
  515. data/sig/orb/models/subscription_change_apply_params.rbs +0 -2
  516. data/sig/orb/models/subscription_change_apply_response.rbs +20 -62
  517. data/sig/orb/models/subscription_change_cancel_params.rbs +0 -2
  518. data/sig/orb/models/subscription_change_cancel_response.rbs +20 -62
  519. data/sig/orb/models/subscription_change_retrieve_params.rbs +0 -2
  520. data/sig/orb/models/subscription_change_retrieve_response.rbs +20 -62
  521. data/sig/orb/models/subscription_create_params.rbs +1103 -1499
  522. data/sig/orb/models/subscription_create_response.rbs +20 -60
  523. data/sig/orb/models/subscription_fetch_costs_params.rbs +0 -2
  524. data/sig/orb/models/subscription_fetch_costs_response.rbs +0 -6
  525. data/sig/orb/models/subscription_fetch_params.rbs +0 -2
  526. data/sig/orb/models/subscription_fetch_schedule_params.rbs +0 -2
  527. data/sig/orb/models/subscription_fetch_schedule_response.rbs +0 -4
  528. data/sig/orb/models/subscription_fetch_usage_params.rbs +0 -2
  529. data/sig/orb/models/subscription_list_params.rbs +0 -2
  530. data/sig/orb/models/subscription_price_intervals_params.rbs +666 -896
  531. data/sig/orb/models/subscription_price_intervals_response.rbs +20 -60
  532. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1103 -1499
  533. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +20 -60
  534. data/sig/orb/models/subscription_trigger_phase_params.rbs +0 -2
  535. data/sig/orb/models/subscription_trigger_phase_response.rbs +20 -60
  536. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +0 -2
  537. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +20 -60
  538. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +0 -2
  539. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +20 -60
  540. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +0 -2
  541. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +20 -60
  542. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +0 -2
  543. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +20 -60
  544. data/sig/orb/models/subscription_update_params.rbs +0 -2
  545. data/sig/orb/models/subscription_update_trial_params.rbs +1 -3
  546. data/sig/orb/models/subscription_update_trial_response.rbs +20 -60
  547. data/sig/orb/models/subscription_usage.rbs +35 -53
  548. data/sig/orb/models/subscriptions.rbs +6 -8
  549. data/sig/orb/models/top_level_ping_params.rbs +0 -2
  550. data/sig/orb/models/top_level_ping_response.rbs +0 -2
  551. data/sig/orb/models/trial_discount.rbs +4 -6
  552. data/sig/orb/models/usage_discount.rbs +4 -6
  553. data/sig/orb/request_options.rbs +1 -1
  554. data/sig/orb/resources/alerts.rbs +12 -12
  555. data/sig/orb/resources/coupons/subscriptions.rbs +1 -1
  556. data/sig/orb/resources/coupons.rbs +4 -4
  557. data/sig/orb/resources/credit_notes.rbs +4 -4
  558. data/sig/orb/resources/customers/credits/ledger.rbs +2 -2
  559. data/sig/orb/resources/customers/credits/top_ups.rbs +2 -2
  560. data/sig/orb/resources/customers.rbs +24 -24
  561. data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +1 -1
  562. data/sig/orb/resources/dimensional_price_groups.rbs +3 -3
  563. data/sig/orb/resources/events/volume.rbs +1 -1
  564. data/sig/orb/resources/events.rbs +1 -1
  565. data/sig/orb/resources/invoices.rbs +10 -10
  566. data/sig/orb/resources/items.rbs +5 -5
  567. data/sig/orb/resources/metrics.rbs +4 -4
  568. data/sig/orb/resources/plans/external_plan_id.rbs +2 -2
  569. data/sig/orb/resources/plans.rbs +5 -5
  570. data/sig/orb/resources/prices.rbs +11 -11
  571. data/sig/orb/resources/subscriptions.rbs +21 -21
  572. metadata +2 -2
@@ -3,6 +3,8 @@
3
3
  module Orb
4
4
  module Models
5
5
  class SubscriptionUpdateTrialResponse < Orb::Internal::Type::BaseModel
6
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
7
+
6
8
  sig { returns(String) }
7
9
  attr_accessor :id
8
10
 
@@ -13,7 +15,13 @@ module Orb
13
15
 
14
16
  # The adjustment intervals for this subscription sorted by the start_date of the
15
17
  # adjustment interval.
16
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]) }
18
+ sig do
19
+ returns(
20
+ T::Array[
21
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval
22
+ ]
23
+ )
24
+ end
17
25
  attr_accessor :adjustment_intervals
18
26
 
19
27
  # Determines whether issued invoices for this subscription will automatically be
@@ -22,17 +30,18 @@ module Orb
22
30
  sig { returns(T.nilable(T::Boolean)) }
23
31
  attr_accessor :auto_collection
24
32
 
25
- sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration) }
33
+ sig do
34
+ returns(
35
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration
36
+ )
37
+ end
26
38
  attr_reader :billing_cycle_anchor_configuration
27
39
 
28
40
  sig do
29
41
  params(
30
- billing_cycle_anchor_configuration: T.any(
31
- Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
32
- Orb::Internal::AnyHash
33
- )
34
- )
35
- .void
42
+ billing_cycle_anchor_configuration:
43
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration::OrHash
44
+ ).void
36
45
  end
37
46
  attr_writer :billing_cycle_anchor_configuration
38
47
 
@@ -76,10 +85,10 @@ module Orb
76
85
  # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
77
86
  # your account's timezone. See [Timezone localization](/essentials/timezones) for
78
87
  # information on what this timezone parameter influences within Orb.
79
- sig { returns(Orb::Models::Customer) }
88
+ sig { returns(Orb::Customer) }
80
89
  attr_reader :customer
81
90
 
82
- sig { params(customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash)).void }
91
+ sig { params(customer: Orb::Customer::OrHash).void }
83
92
  attr_writer :customer
84
93
 
85
94
  # Determines the default memo on this subscriptions' invoices. Note that if this
@@ -105,14 +114,26 @@ module Orb
105
114
  sig { returns(T.nilable(Time)) }
106
115
  attr_accessor :end_date
107
116
 
108
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule]) }
117
+ sig do
118
+ returns(
119
+ T::Array[
120
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule
121
+ ]
122
+ )
123
+ end
109
124
  attr_accessor :fixed_fee_quantity_schedule
110
125
 
111
126
  sig { returns(T.nilable(String)) }
112
127
  attr_accessor :invoicing_threshold
113
128
 
114
129
  # The maximum intervals for this subscription sorted by the start_date.
115
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]) }
130
+ sig do
131
+ returns(
132
+ T::Array[
133
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval
134
+ ]
135
+ )
136
+ end
116
137
  attr_accessor :maximum_intervals
117
138
 
118
139
  # User specified key-value pairs for the resource. If not present, this defaults
@@ -123,7 +144,13 @@ module Orb
123
144
  attr_accessor :metadata
124
145
 
125
146
  # The minimum intervals for this subscription sorted by the start_date.
126
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]) }
147
+ sig do
148
+ returns(
149
+ T::Array[
150
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval
151
+ ]
152
+ )
153
+ end
127
154
  attr_accessor :minimum_intervals
128
155
 
129
156
  # Determines the difference between the invoice issue date for subscription
@@ -134,16 +161,22 @@ module Orb
134
161
  attr_accessor :net_terms
135
162
 
136
163
  # A pending subscription change if one exists on this subscription.
137
- sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange)) }
164
+ sig do
165
+ returns(
166
+ T.nilable(
167
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange
168
+ )
169
+ )
170
+ end
138
171
  attr_reader :pending_subscription_change
139
172
 
140
173
  sig do
141
174
  params(
142
- pending_subscription_change: T.nilable(
143
- T.any(Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
144
- )
145
- )
146
- .void
175
+ pending_subscription_change:
176
+ T.nilable(
177
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange::OrHash
178
+ )
179
+ ).void
147
180
  end
148
181
  attr_writer :pending_subscription_change
149
182
 
@@ -151,24 +184,36 @@ module Orb
151
184
  # subscribed to by a customer. Plans define the billing behavior of the
152
185
  # subscription. You can see more about how to configure prices in the
153
186
  # [Price resource](/reference/price).
154
- sig { returns(Orb::Models::Plan) }
187
+ sig { returns(Orb::Plan) }
155
188
  attr_reader :plan
156
189
 
157
- sig { params(plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash)).void }
190
+ sig { params(plan: Orb::Plan::OrHash).void }
158
191
  attr_writer :plan
159
192
 
160
193
  # The price intervals for this subscription.
161
- sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]) }
194
+ sig do
195
+ returns(
196
+ T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]
197
+ )
198
+ end
162
199
  attr_accessor :price_intervals
163
200
 
164
- sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon)) }
201
+ sig do
202
+ returns(
203
+ T.nilable(
204
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon
205
+ )
206
+ )
207
+ end
165
208
  attr_reader :redeemed_coupon
166
209
 
167
210
  sig do
168
211
  params(
169
- redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon, Orb::Internal::AnyHash))
170
- )
171
- .void
212
+ redeemed_coupon:
213
+ T.nilable(
214
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon::OrHash
215
+ )
216
+ ).void
172
217
  end
173
218
  attr_writer :redeemed_coupon
174
219
 
@@ -176,29 +221,43 @@ module Orb
176
221
  sig { returns(Time) }
177
222
  attr_accessor :start_date
178
223
 
179
- sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol) }
224
+ sig do
225
+ returns(
226
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
227
+ )
228
+ end
180
229
  attr_accessor :status
181
230
 
182
231
  sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo) }
183
232
  attr_reader :trial_info
184
233
 
185
234
  sig do
186
- params(trial_info: T.any(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo, Orb::Internal::AnyHash))
187
- .void
235
+ params(
236
+ trial_info:
237
+ Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo::OrHash
238
+ ).void
188
239
  end
189
240
  attr_writer :trial_info
190
241
 
191
242
  # The resources that were changed as part of this operation. Only present when
192
243
  # fetched through the subscription changes API or if the
193
244
  # `include_changed_resources` parameter was passed in the request.
194
- sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources)) }
245
+ sig do
246
+ returns(
247
+ T.nilable(
248
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources
249
+ )
250
+ )
251
+ end
195
252
  attr_reader :changed_resources
196
253
 
197
254
  sig do
198
255
  params(
199
- changed_resources: T.nilable(T.any(Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources, Orb::Internal::AnyHash))
200
- )
201
- .void
256
+ changed_resources:
257
+ T.nilable(
258
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources::OrHash
259
+ )
260
+ ).void
202
261
  end
203
262
  attr_writer :changed_resources
204
263
 
@@ -206,45 +265,66 @@ module Orb
206
265
  params(
207
266
  id: String,
208
267
  active_plan_phase_order: T.nilable(Integer),
209
- adjustment_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval, Orb::Internal::AnyHash)],
268
+ adjustment_intervals:
269
+ T::Array[
270
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::OrHash
271
+ ],
210
272
  auto_collection: T.nilable(T::Boolean),
211
- billing_cycle_anchor_configuration: T.any(
212
- Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
213
- Orb::Internal::AnyHash
214
- ),
273
+ billing_cycle_anchor_configuration:
274
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration::OrHash,
215
275
  billing_cycle_day: Integer,
216
276
  created_at: Time,
217
277
  current_billing_period_end_date: T.nilable(Time),
218
278
  current_billing_period_start_date: T.nilable(Time),
219
- customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
279
+ customer: Orb::Customer::OrHash,
220
280
  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
- ],
281
+ discount_intervals:
282
+ T::Array[
283
+ T.any(
284
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount::OrHash,
285
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage::OrHash,
286
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage::OrHash
287
+ )
288
+ ],
229
289
  end_date: T.nilable(Time),
230
- fixed_fee_quantity_schedule: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule, Orb::Internal::AnyHash)],
290
+ fixed_fee_quantity_schedule:
291
+ T::Array[
292
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule::OrHash
293
+ ],
231
294
  invoicing_threshold: T.nilable(String),
232
- maximum_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval, Orb::Internal::AnyHash)],
295
+ maximum_intervals:
296
+ T::Array[
297
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval::OrHash
298
+ ],
233
299
  metadata: T::Hash[Symbol, String],
234
- minimum_intervals: T::Array[T.any(Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval, Orb::Internal::AnyHash)],
300
+ minimum_intervals:
301
+ T::Array[
302
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval::OrHash
303
+ ],
235
304
  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)),
305
+ pending_subscription_change:
306
+ T.nilable(
307
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange::OrHash
308
+ ),
309
+ plan: Orb::Plan::OrHash,
310
+ price_intervals:
311
+ T::Array[
312
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::OrHash
313
+ ],
314
+ redeemed_coupon:
315
+ T.nilable(
316
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon::OrHash
317
+ ),
242
318
  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)
319
+ status:
320
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::OrSymbol,
321
+ trial_info:
322
+ Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo::OrHash,
323
+ changed_resources:
324
+ T.nilable(
325
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources::OrHash
326
+ )
327
+ ).returns(T.attached_class)
248
328
  end
249
329
  def self.new(
250
330
  id:,
@@ -333,50 +413,81 @@ module Orb
333
413
  # fetched through the subscription changes API or if the
334
414
  # `include_changed_resources` parameter was passed in the request.
335
415
  changed_resources: nil
336
- ); end
416
+ )
417
+ end
418
+
337
419
  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[
420
+ override.returns(
421
+ {
422
+ id: String,
423
+ active_plan_phase_order: T.nilable(Integer),
424
+ adjustment_intervals:
425
+ T::Array[
426
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval
427
+ ],
428
+ auto_collection: T.nilable(T::Boolean),
429
+ billing_cycle_anchor_configuration:
430
+ Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration,
431
+ billing_cycle_day: Integer,
432
+ created_at: Time,
433
+ current_billing_period_end_date: T.nilable(Time),
434
+ current_billing_period_start_date: T.nilable(Time),
435
+ customer: Orb::Customer,
436
+ default_invoice_memo: T.nilable(String),
437
+ discount_intervals:
438
+ T::Array[
353
439
  T.any(
354
440
  Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
355
441
  Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
356
442
  Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
357
443
  )
358
444
  ],
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
- )
445
+ end_date: T.nilable(Time),
446
+ fixed_fee_quantity_schedule:
447
+ T::Array[
448
+ Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule
449
+ ],
450
+ invoicing_threshold: T.nilable(String),
451
+ maximum_intervals:
452
+ T::Array[
453
+ Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval
454
+ ],
455
+ metadata: T::Hash[Symbol, String],
456
+ minimum_intervals:
457
+ T::Array[
458
+ Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval
459
+ ],
460
+ net_terms: Integer,
461
+ pending_subscription_change:
462
+ T.nilable(
463
+ Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange
464
+ ),
465
+ plan: Orb::Plan,
466
+ price_intervals:
467
+ T::Array[
468
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval
469
+ ],
470
+ redeemed_coupon:
471
+ T.nilable(
472
+ Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon
473
+ ),
474
+ start_date: Time,
475
+ status:
476
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol,
477
+ trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo,
478
+ changed_resources:
479
+ T.nilable(
480
+ Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources
481
+ )
482
+ }
483
+ )
484
+ end
485
+ def to_hash
376
486
  end
377
- def to_hash; end
378
487
 
379
488
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
489
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
490
+
380
491
  sig { returns(String) }
381
492
  attr_accessor :id
382
493
 
@@ -408,19 +519,18 @@ module Orb
408
519
  sig do
409
520
  params(
410
521
  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
- ),
522
+ adjustment:
523
+ T.any(
524
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
525
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
526
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
527
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum::OrHash,
528
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum::OrHash
529
+ ),
419
530
  applies_to_price_interval_ids: T::Array[String],
420
531
  end_date: T.nilable(Time),
421
532
  start_date: Time
422
- )
423
- .returns(T.attached_class)
533
+ ).returns(T.attached_class)
424
534
  end
425
535
  def self.new(
426
536
  id:,
@@ -431,31 +541,47 @@ module Orb
431
541
  end_date:,
432
542
  # The start date of the adjustment interval.
433
543
  start_date:
434
- ); end
544
+ )
545
+ end
546
+
435
547
  sig do
436
- override
437
- .returns(
438
- {
439
- id: String,
440
- adjustment: T.any(
548
+ override.returns(
549
+ {
550
+ id: String,
551
+ adjustment:
552
+ T.any(
441
553
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
442
554
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
443
555
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
444
556
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
445
557
  Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
446
558
  ),
447
- applies_to_price_interval_ids: T::Array[String],
448
- end_date: T.nilable(Time),
449
- start_date: Time
450
- }
451
- )
559
+ applies_to_price_interval_ids: T::Array[String],
560
+ end_date: T.nilable(Time),
561
+ start_date: Time
562
+ }
563
+ )
564
+ end
565
+ def to_hash
452
566
  end
453
- def to_hash; end
454
567
 
455
568
  module Adjustment
456
569
  extend Orb::Internal::Type::Union
457
570
 
571
+ Variants =
572
+ T.type_alias do
573
+ T.any(
574
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
575
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
576
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
577
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
578
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
579
+ )
580
+ end
581
+
458
582
  class UsageDiscount < Orb::Internal::Type::BaseModel
583
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
584
+
459
585
  sig { returns(String) }
460
586
  attr_accessor :id
461
587
 
@@ -493,8 +619,7 @@ module Orb
493
619
  reason: T.nilable(String),
494
620
  usage_discount: Float,
495
621
  adjustment_type: Symbol
496
- )
497
- .returns(T.attached_class)
622
+ ).returns(T.attached_class)
498
623
  end
499
624
  def self.new(
500
625
  id:,
@@ -511,25 +636,29 @@ module Orb
511
636
  # to in a given billing period.
512
637
  usage_discount:,
513
638
  adjustment_type: :usage_discount
514
- ); end
639
+ )
640
+ end
641
+
515
642
  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
- )
643
+ override.returns(
644
+ {
645
+ id: String,
646
+ adjustment_type: Symbol,
647
+ applies_to_price_ids: T::Array[String],
648
+ is_invoice_level: T::Boolean,
649
+ plan_phase_order: T.nilable(Integer),
650
+ reason: T.nilable(String),
651
+ usage_discount: Float
652
+ }
653
+ )
654
+ end
655
+ def to_hash
528
656
  end
529
- def to_hash; end
530
657
  end
531
658
 
532
659
  class AmountDiscount < Orb::Internal::Type::BaseModel
660
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
661
+
533
662
  sig { returns(String) }
534
663
  attr_accessor :id
535
664
 
@@ -567,8 +696,7 @@ module Orb
567
696
  plan_phase_order: T.nilable(Integer),
568
697
  reason: T.nilable(String),
569
698
  adjustment_type: Symbol
570
- )
571
- .returns(T.attached_class)
699
+ ).returns(T.attached_class)
572
700
  end
573
701
  def self.new(
574
702
  id:,
@@ -585,25 +713,29 @@ module Orb
585
713
  # The reason for the adjustment.
586
714
  reason:,
587
715
  adjustment_type: :amount_discount
588
- ); end
716
+ )
717
+ end
718
+
589
719
  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
- )
720
+ override.returns(
721
+ {
722
+ id: String,
723
+ adjustment_type: Symbol,
724
+ amount_discount: String,
725
+ applies_to_price_ids: T::Array[String],
726
+ is_invoice_level: T::Boolean,
727
+ plan_phase_order: T.nilable(Integer),
728
+ reason: T.nilable(String)
729
+ }
730
+ )
731
+ end
732
+ def to_hash
602
733
  end
603
- def to_hash; end
604
734
  end
605
735
 
606
736
  class PercentageDiscount < Orb::Internal::Type::BaseModel
737
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
738
+
607
739
  sig { returns(String) }
608
740
  attr_accessor :id
609
741
 
@@ -641,8 +773,7 @@ module Orb
641
773
  plan_phase_order: T.nilable(Integer),
642
774
  reason: T.nilable(String),
643
775
  adjustment_type: Symbol
644
- )
645
- .returns(T.attached_class)
776
+ ).returns(T.attached_class)
646
777
  end
647
778
  def self.new(
648
779
  id:,
@@ -659,25 +790,29 @@ module Orb
659
790
  # The reason for the adjustment.
660
791
  reason:,
661
792
  adjustment_type: :percentage_discount
662
- ); end
793
+ )
794
+ end
795
+
663
796
  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
- )
797
+ override.returns(
798
+ {
799
+ id: String,
800
+ adjustment_type: Symbol,
801
+ applies_to_price_ids: T::Array[String],
802
+ is_invoice_level: T::Boolean,
803
+ percentage_discount: Float,
804
+ plan_phase_order: T.nilable(Integer),
805
+ reason: T.nilable(String)
806
+ }
807
+ )
808
+ end
809
+ def to_hash
676
810
  end
677
- def to_hash; end
678
811
  end
679
812
 
680
813
  class Minimum < Orb::Internal::Type::BaseModel
814
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
815
+
681
816
  sig { returns(String) }
682
817
  attr_accessor :id
683
818
 
@@ -720,8 +855,7 @@ module Orb
720
855
  plan_phase_order: T.nilable(Integer),
721
856
  reason: T.nilable(String),
722
857
  adjustment_type: Symbol
723
- )
724
- .returns(T.attached_class)
858
+ ).returns(T.attached_class)
725
859
  end
726
860
  def self.new(
727
861
  id:,
@@ -740,26 +874,30 @@ module Orb
740
874
  # The reason for the adjustment.
741
875
  reason:,
742
876
  adjustment_type: :minimum
743
- ); end
877
+ )
878
+ end
879
+
744
880
  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
- )
881
+ override.returns(
882
+ {
883
+ id: String,
884
+ adjustment_type: Symbol,
885
+ applies_to_price_ids: T::Array[String],
886
+ is_invoice_level: T::Boolean,
887
+ item_id: String,
888
+ minimum_amount: String,
889
+ plan_phase_order: T.nilable(Integer),
890
+ reason: T.nilable(String)
891
+ }
892
+ )
893
+ end
894
+ def to_hash
758
895
  end
759
- def to_hash; end
760
896
  end
761
897
 
762
898
  class Maximum < Orb::Internal::Type::BaseModel
899
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
900
+
763
901
  sig { returns(String) }
764
902
  attr_accessor :id
765
903
 
@@ -797,8 +935,7 @@ module Orb
797
935
  plan_phase_order: T.nilable(Integer),
798
936
  reason: T.nilable(String),
799
937
  adjustment_type: Symbol
800
- )
801
- .returns(T.attached_class)
938
+ ).returns(T.attached_class)
802
939
  end
803
940
  def self.new(
804
941
  id:,
@@ -815,35 +952,41 @@ module Orb
815
952
  # The reason for the adjustment.
816
953
  reason:,
817
954
  adjustment_type: :maximum
818
- ); end
955
+ )
956
+ end
957
+
819
958
  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
- )
959
+ override.returns(
960
+ {
961
+ id: String,
962
+ adjustment_type: Symbol,
963
+ applies_to_price_ids: T::Array[String],
964
+ is_invoice_level: T::Boolean,
965
+ maximum_amount: String,
966
+ plan_phase_order: T.nilable(Integer),
967
+ reason: T.nilable(String)
968
+ }
969
+ )
970
+ end
971
+ def to_hash
832
972
  end
833
- def to_hash; end
834
973
  end
835
974
 
836
975
  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
- )
976
+ override.returns(
977
+ T::Array[
978
+ Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Variants
979
+ ]
980
+ )
981
+ end
982
+ def self.variants
841
983
  end
842
- def self.variants; end
843
984
  end
844
985
  end
845
986
 
846
987
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
988
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
989
+
847
990
  # The day of the month on which the billing cycle is anchored. If the maximum
848
991
  # number of days in a month is greater than this value, the last day of the month
849
992
  # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
@@ -863,7 +1006,11 @@ module Orb
863
1006
  attr_accessor :year
864
1007
 
865
1008
  sig do
866
- params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
1009
+ params(
1010
+ day: Integer,
1011
+ month: T.nilable(Integer),
1012
+ year: T.nilable(Integer)
1013
+ ).returns(T.attached_class)
867
1014
  end
868
1015
  def self.new(
869
1016
  # The day of the month on which the billing cycle is anchored. If the maximum
@@ -878,15 +1025,37 @@ module Orb
878
1025
  # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
879
1026
  # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
880
1027
  year: nil
881
- ); end
882
- sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
883
- def to_hash; end
1028
+ )
1029
+ end
1030
+
1031
+ sig do
1032
+ override.returns(
1033
+ {
1034
+ day: Integer,
1035
+ month: T.nilable(Integer),
1036
+ year: T.nilable(Integer)
1037
+ }
1038
+ )
1039
+ end
1040
+ def to_hash
1041
+ end
884
1042
  end
885
1043
 
886
1044
  module DiscountInterval
887
1045
  extend Orb::Internal::Type::Union
888
1046
 
1047
+ Variants =
1048
+ T.type_alias do
1049
+ T.any(
1050
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
1051
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
1052
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
1053
+ )
1054
+ end
1055
+
889
1056
  class Amount < Orb::Internal::Type::BaseModel
1057
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1058
+
890
1059
  # Only available if discount_type is `amount`.
891
1060
  sig { returns(String) }
892
1061
  attr_accessor :amount_discount
@@ -918,8 +1087,7 @@ module Orb
918
1087
  end_date: T.nilable(Time),
919
1088
  start_date: Time,
920
1089
  discount_type: Symbol
921
- )
922
- .returns(T.attached_class)
1090
+ ).returns(T.attached_class)
923
1091
  end
924
1092
  def self.new(
925
1093
  # Only available if discount_type is `amount`.
@@ -933,24 +1101,28 @@ module Orb
933
1101
  # The start date of the discount interval.
934
1102
  start_date:,
935
1103
  discount_type: :amount
936
- ); end
1104
+ )
1105
+ end
1106
+
937
1107
  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
- )
1108
+ override.returns(
1109
+ {
1110
+ amount_discount: String,
1111
+ applies_to_price_ids: T::Array[String],
1112
+ applies_to_price_interval_ids: T::Array[String],
1113
+ discount_type: Symbol,
1114
+ end_date: T.nilable(Time),
1115
+ start_date: Time
1116
+ }
1117
+ )
1118
+ end
1119
+ def to_hash
949
1120
  end
950
- def to_hash; end
951
1121
  end
952
1122
 
953
1123
  class Percentage < Orb::Internal::Type::BaseModel
1124
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1125
+
954
1126
  # The price ids that this discount interval applies to.
955
1127
  sig { returns(T::Array[String]) }
956
1128
  attr_accessor :applies_to_price_ids
@@ -983,8 +1155,7 @@ module Orb
983
1155
  percentage_discount: Float,
984
1156
  start_date: Time,
985
1157
  discount_type: Symbol
986
- )
987
- .returns(T.attached_class)
1158
+ ).returns(T.attached_class)
988
1159
  end
989
1160
  def self.new(
990
1161
  # The price ids that this discount interval applies to.
@@ -999,24 +1170,28 @@ module Orb
999
1170
  # The start date of the discount interval.
1000
1171
  start_date:,
1001
1172
  discount_type: :percentage
1002
- ); end
1173
+ )
1174
+ end
1175
+
1003
1176
  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
- )
1177
+ override.returns(
1178
+ {
1179
+ applies_to_price_ids: T::Array[String],
1180
+ applies_to_price_interval_ids: T::Array[String],
1181
+ discount_type: Symbol,
1182
+ end_date: T.nilable(Time),
1183
+ percentage_discount: Float,
1184
+ start_date: Time
1185
+ }
1186
+ )
1187
+ end
1188
+ def to_hash
1015
1189
  end
1016
- def to_hash; end
1017
1190
  end
1018
1191
 
1019
1192
  class Usage < Orb::Internal::Type::BaseModel
1193
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1194
+
1020
1195
  # The price ids that this discount interval applies to.
1021
1196
  sig { returns(T::Array[String]) }
1022
1197
  attr_accessor :applies_to_price_ids
@@ -1049,8 +1224,7 @@ module Orb
1049
1224
  start_date: Time,
1050
1225
  usage_discount: Float,
1051
1226
  discount_type: Symbol
1052
- )
1053
- .returns(T.attached_class)
1227
+ ).returns(T.attached_class)
1054
1228
  end
1055
1229
  def self.new(
1056
1230
  # The price ids that this discount interval applies to.
@@ -1065,33 +1239,39 @@ module Orb
1065
1239
  # discount is for
1066
1240
  usage_discount:,
1067
1241
  discount_type: :usage
1068
- ); end
1242
+ )
1243
+ end
1244
+
1069
1245
  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
- )
1246
+ override.returns(
1247
+ {
1248
+ applies_to_price_ids: T::Array[String],
1249
+ applies_to_price_interval_ids: T::Array[String],
1250
+ discount_type: Symbol,
1251
+ end_date: T.nilable(Time),
1252
+ start_date: Time,
1253
+ usage_discount: Float
1254
+ }
1255
+ )
1256
+ end
1257
+ def to_hash
1081
1258
  end
1082
- def to_hash; end
1083
1259
  end
1084
1260
 
1085
1261
  sig do
1086
- override
1087
- .returns(
1088
- [Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage]
1089
- )
1262
+ override.returns(
1263
+ T::Array[
1264
+ Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Variants
1265
+ ]
1266
+ )
1267
+ end
1268
+ def self.variants
1090
1269
  end
1091
- def self.variants; end
1092
1270
  end
1093
1271
 
1094
1272
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1273
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1274
+
1095
1275
  sig { returns(T.nilable(Time)) }
1096
1276
  attr_accessor :end_date
1097
1277
 
@@ -1105,18 +1285,33 @@ module Orb
1105
1285
  attr_accessor :start_date
1106
1286
 
1107
1287
  sig do
1108
- params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
1109
- .returns(T.attached_class)
1288
+ params(
1289
+ end_date: T.nilable(Time),
1290
+ price_id: String,
1291
+ quantity: Float,
1292
+ start_date: Time
1293
+ ).returns(T.attached_class)
1294
+ end
1295
+ def self.new(end_date:, price_id:, quantity:, start_date:)
1110
1296
  end
1111
- def self.new(end_date:, price_id:, quantity:, start_date:); end
1112
1297
 
1113
1298
  sig do
1114
- override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
1299
+ override.returns(
1300
+ {
1301
+ end_date: T.nilable(Time),
1302
+ price_id: String,
1303
+ quantity: Float,
1304
+ start_date: Time
1305
+ }
1306
+ )
1307
+ end
1308
+ def to_hash
1115
1309
  end
1116
- def to_hash; end
1117
1310
  end
1118
1311
 
1119
1312
  class MaximumInterval < Orb::Internal::Type::BaseModel
1313
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1314
+
1120
1315
  # The price ids that this maximum interval applies to.
1121
1316
  sig { returns(T::Array[String]) }
1122
1317
  attr_accessor :applies_to_price_ids
@@ -1145,8 +1340,7 @@ module Orb
1145
1340
  end_date: T.nilable(Time),
1146
1341
  maximum_amount: String,
1147
1342
  start_date: Time
1148
- )
1149
- .returns(T.attached_class)
1343
+ ).returns(T.attached_class)
1150
1344
  end
1151
1345
  def self.new(
1152
1346
  # The price ids that this maximum interval applies to.
@@ -1160,23 +1354,27 @@ module Orb
1160
1354
  maximum_amount:,
1161
1355
  # The start date of the maximum interval.
1162
1356
  start_date:
1163
- ); end
1357
+ )
1358
+ end
1359
+
1164
1360
  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
- )
1361
+ override.returns(
1362
+ {
1363
+ applies_to_price_ids: T::Array[String],
1364
+ applies_to_price_interval_ids: T::Array[String],
1365
+ end_date: T.nilable(Time),
1366
+ maximum_amount: String,
1367
+ start_date: Time
1368
+ }
1369
+ )
1370
+ end
1371
+ def to_hash
1175
1372
  end
1176
- def to_hash; end
1177
1373
  end
1178
1374
 
1179
1375
  class MinimumInterval < Orb::Internal::Type::BaseModel
1376
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1377
+
1180
1378
  # The price ids that this minimum interval applies to.
1181
1379
  sig { returns(T::Array[String]) }
1182
1380
  attr_accessor :applies_to_price_ids
@@ -1205,8 +1403,7 @@ module Orb
1205
1403
  end_date: T.nilable(Time),
1206
1404
  minimum_amount: String,
1207
1405
  start_date: Time
1208
- )
1209
- .returns(T.attached_class)
1406
+ ).returns(T.attached_class)
1210
1407
  end
1211
1408
  def self.new(
1212
1409
  # The price ids that this minimum interval applies to.
@@ -1220,35 +1417,43 @@ module Orb
1220
1417
  minimum_amount:,
1221
1418
  # The start date of the minimum interval.
1222
1419
  start_date:
1223
- ); end
1420
+ )
1421
+ end
1422
+
1224
1423
  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
- )
1424
+ override.returns(
1425
+ {
1426
+ applies_to_price_ids: T::Array[String],
1427
+ applies_to_price_interval_ids: T::Array[String],
1428
+ end_date: T.nilable(Time),
1429
+ minimum_amount: String,
1430
+ start_date: Time
1431
+ }
1432
+ )
1433
+ end
1434
+ def to_hash
1235
1435
  end
1236
- def to_hash; end
1237
1436
  end
1238
1437
 
1239
1438
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1439
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1440
+
1240
1441
  sig { returns(String) }
1241
1442
  attr_accessor :id
1242
1443
 
1243
1444
  # A pending subscription change if one exists on this subscription.
1244
1445
  sig { params(id: String).returns(T.attached_class) }
1245
- def self.new(id:); end
1446
+ def self.new(id:)
1447
+ end
1246
1448
 
1247
- sig { override.returns({id: String}) }
1248
- def to_hash; end
1449
+ sig { override.returns({ id: String }) }
1450
+ def to_hash
1451
+ end
1249
1452
  end
1250
1453
 
1251
1454
  class PriceInterval < Orb::Internal::Type::BaseModel
1455
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1456
+
1252
1457
  sig { returns(String) }
1253
1458
  attr_accessor :id
1254
1459
 
@@ -1282,7 +1487,9 @@ module Orb
1282
1487
  sig do
1283
1488
  returns(
1284
1489
  T.nilable(
1285
- T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition]
1490
+ T::Array[
1491
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition
1492
+ ]
1286
1493
  )
1287
1494
  )
1288
1495
  end
@@ -1301,34 +1508,34 @@ module Orb
1301
1508
  sig do
1302
1509
  returns(
1303
1510
  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
1511
+ Orb::Price::Unit,
1512
+ Orb::Price::Package,
1513
+ Orb::Price::Matrix,
1514
+ Orb::Price::Tiered,
1515
+ Orb::Price::TieredBps,
1516
+ Orb::Price::Bps,
1517
+ Orb::Price::BulkBps,
1518
+ Orb::Price::Bulk,
1519
+ Orb::Price::ThresholdTotalAmount,
1520
+ Orb::Price::TieredPackage,
1521
+ Orb::Price::GroupedTiered,
1522
+ Orb::Price::TieredWithMinimum,
1523
+ Orb::Price::TieredPackageWithMinimum,
1524
+ Orb::Price::PackageWithAllocation,
1525
+ Orb::Price::UnitWithPercent,
1526
+ Orb::Price::MatrixWithAllocation,
1527
+ Orb::Price::TieredWithProration,
1528
+ Orb::Price::UnitWithProration,
1529
+ Orb::Price::GroupedAllocation,
1530
+ Orb::Price::GroupedWithProratedMinimum,
1531
+ Orb::Price::GroupedWithMeteredMinimum,
1532
+ Orb::Price::MatrixWithDisplayName,
1533
+ Orb::Price::BulkWithProration,
1534
+ Orb::Price::GroupedTieredPackage,
1535
+ Orb::Price::MaxGroupTieredPackage,
1536
+ Orb::Price::ScalableMatrixWithUnitPricing,
1537
+ Orb::Price::ScalableMatrixWithTieredPricing,
1538
+ Orb::Price::CumulativeGroupedBulk
1332
1539
  )
1333
1540
  )
1334
1541
  end
@@ -1355,49 +1562,46 @@ module Orb
1355
1562
  current_billing_period_start_date: T.nilable(Time),
1356
1563
  end_date: T.nilable(Time),
1357
1564
  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
- ),
1565
+ fixed_fee_quantity_transitions:
1566
+ T.nilable(
1567
+ T::Array[
1568
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition::OrHash
1569
+ ]
1570
+ ),
1571
+ price:
1572
+ T.any(
1573
+ Orb::Price::Unit::OrHash,
1574
+ Orb::Price::Package::OrHash,
1575
+ Orb::Price::Matrix::OrHash,
1576
+ Orb::Price::Tiered::OrHash,
1577
+ Orb::Price::TieredBps::OrHash,
1578
+ Orb::Price::Bps::OrHash,
1579
+ Orb::Price::BulkBps::OrHash,
1580
+ Orb::Price::Bulk::OrHash,
1581
+ Orb::Price::ThresholdTotalAmount::OrHash,
1582
+ Orb::Price::TieredPackage::OrHash,
1583
+ Orb::Price::GroupedTiered::OrHash,
1584
+ Orb::Price::TieredWithMinimum::OrHash,
1585
+ Orb::Price::TieredPackageWithMinimum::OrHash,
1586
+ Orb::Price::PackageWithAllocation::OrHash,
1587
+ Orb::Price::UnitWithPercent::OrHash,
1588
+ Orb::Price::MatrixWithAllocation::OrHash,
1589
+ Orb::Price::TieredWithProration::OrHash,
1590
+ Orb::Price::UnitWithProration::OrHash,
1591
+ Orb::Price::GroupedAllocation::OrHash,
1592
+ Orb::Price::GroupedWithProratedMinimum::OrHash,
1593
+ Orb::Price::GroupedWithMeteredMinimum::OrHash,
1594
+ Orb::Price::MatrixWithDisplayName::OrHash,
1595
+ Orb::Price::BulkWithProration::OrHash,
1596
+ Orb::Price::GroupedTieredPackage::OrHash,
1597
+ Orb::Price::MaxGroupTieredPackage::OrHash,
1598
+ Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
1599
+ Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
1600
+ Orb::Price::CumulativeGroupedBulk::OrHash
1601
+ ),
1397
1602
  start_date: Time,
1398
1603
  usage_customer_ids: T.nilable(T::Array[String])
1399
- )
1400
- .returns(T.attached_class)
1604
+ ).returns(T.attached_class)
1401
1605
  end
1402
1606
  def self.new(
1403
1607
  id:,
@@ -1436,58 +1640,66 @@ module Orb
1436
1640
  # A list of customer IDs whose usage events will be aggregated and billed under
1437
1641
  # this price interval.
1438
1642
  usage_customer_ids:
1439
- ); end
1643
+ )
1644
+ end
1645
+
1440
1646
  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]
1647
+ override.returns(
1648
+ {
1649
+ id: String,
1650
+ billing_cycle_day: Integer,
1651
+ current_billing_period_end_date: T.nilable(Time),
1652
+ current_billing_period_start_date: T.nilable(Time),
1653
+ end_date: T.nilable(Time),
1654
+ filter: T.nilable(String),
1655
+ fixed_fee_quantity_transitions:
1656
+ T.nilable(
1657
+ T::Array[
1658
+ Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition
1659
+ ]
1452
1660
  ),
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
1661
+ price:
1662
+ T.any(
1663
+ Orb::Price::Unit,
1664
+ Orb::Price::Package,
1665
+ Orb::Price::Matrix,
1666
+ Orb::Price::Tiered,
1667
+ Orb::Price::TieredBps,
1668
+ Orb::Price::Bps,
1669
+ Orb::Price::BulkBps,
1670
+ Orb::Price::Bulk,
1671
+ Orb::Price::ThresholdTotalAmount,
1672
+ Orb::Price::TieredPackage,
1673
+ Orb::Price::GroupedTiered,
1674
+ Orb::Price::TieredWithMinimum,
1675
+ Orb::Price::TieredPackageWithMinimum,
1676
+ Orb::Price::PackageWithAllocation,
1677
+ Orb::Price::UnitWithPercent,
1678
+ Orb::Price::MatrixWithAllocation,
1679
+ Orb::Price::TieredWithProration,
1680
+ Orb::Price::UnitWithProration,
1681
+ Orb::Price::GroupedAllocation,
1682
+ Orb::Price::GroupedWithProratedMinimum,
1683
+ Orb::Price::GroupedWithMeteredMinimum,
1684
+ Orb::Price::MatrixWithDisplayName,
1685
+ Orb::Price::BulkWithProration,
1686
+ Orb::Price::GroupedTieredPackage,
1687
+ Orb::Price::MaxGroupTieredPackage,
1688
+ Orb::Price::ScalableMatrixWithUnitPricing,
1689
+ Orb::Price::ScalableMatrixWithTieredPricing,
1690
+ Orb::Price::CumulativeGroupedBulk
1482
1691
  ),
1483
- start_date: Time,
1484
- usage_customer_ids: T.nilable(T::Array[String])
1485
- }
1486
- )
1692
+ start_date: Time,
1693
+ usage_customer_ids: T.nilable(T::Array[String])
1694
+ }
1695
+ )
1696
+ end
1697
+ def to_hash
1487
1698
  end
1488
- def to_hash; end
1489
1699
 
1490
1700
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1701
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1702
+
1491
1703
  sig { returns(Time) }
1492
1704
  attr_accessor :effective_date
1493
1705
 
@@ -1497,15 +1709,29 @@ module Orb
1497
1709
  sig { returns(Integer) }
1498
1710
  attr_accessor :quantity
1499
1711
 
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
1712
+ sig do
1713
+ params(
1714
+ effective_date: Time,
1715
+ price_id: String,
1716
+ quantity: Integer
1717
+ ).returns(T.attached_class)
1718
+ end
1719
+ def self.new(effective_date:, price_id:, quantity:)
1720
+ end
1502
1721
 
1503
- sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
1504
- def to_hash; end
1722
+ sig do
1723
+ override.returns(
1724
+ { effective_date: Time, price_id: String, quantity: Integer }
1725
+ )
1726
+ end
1727
+ def to_hash
1728
+ end
1505
1729
  end
1506
1730
  end
1507
1731
 
1508
1732
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1733
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1734
+
1509
1735
  sig { returns(String) }
1510
1736
  attr_accessor :coupon_id
1511
1737
 
@@ -1516,54 +1742,92 @@ module Orb
1516
1742
  attr_accessor :start_date
1517
1743
 
1518
1744
  sig do
1519
- params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
1745
+ params(
1746
+ coupon_id: String,
1747
+ end_date: T.nilable(Time),
1748
+ start_date: Time
1749
+ ).returns(T.attached_class)
1750
+ end
1751
+ def self.new(coupon_id:, end_date:, start_date:)
1520
1752
  end
1521
- def self.new(coupon_id:, end_date:, start_date:); end
1522
1753
 
1523
- sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
1524
- def to_hash; end
1754
+ sig do
1755
+ override.returns(
1756
+ { coupon_id: String, end_date: T.nilable(Time), start_date: Time }
1757
+ )
1758
+ end
1759
+ def to_hash
1760
+ end
1525
1761
  end
1526
1762
 
1527
1763
  module Status
1528
1764
  extend Orb::Internal::Type::Enum
1529
1765
 
1530
- TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status) }
1766
+ TaggedSymbol =
1767
+ T.type_alias do
1768
+ T.all(Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status)
1769
+ end
1531
1770
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1532
1771
 
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)
1772
+ ACTIVE =
1773
+ T.let(
1774
+ :active,
1775
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1776
+ )
1777
+ ENDED =
1778
+ T.let(
1779
+ :ended,
1780
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1781
+ )
1782
+ UPCOMING =
1783
+ T.let(
1784
+ :upcoming,
1785
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1786
+ )
1536
1787
 
1537
- sig { override.returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol]) }
1538
- def self.values; end
1788
+ sig do
1789
+ override.returns(
1790
+ T::Array[
1791
+ Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol
1792
+ ]
1793
+ )
1794
+ end
1795
+ def self.values
1796
+ end
1539
1797
  end
1540
1798
 
1541
1799
  class TrialInfo < Orb::Internal::Type::BaseModel
1800
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1801
+
1542
1802
  sig { returns(T.nilable(Time)) }
1543
1803
  attr_accessor :end_date
1544
1804
 
1545
1805
  sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
1546
- def self.new(end_date:); end
1806
+ def self.new(end_date:)
1807
+ end
1547
1808
 
1548
- sig { override.returns({end_date: T.nilable(Time)}) }
1549
- def to_hash; end
1809
+ sig { override.returns({ end_date: T.nilable(Time) }) }
1810
+ def to_hash
1811
+ end
1550
1812
  end
1551
1813
 
1552
1814
  class ChangedResources < Orb::Internal::Type::BaseModel
1815
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1816
+
1553
1817
  # The credit notes that were created as part of this operation.
1554
- sig { returns(T::Array[Orb::Models::CreditNote]) }
1818
+ sig { returns(T::Array[Orb::CreditNote]) }
1555
1819
  attr_accessor :created_credit_notes
1556
1820
 
1557
1821
  # The invoices that were created as part of this operation.
1558
- sig { returns(T::Array[Orb::Models::Invoice]) }
1822
+ sig { returns(T::Array[Orb::Invoice]) }
1559
1823
  attr_accessor :created_invoices
1560
1824
 
1561
1825
  # The credit notes that were voided as part of this operation.
1562
- sig { returns(T::Array[Orb::Models::CreditNote]) }
1826
+ sig { returns(T::Array[Orb::CreditNote]) }
1563
1827
  attr_accessor :voided_credit_notes
1564
1828
 
1565
1829
  # The invoices that were voided as part of this operation.
1566
- sig { returns(T::Array[Orb::Models::Invoice]) }
1830
+ sig { returns(T::Array[Orb::Invoice]) }
1567
1831
  attr_accessor :voided_invoices
1568
1832
 
1569
1833
  # The resources that were changed as part of this operation. Only present when
@@ -1571,12 +1835,11 @@ module Orb
1571
1835
  # `include_changed_resources` parameter was passed in the request.
1572
1836
  sig do
1573
1837
  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)
1838
+ created_credit_notes: T::Array[Orb::CreditNote::OrHash],
1839
+ created_invoices: T::Array[Orb::Invoice::OrHash],
1840
+ voided_credit_notes: T::Array[Orb::CreditNote::OrHash],
1841
+ voided_invoices: T::Array[Orb::Invoice::OrHash]
1842
+ ).returns(T.attached_class)
1580
1843
  end
1581
1844
  def self.new(
1582
1845
  # The credit notes that were created as part of this operation.
@@ -1587,19 +1850,21 @@ module Orb
1587
1850
  voided_credit_notes:,
1588
1851
  # The invoices that were voided as part of this operation.
1589
1852
  voided_invoices:
1590
- ); end
1853
+ )
1854
+ end
1855
+
1591
1856
  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
- )
1857
+ override.returns(
1858
+ {
1859
+ created_credit_notes: T::Array[Orb::CreditNote],
1860
+ created_invoices: T::Array[Orb::Invoice],
1861
+ voided_credit_notes: T::Array[Orb::CreditNote],
1862
+ voided_invoices: T::Array[Orb::Invoice]
1863
+ }
1864
+ )
1865
+ end
1866
+ def to_hash
1601
1867
  end
1602
- def to_hash; end
1603
1868
  end
1604
1869
  end
1605
1870
  end