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
@@ -0,0 +1,1581 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class SubscriptionChangeRetrieveResponse < Orb::Internal::Type::BaseModel
6
+ sig { returns(String) }
7
+ attr_accessor :id
8
+
9
+ # Subscription change will be cancelled at this time and can no longer be applied.
10
+ sig { returns(Time) }
11
+ attr_accessor :expiration_time
12
+
13
+ sig { returns(Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol) }
14
+ attr_accessor :status
15
+
16
+ sig { returns(T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription)) }
17
+ attr_reader :subscription
18
+
19
+ sig do
20
+ params(
21
+ subscription: T.nilable(T.any(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription, Orb::Internal::AnyHash))
22
+ )
23
+ .void
24
+ end
25
+ attr_writer :subscription
26
+
27
+ # When this change was applied.
28
+ sig { returns(T.nilable(Time)) }
29
+ attr_accessor :applied_at
30
+
31
+ # When this change was cancelled.
32
+ sig { returns(T.nilable(Time)) }
33
+ attr_accessor :cancelled_at
34
+
35
+ # A subscription change represents a desired new subscription / pending change to
36
+ # an existing subscription. It is a way to first preview the effects on the
37
+ # subscription as well as any changes/creation of invoices (see
38
+ # `subscription.changed_resources`).
39
+ sig do
40
+ params(
41
+ id: String,
42
+ expiration_time: Time,
43
+ status: Orb::Models::SubscriptionChangeRetrieveResponse::Status::OrSymbol,
44
+ subscription: T.nilable(T.any(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription, Orb::Internal::AnyHash)),
45
+ applied_at: T.nilable(Time),
46
+ cancelled_at: T.nilable(Time)
47
+ )
48
+ .returns(T.attached_class)
49
+ end
50
+ def self.new(id:, expiration_time:, status:, subscription:, applied_at: nil, cancelled_at: nil); end
51
+
52
+ sig do
53
+ override
54
+ .returns(
55
+ {
56
+ id: String,
57
+ expiration_time: Time,
58
+ status: Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol,
59
+ subscription: T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription),
60
+ applied_at: T.nilable(Time),
61
+ cancelled_at: T.nilable(Time)
62
+ }
63
+ )
64
+ end
65
+ def to_hash; end
66
+
67
+ module Status
68
+ extend Orb::Internal::Type::Enum
69
+
70
+ TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Status) }
71
+ OrSymbol =
72
+ T.type_alias { T.any(Symbol, String, Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol) }
73
+
74
+ PENDING = T.let(:pending, Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol)
75
+ APPLIED = T.let(:applied, Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol)
76
+ CANCELLED = T.let(:cancelled, Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol)
77
+
78
+ sig { override.returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Status::TaggedSymbol]) }
79
+ def self.values; end
80
+ end
81
+
82
+ class Subscription < Orb::Internal::Type::BaseModel
83
+ sig { returns(String) }
84
+ attr_accessor :id
85
+
86
+ # The current plan phase that is active, only if the subscription's plan has
87
+ # phases.
88
+ sig { returns(T.nilable(Integer)) }
89
+ attr_accessor :active_plan_phase_order
90
+
91
+ # The adjustment intervals for this subscription sorted by the start_date of the
92
+ # adjustment interval.
93
+ sig { returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval]) }
94
+ attr_accessor :adjustment_intervals
95
+
96
+ # Determines whether issued invoices for this subscription will automatically be
97
+ # charged with the saved payment method on the due date. This property defaults to
98
+ # the plan's behavior. If null, defaults to the customer's setting.
99
+ sig { returns(T.nilable(T::Boolean)) }
100
+ attr_accessor :auto_collection
101
+
102
+ sig { returns(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::BillingCycleAnchorConfiguration) }
103
+ attr_reader :billing_cycle_anchor_configuration
104
+
105
+ sig do
106
+ params(
107
+ billing_cycle_anchor_configuration: T.any(
108
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::BillingCycleAnchorConfiguration,
109
+ Orb::Internal::AnyHash
110
+ )
111
+ )
112
+ .void
113
+ end
114
+ attr_writer :billing_cycle_anchor_configuration
115
+
116
+ # The day of the month on which the billing cycle is anchored. If the maximum
117
+ # number of days in a month is greater than this value, the last day of the month
118
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
119
+ # period begins on the 30th.
120
+ sig { returns(Integer) }
121
+ attr_accessor :billing_cycle_day
122
+
123
+ sig { returns(Time) }
124
+ attr_accessor :created_at
125
+
126
+ # The end of the current billing period. This is an exclusive timestamp, such that
127
+ # the instant returned is not part of the billing period. Set to null for
128
+ # subscriptions that are not currently active.
129
+ sig { returns(T.nilable(Time)) }
130
+ attr_accessor :current_billing_period_end_date
131
+
132
+ # The start date of the current billing period. This is an inclusive timestamp;
133
+ # the instant returned is exactly the beginning of the billing period. Set to null
134
+ # if the subscription is not currently active.
135
+ sig { returns(T.nilable(Time)) }
136
+ attr_accessor :current_billing_period_start_date
137
+
138
+ # A customer is a buyer of your products, and the other party to the billing
139
+ # relationship.
140
+ #
141
+ # In Orb, customers are assigned system generated identifiers automatically, but
142
+ # it's often desirable to have these match existing identifiers in your system. To
143
+ # avoid having to denormalize Orb ID information, you can pass in an
144
+ # `external_customer_id` with your own identifier. See
145
+ # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
146
+ # information about how these aliases work in Orb.
147
+ #
148
+ # In addition to having an identifier in your system, a customer may exist in a
149
+ # payment provider solution like Stripe. Use the `payment_provider_id` and the
150
+ # `payment_provider` enum field to express this mapping.
151
+ #
152
+ # A customer also has a timezone (from the standard
153
+ # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
154
+ # your account's timezone. See [Timezone localization](/essentials/timezones) for
155
+ # information on what this timezone parameter influences within Orb.
156
+ sig { returns(Orb::Models::Customer) }
157
+ attr_reader :customer
158
+
159
+ sig { params(customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash)).void }
160
+ attr_writer :customer
161
+
162
+ # Determines the default memo on this subscriptions' invoices. Note that if this
163
+ # is not provided, it is determined by the plan configuration.
164
+ sig { returns(T.nilable(String)) }
165
+ attr_accessor :default_invoice_memo
166
+
167
+ # The discount intervals for this subscription sorted by the start_date.
168
+ sig do
169
+ returns(
170
+ T::Array[
171
+ T.any(
172
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::AmountDiscountInterval,
173
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::PercentageDiscountInterval,
174
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::UsageDiscountInterval
175
+ )
176
+ ]
177
+ )
178
+ end
179
+ attr_accessor :discount_intervals
180
+
181
+ # The date Orb stops billing for this subscription.
182
+ sig { returns(T.nilable(Time)) }
183
+ attr_accessor :end_date
184
+
185
+ sig { returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::FixedFeeQuantitySchedule]) }
186
+ attr_accessor :fixed_fee_quantity_schedule
187
+
188
+ sig { returns(T.nilable(String)) }
189
+ attr_accessor :invoicing_threshold
190
+
191
+ # The maximum intervals for this subscription sorted by the start_date.
192
+ sig { returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval]) }
193
+ attr_accessor :maximum_intervals
194
+
195
+ # User specified key-value pairs for the resource. If not present, this defaults
196
+ # to an empty dictionary. Individual keys can be removed by setting the value to
197
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
198
+ # `null`.
199
+ sig { returns(T::Hash[Symbol, String]) }
200
+ attr_accessor :metadata
201
+
202
+ # The minimum intervals for this subscription sorted by the start_date.
203
+ sig { returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval]) }
204
+ attr_accessor :minimum_intervals
205
+
206
+ # Determines the difference between the invoice issue date for subscription
207
+ # invoices as the date that they are due. A value of `0` here represents that the
208
+ # invoice is due on issue, whereas a value of `30` represents that the customer
209
+ # has a month to pay the invoice.
210
+ sig { returns(Integer) }
211
+ attr_accessor :net_terms
212
+
213
+ # A pending subscription change if one exists on this subscription.
214
+ sig do
215
+ returns(
216
+ T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange)
217
+ )
218
+ end
219
+ attr_reader :pending_subscription_change
220
+
221
+ sig do
222
+ params(
223
+ pending_subscription_change: T.nilable(
224
+ T.any(
225
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange,
226
+ Orb::Internal::AnyHash
227
+ )
228
+ )
229
+ )
230
+ .void
231
+ end
232
+ attr_writer :pending_subscription_change
233
+
234
+ # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
235
+ # subscribed to by a customer. Plans define the billing behavior of the
236
+ # subscription. You can see more about how to configure prices in the
237
+ # [Price resource](/reference/price).
238
+ sig { returns(Orb::Models::Plan) }
239
+ attr_reader :plan
240
+
241
+ sig { params(plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash)).void }
242
+ attr_writer :plan
243
+
244
+ # The price intervals for this subscription.
245
+ sig { returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval]) }
246
+ attr_accessor :price_intervals
247
+
248
+ sig { returns(T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::RedeemedCoupon)) }
249
+ attr_reader :redeemed_coupon
250
+
251
+ sig do
252
+ params(
253
+ redeemed_coupon: T.nilable(
254
+ T.any(
255
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::RedeemedCoupon,
256
+ Orb::Internal::AnyHash
257
+ )
258
+ )
259
+ )
260
+ .void
261
+ end
262
+ attr_writer :redeemed_coupon
263
+
264
+ # The date Orb starts billing for this subscription.
265
+ sig { returns(Time) }
266
+ attr_accessor :start_date
267
+
268
+ sig { returns(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol) }
269
+ attr_accessor :status
270
+
271
+ sig { returns(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::TrialInfo) }
272
+ attr_reader :trial_info
273
+
274
+ sig do
275
+ params(
276
+ trial_info: T.any(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::TrialInfo, Orb::Internal::AnyHash)
277
+ )
278
+ .void
279
+ end
280
+ attr_writer :trial_info
281
+
282
+ # The resources that were changed as part of this operation. Only present when
283
+ # fetched through the subscription changes API or if the
284
+ # `include_changed_resources` parameter was passed in the request.
285
+ sig { returns(T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::ChangedResources)) }
286
+ attr_reader :changed_resources
287
+
288
+ sig do
289
+ params(
290
+ changed_resources: T.nilable(
291
+ T.any(
292
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::ChangedResources,
293
+ Orb::Internal::AnyHash
294
+ )
295
+ )
296
+ )
297
+ .void
298
+ end
299
+ attr_writer :changed_resources
300
+
301
+ sig do
302
+ params(
303
+ id: String,
304
+ active_plan_phase_order: T.nilable(Integer),
305
+ adjustment_intervals: T::Array[
306
+ T.any(
307
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval,
308
+ Orb::Internal::AnyHash
309
+ )
310
+ ],
311
+ auto_collection: T.nilable(T::Boolean),
312
+ billing_cycle_anchor_configuration: T.any(
313
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::BillingCycleAnchorConfiguration,
314
+ Orb::Internal::AnyHash
315
+ ),
316
+ billing_cycle_day: Integer,
317
+ created_at: Time,
318
+ current_billing_period_end_date: T.nilable(Time),
319
+ current_billing_period_start_date: T.nilable(Time),
320
+ customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
321
+ default_invoice_memo: T.nilable(String),
322
+ discount_intervals: T::Array[
323
+ T.any(
324
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::AmountDiscountInterval,
325
+ Orb::Internal::AnyHash,
326
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::PercentageDiscountInterval,
327
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::UsageDiscountInterval
328
+ )
329
+ ],
330
+ end_date: T.nilable(Time),
331
+ fixed_fee_quantity_schedule: T::Array[
332
+ T.any(
333
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::FixedFeeQuantitySchedule,
334
+ Orb::Internal::AnyHash
335
+ )
336
+ ],
337
+ invoicing_threshold: T.nilable(String),
338
+ maximum_intervals: T::Array[
339
+ T.any(
340
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval,
341
+ Orb::Internal::AnyHash
342
+ )
343
+ ],
344
+ metadata: T::Hash[Symbol, String],
345
+ minimum_intervals: T::Array[
346
+ T.any(
347
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval,
348
+ Orb::Internal::AnyHash
349
+ )
350
+ ],
351
+ net_terms: Integer,
352
+ pending_subscription_change: T.nilable(
353
+ T.any(
354
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange,
355
+ Orb::Internal::AnyHash
356
+ )
357
+ ),
358
+ plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash),
359
+ price_intervals: T::Array[
360
+ T.any(
361
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval,
362
+ Orb::Internal::AnyHash
363
+ )
364
+ ],
365
+ redeemed_coupon: T.nilable(
366
+ T.any(
367
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::RedeemedCoupon,
368
+ Orb::Internal::AnyHash
369
+ )
370
+ ),
371
+ start_date: Time,
372
+ status: Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::OrSymbol,
373
+ trial_info: T.any(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::TrialInfo, Orb::Internal::AnyHash),
374
+ changed_resources: T.nilable(
375
+ T.any(
376
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::ChangedResources,
377
+ Orb::Internal::AnyHash
378
+ )
379
+ )
380
+ )
381
+ .returns(T.attached_class)
382
+ end
383
+ def self.new(
384
+ id:,
385
+ active_plan_phase_order:,
386
+ adjustment_intervals:,
387
+ auto_collection:,
388
+ billing_cycle_anchor_configuration:,
389
+ billing_cycle_day:,
390
+ created_at:,
391
+ current_billing_period_end_date:,
392
+ current_billing_period_start_date:,
393
+ customer:,
394
+ default_invoice_memo:,
395
+ discount_intervals:,
396
+ end_date:,
397
+ fixed_fee_quantity_schedule:,
398
+ invoicing_threshold:,
399
+ maximum_intervals:,
400
+ metadata:,
401
+ minimum_intervals:,
402
+ net_terms:,
403
+ pending_subscription_change:,
404
+ plan:,
405
+ price_intervals:,
406
+ redeemed_coupon:,
407
+ start_date:,
408
+ status:,
409
+ trial_info:,
410
+ changed_resources: nil
411
+ ); end
412
+ sig do
413
+ override
414
+ .returns(
415
+ {
416
+ id: String,
417
+ active_plan_phase_order: T.nilable(Integer),
418
+ adjustment_intervals: T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval],
419
+ auto_collection: T.nilable(T::Boolean),
420
+ billing_cycle_anchor_configuration: Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::BillingCycleAnchorConfiguration,
421
+ billing_cycle_day: Integer,
422
+ created_at: Time,
423
+ current_billing_period_end_date: T.nilable(Time),
424
+ current_billing_period_start_date: T.nilable(Time),
425
+ customer: Orb::Models::Customer,
426
+ default_invoice_memo: T.nilable(String),
427
+ discount_intervals: T::Array[
428
+ T.any(
429
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::AmountDiscountInterval,
430
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::PercentageDiscountInterval,
431
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::UsageDiscountInterval
432
+ )
433
+ ],
434
+ end_date: T.nilable(Time),
435
+ fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::FixedFeeQuantitySchedule],
436
+ invoicing_threshold: T.nilable(String),
437
+ maximum_intervals: T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval],
438
+ metadata: T::Hash[Symbol, String],
439
+ minimum_intervals: T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval],
440
+ net_terms: Integer,
441
+ pending_subscription_change: T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange),
442
+ plan: Orb::Models::Plan,
443
+ price_intervals: T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval],
444
+ redeemed_coupon: T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::RedeemedCoupon),
445
+ start_date: Time,
446
+ status: Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol,
447
+ trial_info: Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::TrialInfo,
448
+ changed_resources: T.nilable(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::ChangedResources)
449
+ }
450
+ )
451
+ end
452
+ def to_hash; end
453
+
454
+ class AdjustmentInterval < Orb::Internal::Type::BaseModel
455
+ sig { returns(String) }
456
+ attr_accessor :id
457
+
458
+ sig do
459
+ returns(
460
+ T.any(
461
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment,
462
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment,
463
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment,
464
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment,
465
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment
466
+ )
467
+ )
468
+ end
469
+ attr_accessor :adjustment
470
+
471
+ # The price interval IDs that this adjustment applies to.
472
+ sig { returns(T::Array[String]) }
473
+ attr_accessor :applies_to_price_interval_ids
474
+
475
+ # The end date of the adjustment interval.
476
+ sig { returns(T.nilable(Time)) }
477
+ attr_accessor :end_date
478
+
479
+ # The start date of the adjustment interval.
480
+ sig { returns(Time) }
481
+ attr_accessor :start_date
482
+
483
+ sig do
484
+ params(
485
+ id: String,
486
+ adjustment: T.any(
487
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment,
488
+ Orb::Internal::AnyHash,
489
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment,
490
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment,
491
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment,
492
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment
493
+ ),
494
+ applies_to_price_interval_ids: T::Array[String],
495
+ end_date: T.nilable(Time),
496
+ start_date: Time
497
+ )
498
+ .returns(T.attached_class)
499
+ end
500
+ def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:); end
501
+
502
+ sig do
503
+ override
504
+ .returns(
505
+ {
506
+ id: String,
507
+ adjustment: T.any(
508
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment,
509
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment,
510
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment,
511
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment,
512
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment
513
+ ),
514
+ applies_to_price_interval_ids: T::Array[String],
515
+ end_date: T.nilable(Time),
516
+ start_date: Time
517
+ }
518
+ )
519
+ end
520
+ def to_hash; end
521
+
522
+ module Adjustment
523
+ extend Orb::Internal::Type::Union
524
+
525
+ class PlanPhaseUsageDiscountAdjustment < Orb::Internal::Type::BaseModel
526
+ sig { returns(String) }
527
+ attr_accessor :id
528
+
529
+ sig { returns(Symbol) }
530
+ attr_accessor :adjustment_type
531
+
532
+ # The price IDs that this adjustment applies to.
533
+ sig { returns(T::Array[String]) }
534
+ attr_accessor :applies_to_price_ids
535
+
536
+ # True for adjustments that apply to an entire invocice, false for adjustments
537
+ # that apply to only one price.
538
+ sig { returns(T::Boolean) }
539
+ attr_accessor :is_invoice_level
540
+
541
+ # The plan phase in which this adjustment is active.
542
+ sig { returns(T.nilable(Integer)) }
543
+ attr_accessor :plan_phase_order
544
+
545
+ # The reason for the adjustment.
546
+ sig { returns(T.nilable(String)) }
547
+ attr_accessor :reason
548
+
549
+ # The number of usage units by which to discount the price this adjustment applies
550
+ # to in a given billing period.
551
+ sig { returns(Float) }
552
+ attr_accessor :usage_discount
553
+
554
+ sig do
555
+ params(
556
+ id: String,
557
+ applies_to_price_ids: T::Array[String],
558
+ is_invoice_level: T::Boolean,
559
+ plan_phase_order: T.nilable(Integer),
560
+ reason: T.nilable(String),
561
+ usage_discount: Float,
562
+ adjustment_type: Symbol
563
+ )
564
+ .returns(T.attached_class)
565
+ end
566
+ def self.new(
567
+ id:,
568
+ applies_to_price_ids:,
569
+ is_invoice_level:,
570
+ plan_phase_order:,
571
+ reason:,
572
+ usage_discount:,
573
+ adjustment_type: :usage_discount
574
+ ); end
575
+ sig do
576
+ override
577
+ .returns(
578
+ {
579
+ id: String,
580
+ adjustment_type: Symbol,
581
+ applies_to_price_ids: T::Array[String],
582
+ is_invoice_level: T::Boolean,
583
+ plan_phase_order: T.nilable(Integer),
584
+ reason: T.nilable(String),
585
+ usage_discount: Float
586
+ }
587
+ )
588
+ end
589
+ def to_hash; end
590
+ end
591
+
592
+ class PlanPhaseAmountDiscountAdjustment < Orb::Internal::Type::BaseModel
593
+ sig { returns(String) }
594
+ attr_accessor :id
595
+
596
+ sig { returns(Symbol) }
597
+ attr_accessor :adjustment_type
598
+
599
+ # The amount by which to discount the prices this adjustment applies to in a given
600
+ # billing period.
601
+ sig { returns(String) }
602
+ attr_accessor :amount_discount
603
+
604
+ # The price IDs that this adjustment applies to.
605
+ sig { returns(T::Array[String]) }
606
+ attr_accessor :applies_to_price_ids
607
+
608
+ # True for adjustments that apply to an entire invocice, false for adjustments
609
+ # that apply to only one price.
610
+ sig { returns(T::Boolean) }
611
+ attr_accessor :is_invoice_level
612
+
613
+ # The plan phase in which this adjustment is active.
614
+ sig { returns(T.nilable(Integer)) }
615
+ attr_accessor :plan_phase_order
616
+
617
+ # The reason for the adjustment.
618
+ sig { returns(T.nilable(String)) }
619
+ attr_accessor :reason
620
+
621
+ sig do
622
+ params(
623
+ id: String,
624
+ amount_discount: String,
625
+ applies_to_price_ids: T::Array[String],
626
+ is_invoice_level: T::Boolean,
627
+ plan_phase_order: T.nilable(Integer),
628
+ reason: T.nilable(String),
629
+ adjustment_type: Symbol
630
+ )
631
+ .returns(T.attached_class)
632
+ end
633
+ def self.new(
634
+ id:,
635
+ amount_discount:,
636
+ applies_to_price_ids:,
637
+ is_invoice_level:,
638
+ plan_phase_order:,
639
+ reason:,
640
+ adjustment_type: :amount_discount
641
+ ); end
642
+ sig do
643
+ override
644
+ .returns(
645
+ {
646
+ id: String,
647
+ adjustment_type: Symbol,
648
+ amount_discount: String,
649
+ applies_to_price_ids: T::Array[String],
650
+ is_invoice_level: T::Boolean,
651
+ plan_phase_order: T.nilable(Integer),
652
+ reason: T.nilable(String)
653
+ }
654
+ )
655
+ end
656
+ def to_hash; end
657
+ end
658
+
659
+ class PlanPhasePercentageDiscountAdjustment < Orb::Internal::Type::BaseModel
660
+ sig { returns(String) }
661
+ attr_accessor :id
662
+
663
+ sig { returns(Symbol) }
664
+ attr_accessor :adjustment_type
665
+
666
+ # The price IDs that this adjustment applies to.
667
+ sig { returns(T::Array[String]) }
668
+ attr_accessor :applies_to_price_ids
669
+
670
+ # True for adjustments that apply to an entire invocice, false for adjustments
671
+ # that apply to only one price.
672
+ sig { returns(T::Boolean) }
673
+ attr_accessor :is_invoice_level
674
+
675
+ # The percentage (as a value between 0 and 1) by which to discount the price
676
+ # intervals this adjustment applies to in a given billing period.
677
+ sig { returns(Float) }
678
+ attr_accessor :percentage_discount
679
+
680
+ # The plan phase in which this adjustment is active.
681
+ sig { returns(T.nilable(Integer)) }
682
+ attr_accessor :plan_phase_order
683
+
684
+ # The reason for the adjustment.
685
+ sig { returns(T.nilable(String)) }
686
+ attr_accessor :reason
687
+
688
+ sig do
689
+ params(
690
+ id: String,
691
+ applies_to_price_ids: T::Array[String],
692
+ is_invoice_level: T::Boolean,
693
+ percentage_discount: Float,
694
+ plan_phase_order: T.nilable(Integer),
695
+ reason: T.nilable(String),
696
+ adjustment_type: Symbol
697
+ )
698
+ .returns(T.attached_class)
699
+ end
700
+ def self.new(
701
+ id:,
702
+ applies_to_price_ids:,
703
+ is_invoice_level:,
704
+ percentage_discount:,
705
+ plan_phase_order:,
706
+ reason:,
707
+ adjustment_type: :percentage_discount
708
+ ); end
709
+ sig do
710
+ override
711
+ .returns(
712
+ {
713
+ id: String,
714
+ adjustment_type: Symbol,
715
+ applies_to_price_ids: T::Array[String],
716
+ is_invoice_level: T::Boolean,
717
+ percentage_discount: Float,
718
+ plan_phase_order: T.nilable(Integer),
719
+ reason: T.nilable(String)
720
+ }
721
+ )
722
+ end
723
+ def to_hash; end
724
+ end
725
+
726
+ class PlanPhaseMinimumAdjustment < Orb::Internal::Type::BaseModel
727
+ sig { returns(String) }
728
+ attr_accessor :id
729
+
730
+ sig { returns(Symbol) }
731
+ attr_accessor :adjustment_type
732
+
733
+ # The price IDs that this adjustment applies to.
734
+ sig { returns(T::Array[String]) }
735
+ attr_accessor :applies_to_price_ids
736
+
737
+ # True for adjustments that apply to an entire invocice, false for adjustments
738
+ # that apply to only one price.
739
+ sig { returns(T::Boolean) }
740
+ attr_accessor :is_invoice_level
741
+
742
+ # The item ID that revenue from this minimum will be attributed to.
743
+ sig { returns(String) }
744
+ attr_accessor :item_id
745
+
746
+ # The minimum amount to charge in a given billing period for the prices this
747
+ # adjustment applies to.
748
+ sig { returns(String) }
749
+ attr_accessor :minimum_amount
750
+
751
+ # The plan phase in which this adjustment is active.
752
+ sig { returns(T.nilable(Integer)) }
753
+ attr_accessor :plan_phase_order
754
+
755
+ # The reason for the adjustment.
756
+ sig { returns(T.nilable(String)) }
757
+ attr_accessor :reason
758
+
759
+ sig do
760
+ params(
761
+ id: String,
762
+ applies_to_price_ids: T::Array[String],
763
+ is_invoice_level: T::Boolean,
764
+ item_id: String,
765
+ minimum_amount: String,
766
+ plan_phase_order: T.nilable(Integer),
767
+ reason: T.nilable(String),
768
+ adjustment_type: Symbol
769
+ )
770
+ .returns(T.attached_class)
771
+ end
772
+ def self.new(
773
+ id:,
774
+ applies_to_price_ids:,
775
+ is_invoice_level:,
776
+ item_id:,
777
+ minimum_amount:,
778
+ plan_phase_order:,
779
+ reason:,
780
+ adjustment_type: :minimum
781
+ ); end
782
+ sig do
783
+ override
784
+ .returns(
785
+ {
786
+ id: String,
787
+ adjustment_type: Symbol,
788
+ applies_to_price_ids: T::Array[String],
789
+ is_invoice_level: T::Boolean,
790
+ item_id: String,
791
+ minimum_amount: String,
792
+ plan_phase_order: T.nilable(Integer),
793
+ reason: T.nilable(String)
794
+ }
795
+ )
796
+ end
797
+ def to_hash; end
798
+ end
799
+
800
+ class PlanPhaseMaximumAdjustment < Orb::Internal::Type::BaseModel
801
+ sig { returns(String) }
802
+ attr_accessor :id
803
+
804
+ sig { returns(Symbol) }
805
+ attr_accessor :adjustment_type
806
+
807
+ # The price IDs that this adjustment applies to.
808
+ sig { returns(T::Array[String]) }
809
+ attr_accessor :applies_to_price_ids
810
+
811
+ # True for adjustments that apply to an entire invocice, false for adjustments
812
+ # that apply to only one price.
813
+ sig { returns(T::Boolean) }
814
+ attr_accessor :is_invoice_level
815
+
816
+ # The maximum amount to charge in a given billing period for the prices this
817
+ # adjustment applies to.
818
+ sig { returns(String) }
819
+ attr_accessor :maximum_amount
820
+
821
+ # The plan phase in which this adjustment is active.
822
+ sig { returns(T.nilable(Integer)) }
823
+ attr_accessor :plan_phase_order
824
+
825
+ # The reason for the adjustment.
826
+ sig { returns(T.nilable(String)) }
827
+ attr_accessor :reason
828
+
829
+ sig do
830
+ params(
831
+ id: String,
832
+ applies_to_price_ids: T::Array[String],
833
+ is_invoice_level: T::Boolean,
834
+ maximum_amount: String,
835
+ plan_phase_order: T.nilable(Integer),
836
+ reason: T.nilable(String),
837
+ adjustment_type: Symbol
838
+ )
839
+ .returns(T.attached_class)
840
+ end
841
+ def self.new(
842
+ id:,
843
+ applies_to_price_ids:,
844
+ is_invoice_level:,
845
+ maximum_amount:,
846
+ plan_phase_order:,
847
+ reason:,
848
+ adjustment_type: :maximum
849
+ ); end
850
+ sig do
851
+ override
852
+ .returns(
853
+ {
854
+ id: String,
855
+ adjustment_type: Symbol,
856
+ applies_to_price_ids: T::Array[String],
857
+ is_invoice_level: T::Boolean,
858
+ maximum_amount: String,
859
+ plan_phase_order: T.nilable(Integer),
860
+ reason: T.nilable(String)
861
+ }
862
+ )
863
+ end
864
+ def to_hash; end
865
+ end
866
+
867
+ sig do
868
+ override
869
+ .returns(
870
+ [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]
871
+ )
872
+ end
873
+ def self.variants; end
874
+ end
875
+ end
876
+
877
+ class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
878
+ # The day of the month on which the billing cycle is anchored. If the maximum
879
+ # number of days in a month is greater than this value, the last day of the month
880
+ # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
881
+ # period begins on the 30th.
882
+ sig { returns(Integer) }
883
+ attr_accessor :day
884
+
885
+ # The month on which the billing cycle is anchored (e.g. a quarterly price
886
+ # anchored in February would have cycles starting February, May, August, and
887
+ # November).
888
+ sig { returns(T.nilable(Integer)) }
889
+ attr_accessor :month
890
+
891
+ # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
892
+ # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
893
+ sig { returns(T.nilable(Integer)) }
894
+ attr_accessor :year
895
+
896
+ sig do
897
+ params(
898
+ day: Integer,
899
+ month: T.nilable(Integer),
900
+ year: T.nilable(Integer)
901
+ ).returns(T.attached_class)
902
+ end
903
+ def self.new(day:, month: nil, year: nil); end
904
+
905
+ sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
906
+ def to_hash; end
907
+ end
908
+
909
+ module DiscountInterval
910
+ extend Orb::Internal::Type::Union
911
+
912
+ class AmountDiscountInterval < Orb::Internal::Type::BaseModel
913
+ # Only available if discount_type is `amount`.
914
+ sig { returns(String) }
915
+ attr_accessor :amount_discount
916
+
917
+ # The price ids that this discount interval applies to.
918
+ sig { returns(T::Array[String]) }
919
+ attr_accessor :applies_to_price_ids
920
+
921
+ # The price interval ids that this discount interval applies to.
922
+ sig { returns(T::Array[String]) }
923
+ attr_accessor :applies_to_price_interval_ids
924
+
925
+ sig { returns(Symbol) }
926
+ attr_accessor :discount_type
927
+
928
+ # The end date of the discount interval.
929
+ sig { returns(T.nilable(Time)) }
930
+ attr_accessor :end_date
931
+
932
+ # The start date of the discount interval.
933
+ sig { returns(Time) }
934
+ attr_accessor :start_date
935
+
936
+ sig do
937
+ params(
938
+ amount_discount: String,
939
+ applies_to_price_ids: T::Array[String],
940
+ applies_to_price_interval_ids: T::Array[String],
941
+ end_date: T.nilable(Time),
942
+ start_date: Time,
943
+ discount_type: Symbol
944
+ )
945
+ .returns(T.attached_class)
946
+ end
947
+ def self.new(
948
+ amount_discount:,
949
+ applies_to_price_ids:,
950
+ applies_to_price_interval_ids:,
951
+ end_date:,
952
+ start_date:,
953
+ discount_type: :amount
954
+ ); end
955
+ sig do
956
+ override
957
+ .returns(
958
+ {
959
+ amount_discount: String,
960
+ applies_to_price_ids: T::Array[String],
961
+ applies_to_price_interval_ids: T::Array[String],
962
+ discount_type: Symbol,
963
+ end_date: T.nilable(Time),
964
+ start_date: Time
965
+ }
966
+ )
967
+ end
968
+ def to_hash; end
969
+ end
970
+
971
+ class PercentageDiscountInterval < Orb::Internal::Type::BaseModel
972
+ # The price ids that this discount interval applies to.
973
+ sig { returns(T::Array[String]) }
974
+ attr_accessor :applies_to_price_ids
975
+
976
+ # The price interval ids that this discount interval applies to.
977
+ sig { returns(T::Array[String]) }
978
+ attr_accessor :applies_to_price_interval_ids
979
+
980
+ sig { returns(Symbol) }
981
+ attr_accessor :discount_type
982
+
983
+ # The end date of the discount interval.
984
+ sig { returns(T.nilable(Time)) }
985
+ attr_accessor :end_date
986
+
987
+ # Only available if discount_type is `percentage`.This is a number between 0
988
+ # and 1.
989
+ sig { returns(Float) }
990
+ attr_accessor :percentage_discount
991
+
992
+ # The start date of the discount interval.
993
+ sig { returns(Time) }
994
+ attr_accessor :start_date
995
+
996
+ sig do
997
+ params(
998
+ applies_to_price_ids: T::Array[String],
999
+ applies_to_price_interval_ids: T::Array[String],
1000
+ end_date: T.nilable(Time),
1001
+ percentage_discount: Float,
1002
+ start_date: Time,
1003
+ discount_type: Symbol
1004
+ )
1005
+ .returns(T.attached_class)
1006
+ end
1007
+ def self.new(
1008
+ applies_to_price_ids:,
1009
+ applies_to_price_interval_ids:,
1010
+ end_date:,
1011
+ percentage_discount:,
1012
+ start_date:,
1013
+ discount_type: :percentage
1014
+ ); end
1015
+ sig do
1016
+ override
1017
+ .returns(
1018
+ {
1019
+ applies_to_price_ids: T::Array[String],
1020
+ applies_to_price_interval_ids: T::Array[String],
1021
+ discount_type: Symbol,
1022
+ end_date: T.nilable(Time),
1023
+ percentage_discount: Float,
1024
+ start_date: Time
1025
+ }
1026
+ )
1027
+ end
1028
+ def to_hash; end
1029
+ end
1030
+
1031
+ class UsageDiscountInterval < Orb::Internal::Type::BaseModel
1032
+ # The price ids that this discount interval applies to.
1033
+ sig { returns(T::Array[String]) }
1034
+ attr_accessor :applies_to_price_ids
1035
+
1036
+ # The price interval ids that this discount interval applies to.
1037
+ sig { returns(T::Array[String]) }
1038
+ attr_accessor :applies_to_price_interval_ids
1039
+
1040
+ sig { returns(Symbol) }
1041
+ attr_accessor :discount_type
1042
+
1043
+ # The end date of the discount interval.
1044
+ sig { returns(T.nilable(Time)) }
1045
+ attr_accessor :end_date
1046
+
1047
+ # The start date of the discount interval.
1048
+ sig { returns(Time) }
1049
+ attr_accessor :start_date
1050
+
1051
+ # Only available if discount_type is `usage`. Number of usage units that this
1052
+ # discount is for
1053
+ sig { returns(Float) }
1054
+ attr_accessor :usage_discount
1055
+
1056
+ sig do
1057
+ params(
1058
+ applies_to_price_ids: T::Array[String],
1059
+ applies_to_price_interval_ids: T::Array[String],
1060
+ end_date: T.nilable(Time),
1061
+ start_date: Time,
1062
+ usage_discount: Float,
1063
+ discount_type: Symbol
1064
+ )
1065
+ .returns(T.attached_class)
1066
+ end
1067
+ def self.new(
1068
+ applies_to_price_ids:,
1069
+ applies_to_price_interval_ids:,
1070
+ end_date:,
1071
+ start_date:,
1072
+ usage_discount:,
1073
+ discount_type: :usage
1074
+ ); end
1075
+ sig do
1076
+ override
1077
+ .returns(
1078
+ {
1079
+ applies_to_price_ids: T::Array[String],
1080
+ applies_to_price_interval_ids: T::Array[String],
1081
+ discount_type: Symbol,
1082
+ end_date: T.nilable(Time),
1083
+ start_date: Time,
1084
+ usage_discount: Float
1085
+ }
1086
+ )
1087
+ end
1088
+ def to_hash; end
1089
+ end
1090
+
1091
+ sig do
1092
+ override
1093
+ .returns(
1094
+ [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::UsageDiscountInterval]
1095
+ )
1096
+ end
1097
+ def self.variants; end
1098
+ end
1099
+
1100
+ class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
1101
+ sig { returns(T.nilable(Time)) }
1102
+ attr_accessor :end_date
1103
+
1104
+ sig { returns(String) }
1105
+ attr_accessor :price_id
1106
+
1107
+ sig { returns(Float) }
1108
+ attr_accessor :quantity
1109
+
1110
+ sig { returns(Time) }
1111
+ attr_accessor :start_date
1112
+
1113
+ sig do
1114
+ params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
1115
+ .returns(T.attached_class)
1116
+ end
1117
+ def self.new(end_date:, price_id:, quantity:, start_date:); end
1118
+
1119
+ sig do
1120
+ override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
1121
+ end
1122
+ def to_hash; end
1123
+ end
1124
+
1125
+ class MaximumInterval < Orb::Internal::Type::BaseModel
1126
+ # The price ids that this maximum interval applies to.
1127
+ sig { returns(T::Array[String]) }
1128
+ attr_accessor :applies_to_price_ids
1129
+
1130
+ # The price interval ids that this maximum interval applies to.
1131
+ sig { returns(T::Array[String]) }
1132
+ attr_accessor :applies_to_price_interval_ids
1133
+
1134
+ # The end date of the maximum interval.
1135
+ sig { returns(T.nilable(Time)) }
1136
+ attr_accessor :end_date
1137
+
1138
+ # The maximum amount to charge in a given billing period for the price intervals
1139
+ # this transform applies to.
1140
+ sig { returns(String) }
1141
+ attr_accessor :maximum_amount
1142
+
1143
+ # The start date of the maximum interval.
1144
+ sig { returns(Time) }
1145
+ attr_accessor :start_date
1146
+
1147
+ sig do
1148
+ params(
1149
+ applies_to_price_ids: T::Array[String],
1150
+ applies_to_price_interval_ids: T::Array[String],
1151
+ end_date: T.nilable(Time),
1152
+ maximum_amount: String,
1153
+ start_date: Time
1154
+ )
1155
+ .returns(T.attached_class)
1156
+ end
1157
+ def self.new(
1158
+ applies_to_price_ids:,
1159
+ applies_to_price_interval_ids:,
1160
+ end_date:,
1161
+ maximum_amount:,
1162
+ start_date:
1163
+ )
1164
+ end
1165
+
1166
+ sig do
1167
+ override
1168
+ .returns(
1169
+ {
1170
+ applies_to_price_ids: T::Array[String],
1171
+ applies_to_price_interval_ids: T::Array[String],
1172
+ end_date: T.nilable(Time),
1173
+ maximum_amount: String,
1174
+ start_date: Time
1175
+ }
1176
+ )
1177
+ end
1178
+ def to_hash; end
1179
+ end
1180
+
1181
+ class MinimumInterval < Orb::Internal::Type::BaseModel
1182
+ # The price ids that this minimum interval applies to.
1183
+ sig { returns(T::Array[String]) }
1184
+ attr_accessor :applies_to_price_ids
1185
+
1186
+ # The price interval ids that this minimum interval applies to.
1187
+ sig { returns(T::Array[String]) }
1188
+ attr_accessor :applies_to_price_interval_ids
1189
+
1190
+ # The end date of the minimum interval.
1191
+ sig { returns(T.nilable(Time)) }
1192
+ attr_accessor :end_date
1193
+
1194
+ # The minimum amount to charge in a given billing period for the price intervals
1195
+ # this minimum applies to.
1196
+ sig { returns(String) }
1197
+ attr_accessor :minimum_amount
1198
+
1199
+ # The start date of the minimum interval.
1200
+ sig { returns(Time) }
1201
+ attr_accessor :start_date
1202
+
1203
+ sig do
1204
+ params(
1205
+ applies_to_price_ids: T::Array[String],
1206
+ applies_to_price_interval_ids: T::Array[String],
1207
+ end_date: T.nilable(Time),
1208
+ minimum_amount: String,
1209
+ start_date: Time
1210
+ )
1211
+ .returns(T.attached_class)
1212
+ end
1213
+ def self.new(
1214
+ applies_to_price_ids:,
1215
+ applies_to_price_interval_ids:,
1216
+ end_date:,
1217
+ minimum_amount:,
1218
+ start_date:
1219
+ )
1220
+ end
1221
+
1222
+ sig do
1223
+ override
1224
+ .returns(
1225
+ {
1226
+ applies_to_price_ids: T::Array[String],
1227
+ applies_to_price_interval_ids: T::Array[String],
1228
+ end_date: T.nilable(Time),
1229
+ minimum_amount: String,
1230
+ start_date: Time
1231
+ }
1232
+ )
1233
+ end
1234
+ def to_hash; end
1235
+ end
1236
+
1237
+ class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
1238
+ sig { returns(String) }
1239
+ attr_accessor :id
1240
+
1241
+ # A pending subscription change if one exists on this subscription.
1242
+ sig { params(id: String).returns(T.attached_class) }
1243
+ def self.new(id:); end
1244
+
1245
+ sig { override.returns({id: String}) }
1246
+ def to_hash; end
1247
+ end
1248
+
1249
+ class PriceInterval < Orb::Internal::Type::BaseModel
1250
+ sig { returns(String) }
1251
+ attr_accessor :id
1252
+
1253
+ # The day of the month that Orb bills for this price
1254
+ sig { returns(Integer) }
1255
+ attr_accessor :billing_cycle_day
1256
+
1257
+ # The end of the current billing period. This is an exclusive timestamp, such that
1258
+ # the instant returned is exactly the end of the billing period. Set to null if
1259
+ # this price interval is not currently active.
1260
+ sig { returns(T.nilable(Time)) }
1261
+ attr_accessor :current_billing_period_end_date
1262
+
1263
+ # The start date of the current billing period. This is an inclusive timestamp;
1264
+ # the instant returned is exactly the beginning of the billing period. Set to null
1265
+ # if this price interval is not currently active.
1266
+ sig { returns(T.nilable(Time)) }
1267
+ attr_accessor :current_billing_period_start_date
1268
+
1269
+ # The end date of the price interval. This is the date that Orb stops billing for
1270
+ # this price.
1271
+ sig { returns(T.nilable(Time)) }
1272
+ attr_accessor :end_date
1273
+
1274
+ # An additional filter to apply to usage queries.
1275
+ sig { returns(T.nilable(String)) }
1276
+ attr_accessor :filter
1277
+
1278
+ # The fixed fee quantity transitions for this price interval. This is only
1279
+ # relevant for fixed fees.
1280
+ sig do
1281
+ returns(
1282
+ T.nilable(
1283
+ T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval::FixedFeeQuantityTransition]
1284
+ )
1285
+ )
1286
+ end
1287
+ attr_accessor :fixed_fee_quantity_transitions
1288
+
1289
+ # The Price resource represents a price that can be billed on a subscription,
1290
+ # resulting in a charge on an invoice in the form of an invoice line item. Prices
1291
+ # take a quantity and determine an amount to bill.
1292
+ #
1293
+ # Orb supports a few different pricing models out of the box. Each of these models
1294
+ # is serialized differently in a given Price object. The model_type field
1295
+ # determines the key for the configuration object that is present.
1296
+ #
1297
+ # For more on the types of prices, see
1298
+ # [the core concepts documentation](/core-concepts#plan-and-price)
1299
+ sig do
1300
+ returns(
1301
+ T.any(
1302
+ Orb::Models::Price::UnitPrice,
1303
+ Orb::Models::Price::PackagePrice,
1304
+ Orb::Models::Price::MatrixPrice,
1305
+ Orb::Models::Price::TieredPrice,
1306
+ Orb::Models::Price::TieredBpsPrice,
1307
+ Orb::Models::Price::BpsPrice,
1308
+ Orb::Models::Price::BulkBpsPrice,
1309
+ Orb::Models::Price::BulkPrice,
1310
+ Orb::Models::Price::ThresholdTotalAmountPrice,
1311
+ Orb::Models::Price::TieredPackagePrice,
1312
+ Orb::Models::Price::GroupedTieredPrice,
1313
+ Orb::Models::Price::TieredWithMinimumPrice,
1314
+ Orb::Models::Price::TieredPackageWithMinimumPrice,
1315
+ Orb::Models::Price::PackageWithAllocationPrice,
1316
+ Orb::Models::Price::UnitWithPercentPrice,
1317
+ Orb::Models::Price::MatrixWithAllocationPrice,
1318
+ Orb::Models::Price::TieredWithProrationPrice,
1319
+ Orb::Models::Price::UnitWithProrationPrice,
1320
+ Orb::Models::Price::GroupedAllocationPrice,
1321
+ Orb::Models::Price::GroupedWithProratedMinimumPrice,
1322
+ Orb::Models::Price::GroupedWithMeteredMinimumPrice,
1323
+ Orb::Models::Price::MatrixWithDisplayNamePrice,
1324
+ Orb::Models::Price::BulkWithProrationPrice,
1325
+ Orb::Models::Price::GroupedTieredPackagePrice,
1326
+ Orb::Models::Price::MaxGroupTieredPackagePrice,
1327
+ Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
1328
+ Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
1329
+ Orb::Models::Price::CumulativeGroupedBulkPrice
1330
+ )
1331
+ )
1332
+ end
1333
+ attr_accessor :price
1334
+
1335
+ # The start date of the price interval. This is the date that Orb starts billing
1336
+ # for this price.
1337
+ sig { returns(Time) }
1338
+ attr_accessor :start_date
1339
+
1340
+ # A list of customer IDs whose usage events will be aggregated and billed under
1341
+ # this price interval.
1342
+ sig { returns(T.nilable(T::Array[String])) }
1343
+ attr_accessor :usage_customer_ids
1344
+
1345
+ # The Price Interval resource represents a period of time for which a price will
1346
+ # bill on a subscription. A subscription’s price intervals define its billing
1347
+ # behavior.
1348
+ sig do
1349
+ params(
1350
+ id: String,
1351
+ billing_cycle_day: Integer,
1352
+ current_billing_period_end_date: T.nilable(Time),
1353
+ current_billing_period_start_date: T.nilable(Time),
1354
+ end_date: T.nilable(Time),
1355
+ filter: T.nilable(String),
1356
+ fixed_fee_quantity_transitions: T.nilable(
1357
+ T::Array[
1358
+ T.any(
1359
+ Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval::FixedFeeQuantityTransition,
1360
+ Orb::Internal::AnyHash
1361
+ )
1362
+ ]
1363
+ ),
1364
+ price: T.any(
1365
+ Orb::Models::Price::UnitPrice,
1366
+ Orb::Internal::AnyHash,
1367
+ Orb::Models::Price::PackagePrice,
1368
+ Orb::Models::Price::MatrixPrice,
1369
+ Orb::Models::Price::TieredPrice,
1370
+ Orb::Models::Price::TieredBpsPrice,
1371
+ Orb::Models::Price::BpsPrice,
1372
+ Orb::Models::Price::BulkBpsPrice,
1373
+ Orb::Models::Price::BulkPrice,
1374
+ Orb::Models::Price::ThresholdTotalAmountPrice,
1375
+ Orb::Models::Price::TieredPackagePrice,
1376
+ Orb::Models::Price::GroupedTieredPrice,
1377
+ Orb::Models::Price::TieredWithMinimumPrice,
1378
+ Orb::Models::Price::TieredPackageWithMinimumPrice,
1379
+ Orb::Models::Price::PackageWithAllocationPrice,
1380
+ Orb::Models::Price::UnitWithPercentPrice,
1381
+ Orb::Models::Price::MatrixWithAllocationPrice,
1382
+ Orb::Models::Price::TieredWithProrationPrice,
1383
+ Orb::Models::Price::UnitWithProrationPrice,
1384
+ Orb::Models::Price::GroupedAllocationPrice,
1385
+ Orb::Models::Price::GroupedWithProratedMinimumPrice,
1386
+ Orb::Models::Price::GroupedWithMeteredMinimumPrice,
1387
+ Orb::Models::Price::MatrixWithDisplayNamePrice,
1388
+ Orb::Models::Price::BulkWithProrationPrice,
1389
+ Orb::Models::Price::GroupedTieredPackagePrice,
1390
+ Orb::Models::Price::MaxGroupTieredPackagePrice,
1391
+ Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
1392
+ Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
1393
+ Orb::Models::Price::CumulativeGroupedBulkPrice
1394
+ ),
1395
+ start_date: Time,
1396
+ usage_customer_ids: T.nilable(T::Array[String])
1397
+ )
1398
+ .returns(T.attached_class)
1399
+ end
1400
+ def self.new(
1401
+ id:,
1402
+ billing_cycle_day:,
1403
+ current_billing_period_end_date:,
1404
+ current_billing_period_start_date:,
1405
+ end_date:,
1406
+ filter:,
1407
+ fixed_fee_quantity_transitions:,
1408
+ price:,
1409
+ start_date:,
1410
+ usage_customer_ids:
1411
+ ); end
1412
+ sig do
1413
+ override
1414
+ .returns(
1415
+ {
1416
+ id: String,
1417
+ billing_cycle_day: Integer,
1418
+ current_billing_period_end_date: T.nilable(Time),
1419
+ current_billing_period_start_date: T.nilable(Time),
1420
+ end_date: T.nilable(Time),
1421
+ filter: T.nilable(String),
1422
+ fixed_fee_quantity_transitions: T.nilable(
1423
+ T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval::FixedFeeQuantityTransition]
1424
+ ),
1425
+ price: T.any(
1426
+ Orb::Models::Price::UnitPrice,
1427
+ Orb::Models::Price::PackagePrice,
1428
+ Orb::Models::Price::MatrixPrice,
1429
+ Orb::Models::Price::TieredPrice,
1430
+ Orb::Models::Price::TieredBpsPrice,
1431
+ Orb::Models::Price::BpsPrice,
1432
+ Orb::Models::Price::BulkBpsPrice,
1433
+ Orb::Models::Price::BulkPrice,
1434
+ Orb::Models::Price::ThresholdTotalAmountPrice,
1435
+ Orb::Models::Price::TieredPackagePrice,
1436
+ Orb::Models::Price::GroupedTieredPrice,
1437
+ Orb::Models::Price::TieredWithMinimumPrice,
1438
+ Orb::Models::Price::TieredPackageWithMinimumPrice,
1439
+ Orb::Models::Price::PackageWithAllocationPrice,
1440
+ Orb::Models::Price::UnitWithPercentPrice,
1441
+ Orb::Models::Price::MatrixWithAllocationPrice,
1442
+ Orb::Models::Price::TieredWithProrationPrice,
1443
+ Orb::Models::Price::UnitWithProrationPrice,
1444
+ Orb::Models::Price::GroupedAllocationPrice,
1445
+ Orb::Models::Price::GroupedWithProratedMinimumPrice,
1446
+ Orb::Models::Price::GroupedWithMeteredMinimumPrice,
1447
+ Orb::Models::Price::MatrixWithDisplayNamePrice,
1448
+ Orb::Models::Price::BulkWithProrationPrice,
1449
+ Orb::Models::Price::GroupedTieredPackagePrice,
1450
+ Orb::Models::Price::MaxGroupTieredPackagePrice,
1451
+ Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
1452
+ Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
1453
+ Orb::Models::Price::CumulativeGroupedBulkPrice
1454
+ ),
1455
+ start_date: Time,
1456
+ usage_customer_ids: T.nilable(T::Array[String])
1457
+ }
1458
+ )
1459
+ end
1460
+ def to_hash; end
1461
+
1462
+ class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1463
+ sig { returns(Time) }
1464
+ attr_accessor :effective_date
1465
+
1466
+ sig { returns(String) }
1467
+ attr_accessor :price_id
1468
+
1469
+ sig { returns(Integer) }
1470
+ attr_accessor :quantity
1471
+
1472
+ sig do
1473
+ params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class)
1474
+ end
1475
+ def self.new(effective_date:, price_id:, quantity:); end
1476
+
1477
+ sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
1478
+ def to_hash; end
1479
+ end
1480
+ end
1481
+
1482
+ class RedeemedCoupon < Orb::Internal::Type::BaseModel
1483
+ sig { returns(String) }
1484
+ attr_accessor :coupon_id
1485
+
1486
+ sig { returns(T.nilable(Time)) }
1487
+ attr_accessor :end_date
1488
+
1489
+ sig { returns(Time) }
1490
+ attr_accessor :start_date
1491
+
1492
+ sig do
1493
+ params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
1494
+ end
1495
+ def self.new(coupon_id:, end_date:, start_date:); end
1496
+
1497
+ sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
1498
+ def to_hash; end
1499
+ end
1500
+
1501
+ module Status
1502
+ extend Orb::Internal::Type::Enum
1503
+
1504
+ TaggedSymbol =
1505
+ T.type_alias { T.all(Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status) }
1506
+ OrSymbol =
1507
+ T.type_alias { T.any(Symbol, String, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol) }
1508
+
1509
+ ACTIVE =
1510
+ T.let(:active, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol)
1511
+ ENDED =
1512
+ T.let(:ended, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol)
1513
+ UPCOMING =
1514
+ T.let(:upcoming, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol)
1515
+
1516
+ sig do
1517
+ override
1518
+ .returns(T::Array[Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::Status::TaggedSymbol])
1519
+ end
1520
+ def self.values; end
1521
+ end
1522
+
1523
+ class TrialInfo < Orb::Internal::Type::BaseModel
1524
+ sig { returns(T.nilable(Time)) }
1525
+ attr_accessor :end_date
1526
+
1527
+ sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
1528
+ def self.new(end_date:); end
1529
+
1530
+ sig { override.returns({end_date: T.nilable(Time)}) }
1531
+ def to_hash; end
1532
+ end
1533
+
1534
+ class ChangedResources < Orb::Internal::Type::BaseModel
1535
+ # The credit notes that were created as part of this operation.
1536
+ sig { returns(T::Array[Orb::Models::CreditNote]) }
1537
+ attr_accessor :created_credit_notes
1538
+
1539
+ # The invoices that were created as part of this operation.
1540
+ sig { returns(T::Array[Orb::Models::Invoice]) }
1541
+ attr_accessor :created_invoices
1542
+
1543
+ # The credit notes that were voided as part of this operation.
1544
+ sig { returns(T::Array[Orb::Models::CreditNote]) }
1545
+ attr_accessor :voided_credit_notes
1546
+
1547
+ # The invoices that were voided as part of this operation.
1548
+ sig { returns(T::Array[Orb::Models::Invoice]) }
1549
+ attr_accessor :voided_invoices
1550
+
1551
+ # The resources that were changed as part of this operation. Only present when
1552
+ # fetched through the subscription changes API or if the
1553
+ # `include_changed_resources` parameter was passed in the request.
1554
+ sig do
1555
+ params(
1556
+ created_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1557
+ created_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)],
1558
+ voided_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
1559
+ voided_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)]
1560
+ )
1561
+ .returns(T.attached_class)
1562
+ end
1563
+ def self.new(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:); end
1564
+
1565
+ sig do
1566
+ override
1567
+ .returns(
1568
+ {
1569
+ created_credit_notes: T::Array[Orb::Models::CreditNote],
1570
+ created_invoices: T::Array[Orb::Models::Invoice],
1571
+ voided_credit_notes: T::Array[Orb::Models::CreditNote],
1572
+ voided_invoices: T::Array[Orb::Models::Invoice]
1573
+ }
1574
+ )
1575
+ end
1576
+ def to_hash; end
1577
+ end
1578
+ end
1579
+ end
1580
+ end
1581
+ end