orb-billing 0.1.0.pre.alpha.37 → 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 (402) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -5
  3. data/lib/orb/client.rb +4 -0
  4. data/lib/orb/internal/page.rb +6 -2
  5. data/lib/orb/internal/transport/base_client.rb +3 -3
  6. data/lib/orb/internal/transport/pooled_net_requester.rb +2 -2
  7. data/lib/orb/internal/type/array_of.rb +5 -3
  8. data/lib/orb/internal/type/base_model.rb +19 -16
  9. data/lib/orb/internal/type/base_page.rb +4 -1
  10. data/lib/orb/internal/type/{boolean_model.rb → boolean.rb} +2 -2
  11. data/lib/orb/internal/type/converter.rb +26 -23
  12. data/lib/orb/internal/type/enum.rb +10 -8
  13. data/lib/orb/internal/type/hash_of.rb +3 -1
  14. data/lib/orb/internal/util.rb +29 -50
  15. data/lib/orb/models/alert.rb +10 -10
  16. data/lib/orb/models/alert_create_for_customer_params.rb +3 -3
  17. data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -3
  18. data/lib/orb/models/alert_create_for_subscription_params.rb +3 -3
  19. data/lib/orb/models/alert_list_params.rb +5 -5
  20. data/lib/orb/models/alert_update_params.rb +3 -3
  21. data/lib/orb/models/amount_discount.rb +1 -1
  22. data/lib/orb/models/billable_metric.rb +7 -7
  23. data/lib/orb/models/coupon.rb +7 -7
  24. data/lib/orb/models/coupon_create_params.rb +2 -2
  25. data/lib/orb/models/coupon_list_params.rb +3 -3
  26. data/lib/orb/models/coupons/subscription_list_params.rb +1 -1
  27. data/lib/orb/models/credit_note.rb +1 -1
  28. data/lib/orb/models/credit_note_list_params.rb +5 -5
  29. data/lib/orb/models/customer.rb +237 -237
  30. data/lib/orb/models/customer_create_params.rb +229 -229
  31. data/lib/orb/models/customer_list_params.rb +5 -5
  32. data/lib/orb/models/customer_update_by_external_id_params.rb +230 -230
  33. data/lib/orb/models/customer_update_params.rb +230 -230
  34. data/lib/orb/models/customers/balance_transaction_create_response.rb +2 -2
  35. data/lib/orb/models/customers/balance_transaction_list_params.rb +5 -5
  36. data/lib/orb/models/customers/balance_transaction_list_response.rb +2 -2
  37. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +6 -6
  38. data/lib/orb/models/customers/cost_list_params.rb +6 -6
  39. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +3 -3
  40. data/lib/orb/models/customers/credit_list_params.rb +3 -3
  41. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +22 -22
  42. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +22 -22
  43. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +22 -22
  44. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +22 -22
  45. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +5 -5
  46. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +22 -22
  47. data/lib/orb/models/customers/credits/ledger_list_params.rb +5 -5
  48. data/lib/orb/models/customers/credits/ledger_list_response.rb +22 -22
  49. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -10
  50. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +9 -9
  51. data/lib/orb/models/customers/credits/top_up_create_params.rb +10 -10
  52. data/lib/orb/models/customers/credits/top_up_create_response.rb +9 -9
  53. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +1 -1
  54. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +9 -9
  55. data/lib/orb/models/customers/credits/top_up_list_params.rb +1 -1
  56. data/lib/orb/models/customers/credits/top_up_list_response.rb +9 -9
  57. data/lib/orb/models/dimensional_price_group.rb +7 -7
  58. data/lib/orb/models/dimensional_price_group_create_params.rb +2 -2
  59. data/lib/orb/models/dimensional_price_group_list_params.rb +1 -1
  60. data/lib/orb/models/evaluate_price_group.rb +1 -1
  61. data/lib/orb/models/event_ingest_params.rb +8 -8
  62. data/lib/orb/models/event_ingest_response.rb +4 -4
  63. data/lib/orb/models/event_search_params.rb +5 -5
  64. data/lib/orb/models/event_search_response.rb +9 -9
  65. data/lib/orb/models/event_update_params.rb +4 -4
  66. data/lib/orb/models/events/backfill_close_response.rb +8 -8
  67. data/lib/orb/models/events/backfill_create_params.rb +12 -12
  68. data/lib/orb/models/events/backfill_create_response.rb +8 -8
  69. data/lib/orb/models/events/backfill_fetch_response.rb +8 -8
  70. data/lib/orb/models/events/backfill_list_params.rb +1 -1
  71. data/lib/orb/models/events/backfill_list_response.rb +8 -8
  72. data/lib/orb/models/events/backfill_revert_response.rb +8 -8
  73. data/lib/orb/models/events/event_volumes.rb +1 -1
  74. data/lib/orb/models/events/volume_list_params.rb +7 -7
  75. data/lib/orb/models/invoice.rb +278 -278
  76. data/lib/orb/models/invoice_create_params.rb +13 -12
  77. data/lib/orb/models/invoice_fetch_upcoming_response.rb +274 -274
  78. data/lib/orb/models/invoice_issue_params.rb +5 -5
  79. data/lib/orb/models/invoice_line_item_create_params.rb +1 -1
  80. data/lib/orb/models/invoice_line_item_create_response.rb +32 -32
  81. data/lib/orb/models/invoice_list_params.rb +13 -13
  82. data/lib/orb/models/invoice_update_params.rb +2 -2
  83. data/lib/orb/models/item.rb +2 -2
  84. data/lib/orb/models/item_list_params.rb +1 -1
  85. data/lib/orb/models/metric_create_params.rb +2 -2
  86. data/lib/orb/models/metric_list_params.rb +5 -5
  87. data/lib/orb/models/metric_update_params.rb +2 -2
  88. data/lib/orb/models/pagination_metadata.rb +1 -1
  89. data/lib/orb/models/percentage_discount.rb +2 -2
  90. data/lib/orb/models/plan.rb +40 -40
  91. data/lib/orb/models/plan_create_params.rb +292 -292
  92. data/lib/orb/models/plan_list_params.rb +5 -5
  93. data/lib/orb/models/plan_update_params.rb +4 -4
  94. data/lib/orb/models/plans/external_plan_id_update_params.rb +4 -4
  95. data/lib/orb/models/price.rb +186 -186
  96. data/lib/orb/models/price_create_params.rb +21 -21
  97. data/lib/orb/models/price_evaluate_params.rb +4 -4
  98. data/lib/orb/models/price_list_params.rb +1 -1
  99. data/lib/orb/models/price_update_params.rb +2 -2
  100. data/lib/orb/models/prices/external_price_id_update_params.rb +2 -2
  101. data/lib/orb/models/subscription.rb +120 -93
  102. data/lib/orb/models/subscription_cancel_params.rb +4 -4
  103. data/lib/orb/models/subscription_cancel_response.rb +156 -78
  104. data/lib/orb/models/subscription_change_apply_params.rb +33 -0
  105. data/lib/orb/models/subscription_change_apply_response.rb +1372 -0
  106. data/lib/orb/models/subscription_change_cancel_params.rb +19 -0
  107. data/lib/orb/models/subscription_change_cancel_response.rb +1372 -0
  108. data/lib/orb/models/subscription_change_retrieve_params.rb +19 -0
  109. data/lib/orb/models/subscription_change_retrieve_response.rb +1372 -0
  110. data/lib/orb/models/subscription_create_params.rb +705 -705
  111. data/lib/orb/models/subscription_create_response.rb +156 -78
  112. data/lib/orb/models/subscription_fetch_costs_params.rb +6 -6
  113. data/lib/orb/models/subscription_fetch_schedule_params.rb +5 -5
  114. data/lib/orb/models/subscription_fetch_schedule_response.rb +2 -2
  115. data/lib/orb/models/subscription_fetch_usage_params.rb +8 -8
  116. data/lib/orb/models/subscription_list_params.rb +5 -5
  117. data/lib/orb/models/subscription_price_intervals_params.rb +358 -358
  118. data/lib/orb/models/subscription_price_intervals_response.rb +158 -78
  119. data/lib/orb/models/subscription_schedule_plan_change_params.rb +715 -715
  120. data/lib/orb/models/subscription_schedule_plan_change_response.rb +158 -78
  121. data/lib/orb/models/subscription_trigger_phase_params.rb +4 -4
  122. data/lib/orb/models/subscription_trigger_phase_response.rb +158 -78
  123. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +158 -78
  124. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +159 -79
  125. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +158 -78
  126. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +9 -9
  127. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +158 -78
  128. data/lib/orb/models/subscription_update_params.rb +11 -11
  129. data/lib/orb/models/subscription_update_trial_params.rb +4 -4
  130. data/lib/orb/models/subscription_update_trial_response.rb +158 -78
  131. data/lib/orb/models/trial_discount.rb +1 -1
  132. data/lib/orb/models/usage_discount.rb +2 -2
  133. data/lib/orb/request_options.rb +7 -7
  134. data/lib/orb/resources/alerts.rb +40 -35
  135. data/lib/orb/resources/coupons/subscriptions.rb +3 -3
  136. data/lib/orb/resources/coupons.rb +9 -9
  137. data/lib/orb/resources/credit_notes.rb +10 -5
  138. data/lib/orb/resources/customers/balance_transactions.rb +28 -23
  139. data/lib/orb/resources/customers/costs.rb +232 -232
  140. data/lib/orb/resources/customers/credits/ledger.rb +348 -338
  141. data/lib/orb/resources/customers/credits/top_ups.rb +12 -12
  142. data/lib/orb/resources/customers/credits.rb +8 -8
  143. data/lib/orb/resources/customers.rb +61 -56
  144. data/lib/orb/resources/dimensional_price_groups.rb +6 -6
  145. data/lib/orb/resources/events/backfills.rb +49 -49
  146. data/lib/orb/resources/events/volume.rb +10 -10
  147. data/lib/orb/resources/events.rb +295 -295
  148. data/lib/orb/resources/invoice_line_items.rb +1 -1
  149. data/lib/orb/resources/invoices.rb +40 -31
  150. data/lib/orb/resources/items.rb +1 -1
  151. data/lib/orb/resources/metrics.rb +13 -8
  152. data/lib/orb/resources/plans/external_plan_id.rb +14 -14
  153. data/lib/orb/resources/plans.rb +24 -19
  154. data/lib/orb/resources/prices/external_price_id.rb +4 -4
  155. data/lib/orb/resources/prices.rb +30 -30
  156. data/lib/orb/resources/subscription_changes.rb +87 -0
  157. data/lib/orb/resources/subscriptions.rb +817 -807
  158. data/lib/orb/resources/top_level.rb +4 -4
  159. data/lib/orb/version.rb +1 -1
  160. data/lib/orb.rb +8 -1
  161. data/rbi/lib/orb/client.rbi +5 -4
  162. data/rbi/lib/orb/errors.rbi +3 -6
  163. data/rbi/lib/orb/internal/page.rbi +3 -6
  164. data/rbi/lib/orb/internal/transport/base_client.rbi +13 -27
  165. data/rbi/lib/orb/internal/transport/pooled_net_requester.rbi +7 -13
  166. data/rbi/lib/orb/internal/type/array_of.rbi +10 -18
  167. data/rbi/lib/orb/internal/type/base_model.rbi +45 -64
  168. data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
  169. data/rbi/lib/orb/internal/type/{boolean_model.rbi → boolean.rbi} +5 -9
  170. data/rbi/lib/orb/internal/type/converter.rbi +25 -31
  171. data/rbi/lib/orb/internal/type/enum.rbi +14 -20
  172. data/rbi/lib/orb/internal/type/hash_of.rbi +8 -16
  173. data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
  174. data/rbi/lib/orb/internal/type/union.rbi +10 -20
  175. data/rbi/lib/orb/internal/type/unknown.rbi +4 -8
  176. data/rbi/lib/orb/internal/util.rbi +40 -72
  177. data/rbi/lib/orb/internal.rbi +1 -1
  178. data/rbi/lib/orb/models/alert.rbi +21 -33
  179. data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +8 -13
  180. data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +8 -13
  181. data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +8 -13
  182. data/rbi/lib/orb/models/alert_disable_params.rbi +2 -4
  183. data/rbi/lib/orb/models/alert_enable_params.rbi +2 -4
  184. data/rbi/lib/orb/models/alert_list_params.rbi +3 -6
  185. data/rbi/lib/orb/models/alert_retrieve_params.rbi +2 -4
  186. data/rbi/lib/orb/models/alert_update_params.rbi +7 -11
  187. data/rbi/lib/orb/models/amount_discount.rbi +4 -7
  188. data/rbi/lib/orb/models/billable_metric.rbi +10 -13
  189. data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -2
  190. data/rbi/lib/orb/models/coupon.rbi +9 -11
  191. data/rbi/lib/orb/models/coupon_archive_params.rbi +2 -4
  192. data/rbi/lib/orb/models/coupon_create_params.rbi +8 -14
  193. data/rbi/lib/orb/models/coupon_fetch_params.rbi +2 -4
  194. data/rbi/lib/orb/models/coupon_list_params.rbi +3 -4
  195. data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +3 -5
  196. data/rbi/lib/orb/models/credit_note.rbi +22 -45
  197. data/rbi/lib/orb/models/credit_note_create_params.rbi +5 -10
  198. data/rbi/lib/orb/models/credit_note_fetch_params.rbi +2 -4
  199. data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -6
  200. data/rbi/lib/orb/models/customer.rbi +256 -281
  201. data/rbi/lib/orb/models/customer_create_params.rbi +251 -276
  202. data/rbi/lib/orb/models/customer_delete_params.rbi +2 -4
  203. data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +2 -4
  204. data/rbi/lib/orb/models/customer_fetch_params.rbi +2 -4
  205. data/rbi/lib/orb/models/customer_list_params.rbi +3 -6
  206. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +2 -4
  207. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +2 -4
  208. data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +252 -277
  209. data/rbi/lib/orb/models/customer_update_params.rbi +252 -277
  210. data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +3 -6
  211. data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +10 -19
  212. data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -6
  213. data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +10 -19
  214. data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +8 -10
  215. data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +6 -12
  216. data/rbi/lib/orb/models/customers/cost_list_params.rbi +8 -10
  217. data/rbi/lib/orb/models/customers/cost_list_response.rbi +6 -12
  218. data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +3 -4
  219. data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +2 -4
  220. data/rbi/lib/orb/models/customers/credit_list_params.rbi +3 -4
  221. data/rbi/lib/orb/models/customers/credit_list_response.rbi +2 -4
  222. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +26 -33
  223. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +79 -136
  224. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +26 -33
  225. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +78 -135
  226. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +5 -10
  227. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +79 -136
  228. data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +5 -10
  229. data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +74 -131
  230. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +13 -19
  231. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +12 -18
  232. data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +13 -19
  233. data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +12 -18
  234. data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +2 -4
  235. data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +2 -4
  236. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +3 -5
  237. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +12 -18
  238. data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +3 -5
  239. data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +12 -18
  240. data/rbi/lib/orb/models/dimensional_price_group.rbi +8 -9
  241. data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -7
  242. data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +3 -5
  243. data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +2 -4
  244. data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +2 -4
  245. data/rbi/lib/orb/models/dimensional_price_groups.rbi +2 -4
  246. data/rbi/lib/orb/models/discount.rbi +1 -2
  247. data/rbi/lib/orb/models/evaluate_price_group.rbi +3 -6
  248. data/rbi/lib/orb/models/event_deprecate_params.rbi +2 -4
  249. data/rbi/lib/orb/models/event_deprecate_response.rbi +2 -4
  250. data/rbi/lib/orb/models/event_ingest_params.rbi +10 -13
  251. data/rbi/lib/orb/models/event_ingest_response.rbi +10 -16
  252. data/rbi/lib/orb/models/event_search_params.rbi +7 -9
  253. data/rbi/lib/orb/models/event_search_response.rbi +11 -14
  254. data/rbi/lib/orb/models/event_update_params.rbi +5 -6
  255. data/rbi/lib/orb/models/event_update_response.rbi +2 -4
  256. data/rbi/lib/orb/models/events/backfill_close_params.rbi +2 -4
  257. data/rbi/lib/orb/models/events/backfill_close_response.rbi +10 -14
  258. data/rbi/lib/orb/models/events/backfill_create_params.rbi +13 -16
  259. data/rbi/lib/orb/models/events/backfill_create_response.rbi +10 -14
  260. data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +2 -4
  261. data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +10 -14
  262. data/rbi/lib/orb/models/events/backfill_list_params.rbi +3 -5
  263. data/rbi/lib/orb/models/events/backfill_list_response.rbi +10 -14
  264. data/rbi/lib/orb/models/events/backfill_revert_params.rbi +2 -4
  265. data/rbi/lib/orb/models/events/backfill_revert_response.rbi +10 -14
  266. data/rbi/lib/orb/models/events/event_volumes.rbi +5 -9
  267. data/rbi/lib/orb/models/events/volume_list_params.rbi +9 -11
  268. data/rbi/lib/orb/models/invoice.rbi +388 -465
  269. data/rbi/lib/orb/models/invoice_create_params.rbi +19 -26
  270. data/rbi/lib/orb/models/invoice_fetch_params.rbi +2 -4
  271. data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +2 -4
  272. data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +381 -460
  273. data/rbi/lib/orb/models/invoice_issue_params.rbi +6 -8
  274. data/rbi/lib/orb/models/invoice_level_discount.rbi +1 -2
  275. data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +3 -5
  276. data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +101 -143
  277. data/rbi/lib/orb/models/invoice_list_params.rbi +8 -13
  278. data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +2 -4
  279. data/rbi/lib/orb/models/invoice_pay_params.rbi +2 -4
  280. data/rbi/lib/orb/models/invoice_update_params.rbi +4 -6
  281. data/rbi/lib/orb/models/invoice_void_params.rbi +2 -4
  282. data/rbi/lib/orb/models/item.rbi +7 -12
  283. data/rbi/lib/orb/models/item_create_params.rbi +2 -4
  284. data/rbi/lib/orb/models/item_fetch_params.rbi +2 -4
  285. data/rbi/lib/orb/models/item_list_params.rbi +3 -5
  286. data/rbi/lib/orb/models/item_update_params.rbi +5 -10
  287. data/rbi/lib/orb/models/metric_create_params.rbi +4 -6
  288. data/rbi/lib/orb/models/metric_fetch_params.rbi +2 -4
  289. data/rbi/lib/orb/models/metric_list_params.rbi +3 -6
  290. data/rbi/lib/orb/models/metric_update_params.rbi +4 -6
  291. data/rbi/lib/orb/models/pagination_metadata.rbi +2 -4
  292. data/rbi/lib/orb/models/percentage_discount.rbi +5 -8
  293. data/rbi/lib/orb/models/plan.rbi +180 -219
  294. data/rbi/lib/orb/models/plan_create_params.rbi +670 -951
  295. data/rbi/lib/orb/models/plan_fetch_params.rbi +2 -4
  296. data/rbi/lib/orb/models/plan_list_params.rbi +4 -8
  297. data/rbi/lib/orb/models/plan_update_params.rbi +6 -8
  298. data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +2 -4
  299. data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +6 -8
  300. data/rbi/lib/orb/models/price.rbi +827 -1494
  301. data/rbi/lib/orb/models/price_create_params.rbi +60 -101
  302. data/rbi/lib/orb/models/price_evaluate_params.rbi +6 -9
  303. data/rbi/lib/orb/models/price_evaluate_response.rbi +2 -4
  304. data/rbi/lib/orb/models/price_fetch_params.rbi +2 -4
  305. data/rbi/lib/orb/models/price_list_params.rbi +3 -5
  306. data/rbi/lib/orb/models/price_update_params.rbi +4 -6
  307. data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +2 -4
  308. data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +4 -6
  309. data/rbi/lib/orb/models/subscription.rbi +167 -187
  310. data/rbi/lib/orb/models/subscription_cancel_params.rbi +5 -7
  311. data/rbi/lib/orb/models/subscription_cancel_response.rbi +224 -178
  312. data/rbi/lib/orb/models/subscription_change_apply_params.rbi +40 -0
  313. data/rbi/lib/orb/models/subscription_change_apply_response.rbi +1554 -0
  314. data/rbi/lib/orb/models/subscription_change_cancel_params.rbi +18 -0
  315. data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +1565 -0
  316. data/rbi/lib/orb/models/subscription_change_retrieve_params.rbi +18 -0
  317. data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +1581 -0
  318. data/rbi/lib/orb/models/subscription_create_params.rbi +1372 -1968
  319. data/rbi/lib/orb/models/subscription_create_response.rbi +224 -178
  320. data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +8 -10
  321. data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +6 -12
  322. data/rbi/lib/orb/models/subscription_fetch_params.rbi +2 -4
  323. data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -6
  324. data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +6 -10
  325. data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +12 -17
  326. data/rbi/lib/orb/models/subscription_list_params.rbi +4 -8
  327. data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +772 -1124
  328. data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +228 -178
  329. data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +1396 -1993
  330. data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +238 -182
  331. data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +5 -7
  332. data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +224 -178
  333. data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +2 -4
  334. data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +238 -182
  335. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +2 -4
  336. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +265 -199
  337. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +2 -4
  338. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +264 -198
  339. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -15
  340. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +238 -182
  341. data/rbi/lib/orb/models/subscription_update_params.rbi +12 -15
  342. data/rbi/lib/orb/models/subscription_update_trial_params.rbi +6 -9
  343. data/rbi/lib/orb/models/subscription_update_trial_response.rbi +224 -178
  344. data/rbi/lib/orb/models/subscription_usage.rbi +24 -43
  345. data/rbi/lib/orb/models/subscriptions.rbi +2 -4
  346. data/rbi/lib/orb/models/top_level_ping_params.rbi +2 -4
  347. data/rbi/lib/orb/models/top_level_ping_response.rbi +2 -4
  348. data/rbi/lib/orb/models/trial_discount.rbi +4 -8
  349. data/rbi/lib/orb/models/usage_discount.rbi +5 -8
  350. data/rbi/lib/orb/request_options.rbi +9 -11
  351. data/rbi/lib/orb/resources/alerts.rbi +44 -60
  352. data/rbi/lib/orb/resources/coupons/subscriptions.rbi +6 -9
  353. data/rbi/lib/orb/resources/coupons.rbi +18 -25
  354. data/rbi/lib/orb/resources/credit_notes.rbi +9 -15
  355. data/rbi/lib/orb/resources/customers/balance_transactions.rbi +26 -31
  356. data/rbi/lib/orb/resources/customers/costs.rbi +241 -246
  357. data/rbi/lib/orb/resources/customers/credits/ledger.rbi +387 -396
  358. data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +29 -40
  359. data/rbi/lib/orb/resources/customers/credits.rbi +15 -20
  360. data/rbi/lib/orb/resources/customers.rbi +407 -417
  361. data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +2 -4
  362. data/rbi/lib/orb/resources/dimensional_price_groups.rbi +13 -19
  363. data/rbi/lib/orb/resources/events/backfills.rbi +61 -69
  364. data/rbi/lib/orb/resources/events/volume.rbi +19 -22
  365. data/rbi/lib/orb/resources/events.rbi +311 -319
  366. data/rbi/lib/orb/resources/invoice_line_items.rbi +4 -7
  367. data/rbi/lib/orb/resources/invoices.rbi +62 -76
  368. data/rbi/lib/orb/resources/items.rbi +7 -14
  369. data/rbi/lib/orb/resources/metrics.rbi +17 -25
  370. data/rbi/lib/orb/resources/plans/external_plan_id.rbi +21 -25
  371. data/rbi/lib/orb/resources/plans.rbi +63 -71
  372. data/rbi/lib/orb/resources/prices/external_price_id.rbi +9 -13
  373. data/rbi/lib/orb/resources/prices.rbi +77 -87
  374. data/rbi/lib/orb/resources/subscription_changes.rbi +61 -0
  375. data/rbi/lib/orb/resources/subscriptions.rbi +933 -963
  376. data/rbi/lib/orb/resources/top_level.rbi +6 -8
  377. data/rbi/lib/orb/version.rbi +1 -1
  378. data/sig/orb/client.rbs +2 -0
  379. data/sig/orb/internal/type/array_of.rbs +2 -2
  380. data/sig/orb/internal/type/{boolean_model.rbs → boolean.rbs} +1 -1
  381. data/sig/orb/internal/util.rbs +5 -5
  382. data/sig/orb/models/subscription.rbs +14 -0
  383. data/sig/orb/models/subscription_cancel_response.rbs +47 -2
  384. data/sig/orb/models/subscription_change_apply_params.rbs +24 -0
  385. data/sig/orb/models/subscription_change_apply_response.rbs +784 -0
  386. data/sig/orb/models/subscription_change_cancel_params.rbs +15 -0
  387. data/sig/orb/models/subscription_change_cancel_response.rbs +784 -0
  388. data/sig/orb/models/subscription_change_retrieve_params.rbs +15 -0
  389. data/sig/orb/models/subscription_change_retrieve_response.rbs +784 -0
  390. data/sig/orb/models/subscription_create_response.rbs +47 -2
  391. data/sig/orb/models/subscription_price_intervals_response.rbs +47 -2
  392. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +47 -2
  393. data/sig/orb/models/subscription_trigger_phase_response.rbs +47 -2
  394. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +47 -2
  395. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +47 -2
  396. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +47 -2
  397. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +47 -2
  398. data/sig/orb/models/subscription_update_trial_response.rbs +47 -2
  399. data/sig/orb/resources/customers.rbs +2 -2
  400. data/sig/orb/resources/subscription_changes.rbs +24 -0
  401. data/sig/orb/version.rbs +1 -1
  402. metadata +26 -5
@@ -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::SubscriptionCreateResponse::AdjustmentInterval>]
24
24
  required :adjustment_intervals,
@@ -26,11 +26,11 @@ 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
- required :auto_collection, Orb::Internal::Type::BooleanModel, nil?: true
33
+ required :auto_collection, Orb::Internal::Type::Boolean, nil?: true
34
34
 
35
35
  # @!attribute billing_cycle_anchor_configuration
36
36
  #
@@ -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::SubscriptionCreateResponse::PendingSubscriptionChange, nil]
161
+ required :pending_subscription_change,
162
+ -> { Orb::Models::SubscriptionCreateResponse::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 }
@@ -191,6 +199,14 @@ module Orb
191
199
  # @return [Orb::Models::SubscriptionCreateResponse::TrialInfo]
192
200
  required :trial_info, -> { Orb::Models::SubscriptionCreateResponse::TrialInfo }
193
201
 
202
+ # @!attribute changed_resources
203
+ # The resources that were changed as part of this operation. Only present when
204
+ # fetched through the subscription changes API or if the
205
+ # `include_changed_resources` parameter was passed in the request.
206
+ #
207
+ # @return [Orb::Models::SubscriptionCreateResponse::ChangedResources, nil]
208
+ optional :changed_resources, -> { Orb::Models::SubscriptionCreateResponse::ChangedResources }, nil?: true
209
+
194
210
  # @!parse
195
211
  # # @param id [String]
196
212
  # # @param active_plan_phase_order [Integer, nil]
@@ -211,12 +227,14 @@ module Orb
211
227
  # # @param metadata [Hash{Symbol=>String}]
212
228
  # # @param minimum_intervals [Array<Orb::Models::SubscriptionCreateResponse::MinimumInterval>]
213
229
  # # @param net_terms [Integer]
230
+ # # @param pending_subscription_change [Orb::Models::SubscriptionCreateResponse::PendingSubscriptionChange, nil]
214
231
  # # @param plan [Orb::Models::Plan]
215
232
  # # @param price_intervals [Array<Orb::Models::SubscriptionCreateResponse::PriceInterval>]
216
233
  # # @param redeemed_coupon [Orb::Models::SubscriptionCreateResponse::RedeemedCoupon, nil]
217
234
  # # @param start_date [Time]
218
235
  # # @param status [Symbol, Orb::Models::SubscriptionCreateResponse::Status]
219
236
  # # @param trial_info [Orb::Models::SubscriptionCreateResponse::TrialInfo]
237
+ # # @param changed_resources [Orb::Models::SubscriptionCreateResponse::ChangedResources, nil]
220
238
  # #
221
239
  # def initialize(
222
240
  # id:,
@@ -238,12 +256,14 @@ module Orb
238
256
  # metadata:,
239
257
  # minimum_intervals:,
240
258
  # net_terms:,
259
+ # pending_subscription_change:,
241
260
  # plan:,
242
261
  # price_intervals:,
243
262
  # redeemed_coupon:,
244
263
  # start_date:,
245
264
  # status:,
246
265
  # trial_info:,
266
+ # changed_resources: nil,
247
267
  # **
248
268
  # )
249
269
  # super
@@ -332,10 +352,10 @@ module Orb
332
352
 
333
353
  # @!attribute is_invoice_level
334
354
  # True for adjustments that apply to an entire invocice, false for adjustments
335
- # that apply to only one price.
355
+ # that apply to only one price.
336
356
  #
337
357
  # @return [Boolean]
338
- required :is_invoice_level, Orb::Internal::Type::BooleanModel
358
+ required :is_invoice_level, Orb::Internal::Type::Boolean
339
359
 
340
360
  # @!attribute plan_phase_order
341
361
  # The plan phase in which this adjustment is active.
@@ -351,7 +371,7 @@ module Orb
351
371
 
352
372
  # @!attribute usage_discount
353
373
  # The number of usage units by which to discount the price this adjustment applies
354
- # to in a given billing period.
374
+ # to in a given billing period.
355
375
  #
356
376
  # @return [Float]
357
377
  required :usage_discount, Float
@@ -394,7 +414,7 @@ module Orb
394
414
 
395
415
  # @!attribute amount_discount
396
416
  # The amount by which to discount the prices this adjustment applies to in a given
397
- # billing period.
417
+ # billing period.
398
418
  #
399
419
  # @return [String]
400
420
  required :amount_discount, String
@@ -407,10 +427,10 @@ module Orb
407
427
 
408
428
  # @!attribute is_invoice_level
409
429
  # True for adjustments that apply to an entire invocice, false for adjustments
410
- # that apply to only one price.
430
+ # that apply to only one price.
411
431
  #
412
432
  # @return [Boolean]
413
- required :is_invoice_level, Orb::Internal::Type::BooleanModel
433
+ required :is_invoice_level, Orb::Internal::Type::Boolean
414
434
 
415
435
  # @!attribute plan_phase_order
416
436
  # The plan phase in which this adjustment is active.
@@ -468,14 +488,14 @@ module Orb
468
488
 
469
489
  # @!attribute is_invoice_level
470
490
  # True for adjustments that apply to an entire invocice, false for adjustments
471
- # that apply to only one price.
491
+ # that apply to only one price.
472
492
  #
473
493
  # @return [Boolean]
474
- required :is_invoice_level, Orb::Internal::Type::BooleanModel
494
+ required :is_invoice_level, Orb::Internal::Type::Boolean
475
495
 
476
496
  # @!attribute percentage_discount
477
497
  # The percentage (as a value between 0 and 1) by which to discount the price
478
- # intervals this adjustment applies to in a given billing period.
498
+ # intervals this adjustment applies to in a given billing period.
479
499
  #
480
500
  # @return [Float]
481
501
  required :percentage_discount, Float
@@ -536,10 +556,10 @@ module Orb
536
556
 
537
557
  # @!attribute is_invoice_level
538
558
  # True for adjustments that apply to an entire invocice, false for adjustments
539
- # that apply to only one price.
559
+ # that apply to only one price.
540
560
  #
541
561
  # @return [Boolean]
542
- required :is_invoice_level, Orb::Internal::Type::BooleanModel
562
+ required :is_invoice_level, Orb::Internal::Type::Boolean
543
563
 
544
564
  # @!attribute item_id
545
565
  # The item ID that revenue from this minimum will be attributed to.
@@ -549,7 +569,7 @@ module Orb
549
569
 
550
570
  # @!attribute minimum_amount
551
571
  # The minimum amount to charge in a given billing period for the prices this
552
- # adjustment applies to.
572
+ # adjustment applies to.
553
573
  #
554
574
  # @return [String]
555
575
  required :minimum_amount, String
@@ -612,14 +632,14 @@ module Orb
612
632
 
613
633
  # @!attribute is_invoice_level
614
634
  # True for adjustments that apply to an entire invocice, false for adjustments
615
- # that apply to only one price.
635
+ # that apply to only one price.
616
636
  #
617
637
  # @return [Boolean]
618
- required :is_invoice_level, Orb::Internal::Type::BooleanModel
638
+ required :is_invoice_level, Orb::Internal::Type::Boolean
619
639
 
620
640
  # @!attribute maximum_amount
621
641
  # The maximum amount to charge in a given billing period for the prices this
622
- # adjustment applies to.
642
+ # adjustment applies to.
623
643
  #
624
644
  # @return [String]
625
645
  required :maximum_amount, String
@@ -671,24 +691,24 @@ module Orb
671
691
  class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
672
692
  # @!attribute day
673
693
  # The day of the month on which the billing cycle is anchored. If the maximum
674
- # number of days in a month is greater than this value, the last day of the month
675
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
676
- # period begins on the 30th.
694
+ # number of days in a month is greater than this value, the last day of the month
695
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
696
+ # period begins on the 30th.
677
697
  #
678
698
  # @return [Integer]
679
699
  required :day, Integer
680
700
 
681
701
  # @!attribute month
682
702
  # The month on which the billing cycle is anchored (e.g. a quarterly price
683
- # anchored in February would have cycles starting February, May, August, and
684
- # November).
703
+ # anchored in February would have cycles starting February, May, August, and
704
+ # November).
685
705
  #
686
706
  # @return [Integer, nil]
687
707
  optional :month, Integer, nil?: true
688
708
 
689
709
  # @!attribute year
690
710
  # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
691
- # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
711
+ # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
692
712
  #
693
713
  # @return [Integer, nil]
694
714
  optional :year, Integer, nil?: true
@@ -800,7 +820,7 @@ module Orb
800
820
 
801
821
  # @!attribute percentage_discount
802
822
  # Only available if discount_type is `percentage`.This is a number between 0
803
- # and 1.
823
+ # and 1.
804
824
  #
805
825
  # @return [Float]
806
826
  required :percentage_discount, Float
@@ -866,7 +886,7 @@ module Orb
866
886
 
867
887
  # @!attribute usage_discount
868
888
  # Only available if discount_type is `usage`. Number of usage units that this
869
- # discount is for
889
+ # discount is for
870
890
  #
871
891
  # @return [Float]
872
892
  required :usage_discount, Float
@@ -952,7 +972,7 @@ module Orb
952
972
 
953
973
  # @!attribute maximum_amount
954
974
  # The maximum amount to charge in a given billing period for the price intervals
955
- # this transform applies to.
975
+ # this transform applies to.
956
976
  #
957
977
  # @return [String]
958
978
  required :maximum_amount, String
@@ -996,7 +1016,7 @@ module Orb
996
1016
 
997
1017
  # @!attribute minimum_amount
998
1018
  # The minimum amount to charge in a given billing period for the price intervals
999
- # this minimum applies to.
1019
+ # this minimum applies to.
1000
1020
  #
1001
1021
  # @return [String]
1002
1022
  required :minimum_amount, String
@@ -1019,6 +1039,23 @@ module Orb
1019
1039
  # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
1020
1040
  end
1021
1041
 
1042
+ # @see Orb::Models::SubscriptionCreateResponse#pending_subscription_change
1043
+ class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1044
+ # @!attribute id
1045
+ #
1046
+ # @return [String]
1047
+ required :id, String
1048
+
1049
+ # @!parse
1050
+ # # A pending subscription change if one exists on this subscription.
1051
+ # #
1052
+ # # @param id [String]
1053
+ # #
1054
+ # def initialize(id:, **) = super
1055
+
1056
+ # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
1057
+ end
1058
+
1022
1059
  class PriceInterval < Orb::Internal::Type::BaseModel
1023
1060
  # @!attribute id
1024
1061
  #
@@ -1033,23 +1070,23 @@ module Orb
1033
1070
 
1034
1071
  # @!attribute current_billing_period_end_date
1035
1072
  # The end of the current billing period. This is an exclusive timestamp, such that
1036
- # the instant returned is exactly the end of the billing period. Set to null if
1037
- # this price interval is not currently active.
1073
+ # the instant returned is exactly the end of the billing period. Set to null if
1074
+ # this price interval is not currently active.
1038
1075
  #
1039
1076
  # @return [Time, nil]
1040
1077
  required :current_billing_period_end_date, Time, nil?: true
1041
1078
 
1042
1079
  # @!attribute current_billing_period_start_date
1043
1080
  # The start date of the current billing period. This is an inclusive timestamp;
1044
- # the instant returned is exactly the beginning of the billing period. Set to null
1045
- # if this price interval is not currently active.
1081
+ # the instant returned is exactly the beginning of the billing period. Set to null
1082
+ # if this price interval is not currently active.
1046
1083
  #
1047
1084
  # @return [Time, nil]
1048
1085
  required :current_billing_period_start_date, Time, nil?: true
1049
1086
 
1050
1087
  # @!attribute end_date
1051
1088
  # The end date of the price interval. This is the date that Orb stops billing for
1052
- # this price.
1089
+ # this price.
1053
1090
  #
1054
1091
  # @return [Time, nil]
1055
1092
  required :end_date, Time, nil?: true
@@ -1062,7 +1099,7 @@ module Orb
1062
1099
 
1063
1100
  # @!attribute fixed_fee_quantity_transitions
1064
1101
  # The fixed fee quantity transitions for this price interval. This is only
1065
- # relevant for fixed fees.
1102
+ # relevant for fixed fees.
1066
1103
  #
1067
1104
  # @return [Array<Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition>, nil]
1068
1105
  required :fixed_fee_quantity_transitions,
@@ -1071,37 +1108,37 @@ module Orb
1071
1108
 
1072
1109
  # @!attribute price
1073
1110
  # The Price resource represents a price that can be billed on a subscription,
1074
- # resulting in a charge on an invoice in the form of an invoice line item. Prices
1075
- # take a quantity and determine an amount to bill.
1111
+ # resulting in a charge on an invoice in the form of an invoice line item. Prices
1112
+ # take a quantity and determine an amount to bill.
1076
1113
  #
1077
- # Orb supports a few different pricing models out of the box. Each of these models
1078
- # is serialized differently in a given Price object. The model_type field
1079
- # determines the key for the configuration object that is present.
1114
+ # Orb supports a few different pricing models out of the box. Each of these models
1115
+ # is serialized differently in a given Price object. The model_type field
1116
+ # determines the key for the configuration object that is present.
1080
1117
  #
1081
- # For more on the types of prices, see
1082
- # [the core concepts documentation](/core-concepts#plan-and-price)
1118
+ # For more on the types of prices, see
1119
+ # [the core concepts documentation](/core-concepts#plan-and-price)
1083
1120
  #
1084
1121
  # @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]
1085
1122
  required :price, union: -> { Orb::Models::Price }
1086
1123
 
1087
1124
  # @!attribute start_date
1088
1125
  # The start date of the price interval. This is the date that Orb starts billing
1089
- # for this price.
1126
+ # for this price.
1090
1127
  #
1091
1128
  # @return [Time]
1092
1129
  required :start_date, Time
1093
1130
 
1094
1131
  # @!attribute usage_customer_ids
1095
1132
  # A list of customer IDs whose usage events will be aggregated and billed under
1096
- # this price interval.
1133
+ # this price interval.
1097
1134
  #
1098
1135
  # @return [Array<String>, nil]
1099
1136
  required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
1100
1137
 
1101
1138
  # @!parse
1102
1139
  # # The Price Interval resource represents a period of time for which a price will
1103
- # # bill on a subscription. A subscription’s price intervals define its billing
1104
- # # behavior.
1140
+ # # bill on a subscription. A subscription’s price intervals define its billing
1141
+ # # behavior.
1105
1142
  # #
1106
1143
  # # @param id [String]
1107
1144
  # # @param billing_cycle_day [Integer]
@@ -1215,6 +1252,47 @@ module Orb
1215
1252
 
1216
1253
  # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
1217
1254
  end
1255
+
1256
+ # @see Orb::Models::SubscriptionCreateResponse#changed_resources
1257
+ class ChangedResources < Orb::Internal::Type::BaseModel
1258
+ # @!attribute created_credit_notes
1259
+ # The credit notes that were created as part of this operation.
1260
+ #
1261
+ # @return [Array<Orb::Models::CreditNote>]
1262
+ required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
1263
+
1264
+ # @!attribute created_invoices
1265
+ # The invoices that were created as part of this operation.
1266
+ #
1267
+ # @return [Array<Orb::Models::Invoice>]
1268
+ required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
1269
+
1270
+ # @!attribute voided_credit_notes
1271
+ # The credit notes that were voided as part of this operation.
1272
+ #
1273
+ # @return [Array<Orb::Models::CreditNote>]
1274
+ required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
1275
+
1276
+ # @!attribute voided_invoices
1277
+ # The invoices that were voided as part of this operation.
1278
+ #
1279
+ # @return [Array<Orb::Models::Invoice>]
1280
+ required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
1281
+
1282
+ # @!parse
1283
+ # # The resources that were changed as part of this operation. Only present when
1284
+ # # fetched through the subscription changes API or if the
1285
+ # # `include_changed_resources` parameter was passed in the request.
1286
+ # #
1287
+ # # @param created_credit_notes [Array<Orb::Models::CreditNote>]
1288
+ # # @param created_invoices [Array<Orb::Models::Invoice>]
1289
+ # # @param voided_credit_notes [Array<Orb::Models::CreditNote>]
1290
+ # # @param voided_invoices [Array<Orb::Models::Invoice>]
1291
+ # #
1292
+ # def initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:, **) = super
1293
+
1294
+ # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
1295
+ end
1218
1296
  end
1219
1297
  end
1220
1298
  end
@@ -28,9 +28,9 @@ module Orb
28
28
 
29
29
  # @!attribute view_mode
30
30
  # Controls whether Orb returns cumulative costs since the start of the billing
31
- # period, or incremental day-by-day costs. If your customer has minimums or
32
- # discounts, it's strongly recommended that you use the default cumulative
33
- # behavior.
31
+ # period, or incremental day-by-day costs. If your customer has minimums or
32
+ # discounts, it's strongly recommended that you use the default cumulative
33
+ # behavior.
34
34
  #
35
35
  # @return [Symbol, Orb::Models::SubscriptionFetchCostsParams::ViewMode, nil]
36
36
  optional :view_mode, enum: -> { Orb::Models::SubscriptionFetchCostsParams::ViewMode }, nil?: true
@@ -47,9 +47,9 @@ module Orb
47
47
  # def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
48
48
 
49
49
  # Controls whether Orb returns cumulative costs since the start of the billing
50
- # period, or incremental day-by-day costs. If your customer has minimums or
51
- # discounts, it's strongly recommended that you use the default cumulative
52
- # behavior.
50
+ # period, or incremental day-by-day costs. If your customer has minimums or
51
+ # discounts, it's strongly recommended that you use the default cumulative
52
+ # behavior.
53
53
  module ViewMode
54
54
  extend Orb::Internal::Type::Enum
55
55
 
@@ -10,7 +10,7 @@ module Orb
10
10
 
11
11
  # @!attribute cursor
12
12
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
13
- # from the initial request.
13
+ # from the initial request.
14
14
  #
15
15
  # @return [String, nil]
16
16
  optional :cursor, String, nil?: true
@@ -28,22 +28,22 @@ module Orb
28
28
  # @!attribute start_date_gt
29
29
  #
30
30
  # @return [Time, nil]
31
- optional :start_date_gt, Time, api_name: :"start_date[gt]", nil?: true
31
+ optional :start_date_gt, Time, nil?: true
32
32
 
33
33
  # @!attribute start_date_gte
34
34
  #
35
35
  # @return [Time, nil]
36
- optional :start_date_gte, Time, api_name: :"start_date[gte]", nil?: true
36
+ optional :start_date_gte, Time, nil?: true
37
37
 
38
38
  # @!attribute start_date_lt
39
39
  #
40
40
  # @return [Time, nil]
41
- optional :start_date_lt, Time, api_name: :"start_date[lt]", nil?: true
41
+ optional :start_date_lt, Time, nil?: true
42
42
 
43
43
  # @!attribute start_date_lte
44
44
  #
45
45
  # @return [Time, nil]
46
- optional :start_date_lte, Time, api_name: :"start_date[lte]", nil?: true
46
+ optional :start_date_lte, Time, nil?: true
47
47
 
48
48
  # @!parse
49
49
  # # @param cursor [String, nil]
@@ -43,8 +43,8 @@ module Orb
43
43
 
44
44
  # @!attribute external_plan_id
45
45
  # An optional user-defined ID for this plan resource, used throughout the system
46
- # as an alias for this Plan. Use this field to identify a plan by an existing
47
- # identifier in your system.
46
+ # as an alias for this Plan. Use this field to identify a plan by an existing
47
+ # identifier in your system.
48
48
  #
49
49
  # @return [String, nil]
50
50
  required :external_plan_id, String, nil?: true
@@ -10,8 +10,8 @@ module Orb
10
10
 
11
11
  # @!attribute billable_metric_id
12
12
  # When specified in conjunction with `group_by`, this parameter filters usage to a
13
- # single billable metric. Note that both `group_by` and `billable_metric_id` must
14
- # be specified together.
13
+ # single billable metric. Note that both `group_by` and `billable_metric_id` must
14
+ # be specified together.
15
15
  #
16
16
  # @return [String, nil]
17
17
  optional :billable_metric_id, String, nil?: true
@@ -62,9 +62,9 @@ module Orb
62
62
 
63
63
  # @!attribute view_mode
64
64
  # Controls whether Orb returns cumulative usage since the start of the billing
65
- # period, or incremental day-by-day usage. If your customer has minimums or
66
- # discounts, it's strongly recommended that you use the default cumulative
67
- # behavior.
65
+ # period, or incremental day-by-day usage. If your customer has minimums or
66
+ # discounts, it's strongly recommended that you use the default cumulative
67
+ # behavior.
68
68
  #
69
69
  # @return [Symbol, Orb::Models::SubscriptionFetchUsageParams::ViewMode, nil]
70
70
  optional :view_mode, enum: -> { Orb::Models::SubscriptionFetchUsageParams::ViewMode }, nil?: true
@@ -115,9 +115,9 @@ module Orb
115
115
  end
116
116
 
117
117
  # Controls whether Orb returns cumulative usage since the start of the billing
118
- # period, or incremental day-by-day usage. If your customer has minimums or
119
- # discounts, it's strongly recommended that you use the default cumulative
120
- # behavior.
118
+ # period, or incremental day-by-day usage. If your customer has minimums or
119
+ # discounts, it's strongly recommended that you use the default cumulative
120
+ # behavior.
121
121
  module ViewMode
122
122
  extend Orb::Internal::Type::Enum
123
123
 
@@ -11,26 +11,26 @@ module Orb
11
11
  # @!attribute created_at_gt
12
12
  #
13
13
  # @return [Time, nil]
14
- optional :created_at_gt, Time, api_name: :"created_at[gt]", nil?: true
14
+ optional :created_at_gt, Time, nil?: true
15
15
 
16
16
  # @!attribute created_at_gte
17
17
  #
18
18
  # @return [Time, nil]
19
- optional :created_at_gte, Time, api_name: :"created_at[gte]", nil?: true
19
+ optional :created_at_gte, Time, nil?: true
20
20
 
21
21
  # @!attribute created_at_lt
22
22
  #
23
23
  # @return [Time, nil]
24
- optional :created_at_lt, Time, api_name: :"created_at[lt]", nil?: true
24
+ optional :created_at_lt, Time, nil?: true
25
25
 
26
26
  # @!attribute created_at_lte
27
27
  #
28
28
  # @return [Time, nil]
29
- optional :created_at_lte, Time, api_name: :"created_at[lte]", nil?: true
29
+ optional :created_at_lte, Time, nil?: true
30
30
 
31
31
  # @!attribute cursor
32
32
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
33
- # from the initial request.
33
+ # from the initial request.
34
34
  #
35
35
  # @return [String, nil]
36
36
  optional :cursor, String, nil?: true