orb-billing 0.1.0.pre.alpha.38 → 0.1.0.pre.alpha.39

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 (390) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/orb/client.rb +4 -0
  4. data/lib/orb/internal/transport/base_client.rb +1 -1
  5. data/lib/orb/internal/transport/pooled_net_requester.rb +1 -1
  6. data/lib/orb/internal/type/base_model.rb +14 -17
  7. data/lib/orb/internal/type/converter.rb +20 -22
  8. data/lib/orb/internal/type/enum.rb +8 -8
  9. data/lib/orb/internal/util.rb +1 -5
  10. data/lib/orb/models/alert.rb +9 -9
  11. data/lib/orb/models/alert_create_for_customer_params.rb +3 -3
  12. data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -3
  13. data/lib/orb/models/alert_create_for_subscription_params.rb +3 -3
  14. data/lib/orb/models/alert_list_params.rb +5 -5
  15. data/lib/orb/models/alert_update_params.rb +3 -3
  16. data/lib/orb/models/amount_discount.rb +1 -1
  17. data/lib/orb/models/billable_metric.rb +7 -7
  18. data/lib/orb/models/coupon.rb +7 -7
  19. data/lib/orb/models/coupon_create_params.rb +2 -2
  20. data/lib/orb/models/coupon_list_params.rb +2 -2
  21. data/lib/orb/models/coupons/subscription_list_params.rb +1 -1
  22. data/lib/orb/models/credit_note.rb +1 -1
  23. data/lib/orb/models/credit_note_list_params.rb +5 -5
  24. data/lib/orb/models/customer.rb +232 -232
  25. data/lib/orb/models/customer_create_params.rb +223 -223
  26. data/lib/orb/models/customer_list_params.rb +5 -5
  27. data/lib/orb/models/customer_update_by_external_id_params.rb +224 -224
  28. data/lib/orb/models/customer_update_params.rb +224 -224
  29. data/lib/orb/models/customers/balance_transaction_create_response.rb +2 -2
  30. data/lib/orb/models/customers/balance_transaction_list_params.rb +5 -5
  31. data/lib/orb/models/customers/balance_transaction_list_response.rb +2 -2
  32. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +6 -6
  33. data/lib/orb/models/customers/cost_list_params.rb +6 -6
  34. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +2 -2
  35. data/lib/orb/models/customers/credit_list_params.rb +2 -2
  36. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +20 -20
  37. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +22 -22
  38. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +20 -20
  39. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +22 -22
  40. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +5 -5
  41. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +22 -22
  42. data/lib/orb/models/customers/credits/ledger_list_params.rb +5 -5
  43. data/lib/orb/models/customers/credits/ledger_list_response.rb +22 -22
  44. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -8
  45. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +7 -7
  46. data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -8
  47. data/lib/orb/models/customers/credits/top_up_create_response.rb +7 -7
  48. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +1 -1
  49. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +7 -7
  50. data/lib/orb/models/customers/credits/top_up_list_params.rb +1 -1
  51. data/lib/orb/models/customers/credits/top_up_list_response.rb +7 -7
  52. data/lib/orb/models/dimensional_price_group.rb +7 -7
  53. data/lib/orb/models/dimensional_price_group_create_params.rb +2 -2
  54. data/lib/orb/models/dimensional_price_group_list_params.rb +1 -1
  55. data/lib/orb/models/event_ingest_params.rb +7 -7
  56. data/lib/orb/models/event_ingest_response.rb +4 -4
  57. data/lib/orb/models/event_search_params.rb +5 -5
  58. data/lib/orb/models/event_search_response.rb +8 -8
  59. data/lib/orb/models/event_update_params.rb +4 -4
  60. data/lib/orb/models/events/backfill_close_response.rb +7 -7
  61. data/lib/orb/models/events/backfill_create_params.rb +11 -11
  62. data/lib/orb/models/events/backfill_create_response.rb +7 -7
  63. data/lib/orb/models/events/backfill_fetch_response.rb +7 -7
  64. data/lib/orb/models/events/backfill_list_params.rb +1 -1
  65. data/lib/orb/models/events/backfill_list_response.rb +7 -7
  66. data/lib/orb/models/events/backfill_revert_response.rb +7 -7
  67. data/lib/orb/models/events/event_volumes.rb +1 -1
  68. data/lib/orb/models/events/volume_list_params.rb +7 -7
  69. data/lib/orb/models/invoice.rb +270 -270
  70. data/lib/orb/models/invoice_create_params.rb +12 -11
  71. data/lib/orb/models/invoice_fetch_upcoming_response.rb +266 -266
  72. data/lib/orb/models/invoice_issue_params.rb +4 -4
  73. data/lib/orb/models/invoice_line_item_create_params.rb +1 -1
  74. data/lib/orb/models/invoice_line_item_create_response.rb +27 -27
  75. data/lib/orb/models/invoice_list_params.rb +12 -12
  76. data/lib/orb/models/invoice_update_params.rb +2 -2
  77. data/lib/orb/models/item.rb +2 -2
  78. data/lib/orb/models/item_list_params.rb +1 -1
  79. data/lib/orb/models/metric_create_params.rb +2 -2
  80. data/lib/orb/models/metric_list_params.rb +5 -5
  81. data/lib/orb/models/metric_update_params.rb +2 -2
  82. data/lib/orb/models/percentage_discount.rb +2 -2
  83. data/lib/orb/models/plan.rb +35 -35
  84. data/lib/orb/models/plan_create_params.rb +267 -267
  85. data/lib/orb/models/plan_list_params.rb +5 -5
  86. data/lib/orb/models/plan_update_params.rb +4 -4
  87. data/lib/orb/models/plans/external_plan_id_update_params.rb +4 -4
  88. data/lib/orb/models/price.rb +158 -158
  89. data/lib/orb/models/price_create_params.rb +20 -20
  90. data/lib/orb/models/price_evaluate_params.rb +4 -4
  91. data/lib/orb/models/price_list_params.rb +1 -1
  92. data/lib/orb/models/price_update_params.rb +2 -2
  93. data/lib/orb/models/prices/external_price_id_update_params.rb +2 -2
  94. data/lib/orb/models/subscription.rb +114 -87
  95. data/lib/orb/models/subscription_cancel_params.rb +3 -3
  96. data/lib/orb/models/subscription_cancel_response.rb +150 -72
  97. data/lib/orb/models/subscription_change_apply_params.rb +33 -0
  98. data/lib/orb/models/subscription_change_apply_response.rb +1372 -0
  99. data/lib/orb/models/subscription_change_cancel_params.rb +19 -0
  100. data/lib/orb/models/subscription_change_cancel_response.rb +1372 -0
  101. data/lib/orb/models/subscription_change_retrieve_params.rb +19 -0
  102. data/lib/orb/models/subscription_change_retrieve_response.rb +1372 -0
  103. data/lib/orb/models/subscription_create_params.rb +641 -641
  104. data/lib/orb/models/subscription_create_response.rb +150 -72
  105. data/lib/orb/models/subscription_fetch_costs_params.rb +6 -6
  106. data/lib/orb/models/subscription_fetch_schedule_params.rb +5 -5
  107. data/lib/orb/models/subscription_fetch_schedule_response.rb +2 -2
  108. data/lib/orb/models/subscription_fetch_usage_params.rb +8 -8
  109. data/lib/orb/models/subscription_list_params.rb +5 -5
  110. data/lib/orb/models/subscription_price_intervals_params.rb +323 -323
  111. data/lib/orb/models/subscription_price_intervals_response.rb +152 -72
  112. data/lib/orb/models/subscription_schedule_plan_change_params.rb +651 -651
  113. data/lib/orb/models/subscription_schedule_plan_change_response.rb +152 -72
  114. data/lib/orb/models/subscription_trigger_phase_params.rb +3 -3
  115. data/lib/orb/models/subscription_trigger_phase_response.rb +152 -72
  116. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +152 -72
  117. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +153 -73
  118. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +152 -72
  119. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -8
  120. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +152 -72
  121. data/lib/orb/models/subscription_update_params.rb +10 -10
  122. data/lib/orb/models/subscription_update_trial_params.rb +3 -3
  123. data/lib/orb/models/subscription_update_trial_response.rb +152 -72
  124. data/lib/orb/models/trial_discount.rb +1 -1
  125. data/lib/orb/models/usage_discount.rb +2 -2
  126. data/lib/orb/request_options.rb +7 -7
  127. data/lib/orb/resources/alerts.rb +38 -38
  128. data/lib/orb/resources/coupons/subscriptions.rb +3 -3
  129. data/lib/orb/resources/coupons.rb +9 -9
  130. data/lib/orb/resources/credit_notes.rb +8 -8
  131. data/lib/orb/resources/customers/balance_transactions.rb +26 -26
  132. data/lib/orb/resources/customers/costs.rb +232 -232
  133. data/lib/orb/resources/customers/credits/ledger.rb +344 -344
  134. data/lib/orb/resources/customers/credits/top_ups.rb +12 -12
  135. data/lib/orb/resources/customers/credits.rb +8 -8
  136. data/lib/orb/resources/customers.rb +59 -59
  137. data/lib/orb/resources/dimensional_price_groups.rb +6 -6
  138. data/lib/orb/resources/events/backfills.rb +49 -49
  139. data/lib/orb/resources/events/volume.rb +10 -10
  140. data/lib/orb/resources/events.rb +295 -295
  141. data/lib/orb/resources/invoice_line_items.rb +1 -1
  142. data/lib/orb/resources/invoices.rb +38 -38
  143. data/lib/orb/resources/items.rb +1 -1
  144. data/lib/orb/resources/metrics.rb +11 -11
  145. data/lib/orb/resources/plans/external_plan_id.rb +14 -14
  146. data/lib/orb/resources/plans.rb +22 -22
  147. data/lib/orb/resources/prices/external_price_id.rb +4 -4
  148. data/lib/orb/resources/prices.rb +30 -30
  149. data/lib/orb/resources/subscription_changes.rb +87 -0
  150. data/lib/orb/resources/subscriptions.rb +813 -813
  151. data/lib/orb/resources/top_level.rb +4 -4
  152. data/lib/orb/version.rb +1 -1
  153. data/lib/orb.rb +7 -0
  154. data/rbi/lib/orb/client.rbi +5 -4
  155. data/rbi/lib/orb/errors.rbi +3 -6
  156. data/rbi/lib/orb/internal/page.rbi +3 -6
  157. data/rbi/lib/orb/internal/transport/base_client.rbi +13 -27
  158. data/rbi/lib/orb/internal/transport/pooled_net_requester.rbi +7 -13
  159. data/rbi/lib/orb/internal/type/array_of.rbi +8 -16
  160. data/rbi/lib/orb/internal/type/base_model.rbi +45 -64
  161. data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
  162. data/rbi/lib/orb/internal/type/boolean.rbi +4 -8
  163. data/rbi/lib/orb/internal/type/converter.rbi +25 -31
  164. data/rbi/lib/orb/internal/type/enum.rbi +14 -20
  165. data/rbi/lib/orb/internal/type/hash_of.rbi +8 -16
  166. data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
  167. data/rbi/lib/orb/internal/type/union.rbi +10 -20
  168. data/rbi/lib/orb/internal/type/unknown.rbi +4 -8
  169. data/rbi/lib/orb/internal/util.rbi +34 -68
  170. data/rbi/lib/orb/internal.rbi +1 -1
  171. data/rbi/lib/orb/models/alert.rbi +21 -33
  172. data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +8 -13
  173. data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +8 -13
  174. data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +8 -13
  175. data/rbi/lib/orb/models/alert_disable_params.rbi +2 -4
  176. data/rbi/lib/orb/models/alert_enable_params.rbi +2 -4
  177. data/rbi/lib/orb/models/alert_list_params.rbi +3 -6
  178. data/rbi/lib/orb/models/alert_retrieve_params.rbi +2 -4
  179. data/rbi/lib/orb/models/alert_update_params.rbi +7 -11
  180. data/rbi/lib/orb/models/amount_discount.rbi +4 -7
  181. data/rbi/lib/orb/models/billable_metric.rbi +10 -13
  182. data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -2
  183. data/rbi/lib/orb/models/coupon.rbi +9 -11
  184. data/rbi/lib/orb/models/coupon_archive_params.rbi +2 -4
  185. data/rbi/lib/orb/models/coupon_create_params.rbi +8 -14
  186. data/rbi/lib/orb/models/coupon_fetch_params.rbi +2 -4
  187. data/rbi/lib/orb/models/coupon_list_params.rbi +3 -4
  188. data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +3 -5
  189. data/rbi/lib/orb/models/credit_note.rbi +22 -45
  190. data/rbi/lib/orb/models/credit_note_create_params.rbi +5 -10
  191. data/rbi/lib/orb/models/credit_note_fetch_params.rbi +2 -4
  192. data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -6
  193. data/rbi/lib/orb/models/customer.rbi +256 -281
  194. data/rbi/lib/orb/models/customer_create_params.rbi +251 -276
  195. data/rbi/lib/orb/models/customer_delete_params.rbi +2 -4
  196. data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +2 -4
  197. data/rbi/lib/orb/models/customer_fetch_params.rbi +2 -4
  198. data/rbi/lib/orb/models/customer_list_params.rbi +3 -6
  199. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +2 -4
  200. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +2 -4
  201. data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +252 -277
  202. data/rbi/lib/orb/models/customer_update_params.rbi +252 -277
  203. data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +3 -6
  204. data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +10 -19
  205. data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -6
  206. data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +10 -19
  207. data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +8 -10
  208. data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +6 -12
  209. data/rbi/lib/orb/models/customers/cost_list_params.rbi +8 -10
  210. data/rbi/lib/orb/models/customers/cost_list_response.rbi +6 -12
  211. data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +3 -4
  212. data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +2 -4
  213. data/rbi/lib/orb/models/customers/credit_list_params.rbi +3 -4
  214. data/rbi/lib/orb/models/customers/credit_list_response.rbi +2 -4
  215. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +26 -33
  216. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +79 -136
  217. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +26 -33
  218. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +78 -135
  219. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +5 -10
  220. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +79 -136
  221. data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +5 -10
  222. data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +74 -131
  223. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +13 -19
  224. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +12 -18
  225. data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +13 -19
  226. data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +12 -18
  227. data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +2 -4
  228. data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +2 -4
  229. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +3 -5
  230. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +12 -18
  231. data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +3 -5
  232. data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +12 -18
  233. data/rbi/lib/orb/models/dimensional_price_group.rbi +8 -9
  234. data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -7
  235. data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +3 -5
  236. data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +2 -4
  237. data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +2 -4
  238. data/rbi/lib/orb/models/dimensional_price_groups.rbi +2 -4
  239. data/rbi/lib/orb/models/discount.rbi +1 -2
  240. data/rbi/lib/orb/models/evaluate_price_group.rbi +3 -6
  241. data/rbi/lib/orb/models/event_deprecate_params.rbi +2 -4
  242. data/rbi/lib/orb/models/event_deprecate_response.rbi +2 -4
  243. data/rbi/lib/orb/models/event_ingest_params.rbi +10 -13
  244. data/rbi/lib/orb/models/event_ingest_response.rbi +10 -16
  245. data/rbi/lib/orb/models/event_search_params.rbi +7 -9
  246. data/rbi/lib/orb/models/event_search_response.rbi +11 -14
  247. data/rbi/lib/orb/models/event_update_params.rbi +5 -6
  248. data/rbi/lib/orb/models/event_update_response.rbi +2 -4
  249. data/rbi/lib/orb/models/events/backfill_close_params.rbi +2 -4
  250. data/rbi/lib/orb/models/events/backfill_close_response.rbi +10 -14
  251. data/rbi/lib/orb/models/events/backfill_create_params.rbi +13 -16
  252. data/rbi/lib/orb/models/events/backfill_create_response.rbi +10 -14
  253. data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +2 -4
  254. data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +10 -14
  255. data/rbi/lib/orb/models/events/backfill_list_params.rbi +3 -5
  256. data/rbi/lib/orb/models/events/backfill_list_response.rbi +10 -14
  257. data/rbi/lib/orb/models/events/backfill_revert_params.rbi +2 -4
  258. data/rbi/lib/orb/models/events/backfill_revert_response.rbi +10 -14
  259. data/rbi/lib/orb/models/events/event_volumes.rbi +5 -9
  260. data/rbi/lib/orb/models/events/volume_list_params.rbi +9 -11
  261. data/rbi/lib/orb/models/invoice.rbi +388 -465
  262. data/rbi/lib/orb/models/invoice_create_params.rbi +19 -26
  263. data/rbi/lib/orb/models/invoice_fetch_params.rbi +2 -4
  264. data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +2 -4
  265. data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +381 -460
  266. data/rbi/lib/orb/models/invoice_issue_params.rbi +6 -8
  267. data/rbi/lib/orb/models/invoice_level_discount.rbi +1 -2
  268. data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +3 -5
  269. data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +101 -143
  270. data/rbi/lib/orb/models/invoice_list_params.rbi +8 -13
  271. data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +2 -4
  272. data/rbi/lib/orb/models/invoice_pay_params.rbi +2 -4
  273. data/rbi/lib/orb/models/invoice_update_params.rbi +4 -6
  274. data/rbi/lib/orb/models/invoice_void_params.rbi +2 -4
  275. data/rbi/lib/orb/models/item.rbi +7 -12
  276. data/rbi/lib/orb/models/item_create_params.rbi +2 -4
  277. data/rbi/lib/orb/models/item_fetch_params.rbi +2 -4
  278. data/rbi/lib/orb/models/item_list_params.rbi +3 -5
  279. data/rbi/lib/orb/models/item_update_params.rbi +5 -10
  280. data/rbi/lib/orb/models/metric_create_params.rbi +4 -6
  281. data/rbi/lib/orb/models/metric_fetch_params.rbi +2 -4
  282. data/rbi/lib/orb/models/metric_list_params.rbi +3 -6
  283. data/rbi/lib/orb/models/metric_update_params.rbi +4 -6
  284. data/rbi/lib/orb/models/pagination_metadata.rbi +2 -4
  285. data/rbi/lib/orb/models/percentage_discount.rbi +5 -8
  286. data/rbi/lib/orb/models/plan.rbi +180 -219
  287. data/rbi/lib/orb/models/plan_create_params.rbi +670 -951
  288. data/rbi/lib/orb/models/plan_fetch_params.rbi +2 -4
  289. data/rbi/lib/orb/models/plan_list_params.rbi +4 -8
  290. data/rbi/lib/orb/models/plan_update_params.rbi +6 -8
  291. data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +2 -4
  292. data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +6 -8
  293. data/rbi/lib/orb/models/price.rbi +827 -1494
  294. data/rbi/lib/orb/models/price_create_params.rbi +60 -101
  295. data/rbi/lib/orb/models/price_evaluate_params.rbi +6 -9
  296. data/rbi/lib/orb/models/price_evaluate_response.rbi +2 -4
  297. data/rbi/lib/orb/models/price_fetch_params.rbi +2 -4
  298. data/rbi/lib/orb/models/price_list_params.rbi +3 -5
  299. data/rbi/lib/orb/models/price_update_params.rbi +4 -6
  300. data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +2 -4
  301. data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +4 -6
  302. data/rbi/lib/orb/models/subscription.rbi +167 -187
  303. data/rbi/lib/orb/models/subscription_cancel_params.rbi +5 -7
  304. data/rbi/lib/orb/models/subscription_cancel_response.rbi +224 -178
  305. data/rbi/lib/orb/models/subscription_change_apply_params.rbi +40 -0
  306. data/rbi/lib/orb/models/subscription_change_apply_response.rbi +1554 -0
  307. data/rbi/lib/orb/models/subscription_change_cancel_params.rbi +18 -0
  308. data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +1565 -0
  309. data/rbi/lib/orb/models/subscription_change_retrieve_params.rbi +18 -0
  310. data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +1581 -0
  311. data/rbi/lib/orb/models/subscription_create_params.rbi +1372 -1968
  312. data/rbi/lib/orb/models/subscription_create_response.rbi +224 -178
  313. data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +8 -10
  314. data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +6 -12
  315. data/rbi/lib/orb/models/subscription_fetch_params.rbi +2 -4
  316. data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -6
  317. data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +6 -10
  318. data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +12 -17
  319. data/rbi/lib/orb/models/subscription_list_params.rbi +4 -8
  320. data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +772 -1124
  321. data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +228 -178
  322. data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +1396 -1993
  323. data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +238 -182
  324. data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +5 -7
  325. data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +224 -178
  326. data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +2 -4
  327. data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +238 -182
  328. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +2 -4
  329. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +265 -199
  330. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +2 -4
  331. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +264 -198
  332. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -15
  333. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +238 -182
  334. data/rbi/lib/orb/models/subscription_update_params.rbi +12 -15
  335. data/rbi/lib/orb/models/subscription_update_trial_params.rbi +6 -9
  336. data/rbi/lib/orb/models/subscription_update_trial_response.rbi +224 -178
  337. data/rbi/lib/orb/models/subscription_usage.rbi +24 -43
  338. data/rbi/lib/orb/models/subscriptions.rbi +2 -4
  339. data/rbi/lib/orb/models/top_level_ping_params.rbi +2 -4
  340. data/rbi/lib/orb/models/top_level_ping_response.rbi +2 -4
  341. data/rbi/lib/orb/models/trial_discount.rbi +4 -8
  342. data/rbi/lib/orb/models/usage_discount.rbi +5 -8
  343. data/rbi/lib/orb/request_options.rbi +9 -11
  344. data/rbi/lib/orb/resources/alerts.rbi +44 -60
  345. data/rbi/lib/orb/resources/coupons/subscriptions.rbi +6 -9
  346. data/rbi/lib/orb/resources/coupons.rbi +18 -25
  347. data/rbi/lib/orb/resources/credit_notes.rbi +9 -15
  348. data/rbi/lib/orb/resources/customers/balance_transactions.rbi +26 -31
  349. data/rbi/lib/orb/resources/customers/costs.rbi +241 -246
  350. data/rbi/lib/orb/resources/customers/credits/ledger.rbi +387 -396
  351. data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +29 -40
  352. data/rbi/lib/orb/resources/customers/credits.rbi +15 -20
  353. data/rbi/lib/orb/resources/customers.rbi +407 -417
  354. data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +2 -4
  355. data/rbi/lib/orb/resources/dimensional_price_groups.rbi +13 -19
  356. data/rbi/lib/orb/resources/events/backfills.rbi +61 -69
  357. data/rbi/lib/orb/resources/events/volume.rbi +19 -22
  358. data/rbi/lib/orb/resources/events.rbi +311 -319
  359. data/rbi/lib/orb/resources/invoice_line_items.rbi +4 -7
  360. data/rbi/lib/orb/resources/invoices.rbi +62 -76
  361. data/rbi/lib/orb/resources/items.rbi +7 -14
  362. data/rbi/lib/orb/resources/metrics.rbi +17 -25
  363. data/rbi/lib/orb/resources/plans/external_plan_id.rbi +21 -25
  364. data/rbi/lib/orb/resources/plans.rbi +63 -71
  365. data/rbi/lib/orb/resources/prices/external_price_id.rbi +9 -13
  366. data/rbi/lib/orb/resources/prices.rbi +77 -87
  367. data/rbi/lib/orb/resources/subscription_changes.rbi +61 -0
  368. data/rbi/lib/orb/resources/subscriptions.rbi +933 -963
  369. data/rbi/lib/orb/resources/top_level.rbi +6 -8
  370. data/sig/orb/client.rbs +2 -0
  371. data/sig/orb/models/subscription.rbs +14 -0
  372. data/sig/orb/models/subscription_cancel_response.rbs +47 -2
  373. data/sig/orb/models/subscription_change_apply_params.rbs +24 -0
  374. data/sig/orb/models/subscription_change_apply_response.rbs +784 -0
  375. data/sig/orb/models/subscription_change_cancel_params.rbs +15 -0
  376. data/sig/orb/models/subscription_change_cancel_response.rbs +784 -0
  377. data/sig/orb/models/subscription_change_retrieve_params.rbs +15 -0
  378. data/sig/orb/models/subscription_change_retrieve_response.rbs +784 -0
  379. data/sig/orb/models/subscription_create_response.rbs +47 -2
  380. data/sig/orb/models/subscription_price_intervals_response.rbs +47 -2
  381. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +47 -2
  382. data/sig/orb/models/subscription_trigger_phase_response.rbs +47 -2
  383. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +47 -2
  384. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +47 -2
  385. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +47 -2
  386. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +47 -2
  387. data/sig/orb/models/subscription_update_trial_response.rbs +47 -2
  388. data/sig/orb/resources/customers.rbs +2 -2
  389. data/sig/orb/resources/subscription_changes.rbs +24 -0
  390. metadata +23 -2
@@ -7,18 +7,18 @@ module Orb
7
7
  attr_accessor :id
8
8
 
9
9
  # The current plan phase that is active, only if the subscription's plan has
10
- # phases.
10
+ # phases.
11
11
  sig { returns(T.nilable(Integer)) }
12
12
  attr_accessor :active_plan_phase_order
13
13
 
14
14
  # The adjustment intervals for this subscription sorted by the start_date of the
15
- # adjustment interval.
15
+ # adjustment interval.
16
16
  sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval]) }
17
17
  attr_accessor :adjustment_intervals
18
18
 
19
19
  # Determines whether issued invoices for this subscription will automatically be
20
- # charged with the saved payment method on the due date. This property defaults to
21
- # the plan's behavior. If null, defaults to the customer's setting.
20
+ # charged with the saved payment method on the due date. This property defaults to
21
+ # the plan's behavior. If null, defaults to the customer's setting.
22
22
  sig { returns(T.nilable(T::Boolean)) }
23
23
  attr_accessor :auto_collection
24
24
 
@@ -37,9 +37,9 @@ module Orb
37
37
  attr_writer :billing_cycle_anchor_configuration
38
38
 
39
39
  # The day of the month on which the billing cycle is anchored. If the maximum
40
- # number of days in a month is greater than this value, the last day of the month
41
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
42
- # period begins on the 30th.
40
+ # number of days in a month is greater than this value, the last day of the month
41
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
42
+ # period begins on the 30th.
43
43
  sig { returns(Integer) }
44
44
  attr_accessor :billing_cycle_day
45
45
 
@@ -47,35 +47,35 @@ module Orb
47
47
  attr_accessor :created_at
48
48
 
49
49
  # The end of the current billing period. This is an exclusive timestamp, such that
50
- # the instant returned is not part of the billing period. Set to null for
51
- # subscriptions that are not currently active.
50
+ # the instant returned is not part of the billing period. Set to null for
51
+ # subscriptions that are not currently active.
52
52
  sig { returns(T.nilable(Time)) }
53
53
  attr_accessor :current_billing_period_end_date
54
54
 
55
55
  # The start date of the current billing period. This is an inclusive timestamp;
56
- # the instant returned is exactly the beginning of the billing period. Set to null
57
- # if the subscription is not currently active.
56
+ # the instant returned is exactly the beginning of the billing period. Set to null
57
+ # if the subscription is not currently active.
58
58
  sig { returns(T.nilable(Time)) }
59
59
  attr_accessor :current_billing_period_start_date
60
60
 
61
61
  # A customer is a buyer of your products, and the other party to the billing
62
- # relationship.
62
+ # relationship.
63
63
  #
64
- # In Orb, customers are assigned system generated identifiers automatically, but
65
- # it's often desirable to have these match existing identifiers in your system. To
66
- # avoid having to denormalize Orb ID information, you can pass in an
67
- # `external_customer_id` with your own identifier. See
68
- # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
69
- # information about how these aliases work in Orb.
64
+ # In Orb, customers are assigned system generated identifiers automatically, but
65
+ # it's often desirable to have these match existing identifiers in your system. To
66
+ # avoid having to denormalize Orb ID information, you can pass in an
67
+ # `external_customer_id` with your own identifier. See
68
+ # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
69
+ # information about how these aliases work in Orb.
70
70
  #
71
- # In addition to having an identifier in your system, a customer may exist in a
72
- # payment provider solution like Stripe. Use the `payment_provider_id` and the
73
- # `payment_provider` enum field to express this mapping.
71
+ # In addition to having an identifier in your system, a customer may exist in a
72
+ # payment provider solution like Stripe. Use the `payment_provider_id` and the
73
+ # `payment_provider` enum field to express this mapping.
74
74
  #
75
- # A customer also has a timezone (from the standard
76
- # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
77
- # your account's timezone. See [Timezone localization](/essentials/timezones) for
78
- # information on what this timezone parameter influences within Orb.
75
+ # A customer also has a timezone (from the standard
76
+ # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
77
+ # your account's timezone. See [Timezone localization](/essentials/timezones) for
78
+ # information on what this timezone parameter influences within Orb.
79
79
  sig { returns(Orb::Models::Customer) }
80
80
  attr_reader :customer
81
81
 
@@ -83,7 +83,7 @@ module Orb
83
83
  attr_writer :customer
84
84
 
85
85
  # Determines the default memo on this subscriptions' invoices. Note that if this
86
- # is not provided, it is determined by the plan configuration.
86
+ # is not provided, it is determined by the plan configuration.
87
87
  sig { returns(T.nilable(String)) }
88
88
  attr_accessor :default_invoice_memo
89
89
 
@@ -91,11 +91,11 @@ module Orb
91
91
  sig do
92
92
  returns(
93
93
  T::Array[
94
- T.any(
95
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval,
96
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval,
97
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval
98
- )
94
+ T.any(
95
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval,
96
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval,
97
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval
98
+ )
99
99
  ]
100
100
  )
101
101
  end
@@ -116,9 +116,9 @@ module Orb
116
116
  attr_accessor :maximum_intervals
117
117
 
118
118
  # User specified key-value pairs for the resource. If not present, this defaults
119
- # to an empty dictionary. Individual keys can be removed by setting the value to
120
- # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
121
- # `null`.
119
+ # to an empty dictionary. Individual keys can be removed by setting the value to
120
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
121
+ # `null`.
122
122
  sig { returns(T::Hash[Symbol, String]) }
123
123
  attr_accessor :metadata
124
124
 
@@ -127,16 +127,33 @@ module Orb
127
127
  attr_accessor :minimum_intervals
128
128
 
129
129
  # Determines the difference between the invoice issue date for subscription
130
- # invoices as the date that they are due. A value of `0` here represents that the
131
- # invoice is due on issue, whereas a value of `30` represents that the customer
132
- # has a month to pay the invoice.
130
+ # invoices as the date that they are due. A value of `0` here represents that the
131
+ # invoice is due on issue, whereas a value of `30` represents that the customer
132
+ # has a month to pay the invoice.
133
133
  sig { returns(Integer) }
134
134
  attr_accessor :net_terms
135
135
 
136
+ # A pending subscription change if one exists on this subscription.
137
+ sig { returns(T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::PendingSubscriptionChange)) }
138
+ attr_reader :pending_subscription_change
139
+
140
+ sig do
141
+ params(
142
+ pending_subscription_change: T.nilable(
143
+ T.any(
144
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::PendingSubscriptionChange,
145
+ Orb::Internal::AnyHash
146
+ )
147
+ )
148
+ )
149
+ .void
150
+ end
151
+ attr_writer :pending_subscription_change
152
+
136
153
  # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
137
- # subscribed to by a customer. Plans define the billing behavior of the
138
- # subscription. You can see more about how to configure prices in the
139
- # [Price resource](/reference/price).
154
+ # subscribed to by a customer. Plans define the billing behavior of the
155
+ # subscription. You can see more about how to configure prices in the
156
+ # [Price resource](/reference/price).
140
157
  sig { returns(Orb::Models::Plan) }
141
158
  attr_reader :plan
142
159
 
@@ -178,6 +195,22 @@ module Orb
178
195
  end
179
196
  attr_writer :trial_info
180
197
 
198
+ # The resources that were changed as part of this operation. Only present when
199
+ # fetched through the subscription changes API or if the
200
+ # `include_changed_resources` parameter was passed in the request.
201
+ sig { returns(T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::ChangedResources)) }
202
+ attr_reader :changed_resources
203
+
204
+ sig do
205
+ params(
206
+ changed_resources: T.nilable(
207
+ T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::ChangedResources, Orb::Internal::AnyHash)
208
+ )
209
+ )
210
+ .void
211
+ end
212
+ attr_writer :changed_resources
213
+
181
214
  sig do
182
215
  params(
183
216
  id: String,
@@ -195,25 +228,31 @@ module Orb
195
228
  customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
196
229
  default_invoice_memo: T.nilable(String),
197
230
  discount_intervals: T::Array[
198
- T.any(
199
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval,
200
- Orb::Internal::AnyHash,
201
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval,
202
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval
203
- )
231
+ T.any(
232
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval,
233
+ Orb::Internal::AnyHash,
234
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval,
235
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval
236
+ )
204
237
  ],
205
238
  end_date: T.nilable(Time),
206
239
  fixed_fee_quantity_schedule: T::Array[
207
- T.any(
208
- Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule,
209
- Orb::Internal::AnyHash
210
- )
240
+ T.any(
241
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule,
242
+ Orb::Internal::AnyHash
243
+ )
211
244
  ],
212
245
  invoicing_threshold: T.nilable(String),
213
246
  maximum_intervals: T::Array[T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval, Orb::Internal::AnyHash)],
214
247
  metadata: T::Hash[Symbol, String],
215
248
  minimum_intervals: T::Array[T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval, Orb::Internal::AnyHash)],
216
249
  net_terms: Integer,
250
+ pending_subscription_change: T.nilable(
251
+ T.any(
252
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::PendingSubscriptionChange,
253
+ Orb::Internal::AnyHash
254
+ )
255
+ ),
217
256
  plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash),
218
257
  price_intervals: T::Array[T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval, Orb::Internal::AnyHash)],
219
258
  redeemed_coupon: T.nilable(
@@ -221,7 +260,10 @@ module Orb
221
260
  ),
222
261
  start_date: Time,
223
262
  status: Orb::Models::SubscriptionUnscheduleCancellationResponse::Status::OrSymbol,
224
- trial_info: T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo, Orb::Internal::AnyHash)
263
+ trial_info: T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo, Orb::Internal::AnyHash),
264
+ changed_resources: T.nilable(
265
+ T.any(Orb::Models::SubscriptionUnscheduleCancellationResponse::ChangedResources, Orb::Internal::AnyHash)
266
+ )
225
267
  )
226
268
  .returns(T.attached_class)
227
269
  end
@@ -245,15 +287,15 @@ module Orb
245
287
  metadata:,
246
288
  minimum_intervals:,
247
289
  net_terms:,
290
+ pending_subscription_change:,
248
291
  plan:,
249
292
  price_intervals:,
250
293
  redeemed_coupon:,
251
294
  start_date:,
252
295
  status:,
253
- trial_info:
254
- )
255
- end
256
-
296
+ trial_info:,
297
+ changed_resources: nil
298
+ ); end
257
299
  sig do
258
300
  override
259
301
  .returns(
@@ -270,11 +312,11 @@ module Orb
270
312
  customer: Orb::Models::Customer,
271
313
  default_invoice_memo: T.nilable(String),
272
314
  discount_intervals: T::Array[
273
- T.any(
274
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval,
275
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval,
276
- Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval
277
- )
315
+ T.any(
316
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval,
317
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval,
318
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval
319
+ )
278
320
  ],
279
321
  end_date: T.nilable(Time),
280
322
  fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule],
@@ -283,17 +325,18 @@ module Orb
283
325
  metadata: T::Hash[Symbol, String],
284
326
  minimum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval],
285
327
  net_terms: Integer,
328
+ pending_subscription_change: T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::PendingSubscriptionChange),
286
329
  plan: Orb::Models::Plan,
287
330
  price_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval],
288
331
  redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon),
289
332
  start_date: Time,
290
333
  status: Orb::Models::SubscriptionUnscheduleCancellationResponse::Status::TaggedSymbol,
291
- trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo
334
+ trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo,
335
+ changed_resources: T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::ChangedResources)
292
336
  }
293
337
  )
294
338
  end
295
- def to_hash
296
- end
339
+ def to_hash; end
297
340
 
298
341
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
299
342
  sig { returns(String) }
@@ -341,8 +384,7 @@ module Orb
341
384
  )
342
385
  .returns(T.attached_class)
343
386
  end
344
- def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
345
- end
387
+ def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:); end
346
388
 
347
389
  sig do
348
390
  override
@@ -362,8 +404,7 @@ module Orb
362
404
  }
363
405
  )
364
406
  end
365
- def to_hash
366
- end
407
+ def to_hash; end
367
408
 
368
409
  module Adjustment
369
410
  extend Orb::Internal::Type::Union
@@ -380,7 +421,7 @@ module Orb
380
421
  attr_accessor :applies_to_price_ids
381
422
 
382
423
  # True for adjustments that apply to an entire invocice, false for adjustments
383
- # that apply to only one price.
424
+ # that apply to only one price.
384
425
  sig { returns(T::Boolean) }
385
426
  attr_accessor :is_invoice_level
386
427
 
@@ -393,7 +434,7 @@ module Orb
393
434
  attr_accessor :reason
394
435
 
395
436
  # The number of usage units by which to discount the price this adjustment applies
396
- # to in a given billing period.
437
+ # to in a given billing period.
397
438
  sig { returns(Float) }
398
439
  attr_accessor :usage_discount
399
440
 
@@ -417,9 +458,7 @@ module Orb
417
458
  reason:,
418
459
  usage_discount:,
419
460
  adjustment_type: :usage_discount
420
- )
421
- end
422
-
461
+ ); end
423
462
  sig do
424
463
  override
425
464
  .returns(
@@ -434,8 +473,7 @@ module Orb
434
473
  }
435
474
  )
436
475
  end
437
- def to_hash
438
- end
476
+ def to_hash; end
439
477
  end
440
478
 
441
479
  class PlanPhaseAmountDiscountAdjustment < Orb::Internal::Type::BaseModel
@@ -446,7 +484,7 @@ module Orb
446
484
  attr_accessor :adjustment_type
447
485
 
448
486
  # The amount by which to discount the prices this adjustment applies to in a given
449
- # billing period.
487
+ # billing period.
450
488
  sig { returns(String) }
451
489
  attr_accessor :amount_discount
452
490
 
@@ -455,7 +493,7 @@ module Orb
455
493
  attr_accessor :applies_to_price_ids
456
494
 
457
495
  # True for adjustments that apply to an entire invocice, false for adjustments
458
- # that apply to only one price.
496
+ # that apply to only one price.
459
497
  sig { returns(T::Boolean) }
460
498
  attr_accessor :is_invoice_level
461
499
 
@@ -487,9 +525,7 @@ module Orb
487
525
  plan_phase_order:,
488
526
  reason:,
489
527
  adjustment_type: :amount_discount
490
- )
491
- end
492
-
528
+ ); end
493
529
  sig do
494
530
  override
495
531
  .returns(
@@ -504,8 +540,7 @@ module Orb
504
540
  }
505
541
  )
506
542
  end
507
- def to_hash
508
- end
543
+ def to_hash; end
509
544
  end
510
545
 
511
546
  class PlanPhasePercentageDiscountAdjustment < Orb::Internal::Type::BaseModel
@@ -520,12 +555,12 @@ module Orb
520
555
  attr_accessor :applies_to_price_ids
521
556
 
522
557
  # True for adjustments that apply to an entire invocice, false for adjustments
523
- # that apply to only one price.
558
+ # that apply to only one price.
524
559
  sig { returns(T::Boolean) }
525
560
  attr_accessor :is_invoice_level
526
561
 
527
562
  # The percentage (as a value between 0 and 1) by which to discount the price
528
- # intervals this adjustment applies to in a given billing period.
563
+ # intervals this adjustment applies to in a given billing period.
529
564
  sig { returns(Float) }
530
565
  attr_accessor :percentage_discount
531
566
 
@@ -557,9 +592,7 @@ module Orb
557
592
  plan_phase_order:,
558
593
  reason:,
559
594
  adjustment_type: :percentage_discount
560
- )
561
- end
562
-
595
+ ); end
563
596
  sig do
564
597
  override
565
598
  .returns(
@@ -574,8 +607,7 @@ module Orb
574
607
  }
575
608
  )
576
609
  end
577
- def to_hash
578
- end
610
+ def to_hash; end
579
611
  end
580
612
 
581
613
  class PlanPhaseMinimumAdjustment < Orb::Internal::Type::BaseModel
@@ -590,7 +622,7 @@ module Orb
590
622
  attr_accessor :applies_to_price_ids
591
623
 
592
624
  # True for adjustments that apply to an entire invocice, false for adjustments
593
- # that apply to only one price.
625
+ # that apply to only one price.
594
626
  sig { returns(T::Boolean) }
595
627
  attr_accessor :is_invoice_level
596
628
 
@@ -599,7 +631,7 @@ module Orb
599
631
  attr_accessor :item_id
600
632
 
601
633
  # The minimum amount to charge in a given billing period for the prices this
602
- # adjustment applies to.
634
+ # adjustment applies to.
603
635
  sig { returns(String) }
604
636
  attr_accessor :minimum_amount
605
637
 
@@ -633,9 +665,7 @@ module Orb
633
665
  plan_phase_order:,
634
666
  reason:,
635
667
  adjustment_type: :minimum
636
- )
637
- end
638
-
668
+ ); end
639
669
  sig do
640
670
  override
641
671
  .returns(
@@ -651,8 +681,7 @@ module Orb
651
681
  }
652
682
  )
653
683
  end
654
- def to_hash
655
- end
684
+ def to_hash; end
656
685
  end
657
686
 
658
687
  class PlanPhaseMaximumAdjustment < Orb::Internal::Type::BaseModel
@@ -667,12 +696,12 @@ module Orb
667
696
  attr_accessor :applies_to_price_ids
668
697
 
669
698
  # True for adjustments that apply to an entire invocice, false for adjustments
670
- # that apply to only one price.
699
+ # that apply to only one price.
671
700
  sig { returns(T::Boolean) }
672
701
  attr_accessor :is_invoice_level
673
702
 
674
703
  # The maximum amount to charge in a given billing period for the prices this
675
- # adjustment applies to.
704
+ # adjustment applies to.
676
705
  sig { returns(String) }
677
706
  attr_accessor :maximum_amount
678
707
 
@@ -704,9 +733,7 @@ module Orb
704
733
  plan_phase_order:,
705
734
  reason:,
706
735
  adjustment_type: :maximum
707
- )
708
- end
709
-
736
+ ); end
710
737
  sig do
711
738
  override
712
739
  .returns(
@@ -721,8 +748,7 @@ module Orb
721
748
  }
722
749
  )
723
750
  end
724
- def to_hash
725
- end
751
+ def to_hash; end
726
752
  end
727
753
 
728
754
  sig do
@@ -731,39 +757,36 @@ module Orb
731
757
  [Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]
732
758
  )
733
759
  end
734
- def self.variants
735
- end
760
+ def self.variants; end
736
761
  end
737
762
  end
738
763
 
739
764
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
740
765
  # The day of the month on which the billing cycle is anchored. If the maximum
741
- # number of days in a month is greater than this value, the last day of the month
742
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
743
- # period begins on the 30th.
766
+ # number of days in a month is greater than this value, the last day of the month
767
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
768
+ # period begins on the 30th.
744
769
  sig { returns(Integer) }
745
770
  attr_accessor :day
746
771
 
747
772
  # The month on which the billing cycle is anchored (e.g. a quarterly price
748
- # anchored in February would have cycles starting February, May, August, and
749
- # November).
773
+ # anchored in February would have cycles starting February, May, August, and
774
+ # November).
750
775
  sig { returns(T.nilable(Integer)) }
751
776
  attr_accessor :month
752
777
 
753
778
  # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
754
- # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
779
+ # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
755
780
  sig { returns(T.nilable(Integer)) }
756
781
  attr_accessor :year
757
782
 
758
783
  sig do
759
784
  params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
760
785
  end
761
- def self.new(day:, month: nil, year: nil)
762
- end
786
+ def self.new(day:, month: nil, year: nil); end
763
787
 
764
788
  sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
765
- def to_hash
766
- end
789
+ def to_hash; end
767
790
  end
768
791
 
769
792
  module DiscountInterval
@@ -811,9 +834,7 @@ module Orb
811
834
  end_date:,
812
835
  start_date:,
813
836
  discount_type: :amount
814
- )
815
- end
816
-
837
+ ); end
817
838
  sig do
818
839
  override
819
840
  .returns(
@@ -827,8 +848,7 @@ module Orb
827
848
  }
828
849
  )
829
850
  end
830
- def to_hash
831
- end
851
+ def to_hash; end
832
852
  end
833
853
 
834
854
  class PercentageDiscountInterval < Orb::Internal::Type::BaseModel
@@ -848,7 +868,7 @@ module Orb
848
868
  attr_accessor :end_date
849
869
 
850
870
  # Only available if discount_type is `percentage`.This is a number between 0
851
- # and 1.
871
+ # and 1.
852
872
  sig { returns(Float) }
853
873
  attr_accessor :percentage_discount
854
874
 
@@ -874,9 +894,7 @@ module Orb
874
894
  percentage_discount:,
875
895
  start_date:,
876
896
  discount_type: :percentage
877
- )
878
- end
879
-
897
+ ); end
880
898
  sig do
881
899
  override
882
900
  .returns(
@@ -890,8 +908,7 @@ module Orb
890
908
  }
891
909
  )
892
910
  end
893
- def to_hash
894
- end
911
+ def to_hash; end
895
912
  end
896
913
 
897
914
  class UsageDiscountInterval < Orb::Internal::Type::BaseModel
@@ -915,7 +932,7 @@ module Orb
915
932
  attr_accessor :start_date
916
933
 
917
934
  # Only available if discount_type is `usage`. Number of usage units that this
918
- # discount is for
935
+ # discount is for
919
936
  sig { returns(Float) }
920
937
  attr_accessor :usage_discount
921
938
 
@@ -937,9 +954,7 @@ module Orb
937
954
  start_date:,
938
955
  usage_discount:,
939
956
  discount_type: :usage
940
- )
941
- end
942
-
957
+ ); end
943
958
  sig do
944
959
  override
945
960
  .returns(
@@ -953,8 +968,7 @@ module Orb
953
968
  }
954
969
  )
955
970
  end
956
- def to_hash
957
- end
971
+ def to_hash; end
958
972
  end
959
973
 
960
974
  sig do
@@ -963,8 +977,7 @@ module Orb
963
977
  [Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval]
964
978
  )
965
979
  end
966
- def self.variants
967
- end
980
+ def self.variants; end
968
981
  end
969
982
 
970
983
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -984,14 +997,12 @@ module Orb
984
997
  params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
985
998
  .returns(T.attached_class)
986
999
  end
987
- def self.new(end_date:, price_id:, quantity:, start_date:)
988
- end
1000
+ def self.new(end_date:, price_id:, quantity:, start_date:); end
989
1001
 
990
1002
  sig do
991
1003
  override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
992
1004
  end
993
- def to_hash
994
- end
1005
+ def to_hash; end
995
1006
  end
996
1007
 
997
1008
  class MaximumInterval < Orb::Internal::Type::BaseModel
@@ -1008,7 +1019,7 @@ module Orb
1008
1019
  attr_accessor :end_date
1009
1020
 
1010
1021
  # The maximum amount to charge in a given billing period for the price intervals
1011
- # this transform applies to.
1022
+ # this transform applies to.
1012
1023
  sig { returns(String) }
1013
1024
  attr_accessor :maximum_amount
1014
1025
 
@@ -1047,8 +1058,7 @@ module Orb
1047
1058
  }
1048
1059
  )
1049
1060
  end
1050
- def to_hash
1051
- end
1061
+ def to_hash; end
1052
1062
  end
1053
1063
 
1054
1064
  class MinimumInterval < Orb::Internal::Type::BaseModel
@@ -1065,7 +1075,7 @@ module Orb
1065
1075
  attr_accessor :end_date
1066
1076
 
1067
1077
  # The minimum amount to charge in a given billing period for the price intervals
1068
- # this minimum applies to.
1078
+ # this minimum applies to.
1069
1079
  sig { returns(String) }
1070
1080
  attr_accessor :minimum_amount
1071
1081
 
@@ -1104,8 +1114,19 @@ module Orb
1104
1114
  }
1105
1115
  )
1106
1116
  end
1107
- def to_hash
1108
- end
1117
+ def to_hash; end
1118
+ end
1119
+
1120
+ class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1121
+ sig { returns(String) }
1122
+ attr_accessor :id
1123
+
1124
+ # A pending subscription change if one exists on this subscription.
1125
+ sig { params(id: String).returns(T.attached_class) }
1126
+ def self.new(id:); end
1127
+
1128
+ sig { override.returns({id: String}) }
1129
+ def to_hash; end
1109
1130
  end
1110
1131
 
1111
1132
  class PriceInterval < Orb::Internal::Type::BaseModel
@@ -1117,19 +1138,19 @@ module Orb
1117
1138
  attr_accessor :billing_cycle_day
1118
1139
 
1119
1140
  # The end of the current billing period. This is an exclusive timestamp, such that
1120
- # the instant returned is exactly the end of the billing period. Set to null if
1121
- # this price interval is not currently active.
1141
+ # the instant returned is exactly the end of the billing period. Set to null if
1142
+ # this price interval is not currently active.
1122
1143
  sig { returns(T.nilable(Time)) }
1123
1144
  attr_accessor :current_billing_period_end_date
1124
1145
 
1125
1146
  # The start date of the current billing period. This is an inclusive timestamp;
1126
- # the instant returned is exactly the beginning of the billing period. Set to null
1127
- # if this price interval is not currently active.
1147
+ # the instant returned is exactly the beginning of the billing period. Set to null
1148
+ # if this price interval is not currently active.
1128
1149
  sig { returns(T.nilable(Time)) }
1129
1150
  attr_accessor :current_billing_period_start_date
1130
1151
 
1131
1152
  # The end date of the price interval. This is the date that Orb stops billing for
1132
- # this price.
1153
+ # this price.
1133
1154
  sig { returns(T.nilable(Time)) }
1134
1155
  attr_accessor :end_date
1135
1156
 
@@ -1138,7 +1159,7 @@ module Orb
1138
1159
  attr_accessor :filter
1139
1160
 
1140
1161
  # The fixed fee quantity transitions for this price interval. This is only
1141
- # relevant for fixed fees.
1162
+ # relevant for fixed fees.
1142
1163
  sig do
1143
1164
  returns(
1144
1165
  T.nilable(
@@ -1149,15 +1170,15 @@ module Orb
1149
1170
  attr_accessor :fixed_fee_quantity_transitions
1150
1171
 
1151
1172
  # The Price resource represents a price that can be billed on a subscription,
1152
- # resulting in a charge on an invoice in the form of an invoice line item. Prices
1153
- # take a quantity and determine an amount to bill.
1173
+ # resulting in a charge on an invoice in the form of an invoice line item. Prices
1174
+ # take a quantity and determine an amount to bill.
1154
1175
  #
1155
- # Orb supports a few different pricing models out of the box. Each of these models
1156
- # is serialized differently in a given Price object. The model_type field
1157
- # determines the key for the configuration object that is present.
1176
+ # Orb supports a few different pricing models out of the box. Each of these models
1177
+ # is serialized differently in a given Price object. The model_type field
1178
+ # determines the key for the configuration object that is present.
1158
1179
  #
1159
- # For more on the types of prices, see
1160
- # [the core concepts documentation](/core-concepts#plan-and-price)
1180
+ # For more on the types of prices, see
1181
+ # [the core concepts documentation](/core-concepts#plan-and-price)
1161
1182
  sig do
1162
1183
  returns(
1163
1184
  T.any(
@@ -1195,18 +1216,18 @@ module Orb
1195
1216
  attr_accessor :price
1196
1217
 
1197
1218
  # The start date of the price interval. This is the date that Orb starts billing
1198
- # for this price.
1219
+ # for this price.
1199
1220
  sig { returns(Time) }
1200
1221
  attr_accessor :start_date
1201
1222
 
1202
1223
  # A list of customer IDs whose usage events will be aggregated and billed under
1203
- # this price interval.
1224
+ # this price interval.
1204
1225
  sig { returns(T.nilable(T::Array[String])) }
1205
1226
  attr_accessor :usage_customer_ids
1206
1227
 
1207
1228
  # The Price Interval resource represents a period of time for which a price will
1208
- # bill on a subscription. A subscription’s price intervals define its billing
1209
- # behavior.
1229
+ # bill on a subscription. A subscription’s price intervals define its billing
1230
+ # behavior.
1210
1231
  sig do
1211
1232
  params(
1212
1233
  id: String,
@@ -1217,10 +1238,10 @@ module Orb
1217
1238
  filter: T.nilable(String),
1218
1239
  fixed_fee_quantity_transitions: T.nilable(
1219
1240
  T::Array[
1220
- T.any(
1221
- Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition,
1222
- Orb::Internal::AnyHash
1223
- )
1241
+ T.any(
1242
+ Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition,
1243
+ Orb::Internal::AnyHash
1244
+ )
1224
1245
  ]
1225
1246
  ),
1226
1247
  price: T.any(
@@ -1270,9 +1291,7 @@ module Orb
1270
1291
  price:,
1271
1292
  start_date:,
1272
1293
  usage_customer_ids:
1273
- )
1274
- end
1275
-
1294
+ ); end
1276
1295
  sig do
1277
1296
  override
1278
1297
  .returns(
@@ -1321,8 +1340,7 @@ module Orb
1321
1340
  }
1322
1341
  )
1323
1342
  end
1324
- def to_hash
1325
- end
1343
+ def to_hash; end
1326
1344
 
1327
1345
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1328
1346
  sig { returns(Time) }
@@ -1335,12 +1353,10 @@ module Orb
1335
1353
  attr_accessor :quantity
1336
1354
 
1337
1355
  sig { params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class) }
1338
- def self.new(effective_date:, price_id:, quantity:)
1339
- end
1356
+ def self.new(effective_date:, price_id:, quantity:); end
1340
1357
 
1341
1358
  sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
1342
- def to_hash
1343
- end
1359
+ def to_hash; end
1344
1360
  end
1345
1361
  end
1346
1362
 
@@ -1357,12 +1373,10 @@ module Orb
1357
1373
  sig do
1358
1374
  params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
1359
1375
  end
1360
- def self.new(coupon_id:, end_date:, start_date:)
1361
- end
1376
+ def self.new(coupon_id:, end_date:, start_date:); end
1362
1377
 
1363
1378
  sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
1364
- def to_hash
1365
- end
1379
+ def to_hash; end
1366
1380
  end
1367
1381
 
1368
1382
  module Status
@@ -1379,8 +1393,7 @@ module Orb
1379
1393
  T.let(:upcoming, Orb::Models::SubscriptionUnscheduleCancellationResponse::Status::TaggedSymbol)
1380
1394
 
1381
1395
  sig { override.returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::Status::TaggedSymbol]) }
1382
- def self.values
1383
- end
1396
+ def self.values; end
1384
1397
  end
1385
1398
 
1386
1399
  class TrialInfo < Orb::Internal::Type::BaseModel
@@ -1388,12 +1401,55 @@ module Orb
1388
1401
  attr_accessor :end_date
1389
1402
 
1390
1403
  sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
1391
- def self.new(end_date:)
1392
- end
1404
+ def self.new(end_date:); end
1393
1405
 
1394
1406
  sig { override.returns({end_date: T.nilable(Time)}) }
1395
- def to_hash
1407
+ def to_hash; end
1408
+ end
1409
+
1410
+ class ChangedResources < Orb::Internal::Type::BaseModel
1411
+ # The credit notes that were created as part of this operation.
1412
+ sig { returns(T::Array[Orb::Models::CreditNote]) }
1413
+ attr_accessor :created_credit_notes
1414
+
1415
+ # The invoices that were created as part of this operation.
1416
+ sig { returns(T::Array[Orb::Models::Invoice]) }
1417
+ attr_accessor :created_invoices
1418
+
1419
+ # The credit notes that were voided as part of this operation.
1420
+ sig { returns(T::Array[Orb::Models::CreditNote]) }
1421
+ attr_accessor :voided_credit_notes
1422
+
1423
+ # The invoices that were voided as part of this operation.
1424
+ sig { returns(T::Array[Orb::Models::Invoice]) }
1425
+ attr_accessor :voided_invoices
1426
+
1427
+ # The resources that were changed as part of this operation. Only present when
1428
+ # fetched through the subscription changes API or if the
1429
+ # `include_changed_resources` parameter was passed in the request.
1430
+ sig do
1431
+ params(
1432
+ created_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1433
+ created_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)],
1434
+ voided_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1435
+ voided_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)]
1436
+ )
1437
+ .returns(T.attached_class)
1438
+ end
1439
+ def self.new(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:); end
1440
+
1441
+ sig do
1442
+ override
1443
+ .returns(
1444
+ {
1445
+ created_credit_notes: T::Array[Orb::Models::CreditNote],
1446
+ created_invoices: T::Array[Orb::Models::Invoice],
1447
+ voided_credit_notes: T::Array[Orb::Models::CreditNote],
1448
+ voided_invoices: T::Array[Orb::Models::Invoice]
1449
+ }
1450
+ )
1396
1451
  end
1452
+ def to_hash; end
1397
1453
  end
1398
1454
  end
1399
1455
  end