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
@@ -11,14 +11,14 @@ module Orb
11
11
 
12
12
  # @!attribute active_plan_phase_order
13
13
  # The current plan phase that is active, only if the subscription's plan has
14
- # phases.
14
+ # phases.
15
15
  #
16
16
  # @return [Integer, nil]
17
17
  required :active_plan_phase_order, Integer, nil?: true
18
18
 
19
19
  # @!attribute adjustment_intervals
20
20
  # The adjustment intervals for this subscription sorted by the start_date of the
21
- # adjustment interval.
21
+ # adjustment interval.
22
22
  #
23
23
  # @return [Array<Orb::Models::Subscription::AdjustmentInterval>]
24
24
  required :adjustment_intervals,
@@ -26,8 +26,8 @@ module Orb
26
26
 
27
27
  # @!attribute auto_collection
28
28
  # Determines whether issued invoices for this subscription will automatically be
29
- # charged with the saved payment method on the due date. This property defaults to
30
- # the plan's behavior. If null, defaults to the customer's setting.
29
+ # charged with the saved payment method on the due date. This property defaults to
30
+ # the plan's behavior. If null, defaults to the customer's setting.
31
31
  #
32
32
  # @return [Boolean, nil]
33
33
  required :auto_collection, Orb::Internal::Type::Boolean, nil?: true
@@ -40,9 +40,9 @@ module Orb
40
40
 
41
41
  # @!attribute billing_cycle_day
42
42
  # The day of the month on which the billing cycle is anchored. If the maximum
43
- # number of days in a month is greater than this value, the last day of the month
44
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
45
- # period begins on the 30th.
43
+ # number of days in a month is greater than this value, the last day of the month
44
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
45
+ # period begins on the 30th.
46
46
  #
47
47
  # @return [Integer]
48
48
  required :billing_cycle_day, Integer
@@ -54,46 +54,46 @@ module Orb
54
54
 
55
55
  # @!attribute current_billing_period_end_date
56
56
  # The end of the current billing period. This is an exclusive timestamp, such that
57
- # the instant returned is not part of the billing period. Set to null for
58
- # subscriptions that are not currently active.
57
+ # the instant returned is not part of the billing period. Set to null for
58
+ # subscriptions that are not currently active.
59
59
  #
60
60
  # @return [Time, nil]
61
61
  required :current_billing_period_end_date, Time, nil?: true
62
62
 
63
63
  # @!attribute current_billing_period_start_date
64
64
  # The start date of the current billing period. This is an inclusive timestamp;
65
- # the instant returned is exactly the beginning of the billing period. Set to null
66
- # if the subscription is not currently active.
65
+ # the instant returned is exactly the beginning of the billing period. Set to null
66
+ # if the subscription is not currently active.
67
67
  #
68
68
  # @return [Time, nil]
69
69
  required :current_billing_period_start_date, Time, nil?: true
70
70
 
71
71
  # @!attribute customer
72
72
  # A customer is a buyer of your products, and the other party to the billing
73
- # relationship.
73
+ # relationship.
74
74
  #
75
- # In Orb, customers are assigned system generated identifiers automatically, but
76
- # it's often desirable to have these match existing identifiers in your system. To
77
- # avoid having to denormalize Orb ID information, you can pass in an
78
- # `external_customer_id` with your own identifier. See
79
- # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
80
- # information about how these aliases work in Orb.
75
+ # In Orb, customers are assigned system generated identifiers automatically, but
76
+ # it's often desirable to have these match existing identifiers in your system. To
77
+ # avoid having to denormalize Orb ID information, you can pass in an
78
+ # `external_customer_id` with your own identifier. See
79
+ # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
80
+ # information about how these aliases work in Orb.
81
81
  #
82
- # In addition to having an identifier in your system, a customer may exist in a
83
- # payment provider solution like Stripe. Use the `payment_provider_id` and the
84
- # `payment_provider` enum field to express this mapping.
82
+ # In addition to having an identifier in your system, a customer may exist in a
83
+ # payment provider solution like Stripe. Use the `payment_provider_id` and the
84
+ # `payment_provider` enum field to express this mapping.
85
85
  #
86
- # A customer also has a timezone (from the standard
87
- # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
88
- # your account's timezone. See [Timezone localization](/essentials/timezones) for
89
- # information on what this timezone parameter influences within Orb.
86
+ # A customer also has a timezone (from the standard
87
+ # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
88
+ # your account's timezone. See [Timezone localization](/essentials/timezones) for
89
+ # information on what this timezone parameter influences within Orb.
90
90
  #
91
91
  # @return [Orb::Models::Customer]
92
92
  required :customer, -> { Orb::Models::Customer }
93
93
 
94
94
  # @!attribute default_invoice_memo
95
95
  # Determines the default memo on this subscriptions' invoices. Note that if this
96
- # is not provided, it is determined by the plan configuration.
96
+ # is not provided, it is determined by the plan configuration.
97
97
  #
98
98
  # @return [String, nil]
99
99
  required :default_invoice_memo, String, nil?: true
@@ -131,9 +131,9 @@ module Orb
131
131
 
132
132
  # @!attribute metadata
133
133
  # User specified key-value pairs for the resource. If not present, this defaults
134
- # to an empty dictionary. Individual keys can be removed by setting the value to
135
- # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
136
- # `null`.
134
+ # to an empty dictionary. Individual keys can be removed by setting the value to
135
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
136
+ # `null`.
137
137
  #
138
138
  # @return [Hash{Symbol=>String}]
139
139
  required :metadata, Orb::Internal::Type::HashOf[String]
@@ -147,18 +147,26 @@ module Orb
147
147
 
148
148
  # @!attribute net_terms
149
149
  # Determines the difference between the invoice issue date for subscription
150
- # invoices as the date that they are due. A value of `0` here represents that the
151
- # invoice is due on issue, whereas a value of `30` represents that the customer
152
- # has a month to pay the invoice.
150
+ # invoices as the date that they are due. A value of `0` here represents that the
151
+ # invoice is due on issue, whereas a value of `30` represents that the customer
152
+ # has a month to pay the invoice.
153
153
  #
154
154
  # @return [Integer]
155
155
  required :net_terms, Integer
156
156
 
157
+ # @!attribute pending_subscription_change
158
+ # A pending subscription change if one exists on this subscription.
159
+ #
160
+ # @return [Orb::Models::Subscription::PendingSubscriptionChange, nil]
161
+ required :pending_subscription_change,
162
+ -> { Orb::Models::Subscription::PendingSubscriptionChange },
163
+ nil?: true
164
+
157
165
  # @!attribute plan
158
166
  # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
159
- # subscribed to by a customer. Plans define the billing behavior of the
160
- # subscription. You can see more about how to configure prices in the
161
- # [Price resource](/reference/price).
167
+ # subscribed to by a customer. Plans define the billing behavior of the
168
+ # subscription. You can see more about how to configure prices in the
169
+ # [Price resource](/reference/price).
162
170
  #
163
171
  # @return [Orb::Models::Plan]
164
172
  required :plan, -> { Orb::Models::Plan }
@@ -192,24 +200,24 @@ module Orb
192
200
 
193
201
  # @!parse
194
202
  # # A [subscription](/core-concepts#subscription) represents the purchase of a plan
195
- # # by a customer.
203
+ # # by a customer.
196
204
  # #
197
- # # By default, subscriptions begin on the day that they're created and renew
198
- # # automatically for each billing cycle at the cadence that's configured in the
199
- # # plan definition.
205
+ # # By default, subscriptions begin on the day that they're created and renew
206
+ # # automatically for each billing cycle at the cadence that's configured in the
207
+ # # plan definition.
200
208
  # #
201
- # # Subscriptions also default to **beginning of month alignment**, which means the
202
- # # first invoice issued for the subscription will have pro-rated charges between
203
- # # the `start_date` and the first of the following month. Subsequent billing
204
- # # periods will always start and end on a month boundary (e.g. subsequent month
205
- # # starts for monthly billing).
209
+ # # Subscriptions also default to **beginning of month alignment**, which means the
210
+ # # first invoice issued for the subscription will have pro-rated charges between
211
+ # # the `start_date` and the first of the following month. Subsequent billing
212
+ # # periods will always start and end on a month boundary (e.g. subsequent month
213
+ # # starts for monthly billing).
206
214
  # #
207
- # # Depending on the plan configuration, any _flat_ recurring fees will be billed
208
- # # either at the beginning (in-advance) or end (in-arrears) of each billing cycle.
209
- # # Plans default to **in-advance billing**. Usage-based fees are billed in arrears
210
- # # as usage is accumulated. In the normal course of events, you can expect an
211
- # # invoice to contain usage-based charges for the previous period, and a recurring
212
- # # fee for the following period.
215
+ # # Depending on the plan configuration, any _flat_ recurring fees will be billed
216
+ # # either at the beginning (in-advance) or end (in-arrears) of each billing cycle.
217
+ # # Plans default to **in-advance billing**. Usage-based fees are billed in arrears
218
+ # # as usage is accumulated. In the normal course of events, you can expect an
219
+ # # invoice to contain usage-based charges for the previous period, and a recurring
220
+ # # fee for the following period.
213
221
  # #
214
222
  # # @param id [String]
215
223
  # # @param active_plan_phase_order [Integer, nil]
@@ -230,6 +238,7 @@ module Orb
230
238
  # # @param metadata [Hash{Symbol=>String}]
231
239
  # # @param minimum_intervals [Array<Orb::Models::Subscription::MinimumInterval>]
232
240
  # # @param net_terms [Integer]
241
+ # # @param pending_subscription_change [Orb::Models::Subscription::PendingSubscriptionChange, nil]
233
242
  # # @param plan [Orb::Models::Plan]
234
243
  # # @param price_intervals [Array<Orb::Models::Subscription::PriceInterval>]
235
244
  # # @param redeemed_coupon [Orb::Models::Subscription::RedeemedCoupon, nil]
@@ -257,6 +266,7 @@ module Orb
257
266
  # metadata:,
258
267
  # minimum_intervals:,
259
268
  # net_terms:,
269
+ # pending_subscription_change:,
260
270
  # plan:,
261
271
  # price_intervals:,
262
272
  # redeemed_coupon:,
@@ -350,7 +360,7 @@ module Orb
350
360
 
351
361
  # @!attribute is_invoice_level
352
362
  # True for adjustments that apply to an entire invocice, false for adjustments
353
- # that apply to only one price.
363
+ # that apply to only one price.
354
364
  #
355
365
  # @return [Boolean]
356
366
  required :is_invoice_level, Orb::Internal::Type::Boolean
@@ -369,7 +379,7 @@ module Orb
369
379
 
370
380
  # @!attribute usage_discount
371
381
  # The number of usage units by which to discount the price this adjustment applies
372
- # to in a given billing period.
382
+ # to in a given billing period.
373
383
  #
374
384
  # @return [Float]
375
385
  required :usage_discount, Float
@@ -412,7 +422,7 @@ module Orb
412
422
 
413
423
  # @!attribute amount_discount
414
424
  # The amount by which to discount the prices this adjustment applies to in a given
415
- # billing period.
425
+ # billing period.
416
426
  #
417
427
  # @return [String]
418
428
  required :amount_discount, String
@@ -425,7 +435,7 @@ module Orb
425
435
 
426
436
  # @!attribute is_invoice_level
427
437
  # True for adjustments that apply to an entire invocice, false for adjustments
428
- # that apply to only one price.
438
+ # that apply to only one price.
429
439
  #
430
440
  # @return [Boolean]
431
441
  required :is_invoice_level, Orb::Internal::Type::Boolean
@@ -486,14 +496,14 @@ module Orb
486
496
 
487
497
  # @!attribute is_invoice_level
488
498
  # True for adjustments that apply to an entire invocice, false for adjustments
489
- # that apply to only one price.
499
+ # that apply to only one price.
490
500
  #
491
501
  # @return [Boolean]
492
502
  required :is_invoice_level, Orb::Internal::Type::Boolean
493
503
 
494
504
  # @!attribute percentage_discount
495
505
  # The percentage (as a value between 0 and 1) by which to discount the price
496
- # intervals this adjustment applies to in a given billing period.
506
+ # intervals this adjustment applies to in a given billing period.
497
507
  #
498
508
  # @return [Float]
499
509
  required :percentage_discount, Float
@@ -554,7 +564,7 @@ module Orb
554
564
 
555
565
  # @!attribute is_invoice_level
556
566
  # True for adjustments that apply to an entire invocice, false for adjustments
557
- # that apply to only one price.
567
+ # that apply to only one price.
558
568
  #
559
569
  # @return [Boolean]
560
570
  required :is_invoice_level, Orb::Internal::Type::Boolean
@@ -567,7 +577,7 @@ module Orb
567
577
 
568
578
  # @!attribute minimum_amount
569
579
  # The minimum amount to charge in a given billing period for the prices this
570
- # adjustment applies to.
580
+ # adjustment applies to.
571
581
  #
572
582
  # @return [String]
573
583
  required :minimum_amount, String
@@ -630,14 +640,14 @@ module Orb
630
640
 
631
641
  # @!attribute is_invoice_level
632
642
  # True for adjustments that apply to an entire invocice, false for adjustments
633
- # that apply to only one price.
643
+ # that apply to only one price.
634
644
  #
635
645
  # @return [Boolean]
636
646
  required :is_invoice_level, Orb::Internal::Type::Boolean
637
647
 
638
648
  # @!attribute maximum_amount
639
649
  # The maximum amount to charge in a given billing period for the prices this
640
- # adjustment applies to.
650
+ # adjustment applies to.
641
651
  #
642
652
  # @return [String]
643
653
  required :maximum_amount, String
@@ -689,24 +699,24 @@ module Orb
689
699
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
690
700
  # @!attribute day
691
701
  # The day of the month on which the billing cycle is anchored. If the maximum
692
- # number of days in a month is greater than this value, the last day of the month
693
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
694
- # period begins on the 30th.
702
+ # number of days in a month is greater than this value, the last day of the month
703
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
704
+ # period begins on the 30th.
695
705
  #
696
706
  # @return [Integer]
697
707
  required :day, Integer
698
708
 
699
709
  # @!attribute month
700
710
  # The month on which the billing cycle is anchored (e.g. a quarterly price
701
- # anchored in February would have cycles starting February, May, August, and
702
- # November).
711
+ # anchored in February would have cycles starting February, May, August, and
712
+ # November).
703
713
  #
704
714
  # @return [Integer, nil]
705
715
  optional :month, Integer, nil?: true
706
716
 
707
717
  # @!attribute year
708
718
  # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
709
- # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
719
+ # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
710
720
  #
711
721
  # @return [Integer, nil]
712
722
  optional :year, Integer, nil?: true
@@ -817,7 +827,7 @@ module Orb
817
827
 
818
828
  # @!attribute percentage_discount
819
829
  # Only available if discount_type is `percentage`.This is a number between 0
820
- # and 1.
830
+ # and 1.
821
831
  #
822
832
  # @return [Float]
823
833
  required :percentage_discount, Float
@@ -883,7 +893,7 @@ module Orb
883
893
 
884
894
  # @!attribute usage_discount
885
895
  # Only available if discount_type is `usage`. Number of usage units that this
886
- # discount is for
896
+ # discount is for
887
897
  #
888
898
  # @return [Float]
889
899
  required :usage_discount, Float
@@ -969,7 +979,7 @@ module Orb
969
979
 
970
980
  # @!attribute maximum_amount
971
981
  # The maximum amount to charge in a given billing period for the price intervals
972
- # this transform applies to.
982
+ # this transform applies to.
973
983
  #
974
984
  # @return [String]
975
985
  required :maximum_amount, String
@@ -1013,7 +1023,7 @@ module Orb
1013
1023
 
1014
1024
  # @!attribute minimum_amount
1015
1025
  # The minimum amount to charge in a given billing period for the price intervals
1016
- # this minimum applies to.
1026
+ # this minimum applies to.
1017
1027
  #
1018
1028
  # @return [String]
1019
1029
  required :minimum_amount, String
@@ -1036,6 +1046,23 @@ module Orb
1036
1046
  # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
1037
1047
  end
1038
1048
 
1049
+ # @see Orb::Models::Subscription#pending_subscription_change
1050
+ class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1051
+ # @!attribute id
1052
+ #
1053
+ # @return [String]
1054
+ required :id, String
1055
+
1056
+ # @!parse
1057
+ # # A pending subscription change if one exists on this subscription.
1058
+ # #
1059
+ # # @param id [String]
1060
+ # #
1061
+ # def initialize(id:, **) = super
1062
+
1063
+ # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
1064
+ end
1065
+
1039
1066
  class PriceInterval < Orb::Internal::Type::BaseModel
1040
1067
  # @!attribute id
1041
1068
  #
@@ -1050,23 +1077,23 @@ module Orb
1050
1077
 
1051
1078
  # @!attribute current_billing_period_end_date
1052
1079
  # The end of the current billing period. This is an exclusive timestamp, such that
1053
- # the instant returned is exactly the end of the billing period. Set to null if
1054
- # this price interval is not currently active.
1080
+ # the instant returned is exactly the end of the billing period. Set to null if
1081
+ # this price interval is not currently active.
1055
1082
  #
1056
1083
  # @return [Time, nil]
1057
1084
  required :current_billing_period_end_date, Time, nil?: true
1058
1085
 
1059
1086
  # @!attribute current_billing_period_start_date
1060
1087
  # The start date of the current billing period. This is an inclusive timestamp;
1061
- # the instant returned is exactly the beginning of the billing period. Set to null
1062
- # if this price interval is not currently active.
1088
+ # the instant returned is exactly the beginning of the billing period. Set to null
1089
+ # if this price interval is not currently active.
1063
1090
  #
1064
1091
  # @return [Time, nil]
1065
1092
  required :current_billing_period_start_date, Time, nil?: true
1066
1093
 
1067
1094
  # @!attribute end_date
1068
1095
  # The end date of the price interval. This is the date that Orb stops billing for
1069
- # this price.
1096
+ # this price.
1070
1097
  #
1071
1098
  # @return [Time, nil]
1072
1099
  required :end_date, Time, nil?: true
@@ -1079,7 +1106,7 @@ module Orb
1079
1106
 
1080
1107
  # @!attribute fixed_fee_quantity_transitions
1081
1108
  # The fixed fee quantity transitions for this price interval. This is only
1082
- # relevant for fixed fees.
1109
+ # relevant for fixed fees.
1083
1110
  #
1084
1111
  # @return [Array<Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition>, nil]
1085
1112
  required :fixed_fee_quantity_transitions,
@@ -1088,37 +1115,37 @@ module Orb
1088
1115
 
1089
1116
  # @!attribute price
1090
1117
  # The Price resource represents a price that can be billed on a subscription,
1091
- # resulting in a charge on an invoice in the form of an invoice line item. Prices
1092
- # take a quantity and determine an amount to bill.
1118
+ # resulting in a charge on an invoice in the form of an invoice line item. Prices
1119
+ # take a quantity and determine an amount to bill.
1093
1120
  #
1094
- # Orb supports a few different pricing models out of the box. Each of these models
1095
- # is serialized differently in a given Price object. The model_type field
1096
- # determines the key for the configuration object that is present.
1121
+ # Orb supports a few different pricing models out of the box. Each of these models
1122
+ # is serialized differently in a given Price object. The model_type field
1123
+ # determines the key for the configuration object that is present.
1097
1124
  #
1098
- # For more on the types of prices, see
1099
- # [the core concepts documentation](/core-concepts#plan-and-price)
1125
+ # For more on the types of prices, see
1126
+ # [the core concepts documentation](/core-concepts#plan-and-price)
1100
1127
  #
1101
1128
  # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice]
1102
1129
  required :price, union: -> { Orb::Models::Price }
1103
1130
 
1104
1131
  # @!attribute start_date
1105
1132
  # The start date of the price interval. This is the date that Orb starts billing
1106
- # for this price.
1133
+ # for this price.
1107
1134
  #
1108
1135
  # @return [Time]
1109
1136
  required :start_date, Time
1110
1137
 
1111
1138
  # @!attribute usage_customer_ids
1112
1139
  # A list of customer IDs whose usage events will be aggregated and billed under
1113
- # this price interval.
1140
+ # this price interval.
1114
1141
  #
1115
1142
  # @return [Array<String>, nil]
1116
1143
  required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
1117
1144
 
1118
1145
  # @!parse
1119
1146
  # # The Price Interval resource represents a period of time for which a price will
1120
- # # bill on a subscription. A subscription’s price intervals define its billing
1121
- # # behavior.
1147
+ # # bill on a subscription. A subscription’s price intervals define its billing
1148
+ # # behavior.
1122
1149
  # #
1123
1150
  # # @param id [String]
1124
1151
  # # @param billing_cycle_day [Integer]
@@ -16,15 +16,15 @@ module Orb
16
16
 
17
17
  # @!attribute allow_invoice_credit_or_void
18
18
  # If false, this request will fail if it would void an issued invoice or create a
19
- # credit note. Consider using this as a safety mechanism if you do not expect
20
- # existing invoices to be changed.
19
+ # credit note. Consider using this as a safety mechanism if you do not expect
20
+ # existing invoices to be changed.
21
21
  #
22
22
  # @return [Boolean, nil]
23
23
  optional :allow_invoice_credit_or_void, Orb::Internal::Type::Boolean, nil?: true
24
24
 
25
25
  # @!attribute cancellation_date
26
26
  # The date that the cancellation should take effect. This parameter can only be
27
- # passed if the `cancel_option` is `requested_date`.
27
+ # passed if the `cancel_option` is `requested_date`.
28
28
  #
29
29
  # @return [Time, nil]
30
30
  optional :cancellation_date, Time, nil?: true