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 SubscriptionPriceIntervalsResponse < 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::SubscriptionPriceIntervalsResponse::AdjustmentInterval]) }
18
+ sig do
19
+ returns(
20
+ T::Array[
21
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration) }
33
+ sig do
34
+ returns(
35
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration,
32
- Orb::Internal::AnyHash
33
- )
34
- )
35
- .void
42
+ billing_cycle_anchor_configuration:
43
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule]) }
117
+ sig do
118
+ returns(
119
+ T::Array[
120
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::MaximumInterval]) }
130
+ sig do
131
+ returns(
132
+ T::Array[
133
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::MinimumInterval]) }
147
+ sig do
148
+ returns(
149
+ T::Array[
150
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange)) }
164
+ sig do
165
+ returns(
166
+ T.nilable(
167
+ Orb::Models::SubscriptionPriceIntervalsResponse::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::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
144
- )
145
- )
146
- .void
175
+ pending_subscription_change:
176
+ T.nilable(
177
+ Orb::Models::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange::OrHash
178
+ )
179
+ ).void
147
180
  end
148
181
  attr_writer :pending_subscription_change
149
182
 
@@ -151,24 +184,38 @@ 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::SubscriptionPriceIntervalsResponse::PriceInterval]) }
194
+ sig do
195
+ returns(
196
+ T::Array[
197
+ Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval
198
+ ]
199
+ )
200
+ end
162
201
  attr_accessor :price_intervals
163
202
 
164
- sig { returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon)) }
203
+ sig do
204
+ returns(
205
+ T.nilable(
206
+ Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon
207
+ )
208
+ )
209
+ end
165
210
  attr_reader :redeemed_coupon
166
211
 
167
212
  sig do
168
213
  params(
169
- redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon, Orb::Internal::AnyHash))
170
- )
171
- .void
214
+ redeemed_coupon:
215
+ T.nilable(
216
+ Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon::OrHash
217
+ )
218
+ ).void
172
219
  end
173
220
  attr_writer :redeemed_coupon
174
221
 
@@ -176,33 +223,45 @@ module Orb
176
223
  sig { returns(Time) }
177
224
  attr_accessor :start_date
178
225
 
179
- sig { returns(Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol) }
226
+ sig do
227
+ returns(
228
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol
229
+ )
230
+ end
180
231
  attr_accessor :status
181
232
 
182
- sig { returns(Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo) }
233
+ sig do
234
+ returns(Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo)
235
+ end
183
236
  attr_reader :trial_info
184
237
 
185
238
  sig do
186
239
  params(
187
- trial_info: T.any(Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo, Orb::Internal::AnyHash)
188
- )
189
- .void
240
+ trial_info:
241
+ Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo::OrHash
242
+ ).void
190
243
  end
191
244
  attr_writer :trial_info
192
245
 
193
246
  # The resources that were changed as part of this operation. Only present when
194
247
  # fetched through the subscription changes API or if the
195
248
  # `include_changed_resources` parameter was passed in the request.
196
- sig { returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources)) }
249
+ sig do
250
+ returns(
251
+ T.nilable(
252
+ Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources
253
+ )
254
+ )
255
+ end
197
256
  attr_reader :changed_resources
198
257
 
199
258
  sig do
200
259
  params(
201
- changed_resources: T.nilable(
202
- T.any(Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources, Orb::Internal::AnyHash)
203
- )
204
- )
205
- .void
260
+ changed_resources:
261
+ T.nilable(
262
+ Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources::OrHash
263
+ )
264
+ ).void
206
265
  end
207
266
  attr_writer :changed_resources
208
267
 
@@ -210,47 +269,66 @@ module Orb
210
269
  params(
211
270
  id: String,
212
271
  active_plan_phase_order: T.nilable(Integer),
213
- adjustment_intervals: T::Array[T.any(Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval, Orb::Internal::AnyHash)],
272
+ adjustment_intervals:
273
+ T::Array[
274
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::OrHash
275
+ ],
214
276
  auto_collection: T.nilable(T::Boolean),
215
- billing_cycle_anchor_configuration: T.any(
216
- Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration,
217
- Orb::Internal::AnyHash
218
- ),
277
+ billing_cycle_anchor_configuration:
278
+ Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration::OrHash,
219
279
  billing_cycle_day: Integer,
220
280
  created_at: Time,
221
281
  current_billing_period_end_date: T.nilable(Time),
222
282
  current_billing_period_start_date: T.nilable(Time),
223
- customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
283
+ customer: Orb::Customer::OrHash,
224
284
  default_invoice_memo: T.nilable(String),
225
- discount_intervals: T::Array[
226
- T.any(
227
- Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Amount,
228
- Orb::Internal::AnyHash,
229
- Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Percentage,
230
- Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Usage
231
- )
232
- ],
285
+ discount_intervals:
286
+ T::Array[
287
+ T.any(
288
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Amount::OrHash,
289
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Percentage::OrHash,
290
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Usage::OrHash
291
+ )
292
+ ],
233
293
  end_date: T.nilable(Time),
234
- fixed_fee_quantity_schedule: T::Array[T.any(Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule, Orb::Internal::AnyHash)],
294
+ fixed_fee_quantity_schedule:
295
+ T::Array[
296
+ Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule::OrHash
297
+ ],
235
298
  invoicing_threshold: T.nilable(String),
236
- maximum_intervals: T::Array[T.any(Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval, Orb::Internal::AnyHash)],
299
+ maximum_intervals:
300
+ T::Array[
301
+ Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval::OrHash
302
+ ],
237
303
  metadata: T::Hash[Symbol, String],
238
- minimum_intervals: T::Array[T.any(Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval, Orb::Internal::AnyHash)],
304
+ minimum_intervals:
305
+ T::Array[
306
+ Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval::OrHash
307
+ ],
239
308
  net_terms: Integer,
240
- pending_subscription_change: T.nilable(
241
- T.any(Orb::Models::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
242
- ),
243
- plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash),
244
- price_intervals: T::Array[T.any(Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval, Orb::Internal::AnyHash)],
245
- redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon, Orb::Internal::AnyHash)),
309
+ pending_subscription_change:
310
+ T.nilable(
311
+ Orb::Models::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange::OrHash
312
+ ),
313
+ plan: Orb::Plan::OrHash,
314
+ price_intervals:
315
+ T::Array[
316
+ Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::OrHash
317
+ ],
318
+ redeemed_coupon:
319
+ T.nilable(
320
+ Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon::OrHash
321
+ ),
246
322
  start_date: Time,
247
- status: Orb::Models::SubscriptionPriceIntervalsResponse::Status::OrSymbol,
248
- trial_info: T.any(Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo, Orb::Internal::AnyHash),
249
- changed_resources: T.nilable(
250
- T.any(Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources, Orb::Internal::AnyHash)
251
- )
252
- )
253
- .returns(T.attached_class)
323
+ status:
324
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::OrSymbol,
325
+ trial_info:
326
+ Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo::OrHash,
327
+ changed_resources:
328
+ T.nilable(
329
+ Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources::OrHash
330
+ )
331
+ ).returns(T.attached_class)
254
332
  end
255
333
  def self.new(
256
334
  id:,
@@ -339,50 +417,82 @@ module Orb
339
417
  # fetched through the subscription changes API or if the
340
418
  # `include_changed_resources` parameter was passed in the request.
341
419
  changed_resources: nil
342
- ); end
420
+ )
421
+ end
422
+
343
423
  sig do
344
- override
345
- .returns(
346
- {
347
- id: String,
348
- active_plan_phase_order: T.nilable(Integer),
349
- adjustment_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval],
350
- auto_collection: T.nilable(T::Boolean),
351
- billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration,
352
- billing_cycle_day: Integer,
353
- created_at: Time,
354
- current_billing_period_end_date: T.nilable(Time),
355
- current_billing_period_start_date: T.nilable(Time),
356
- customer: Orb::Models::Customer,
357
- default_invoice_memo: T.nilable(String),
358
- discount_intervals: T::Array[
424
+ override.returns(
425
+ {
426
+ id: String,
427
+ active_plan_phase_order: T.nilable(Integer),
428
+ adjustment_intervals:
429
+ T::Array[
430
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval
431
+ ],
432
+ auto_collection: T.nilable(T::Boolean),
433
+ billing_cycle_anchor_configuration:
434
+ Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration,
435
+ billing_cycle_day: Integer,
436
+ created_at: Time,
437
+ current_billing_period_end_date: T.nilable(Time),
438
+ current_billing_period_start_date: T.nilable(Time),
439
+ customer: Orb::Customer,
440
+ default_invoice_memo: T.nilable(String),
441
+ discount_intervals:
442
+ T::Array[
359
443
  T.any(
360
444
  Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Amount,
361
445
  Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Percentage,
362
446
  Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Usage
363
447
  )
364
448
  ],
365
- end_date: T.nilable(Time),
366
- fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule],
367
- invoicing_threshold: T.nilable(String),
368
- maximum_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval],
369
- metadata: T::Hash[Symbol, String],
370
- minimum_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval],
371
- net_terms: Integer,
372
- pending_subscription_change: T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange),
373
- plan: Orb::Models::Plan,
374
- price_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval],
375
- redeemed_coupon: T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon),
376
- start_date: Time,
377
- status: Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol,
378
- trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo,
379
- changed_resources: T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources)
380
- }
381
- )
449
+ end_date: T.nilable(Time),
450
+ fixed_fee_quantity_schedule:
451
+ T::Array[
452
+ Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule
453
+ ],
454
+ invoicing_threshold: T.nilable(String),
455
+ maximum_intervals:
456
+ T::Array[
457
+ Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval
458
+ ],
459
+ metadata: T::Hash[Symbol, String],
460
+ minimum_intervals:
461
+ T::Array[
462
+ Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval
463
+ ],
464
+ net_terms: Integer,
465
+ pending_subscription_change:
466
+ T.nilable(
467
+ Orb::Models::SubscriptionPriceIntervalsResponse::PendingSubscriptionChange
468
+ ),
469
+ plan: Orb::Plan,
470
+ price_intervals:
471
+ T::Array[
472
+ Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval
473
+ ],
474
+ redeemed_coupon:
475
+ T.nilable(
476
+ Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon
477
+ ),
478
+ start_date: Time,
479
+ status:
480
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol,
481
+ trial_info:
482
+ Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo,
483
+ changed_resources:
484
+ T.nilable(
485
+ Orb::Models::SubscriptionPriceIntervalsResponse::ChangedResources
486
+ )
487
+ }
488
+ )
489
+ end
490
+ def to_hash
382
491
  end
383
- def to_hash; end
384
492
 
385
493
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
494
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
495
+
386
496
  sig { returns(String) }
387
497
  attr_accessor :id
388
498
 
@@ -414,19 +524,18 @@ module Orb
414
524
  sig do
415
525
  params(
416
526
  id: String,
417
- adjustment: T.any(
418
- Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::UsageDiscount,
419
- Orb::Internal::AnyHash,
420
- Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::AmountDiscount,
421
- Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
422
- Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Minimum,
423
- Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Maximum
424
- ),
527
+ adjustment:
528
+ T.any(
529
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
530
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
531
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
532
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Minimum::OrHash,
533
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Maximum::OrHash
534
+ ),
425
535
  applies_to_price_interval_ids: T::Array[String],
426
536
  end_date: T.nilable(Time),
427
537
  start_date: Time
428
- )
429
- .returns(T.attached_class)
538
+ ).returns(T.attached_class)
430
539
  end
431
540
  def self.new(
432
541
  id:,
@@ -437,31 +546,47 @@ module Orb
437
546
  end_date:,
438
547
  # The start date of the adjustment interval.
439
548
  start_date:
440
- ); end
549
+ )
550
+ end
551
+
441
552
  sig do
442
- override
443
- .returns(
444
- {
445
- id: String,
446
- adjustment: T.any(
553
+ override.returns(
554
+ {
555
+ id: String,
556
+ adjustment:
557
+ T.any(
447
558
  Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::UsageDiscount,
448
559
  Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::AmountDiscount,
449
560
  Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
450
561
  Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Minimum,
451
562
  Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Maximum
452
563
  ),
453
- applies_to_price_interval_ids: T::Array[String],
454
- end_date: T.nilable(Time),
455
- start_date: Time
456
- }
457
- )
564
+ applies_to_price_interval_ids: T::Array[String],
565
+ end_date: T.nilable(Time),
566
+ start_date: Time
567
+ }
568
+ )
569
+ end
570
+ def to_hash
458
571
  end
459
- def to_hash; end
460
572
 
461
573
  module Adjustment
462
574
  extend Orb::Internal::Type::Union
463
575
 
576
+ Variants =
577
+ T.type_alias do
578
+ T.any(
579
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::UsageDiscount,
580
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::AmountDiscount,
581
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
582
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Minimum,
583
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Maximum
584
+ )
585
+ end
586
+
464
587
  class UsageDiscount < Orb::Internal::Type::BaseModel
588
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
589
+
465
590
  sig { returns(String) }
466
591
  attr_accessor :id
467
592
 
@@ -499,8 +624,7 @@ module Orb
499
624
  reason: T.nilable(String),
500
625
  usage_discount: Float,
501
626
  adjustment_type: Symbol
502
- )
503
- .returns(T.attached_class)
627
+ ).returns(T.attached_class)
504
628
  end
505
629
  def self.new(
506
630
  id:,
@@ -517,25 +641,29 @@ module Orb
517
641
  # to in a given billing period.
518
642
  usage_discount:,
519
643
  adjustment_type: :usage_discount
520
- ); end
644
+ )
645
+ end
646
+
521
647
  sig do
522
- override
523
- .returns(
524
- {
525
- id: String,
526
- adjustment_type: Symbol,
527
- applies_to_price_ids: T::Array[String],
528
- is_invoice_level: T::Boolean,
529
- plan_phase_order: T.nilable(Integer),
530
- reason: T.nilable(String),
531
- usage_discount: Float
532
- }
533
- )
648
+ override.returns(
649
+ {
650
+ id: String,
651
+ adjustment_type: Symbol,
652
+ applies_to_price_ids: T::Array[String],
653
+ is_invoice_level: T::Boolean,
654
+ plan_phase_order: T.nilable(Integer),
655
+ reason: T.nilable(String),
656
+ usage_discount: Float
657
+ }
658
+ )
659
+ end
660
+ def to_hash
534
661
  end
535
- def to_hash; end
536
662
  end
537
663
 
538
664
  class AmountDiscount < Orb::Internal::Type::BaseModel
665
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
666
+
539
667
  sig { returns(String) }
540
668
  attr_accessor :id
541
669
 
@@ -573,8 +701,7 @@ module Orb
573
701
  plan_phase_order: T.nilable(Integer),
574
702
  reason: T.nilable(String),
575
703
  adjustment_type: Symbol
576
- )
577
- .returns(T.attached_class)
704
+ ).returns(T.attached_class)
578
705
  end
579
706
  def self.new(
580
707
  id:,
@@ -591,25 +718,29 @@ module Orb
591
718
  # The reason for the adjustment.
592
719
  reason:,
593
720
  adjustment_type: :amount_discount
594
- ); end
721
+ )
722
+ end
723
+
595
724
  sig do
596
- override
597
- .returns(
598
- {
599
- id: String,
600
- adjustment_type: Symbol,
601
- amount_discount: String,
602
- applies_to_price_ids: T::Array[String],
603
- is_invoice_level: T::Boolean,
604
- plan_phase_order: T.nilable(Integer),
605
- reason: T.nilable(String)
606
- }
607
- )
725
+ override.returns(
726
+ {
727
+ id: String,
728
+ adjustment_type: Symbol,
729
+ amount_discount: String,
730
+ applies_to_price_ids: T::Array[String],
731
+ is_invoice_level: T::Boolean,
732
+ plan_phase_order: T.nilable(Integer),
733
+ reason: T.nilable(String)
734
+ }
735
+ )
736
+ end
737
+ def to_hash
608
738
  end
609
- def to_hash; end
610
739
  end
611
740
 
612
741
  class PercentageDiscount < Orb::Internal::Type::BaseModel
742
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
743
+
613
744
  sig { returns(String) }
614
745
  attr_accessor :id
615
746
 
@@ -647,8 +778,7 @@ module Orb
647
778
  plan_phase_order: T.nilable(Integer),
648
779
  reason: T.nilable(String),
649
780
  adjustment_type: Symbol
650
- )
651
- .returns(T.attached_class)
781
+ ).returns(T.attached_class)
652
782
  end
653
783
  def self.new(
654
784
  id:,
@@ -665,25 +795,29 @@ module Orb
665
795
  # The reason for the adjustment.
666
796
  reason:,
667
797
  adjustment_type: :percentage_discount
668
- ); end
798
+ )
799
+ end
800
+
669
801
  sig do
670
- override
671
- .returns(
672
- {
673
- id: String,
674
- adjustment_type: Symbol,
675
- applies_to_price_ids: T::Array[String],
676
- is_invoice_level: T::Boolean,
677
- percentage_discount: Float,
678
- plan_phase_order: T.nilable(Integer),
679
- reason: T.nilable(String)
680
- }
681
- )
802
+ override.returns(
803
+ {
804
+ id: String,
805
+ adjustment_type: Symbol,
806
+ applies_to_price_ids: T::Array[String],
807
+ is_invoice_level: T::Boolean,
808
+ percentage_discount: Float,
809
+ plan_phase_order: T.nilable(Integer),
810
+ reason: T.nilable(String)
811
+ }
812
+ )
813
+ end
814
+ def to_hash
682
815
  end
683
- def to_hash; end
684
816
  end
685
817
 
686
818
  class Minimum < Orb::Internal::Type::BaseModel
819
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
820
+
687
821
  sig { returns(String) }
688
822
  attr_accessor :id
689
823
 
@@ -726,8 +860,7 @@ module Orb
726
860
  plan_phase_order: T.nilable(Integer),
727
861
  reason: T.nilable(String),
728
862
  adjustment_type: Symbol
729
- )
730
- .returns(T.attached_class)
863
+ ).returns(T.attached_class)
731
864
  end
732
865
  def self.new(
733
866
  id:,
@@ -746,26 +879,30 @@ module Orb
746
879
  # The reason for the adjustment.
747
880
  reason:,
748
881
  adjustment_type: :minimum
749
- ); end
882
+ )
883
+ end
884
+
750
885
  sig do
751
- override
752
- .returns(
753
- {
754
- id: String,
755
- adjustment_type: Symbol,
756
- applies_to_price_ids: T::Array[String],
757
- is_invoice_level: T::Boolean,
758
- item_id: String,
759
- minimum_amount: String,
760
- plan_phase_order: T.nilable(Integer),
761
- reason: T.nilable(String)
762
- }
763
- )
886
+ override.returns(
887
+ {
888
+ id: String,
889
+ adjustment_type: Symbol,
890
+ applies_to_price_ids: T::Array[String],
891
+ is_invoice_level: T::Boolean,
892
+ item_id: String,
893
+ minimum_amount: String,
894
+ plan_phase_order: T.nilable(Integer),
895
+ reason: T.nilable(String)
896
+ }
897
+ )
898
+ end
899
+ def to_hash
764
900
  end
765
- def to_hash; end
766
901
  end
767
902
 
768
903
  class Maximum < Orb::Internal::Type::BaseModel
904
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
905
+
769
906
  sig { returns(String) }
770
907
  attr_accessor :id
771
908
 
@@ -803,8 +940,7 @@ module Orb
803
940
  plan_phase_order: T.nilable(Integer),
804
941
  reason: T.nilable(String),
805
942
  adjustment_type: Symbol
806
- )
807
- .returns(T.attached_class)
943
+ ).returns(T.attached_class)
808
944
  end
809
945
  def self.new(
810
946
  id:,
@@ -821,35 +957,41 @@ module Orb
821
957
  # The reason for the adjustment.
822
958
  reason:,
823
959
  adjustment_type: :maximum
824
- ); end
960
+ )
961
+ end
962
+
825
963
  sig do
826
- override
827
- .returns(
828
- {
829
- id: String,
830
- adjustment_type: Symbol,
831
- applies_to_price_ids: T::Array[String],
832
- is_invoice_level: T::Boolean,
833
- maximum_amount: String,
834
- plan_phase_order: T.nilable(Integer),
835
- reason: T.nilable(String)
836
- }
837
- )
964
+ override.returns(
965
+ {
966
+ id: String,
967
+ adjustment_type: Symbol,
968
+ applies_to_price_ids: T::Array[String],
969
+ is_invoice_level: T::Boolean,
970
+ maximum_amount: String,
971
+ plan_phase_order: T.nilable(Integer),
972
+ reason: T.nilable(String)
973
+ }
974
+ )
975
+ end
976
+ def to_hash
838
977
  end
839
- def to_hash; end
840
978
  end
841
979
 
842
980
  sig do
843
- override
844
- .returns(
845
- [Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Maximum]
846
- )
981
+ override.returns(
982
+ T::Array[
983
+ Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::Variants
984
+ ]
985
+ )
986
+ end
987
+ def self.variants
847
988
  end
848
- def self.variants; end
849
989
  end
850
990
  end
851
991
 
852
992
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
993
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
994
+
853
995
  # The day of the month on which the billing cycle is anchored. If the maximum
854
996
  # number of days in a month is greater than this value, the last day of the month
855
997
  # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
@@ -869,7 +1011,11 @@ module Orb
869
1011
  attr_accessor :year
870
1012
 
871
1013
  sig do
872
- params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
1014
+ params(
1015
+ day: Integer,
1016
+ month: T.nilable(Integer),
1017
+ year: T.nilable(Integer)
1018
+ ).returns(T.attached_class)
873
1019
  end
874
1020
  def self.new(
875
1021
  # The day of the month on which the billing cycle is anchored. If the maximum
@@ -884,15 +1030,37 @@ module Orb
884
1030
  # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
885
1031
  # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
886
1032
  year: nil
887
- ); end
888
- sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
889
- def to_hash; end
1033
+ )
1034
+ end
1035
+
1036
+ sig do
1037
+ override.returns(
1038
+ {
1039
+ day: Integer,
1040
+ month: T.nilable(Integer),
1041
+ year: T.nilable(Integer)
1042
+ }
1043
+ )
1044
+ end
1045
+ def to_hash
1046
+ end
890
1047
  end
891
1048
 
892
1049
  module DiscountInterval
893
1050
  extend Orb::Internal::Type::Union
894
1051
 
1052
+ Variants =
1053
+ T.type_alias do
1054
+ T.any(
1055
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Amount,
1056
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Percentage,
1057
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Usage
1058
+ )
1059
+ end
1060
+
895
1061
  class Amount < Orb::Internal::Type::BaseModel
1062
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1063
+
896
1064
  # Only available if discount_type is `amount`.
897
1065
  sig { returns(String) }
898
1066
  attr_accessor :amount_discount
@@ -924,8 +1092,7 @@ module Orb
924
1092
  end_date: T.nilable(Time),
925
1093
  start_date: Time,
926
1094
  discount_type: Symbol
927
- )
928
- .returns(T.attached_class)
1095
+ ).returns(T.attached_class)
929
1096
  end
930
1097
  def self.new(
931
1098
  # Only available if discount_type is `amount`.
@@ -939,24 +1106,28 @@ module Orb
939
1106
  # The start date of the discount interval.
940
1107
  start_date:,
941
1108
  discount_type: :amount
942
- ); end
1109
+ )
1110
+ end
1111
+
943
1112
  sig do
944
- override
945
- .returns(
946
- {
947
- amount_discount: String,
948
- applies_to_price_ids: T::Array[String],
949
- applies_to_price_interval_ids: T::Array[String],
950
- discount_type: Symbol,
951
- end_date: T.nilable(Time),
952
- start_date: Time
953
- }
954
- )
1113
+ override.returns(
1114
+ {
1115
+ amount_discount: String,
1116
+ applies_to_price_ids: T::Array[String],
1117
+ applies_to_price_interval_ids: T::Array[String],
1118
+ discount_type: Symbol,
1119
+ end_date: T.nilable(Time),
1120
+ start_date: Time
1121
+ }
1122
+ )
1123
+ end
1124
+ def to_hash
955
1125
  end
956
- def to_hash; end
957
1126
  end
958
1127
 
959
1128
  class Percentage < Orb::Internal::Type::BaseModel
1129
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1130
+
960
1131
  # The price ids that this discount interval applies to.
961
1132
  sig { returns(T::Array[String]) }
962
1133
  attr_accessor :applies_to_price_ids
@@ -989,8 +1160,7 @@ module Orb
989
1160
  percentage_discount: Float,
990
1161
  start_date: Time,
991
1162
  discount_type: Symbol
992
- )
993
- .returns(T.attached_class)
1163
+ ).returns(T.attached_class)
994
1164
  end
995
1165
  def self.new(
996
1166
  # The price ids that this discount interval applies to.
@@ -1005,24 +1175,28 @@ module Orb
1005
1175
  # The start date of the discount interval.
1006
1176
  start_date:,
1007
1177
  discount_type: :percentage
1008
- ); end
1178
+ )
1179
+ end
1180
+
1009
1181
  sig do
1010
- override
1011
- .returns(
1012
- {
1013
- applies_to_price_ids: T::Array[String],
1014
- applies_to_price_interval_ids: T::Array[String],
1015
- discount_type: Symbol,
1016
- end_date: T.nilable(Time),
1017
- percentage_discount: Float,
1018
- start_date: Time
1019
- }
1020
- )
1182
+ override.returns(
1183
+ {
1184
+ applies_to_price_ids: T::Array[String],
1185
+ applies_to_price_interval_ids: T::Array[String],
1186
+ discount_type: Symbol,
1187
+ end_date: T.nilable(Time),
1188
+ percentage_discount: Float,
1189
+ start_date: Time
1190
+ }
1191
+ )
1192
+ end
1193
+ def to_hash
1021
1194
  end
1022
- def to_hash; end
1023
1195
  end
1024
1196
 
1025
1197
  class Usage < Orb::Internal::Type::BaseModel
1198
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1199
+
1026
1200
  # The price ids that this discount interval applies to.
1027
1201
  sig { returns(T::Array[String]) }
1028
1202
  attr_accessor :applies_to_price_ids
@@ -1055,8 +1229,7 @@ module Orb
1055
1229
  start_date: Time,
1056
1230
  usage_discount: Float,
1057
1231
  discount_type: Symbol
1058
- )
1059
- .returns(T.attached_class)
1232
+ ).returns(T.attached_class)
1060
1233
  end
1061
1234
  def self.new(
1062
1235
  # The price ids that this discount interval applies to.
@@ -1071,33 +1244,39 @@ module Orb
1071
1244
  # discount is for
1072
1245
  usage_discount:,
1073
1246
  discount_type: :usage
1074
- ); end
1247
+ )
1248
+ end
1249
+
1075
1250
  sig do
1076
- override
1077
- .returns(
1078
- {
1079
- applies_to_price_ids: T::Array[String],
1080
- applies_to_price_interval_ids: T::Array[String],
1081
- discount_type: Symbol,
1082
- end_date: T.nilable(Time),
1083
- start_date: Time,
1084
- usage_discount: Float
1085
- }
1086
- )
1251
+ override.returns(
1252
+ {
1253
+ applies_to_price_ids: T::Array[String],
1254
+ applies_to_price_interval_ids: T::Array[String],
1255
+ discount_type: Symbol,
1256
+ end_date: T.nilable(Time),
1257
+ start_date: Time,
1258
+ usage_discount: Float
1259
+ }
1260
+ )
1261
+ end
1262
+ def to_hash
1087
1263
  end
1088
- def to_hash; end
1089
1264
  end
1090
1265
 
1091
1266
  sig do
1092
- override
1093
- .returns(
1094
- [Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Amount, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Usage]
1095
- )
1267
+ override.returns(
1268
+ T::Array[
1269
+ Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::Variants
1270
+ ]
1271
+ )
1272
+ end
1273
+ def self.variants
1096
1274
  end
1097
- def self.variants; end
1098
1275
  end
1099
1276
 
1100
1277
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1278
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1279
+
1101
1280
  sig { returns(T.nilable(Time)) }
1102
1281
  attr_accessor :end_date
1103
1282
 
@@ -1111,18 +1290,33 @@ module Orb
1111
1290
  attr_accessor :start_date
1112
1291
 
1113
1292
  sig do
1114
- params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
1115
- .returns(T.attached_class)
1293
+ params(
1294
+ end_date: T.nilable(Time),
1295
+ price_id: String,
1296
+ quantity: Float,
1297
+ start_date: Time
1298
+ ).returns(T.attached_class)
1299
+ end
1300
+ def self.new(end_date:, price_id:, quantity:, start_date:)
1116
1301
  end
1117
- def self.new(end_date:, price_id:, quantity:, start_date:); end
1118
1302
 
1119
1303
  sig do
1120
- override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
1304
+ override.returns(
1305
+ {
1306
+ end_date: T.nilable(Time),
1307
+ price_id: String,
1308
+ quantity: Float,
1309
+ start_date: Time
1310
+ }
1311
+ )
1312
+ end
1313
+ def to_hash
1121
1314
  end
1122
- def to_hash; end
1123
1315
  end
1124
1316
 
1125
1317
  class MaximumInterval < Orb::Internal::Type::BaseModel
1318
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1319
+
1126
1320
  # The price ids that this maximum interval applies to.
1127
1321
  sig { returns(T::Array[String]) }
1128
1322
  attr_accessor :applies_to_price_ids
@@ -1151,8 +1345,7 @@ module Orb
1151
1345
  end_date: T.nilable(Time),
1152
1346
  maximum_amount: String,
1153
1347
  start_date: Time
1154
- )
1155
- .returns(T.attached_class)
1348
+ ).returns(T.attached_class)
1156
1349
  end
1157
1350
  def self.new(
1158
1351
  # The price ids that this maximum interval applies to.
@@ -1166,23 +1359,27 @@ module Orb
1166
1359
  maximum_amount:,
1167
1360
  # The start date of the maximum interval.
1168
1361
  start_date:
1169
- ); end
1362
+ )
1363
+ end
1364
+
1170
1365
  sig do
1171
- override
1172
- .returns(
1173
- {
1174
- applies_to_price_ids: T::Array[String],
1175
- applies_to_price_interval_ids: T::Array[String],
1176
- end_date: T.nilable(Time),
1177
- maximum_amount: String,
1178
- start_date: Time
1179
- }
1180
- )
1366
+ override.returns(
1367
+ {
1368
+ applies_to_price_ids: T::Array[String],
1369
+ applies_to_price_interval_ids: T::Array[String],
1370
+ end_date: T.nilable(Time),
1371
+ maximum_amount: String,
1372
+ start_date: Time
1373
+ }
1374
+ )
1375
+ end
1376
+ def to_hash
1181
1377
  end
1182
- def to_hash; end
1183
1378
  end
1184
1379
 
1185
1380
  class MinimumInterval < Orb::Internal::Type::BaseModel
1381
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1382
+
1186
1383
  # The price ids that this minimum interval applies to.
1187
1384
  sig { returns(T::Array[String]) }
1188
1385
  attr_accessor :applies_to_price_ids
@@ -1211,8 +1408,7 @@ module Orb
1211
1408
  end_date: T.nilable(Time),
1212
1409
  minimum_amount: String,
1213
1410
  start_date: Time
1214
- )
1215
- .returns(T.attached_class)
1411
+ ).returns(T.attached_class)
1216
1412
  end
1217
1413
  def self.new(
1218
1414
  # The price ids that this minimum interval applies to.
@@ -1226,35 +1422,43 @@ module Orb
1226
1422
  minimum_amount:,
1227
1423
  # The start date of the minimum interval.
1228
1424
  start_date:
1229
- ); end
1425
+ )
1426
+ end
1427
+
1230
1428
  sig do
1231
- override
1232
- .returns(
1233
- {
1234
- applies_to_price_ids: T::Array[String],
1235
- applies_to_price_interval_ids: T::Array[String],
1236
- end_date: T.nilable(Time),
1237
- minimum_amount: String,
1238
- start_date: Time
1239
- }
1240
- )
1429
+ override.returns(
1430
+ {
1431
+ applies_to_price_ids: T::Array[String],
1432
+ applies_to_price_interval_ids: T::Array[String],
1433
+ end_date: T.nilable(Time),
1434
+ minimum_amount: String,
1435
+ start_date: Time
1436
+ }
1437
+ )
1438
+ end
1439
+ def to_hash
1241
1440
  end
1242
- def to_hash; end
1243
1441
  end
1244
1442
 
1245
1443
  class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1444
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1445
+
1246
1446
  sig { returns(String) }
1247
1447
  attr_accessor :id
1248
1448
 
1249
1449
  # A pending subscription change if one exists on this subscription.
1250
1450
  sig { params(id: String).returns(T.attached_class) }
1251
- def self.new(id:); end
1451
+ def self.new(id:)
1452
+ end
1252
1453
 
1253
- sig { override.returns({id: String}) }
1254
- def to_hash; end
1454
+ sig { override.returns({ id: String }) }
1455
+ def to_hash
1456
+ end
1255
1457
  end
1256
1458
 
1257
1459
  class PriceInterval < Orb::Internal::Type::BaseModel
1460
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1461
+
1258
1462
  sig { returns(String) }
1259
1463
  attr_accessor :id
1260
1464
 
@@ -1288,7 +1492,9 @@ module Orb
1288
1492
  sig do
1289
1493
  returns(
1290
1494
  T.nilable(
1291
- T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition]
1495
+ T::Array[
1496
+ Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition
1497
+ ]
1292
1498
  )
1293
1499
  )
1294
1500
  end
@@ -1307,34 +1513,34 @@ module Orb
1307
1513
  sig do
1308
1514
  returns(
1309
1515
  T.any(
1310
- Orb::Models::Price::Unit,
1311
- Orb::Models::Price::Package,
1312
- Orb::Models::Price::Matrix,
1313
- Orb::Models::Price::Tiered,
1314
- Orb::Models::Price::TieredBps,
1315
- Orb::Models::Price::Bps,
1316
- Orb::Models::Price::BulkBps,
1317
- Orb::Models::Price::Bulk,
1318
- Orb::Models::Price::ThresholdTotalAmount,
1319
- Orb::Models::Price::TieredPackage,
1320
- Orb::Models::Price::GroupedTiered,
1321
- Orb::Models::Price::TieredWithMinimum,
1322
- Orb::Models::Price::TieredPackageWithMinimum,
1323
- Orb::Models::Price::PackageWithAllocation,
1324
- Orb::Models::Price::UnitWithPercent,
1325
- Orb::Models::Price::MatrixWithAllocation,
1326
- Orb::Models::Price::TieredWithProration,
1327
- Orb::Models::Price::UnitWithProration,
1328
- Orb::Models::Price::GroupedAllocation,
1329
- Orb::Models::Price::GroupedWithProratedMinimum,
1330
- Orb::Models::Price::GroupedWithMeteredMinimum,
1331
- Orb::Models::Price::MatrixWithDisplayName,
1332
- Orb::Models::Price::BulkWithProration,
1333
- Orb::Models::Price::GroupedTieredPackage,
1334
- Orb::Models::Price::MaxGroupTieredPackage,
1335
- Orb::Models::Price::ScalableMatrixWithUnitPricing,
1336
- Orb::Models::Price::ScalableMatrixWithTieredPricing,
1337
- Orb::Models::Price::CumulativeGroupedBulk
1516
+ Orb::Price::Unit,
1517
+ Orb::Price::Package,
1518
+ Orb::Price::Matrix,
1519
+ Orb::Price::Tiered,
1520
+ Orb::Price::TieredBps,
1521
+ Orb::Price::Bps,
1522
+ Orb::Price::BulkBps,
1523
+ Orb::Price::Bulk,
1524
+ Orb::Price::ThresholdTotalAmount,
1525
+ Orb::Price::TieredPackage,
1526
+ Orb::Price::GroupedTiered,
1527
+ Orb::Price::TieredWithMinimum,
1528
+ Orb::Price::TieredPackageWithMinimum,
1529
+ Orb::Price::PackageWithAllocation,
1530
+ Orb::Price::UnitWithPercent,
1531
+ Orb::Price::MatrixWithAllocation,
1532
+ Orb::Price::TieredWithProration,
1533
+ Orb::Price::UnitWithProration,
1534
+ Orb::Price::GroupedAllocation,
1535
+ Orb::Price::GroupedWithProratedMinimum,
1536
+ Orb::Price::GroupedWithMeteredMinimum,
1537
+ Orb::Price::MatrixWithDisplayName,
1538
+ Orb::Price::BulkWithProration,
1539
+ Orb::Price::GroupedTieredPackage,
1540
+ Orb::Price::MaxGroupTieredPackage,
1541
+ Orb::Price::ScalableMatrixWithUnitPricing,
1542
+ Orb::Price::ScalableMatrixWithTieredPricing,
1543
+ Orb::Price::CumulativeGroupedBulk
1338
1544
  )
1339
1545
  )
1340
1546
  end
@@ -1361,49 +1567,46 @@ module Orb
1361
1567
  current_billing_period_start_date: T.nilable(Time),
1362
1568
  end_date: T.nilable(Time),
1363
1569
  filter: T.nilable(String),
1364
- fixed_fee_quantity_transitions: T.nilable(
1365
- T::Array[
1366
- T.any(
1367
- Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition,
1368
- Orb::Internal::AnyHash
1369
- )
1370
- ]
1371
- ),
1372
- price: T.any(
1373
- Orb::Models::Price::Unit,
1374
- Orb::Internal::AnyHash,
1375
- Orb::Models::Price::Package,
1376
- Orb::Models::Price::Matrix,
1377
- Orb::Models::Price::Tiered,
1378
- Orb::Models::Price::TieredBps,
1379
- Orb::Models::Price::Bps,
1380
- Orb::Models::Price::BulkBps,
1381
- Orb::Models::Price::Bulk,
1382
- Orb::Models::Price::ThresholdTotalAmount,
1383
- Orb::Models::Price::TieredPackage,
1384
- Orb::Models::Price::GroupedTiered,
1385
- Orb::Models::Price::TieredWithMinimum,
1386
- Orb::Models::Price::TieredPackageWithMinimum,
1387
- Orb::Models::Price::PackageWithAllocation,
1388
- Orb::Models::Price::UnitWithPercent,
1389
- Orb::Models::Price::MatrixWithAllocation,
1390
- Orb::Models::Price::TieredWithProration,
1391
- Orb::Models::Price::UnitWithProration,
1392
- Orb::Models::Price::GroupedAllocation,
1393
- Orb::Models::Price::GroupedWithProratedMinimum,
1394
- Orb::Models::Price::GroupedWithMeteredMinimum,
1395
- Orb::Models::Price::MatrixWithDisplayName,
1396
- Orb::Models::Price::BulkWithProration,
1397
- Orb::Models::Price::GroupedTieredPackage,
1398
- Orb::Models::Price::MaxGroupTieredPackage,
1399
- Orb::Models::Price::ScalableMatrixWithUnitPricing,
1400
- Orb::Models::Price::ScalableMatrixWithTieredPricing,
1401
- Orb::Models::Price::CumulativeGroupedBulk
1402
- ),
1570
+ fixed_fee_quantity_transitions:
1571
+ T.nilable(
1572
+ T::Array[
1573
+ Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition::OrHash
1574
+ ]
1575
+ ),
1576
+ price:
1577
+ T.any(
1578
+ Orb::Price::Unit::OrHash,
1579
+ Orb::Price::Package::OrHash,
1580
+ Orb::Price::Matrix::OrHash,
1581
+ Orb::Price::Tiered::OrHash,
1582
+ Orb::Price::TieredBps::OrHash,
1583
+ Orb::Price::Bps::OrHash,
1584
+ Orb::Price::BulkBps::OrHash,
1585
+ Orb::Price::Bulk::OrHash,
1586
+ Orb::Price::ThresholdTotalAmount::OrHash,
1587
+ Orb::Price::TieredPackage::OrHash,
1588
+ Orb::Price::GroupedTiered::OrHash,
1589
+ Orb::Price::TieredWithMinimum::OrHash,
1590
+ Orb::Price::TieredPackageWithMinimum::OrHash,
1591
+ Orb::Price::PackageWithAllocation::OrHash,
1592
+ Orb::Price::UnitWithPercent::OrHash,
1593
+ Orb::Price::MatrixWithAllocation::OrHash,
1594
+ Orb::Price::TieredWithProration::OrHash,
1595
+ Orb::Price::UnitWithProration::OrHash,
1596
+ Orb::Price::GroupedAllocation::OrHash,
1597
+ Orb::Price::GroupedWithProratedMinimum::OrHash,
1598
+ Orb::Price::GroupedWithMeteredMinimum::OrHash,
1599
+ Orb::Price::MatrixWithDisplayName::OrHash,
1600
+ Orb::Price::BulkWithProration::OrHash,
1601
+ Orb::Price::GroupedTieredPackage::OrHash,
1602
+ Orb::Price::MaxGroupTieredPackage::OrHash,
1603
+ Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
1604
+ Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
1605
+ Orb::Price::CumulativeGroupedBulk::OrHash
1606
+ ),
1403
1607
  start_date: Time,
1404
1608
  usage_customer_ids: T.nilable(T::Array[String])
1405
- )
1406
- .returns(T.attached_class)
1609
+ ).returns(T.attached_class)
1407
1610
  end
1408
1611
  def self.new(
1409
1612
  id:,
@@ -1442,58 +1645,66 @@ module Orb
1442
1645
  # A list of customer IDs whose usage events will be aggregated and billed under
1443
1646
  # this price interval.
1444
1647
  usage_customer_ids:
1445
- ); end
1648
+ )
1649
+ end
1650
+
1446
1651
  sig do
1447
- override
1448
- .returns(
1449
- {
1450
- id: String,
1451
- billing_cycle_day: Integer,
1452
- current_billing_period_end_date: T.nilable(Time),
1453
- current_billing_period_start_date: T.nilable(Time),
1454
- end_date: T.nilable(Time),
1455
- filter: T.nilable(String),
1456
- fixed_fee_quantity_transitions: T.nilable(
1457
- T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition]
1652
+ override.returns(
1653
+ {
1654
+ id: String,
1655
+ billing_cycle_day: Integer,
1656
+ current_billing_period_end_date: T.nilable(Time),
1657
+ current_billing_period_start_date: T.nilable(Time),
1658
+ end_date: T.nilable(Time),
1659
+ filter: T.nilable(String),
1660
+ fixed_fee_quantity_transitions:
1661
+ T.nilable(
1662
+ T::Array[
1663
+ Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition
1664
+ ]
1458
1665
  ),
1459
- price: T.any(
1460
- Orb::Models::Price::Unit,
1461
- Orb::Models::Price::Package,
1462
- Orb::Models::Price::Matrix,
1463
- Orb::Models::Price::Tiered,
1464
- Orb::Models::Price::TieredBps,
1465
- Orb::Models::Price::Bps,
1466
- Orb::Models::Price::BulkBps,
1467
- Orb::Models::Price::Bulk,
1468
- Orb::Models::Price::ThresholdTotalAmount,
1469
- Orb::Models::Price::TieredPackage,
1470
- Orb::Models::Price::GroupedTiered,
1471
- Orb::Models::Price::TieredWithMinimum,
1472
- Orb::Models::Price::TieredPackageWithMinimum,
1473
- Orb::Models::Price::PackageWithAllocation,
1474
- Orb::Models::Price::UnitWithPercent,
1475
- Orb::Models::Price::MatrixWithAllocation,
1476
- Orb::Models::Price::TieredWithProration,
1477
- Orb::Models::Price::UnitWithProration,
1478
- Orb::Models::Price::GroupedAllocation,
1479
- Orb::Models::Price::GroupedWithProratedMinimum,
1480
- Orb::Models::Price::GroupedWithMeteredMinimum,
1481
- Orb::Models::Price::MatrixWithDisplayName,
1482
- Orb::Models::Price::BulkWithProration,
1483
- Orb::Models::Price::GroupedTieredPackage,
1484
- Orb::Models::Price::MaxGroupTieredPackage,
1485
- Orb::Models::Price::ScalableMatrixWithUnitPricing,
1486
- Orb::Models::Price::ScalableMatrixWithTieredPricing,
1487
- Orb::Models::Price::CumulativeGroupedBulk
1666
+ price:
1667
+ T.any(
1668
+ Orb::Price::Unit,
1669
+ Orb::Price::Package,
1670
+ Orb::Price::Matrix,
1671
+ Orb::Price::Tiered,
1672
+ Orb::Price::TieredBps,
1673
+ Orb::Price::Bps,
1674
+ Orb::Price::BulkBps,
1675
+ Orb::Price::Bulk,
1676
+ Orb::Price::ThresholdTotalAmount,
1677
+ Orb::Price::TieredPackage,
1678
+ Orb::Price::GroupedTiered,
1679
+ Orb::Price::TieredWithMinimum,
1680
+ Orb::Price::TieredPackageWithMinimum,
1681
+ Orb::Price::PackageWithAllocation,
1682
+ Orb::Price::UnitWithPercent,
1683
+ Orb::Price::MatrixWithAllocation,
1684
+ Orb::Price::TieredWithProration,
1685
+ Orb::Price::UnitWithProration,
1686
+ Orb::Price::GroupedAllocation,
1687
+ Orb::Price::GroupedWithProratedMinimum,
1688
+ Orb::Price::GroupedWithMeteredMinimum,
1689
+ Orb::Price::MatrixWithDisplayName,
1690
+ Orb::Price::BulkWithProration,
1691
+ Orb::Price::GroupedTieredPackage,
1692
+ Orb::Price::MaxGroupTieredPackage,
1693
+ Orb::Price::ScalableMatrixWithUnitPricing,
1694
+ Orb::Price::ScalableMatrixWithTieredPricing,
1695
+ Orb::Price::CumulativeGroupedBulk
1488
1696
  ),
1489
- start_date: Time,
1490
- usage_customer_ids: T.nilable(T::Array[String])
1491
- }
1492
- )
1697
+ start_date: Time,
1698
+ usage_customer_ids: T.nilable(T::Array[String])
1699
+ }
1700
+ )
1701
+ end
1702
+ def to_hash
1493
1703
  end
1494
- def to_hash; end
1495
1704
 
1496
1705
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1706
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1707
+
1497
1708
  sig { returns(Time) }
1498
1709
  attr_accessor :effective_date
1499
1710
 
@@ -1503,15 +1714,29 @@ module Orb
1503
1714
  sig { returns(Integer) }
1504
1715
  attr_accessor :quantity
1505
1716
 
1506
- sig { params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class) }
1507
- def self.new(effective_date:, price_id:, quantity:); end
1717
+ sig do
1718
+ params(
1719
+ effective_date: Time,
1720
+ price_id: String,
1721
+ quantity: Integer
1722
+ ).returns(T.attached_class)
1723
+ end
1724
+ def self.new(effective_date:, price_id:, quantity:)
1725
+ end
1508
1726
 
1509
- sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
1510
- def to_hash; end
1727
+ sig do
1728
+ override.returns(
1729
+ { effective_date: Time, price_id: String, quantity: Integer }
1730
+ )
1731
+ end
1732
+ def to_hash
1733
+ end
1511
1734
  end
1512
1735
  end
1513
1736
 
1514
1737
  class RedeemedCoupon < Orb::Internal::Type::BaseModel
1738
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1739
+
1515
1740
  sig { returns(String) }
1516
1741
  attr_accessor :coupon_id
1517
1742
 
@@ -1522,54 +1747,95 @@ module Orb
1522
1747
  attr_accessor :start_date
1523
1748
 
1524
1749
  sig do
1525
- params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
1750
+ params(
1751
+ coupon_id: String,
1752
+ end_date: T.nilable(Time),
1753
+ start_date: Time
1754
+ ).returns(T.attached_class)
1755
+ end
1756
+ def self.new(coupon_id:, end_date:, start_date:)
1526
1757
  end
1527
- def self.new(coupon_id:, end_date:, start_date:); end
1528
1758
 
1529
- sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
1530
- def to_hash; end
1759
+ sig do
1760
+ override.returns(
1761
+ { coupon_id: String, end_date: T.nilable(Time), start_date: Time }
1762
+ )
1763
+ end
1764
+ def to_hash
1765
+ end
1531
1766
  end
1532
1767
 
1533
1768
  module Status
1534
1769
  extend Orb::Internal::Type::Enum
1535
1770
 
1536
- TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::Status) }
1771
+ TaggedSymbol =
1772
+ T.type_alias do
1773
+ T.all(
1774
+ Symbol,
1775
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status
1776
+ )
1777
+ end
1537
1778
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1538
1779
 
1539
- ACTIVE = T.let(:active, Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol)
1540
- ENDED = T.let(:ended, Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol)
1541
- UPCOMING = T.let(:upcoming, Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol)
1780
+ ACTIVE =
1781
+ T.let(
1782
+ :active,
1783
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol
1784
+ )
1785
+ ENDED =
1786
+ T.let(
1787
+ :ended,
1788
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol
1789
+ )
1790
+ UPCOMING =
1791
+ T.let(
1792
+ :upcoming,
1793
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol
1794
+ )
1542
1795
 
1543
- sig { override.returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol]) }
1544
- def self.values; end
1796
+ sig do
1797
+ override.returns(
1798
+ T::Array[
1799
+ Orb::Models::SubscriptionPriceIntervalsResponse::Status::TaggedSymbol
1800
+ ]
1801
+ )
1802
+ end
1803
+ def self.values
1804
+ end
1545
1805
  end
1546
1806
 
1547
1807
  class TrialInfo < Orb::Internal::Type::BaseModel
1808
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1809
+
1548
1810
  sig { returns(T.nilable(Time)) }
1549
1811
  attr_accessor :end_date
1550
1812
 
1551
1813
  sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
1552
- def self.new(end_date:); end
1814
+ def self.new(end_date:)
1815
+ end
1553
1816
 
1554
- sig { override.returns({end_date: T.nilable(Time)}) }
1555
- def to_hash; end
1817
+ sig { override.returns({ end_date: T.nilable(Time) }) }
1818
+ def to_hash
1819
+ end
1556
1820
  end
1557
1821
 
1558
1822
  class ChangedResources < Orb::Internal::Type::BaseModel
1823
+ OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
1824
+
1559
1825
  # The credit notes that were created as part of this operation.
1560
- sig { returns(T::Array[Orb::Models::CreditNote]) }
1826
+ sig { returns(T::Array[Orb::CreditNote]) }
1561
1827
  attr_accessor :created_credit_notes
1562
1828
 
1563
1829
  # The invoices that were created as part of this operation.
1564
- sig { returns(T::Array[Orb::Models::Invoice]) }
1830
+ sig { returns(T::Array[Orb::Invoice]) }
1565
1831
  attr_accessor :created_invoices
1566
1832
 
1567
1833
  # The credit notes that were voided as part of this operation.
1568
- sig { returns(T::Array[Orb::Models::CreditNote]) }
1834
+ sig { returns(T::Array[Orb::CreditNote]) }
1569
1835
  attr_accessor :voided_credit_notes
1570
1836
 
1571
1837
  # The invoices that were voided as part of this operation.
1572
- sig { returns(T::Array[Orb::Models::Invoice]) }
1838
+ sig { returns(T::Array[Orb::Invoice]) }
1573
1839
  attr_accessor :voided_invoices
1574
1840
 
1575
1841
  # The resources that were changed as part of this operation. Only present when
@@ -1577,12 +1843,11 @@ module Orb
1577
1843
  # `include_changed_resources` parameter was passed in the request.
1578
1844
  sig do
1579
1845
  params(
1580
- created_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1581
- created_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)],
1582
- voided_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1583
- voided_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)]
1584
- )
1585
- .returns(T.attached_class)
1846
+ created_credit_notes: T::Array[Orb::CreditNote::OrHash],
1847
+ created_invoices: T::Array[Orb::Invoice::OrHash],
1848
+ voided_credit_notes: T::Array[Orb::CreditNote::OrHash],
1849
+ voided_invoices: T::Array[Orb::Invoice::OrHash]
1850
+ ).returns(T.attached_class)
1586
1851
  end
1587
1852
  def self.new(
1588
1853
  # The credit notes that were created as part of this operation.
@@ -1593,19 +1858,21 @@ module Orb
1593
1858
  voided_credit_notes:,
1594
1859
  # The invoices that were voided as part of this operation.
1595
1860
  voided_invoices:
1596
- ); end
1861
+ )
1862
+ end
1863
+
1597
1864
  sig do
1598
- override
1599
- .returns(
1600
- {
1601
- created_credit_notes: T::Array[Orb::Models::CreditNote],
1602
- created_invoices: T::Array[Orb::Models::Invoice],
1603
- voided_credit_notes: T::Array[Orb::Models::CreditNote],
1604
- voided_invoices: T::Array[Orb::Models::Invoice]
1605
- }
1606
- )
1865
+ override.returns(
1866
+ {
1867
+ created_credit_notes: T::Array[Orb::CreditNote],
1868
+ created_invoices: T::Array[Orb::Invoice],
1869
+ voided_credit_notes: T::Array[Orb::CreditNote],
1870
+ voided_invoices: T::Array[Orb::Invoice]
1871
+ }
1872
+ )
1873
+ end
1874
+ def to_hash
1607
1875
  end
1608
- def to_hash; end
1609
1876
  end
1610
1877
  end
1611
1878
  end