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

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