orb-billing 0.3.1 → 0.4.0

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 (592) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +3 -3
  4. data/lib/orb/errors.rb +1 -1
  5. data/lib/orb/file_part.rb +2 -2
  6. data/lib/orb/internal/transport/base_client.rb +74 -5
  7. data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
  8. data/lib/orb/internal/type/array_of.rb +1 -1
  9. data/lib/orb/internal/type/base_model.rb +62 -30
  10. data/lib/orb/internal/type/converter.rb +18 -0
  11. data/lib/orb/internal/type/enum.rb +4 -3
  12. data/lib/orb/internal/type/hash_of.rb +1 -1
  13. data/lib/orb/internal/type/request_parameters.rb +4 -4
  14. data/lib/orb/internal/type/union.rb +5 -4
  15. data/lib/orb/internal/util.rb +57 -1
  16. data/lib/orb/internal.rb +6 -0
  17. data/lib/orb/models/alert.rb +29 -32
  18. data/lib/orb/models/alert_create_for_customer_params.rb +7 -8
  19. data/lib/orb/models/alert_create_for_external_customer_params.rb +7 -8
  20. data/lib/orb/models/alert_create_for_subscription_params.rb +7 -8
  21. data/lib/orb/models/alert_list_params.rb +0 -1
  22. data/lib/orb/models/alert_update_params.rb +4 -5
  23. data/lib/orb/models/amount_discount.rb +6 -7
  24. data/lib/orb/models/billable_metric.rb +9 -11
  25. data/lib/orb/models/coupon.rb +13 -12
  26. data/lib/orb/models/coupon_create_params.rb +12 -8
  27. data/lib/orb/models/coupon_list_params.rb +0 -2
  28. data/lib/orb/models/coupons/subscription_list_params.rb +0 -1
  29. data/lib/orb/models/credit_note.rb +48 -46
  30. data/lib/orb/models/credit_note_create_params.rb +6 -6
  31. data/lib/orb/models/credit_note_list_params.rb +0 -1
  32. data/lib/orb/models/customer.rb +54 -61
  33. data/lib/orb/models/customer_create_params.rb +50 -53
  34. data/lib/orb/models/customer_list_params.rb +0 -1
  35. data/lib/orb/models/customer_update_by_external_id_params.rb +50 -53
  36. data/lib/orb/models/customer_update_params.rb +50 -51
  37. data/lib/orb/models/customers/balance_transaction_create_params.rb +3 -3
  38. data/lib/orb/models/customers/balance_transaction_create_response.rb +0 -2
  39. data/lib/orb/models/customers/balance_transaction_list_params.rb +0 -1
  40. data/lib/orb/models/customers/balance_transaction_list_response.rb +0 -2
  41. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +3 -4
  42. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -3
  43. data/lib/orb/models/customers/cost_list_params.rb +3 -4
  44. data/lib/orb/models/customers/cost_list_response.rb +3 -3
  45. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +0 -2
  46. data/lib/orb/models/customers/credit_list_params.rb +0 -2
  47. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +12 -21
  48. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -7
  49. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +11 -22
  50. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -7
  51. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +6 -7
  52. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -7
  53. data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -9
  54. data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -7
  55. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -15
  56. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +0 -6
  57. data/lib/orb/models/customers/credits/top_up_create_params.rb +7 -15
  58. data/lib/orb/models/customers/credits/top_up_create_response.rb +0 -6
  59. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +0 -1
  60. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +0 -6
  61. data/lib/orb/models/customers/credits/top_up_list_params.rb +0 -1
  62. data/lib/orb/models/customers/credits/top_up_list_response.rb +0 -6
  63. data/lib/orb/models/dimensional_price_group.rb +1 -3
  64. data/lib/orb/models/dimensional_price_group_create_params.rb +0 -1
  65. data/lib/orb/models/dimensional_price_group_list_params.rb +0 -1
  66. data/lib/orb/models/dimensional_price_groups.rb +6 -6
  67. data/lib/orb/models/discount.rb +11 -5
  68. data/lib/orb/models/evaluate_price_group.rb +5 -1
  69. data/lib/orb/models/event_ingest_params.rb +4 -9
  70. data/lib/orb/models/event_ingest_response.rb +0 -3
  71. data/lib/orb/models/event_search_params.rb +0 -3
  72. data/lib/orb/models/event_search_response.rb +0 -4
  73. data/lib/orb/models/event_update_params.rb +0 -3
  74. data/lib/orb/models/events/backfill_close_response.rb +0 -4
  75. data/lib/orb/models/events/backfill_create_params.rb +0 -7
  76. data/lib/orb/models/events/backfill_create_response.rb +0 -4
  77. data/lib/orb/models/events/backfill_fetch_response.rb +0 -4
  78. data/lib/orb/models/events/backfill_list_params.rb +0 -1
  79. data/lib/orb/models/events/backfill_list_response.rb +0 -4
  80. data/lib/orb/models/events/backfill_revert_response.rb +0 -4
  81. data/lib/orb/models/events/event_volumes.rb +3 -3
  82. data/lib/orb/models/events/volume_list_params.rb +0 -3
  83. data/lib/orb/models/invoice.rb +179 -202
  84. data/lib/orb/models/invoice_create_params.rb +14 -21
  85. data/lib/orb/models/invoice_fetch_upcoming_response.rb +31 -54
  86. data/lib/orb/models/invoice_issue_params.rb +0 -1
  87. data/lib/orb/models/invoice_level_discount.rb +8 -4
  88. data/lib/orb/models/invoice_line_item_create_params.rb +0 -1
  89. data/lib/orb/models/invoice_line_item_create_response.rb +28 -26
  90. data/lib/orb/models/invoice_list_params.rb +6 -10
  91. data/lib/orb/models/invoice_update_params.rb +0 -1
  92. data/lib/orb/models/item.rb +7 -8
  93. data/lib/orb/models/item_list_params.rb +0 -1
  94. data/lib/orb/models/item_update_params.rb +7 -7
  95. data/lib/orb/models/metric_create_params.rb +0 -1
  96. data/lib/orb/models/metric_list_params.rb +0 -1
  97. data/lib/orb/models/metric_update_params.rb +0 -1
  98. data/lib/orb/models/percentage_discount.rb +6 -8
  99. data/lib/orb/models/plan.rb +90 -103
  100. data/lib/orb/models/plan_create_params.rb +759 -800
  101. data/lib/orb/models/plan_list_params.rb +3 -4
  102. data/lib/orb/models/plan_update_params.rb +0 -2
  103. data/lib/orb/models/plans/external_plan_id_update_params.rb +0 -2
  104. data/lib/orb/models/price.rb +1706 -1724
  105. data/lib/orb/models/price_create_params.rb +75 -84
  106. data/lib/orb/models/price_evaluate_params.rb +0 -2
  107. data/lib/orb/models/price_evaluate_response.rb +3 -3
  108. data/lib/orb/models/price_list_params.rb +0 -1
  109. data/lib/orb/models/price_update_params.rb +0 -1
  110. data/lib/orb/models/prices/external_price_id_update_params.rb +0 -1
  111. data/lib/orb/models/subscription.rb +108 -122
  112. data/lib/orb/models/subscription_cancel_params.rb +3 -5
  113. data/lib/orb/models/subscription_cancel_response.rb +43 -57
  114. data/lib/orb/models/subscription_change_apply_response.rb +43 -58
  115. data/lib/orb/models/subscription_change_cancel_response.rb +43 -58
  116. data/lib/orb/models/subscription_change_retrieve_response.rb +43 -58
  117. data/lib/orb/models/subscription_create_params.rb +1953 -1815
  118. data/lib/orb/models/subscription_create_response.rb +43 -57
  119. data/lib/orb/models/subscription_fetch_costs_params.rb +3 -4
  120. data/lib/orb/models/subscription_fetch_costs_response.rb +3 -3
  121. data/lib/orb/models/subscription_fetch_schedule_params.rb +0 -1
  122. data/lib/orb/models/subscription_fetch_schedule_response.rb +0 -1
  123. data/lib/orb/models/subscription_fetch_usage_params.rb +6 -8
  124. data/lib/orb/models/subscription_list_params.rb +3 -4
  125. data/lib/orb/models/subscription_price_intervals_params.rb +1194 -1017
  126. data/lib/orb/models/subscription_price_intervals_response.rb +43 -57
  127. data/lib/orb/models/subscription_schedule_plan_change_params.rb +1994 -1791
  128. data/lib/orb/models/subscription_schedule_plan_change_response.rb +43 -57
  129. data/lib/orb/models/subscription_trigger_phase_params.rb +0 -2
  130. data/lib/orb/models/subscription_trigger_phase_response.rb +43 -57
  131. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +43 -57
  132. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +43 -57
  133. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +43 -57
  134. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +3 -6
  135. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +43 -57
  136. data/lib/orb/models/subscription_update_params.rb +0 -5
  137. data/lib/orb/models/subscription_update_trial_params.rb +8 -6
  138. data/lib/orb/models/subscription_update_trial_response.rb +43 -57
  139. data/lib/orb/models/subscription_usage.rb +55 -39
  140. data/lib/orb/models/subscriptions.rb +6 -6
  141. data/lib/orb/models/trial_discount.rb +6 -7
  142. data/lib/orb/models/usage_discount.rb +6 -8
  143. data/lib/orb/models.rb +24 -0
  144. data/lib/orb/request_options.rb +4 -0
  145. data/lib/orb/resources/alerts.rb +30 -31
  146. data/lib/orb/resources/coupons/subscriptions.rb +3 -4
  147. data/lib/orb/resources/coupons.rb +11 -21
  148. data/lib/orb/resources/credit_notes.rb +10 -11
  149. data/lib/orb/resources/customers/balance_transactions.rb +3 -4
  150. data/lib/orb/resources/customers/costs.rb +4 -6
  151. data/lib/orb/resources/customers/credits/ledger.rb +14 -33
  152. data/lib/orb/resources/customers/credits/top_ups.rb +10 -20
  153. data/lib/orb/resources/customers/credits.rb +2 -6
  154. data/lib/orb/resources/customers.rb +40 -67
  155. data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +2 -2
  156. data/lib/orb/resources/dimensional_price_groups.rb +8 -10
  157. data/lib/orb/resources/events/backfills.rb +2 -10
  158. data/lib/orb/resources/events/volume.rb +3 -6
  159. data/lib/orb/resources/events.rb +4 -12
  160. data/lib/orb/resources/invoice_line_items.rb +1 -2
  161. data/lib/orb/resources/invoices.rb +26 -43
  162. data/lib/orb/resources/items.rb +12 -13
  163. data/lib/orb/resources/metrics.rb +11 -14
  164. data/lib/orb/resources/plans/external_plan_id.rb +5 -7
  165. data/lib/orb/resources/plans.rb +14 -23
  166. data/lib/orb/resources/prices/external_price_id.rb +5 -6
  167. data/lib/orb/resources/prices.rb +25 -35
  168. data/lib/orb/resources/subscription_changes.rb +1 -1
  169. data/lib/orb/resources/subscriptions.rb +49 -107
  170. data/lib/orb/version.rb +1 -1
  171. data/lib/orb.rb +3 -0
  172. data/rbi/orb/client.rbi +5 -4
  173. data/rbi/orb/errors.rbi +59 -28
  174. data/rbi/orb/file_part.rbi +9 -6
  175. data/rbi/orb/internal/page.rbi +20 -6
  176. data/rbi/orb/internal/transport/base_client.rbi +159 -78
  177. data/rbi/orb/internal/transport/pooled_net_requester.rbi +27 -13
  178. data/rbi/orb/internal/type/array_of.rbi +42 -34
  179. data/rbi/orb/internal/type/base_model.rbi +144 -69
  180. data/rbi/orb/internal/type/base_page.rbi +12 -8
  181. data/rbi/orb/internal/type/boolean.rbi +16 -10
  182. data/rbi/orb/internal/type/converter.rbi +68 -31
  183. data/rbi/orb/internal/type/enum.rbi +28 -15
  184. data/rbi/orb/internal/type/file_input.rbi +12 -10
  185. data/rbi/orb/internal/type/hash_of.rbi +34 -24
  186. data/rbi/orb/internal/type/request_parameters.rbi +12 -4
  187. data/rbi/orb/internal/type/union.rbi +61 -25
  188. data/rbi/orb/internal/type/unknown.rbi +20 -12
  189. data/rbi/orb/internal/util.rbi +232 -90
  190. data/rbi/orb/internal.rbi +2 -0
  191. data/rbi/orb/models/alert.rbi +114 -70
  192. data/rbi/orb/models/alert_create_for_customer_params.rbi +69 -27
  193. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +80 -29
  194. data/rbi/orb/models/alert_create_for_subscription_params.rbi +62 -26
  195. data/rbi/orb/models/alert_disable_params.rbi +18 -6
  196. data/rbi/orb/models/alert_enable_params.rbi +18 -6
  197. data/rbi/orb/models/alert_list_params.rbi +24 -20
  198. data/rbi/orb/models/alert_retrieve_params.rbi +11 -4
  199. data/rbi/orb/models/alert_update_params.rbi +29 -14
  200. data/rbi/orb/models/amount_discount.rbi +29 -19
  201. data/rbi/orb/models/billable_metric.rbi +34 -26
  202. data/rbi/orb/models/billing_cycle_relative_date.rbi +11 -5
  203. data/rbi/orb/models/coupon.rbi +28 -20
  204. data/rbi/orb/models/coupon_archive_params.rbi +11 -4
  205. data/rbi/orb/models/coupon_create_params.rbi +85 -38
  206. data/rbi/orb/models/coupon_fetch_params.rbi +11 -4
  207. data/rbi/orb/models/coupon_list_params.rbi +19 -15
  208. data/rbi/orb/models/coupons/subscription_list_params.rbi +19 -6
  209. data/rbi/orb/models/credit_note.rbi +329 -158
  210. data/rbi/orb/models/credit_note_create_params.rbi +64 -29
  211. data/rbi/orb/models/credit_note_fetch_params.rbi +13 -4
  212. data/rbi/orb/models/credit_note_list_params.rbi +23 -17
  213. data/rbi/orb/models/customer.rbi +461 -329
  214. data/rbi/orb/models/customer_create_params.rbi +713 -325
  215. data/rbi/orb/models/customer_delete_params.rbi +13 -4
  216. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -4
  217. data/rbi/orb/models/customer_fetch_params.rbi +11 -4
  218. data/rbi/orb/models/customer_list_params.rbi +21 -17
  219. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +16 -4
  220. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +16 -4
  221. data/rbi/orb/models/customer_update_by_external_id_params.rbi +1193 -336
  222. data/rbi/orb/models/customer_update_params.rbi +712 -324
  223. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +56 -21
  224. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +172 -61
  225. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +26 -17
  226. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +182 -59
  227. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +62 -22
  228. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +180 -124
  229. data/rbi/orb/models/customers/cost_list_params.rbi +48 -22
  230. data/rbi/orb/models/customers/cost_list_response.rbi +172 -123
  231. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +24 -15
  232. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +54 -22
  233. data/rbi/orb/models/customers/credit_list_params.rbi +21 -15
  234. data/rbi/orb/models/customers/credit_list_response.rbi +50 -21
  235. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +118 -68
  236. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +755 -434
  237. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +129 -59
  238. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +812 -425
  239. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +108 -44
  240. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +793 -432
  241. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +129 -40
  242. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +847 -389
  243. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +86 -53
  244. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +77 -48
  245. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +96 -45
  246. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +95 -43
  247. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +22 -6
  248. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +21 -5
  249. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +15 -5
  250. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +82 -49
  251. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +15 -5
  252. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +96 -43
  253. data/rbi/orb/models/dimensional_price_group.rbi +21 -15
  254. data/rbi/orb/models/dimensional_price_group_create_params.rbi +22 -16
  255. data/rbi/orb/models/dimensional_price_group_list_params.rbi +19 -6
  256. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -4
  257. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +15 -8
  258. data/rbi/orb/models/dimensional_price_groups.rbi +21 -13
  259. data/rbi/orb/models/discount.rbi +11 -5
  260. data/rbi/orb/models/evaluate_price_group.rbi +29 -12
  261. data/rbi/orb/models/event_deprecate_params.rbi +13 -4
  262. data/rbi/orb/models/event_deprecate_response.rbi +11 -3
  263. data/rbi/orb/models/event_ingest_params.rbi +41 -31
  264. data/rbi/orb/models/event_ingest_response.rbi +78 -23
  265. data/rbi/orb/models/event_search_params.rbi +18 -14
  266. data/rbi/orb/models/event_search_response.rbi +42 -21
  267. data/rbi/orb/models/event_update_params.rbi +20 -16
  268. data/rbi/orb/models/event_update_response.rbi +11 -3
  269. data/rbi/orb/models/events/backfill_close_params.rbi +13 -9
  270. data/rbi/orb/models/events/backfill_close_response.rbi +70 -29
  271. data/rbi/orb/models/events/backfill_create_params.rbi +24 -18
  272. data/rbi/orb/models/events/backfill_create_response.rbi +69 -29
  273. data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -9
  274. data/rbi/orb/models/events/backfill_fetch_response.rbi +70 -29
  275. data/rbi/orb/models/events/backfill_list_params.rbi +19 -6
  276. data/rbi/orb/models/events/backfill_list_response.rbi +68 -28
  277. data/rbi/orb/models/events/backfill_revert_params.rbi +13 -9
  278. data/rbi/orb/models/events/backfill_revert_response.rbi +69 -29
  279. data/rbi/orb/models/events/event_volumes.rbi +38 -10
  280. data/rbi/orb/models/events/volume_list_params.rbi +21 -15
  281. data/rbi/orb/models/invoice.rbi +1411 -805
  282. data/rbi/orb/models/invoice_create_params.rbi +107 -69
  283. data/rbi/orb/models/invoice_fetch_params.rbi +11 -4
  284. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +18 -5
  285. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2187 -876
  286. data/rbi/orb/models/invoice_issue_params.rbi +17 -5
  287. data/rbi/orb/models/invoice_level_discount.rbi +11 -4
  288. data/rbi/orb/models/invoice_line_item_create_params.rbi +23 -17
  289. data/rbi/orb/models/invoice_line_item_create_response.rbi +675 -376
  290. data/rbi/orb/models/invoice_list_params.rbi +68 -47
  291. data/rbi/orb/models/invoice_mark_paid_params.rbi +20 -14
  292. data/rbi/orb/models/invoice_pay_params.rbi +11 -4
  293. data/rbi/orb/models/invoice_update_params.rbi +16 -10
  294. data/rbi/orb/models/invoice_void_params.rbi +11 -4
  295. data/rbi/orb/models/item.rbi +90 -39
  296. data/rbi/orb/models/item_create_params.rbi +15 -5
  297. data/rbi/orb/models/item_fetch_params.rbi +11 -4
  298. data/rbi/orb/models/item_list_params.rbi +17 -6
  299. data/rbi/orb/models/item_update_params.rbi +86 -39
  300. data/rbi/orb/models/metric_create_params.rbi +20 -16
  301. data/rbi/orb/models/metric_fetch_params.rbi +11 -4
  302. data/rbi/orb/models/metric_list_params.rbi +21 -17
  303. data/rbi/orb/models/metric_update_params.rbi +16 -10
  304. data/rbi/orb/models/pagination_metadata.rbi +17 -4
  305. data/rbi/orb/models/percentage_discount.rbi +33 -19
  306. data/rbi/orb/models/plan.rbi +532 -365
  307. data/rbi/orb/models/plan_create_params.rbi +5295 -2870
  308. data/rbi/orb/models/plan_fetch_params.rbi +11 -4
  309. data/rbi/orb/models/plan_list_params.rbi +35 -27
  310. data/rbi/orb/models/plan_update_params.rbi +17 -13
  311. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -9
  312. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +22 -13
  313. data/rbi/orb/models/price.rbi +11332 -5033
  314. data/rbi/orb/models/price_create_params.rbi +583 -245
  315. data/rbi/orb/models/price_evaluate_params.rbi +21 -17
  316. data/rbi/orb/models/price_evaluate_response.rbi +14 -6
  317. data/rbi/orb/models/price_fetch_params.rbi +11 -4
  318. data/rbi/orb/models/price_list_params.rbi +17 -6
  319. data/rbi/orb/models/price_update_params.rbi +16 -10
  320. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +15 -8
  321. data/rbi/orb/models/prices/external_price_id_update_params.rbi +21 -10
  322. data/rbi/orb/models/subscription.rbi +668 -420
  323. data/rbi/orb/models/subscription_cancel_params.rbi +47 -22
  324. data/rbi/orb/models/subscription_cancel_response.rbi +817 -438
  325. data/rbi/orb/models/subscription_change_apply_params.rbi +19 -13
  326. data/rbi/orb/models/subscription_change_apply_response.rbi +906 -505
  327. data/rbi/orb/models/subscription_change_cancel_params.rbi +13 -4
  328. data/rbi/orb/models/subscription_change_cancel_response.rbi +906 -516
  329. data/rbi/orb/models/subscription_change_retrieve_params.rbi +13 -4
  330. data/rbi/orb/models/subscription_change_retrieve_response.rbi +903 -524
  331. data/rbi/orb/models/subscription_create_params.rbi +10096 -6746
  332. data/rbi/orb/models/subscription_create_response.rbi +817 -438
  333. data/rbi/orb/models/subscription_fetch_costs_params.rbi +50 -22
  334. data/rbi/orb/models/subscription_fetch_costs_response.rbi +172 -123
  335. data/rbi/orb/models/subscription_fetch_params.rbi +13 -4
  336. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +23 -17
  337. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +45 -19
  338. data/rbi/orb/models/subscription_fetch_usage_params.rbi +84 -34
  339. data/rbi/orb/models/subscription_list_params.rbi +42 -28
  340. data/rbi/orb/models/subscription_price_intervals_params.rbi +5798 -3823
  341. data/rbi/orb/models/subscription_price_intervals_response.rbi +840 -453
  342. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +9676 -6922
  343. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +838 -467
  344. data/rbi/orb/models/subscription_trigger_phase_params.rbi +19 -13
  345. data/rbi/orb/models/subscription_trigger_phase_response.rbi +832 -448
  346. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +16 -4
  347. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +839 -467
  348. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +22 -5
  349. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +815 -504
  350. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +16 -4
  351. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +828 -497
  352. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +63 -26
  353. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +839 -467
  354. data/rbi/orb/models/subscription_update_params.rbi +22 -16
  355. data/rbi/orb/models/subscription_update_trial_params.rbi +60 -19
  356. data/rbi/orb/models/subscription_update_trial_response.rbi +832 -447
  357. data/rbi/orb/models/subscription_usage.rbi +325 -121
  358. data/rbi/orb/models/subscriptions.rbi +19 -11
  359. data/rbi/orb/models/top_level_ping_params.rbi +11 -4
  360. data/rbi/orb/models/top_level_ping_response.rbi +10 -3
  361. data/rbi/orb/models/trial_discount.rbi +30 -20
  362. data/rbi/orb/models/usage_discount.rbi +29 -19
  363. data/rbi/orb/models.rbi +22 -11
  364. data/rbi/orb/request_options.rbi +12 -6
  365. data/rbi/orb/resources/alerts.rbi +61 -40
  366. data/rbi/orb/resources/coupons/subscriptions.rbi +7 -5
  367. data/rbi/orb/resources/coupons.rbi +33 -18
  368. data/rbi/orb/resources/credit_notes.rbi +22 -13
  369. data/rbi/orb/resources/customers/balance_transactions.rbi +17 -9
  370. data/rbi/orb/resources/customers/costs.rbi +18 -11
  371. data/rbi/orb/resources/customers/credits/ledger.rbi +98 -74
  372. data/rbi/orb/resources/customers/credits/top_ups.rbi +61 -25
  373. data/rbi/orb/resources/customers/credits.rbi +16 -7
  374. data/rbi/orb/resources/customers.rbi +137 -72
  375. data/rbi/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +8 -4
  376. data/rbi/orb/resources/dimensional_price_groups.rbi +26 -12
  377. data/rbi/orb/resources/events/backfills.rbi +35 -17
  378. data/rbi/orb/resources/events/volume.rbi +7 -5
  379. data/rbi/orb/resources/events.rbi +26 -16
  380. data/rbi/orb/resources/invoice_line_items.rbi +7 -5
  381. data/rbi/orb/resources/invoices.rbi +72 -41
  382. data/rbi/orb/resources/items.rbi +40 -13
  383. data/rbi/orb/resources/metrics.rbi +25 -15
  384. data/rbi/orb/resources/plans/external_plan_id.rbi +15 -7
  385. data/rbi/orb/resources/plans.rbi +57 -47
  386. data/rbi/orb/resources/prices/external_price_id.rbi +73 -68
  387. data/rbi/orb/resources/prices.rbi +176 -156
  388. data/rbi/orb/resources/subscription_changes.rbi +19 -11
  389. data/rbi/orb/resources/subscriptions.rbi +200 -114
  390. data/rbi/orb/resources/top_level.rbi +9 -3
  391. data/sig/orb/internal/page.rbs +0 -2
  392. data/sig/orb/internal/transport/base_client.rbs +16 -1
  393. data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
  394. data/sig/orb/internal/type/base_model.rbs +11 -5
  395. data/sig/orb/internal/type/base_page.rbs +1 -1
  396. data/sig/orb/internal/type/converter.rbs +2 -0
  397. data/sig/orb/internal/type/enum.rbs +1 -0
  398. data/sig/orb/internal/type/request_parameters.rbs +3 -1
  399. data/sig/orb/internal/type/union.rbs +1 -0
  400. data/sig/orb/internal/util.rbs +13 -0
  401. data/sig/orb/internal.rbs +2 -0
  402. data/sig/orb/models/alert.rbs +19 -31
  403. data/sig/orb/models/alert_create_for_customer_params.rbs +3 -7
  404. data/sig/orb/models/alert_create_for_external_customer_params.rbs +3 -7
  405. data/sig/orb/models/alert_create_for_subscription_params.rbs +3 -7
  406. data/sig/orb/models/alert_disable_params.rbs +0 -2
  407. data/sig/orb/models/alert_enable_params.rbs +0 -2
  408. data/sig/orb/models/alert_list_params.rbs +0 -2
  409. data/sig/orb/models/alert_retrieve_params.rbs +0 -2
  410. data/sig/orb/models/alert_update_params.rbs +3 -7
  411. data/sig/orb/models/amount_discount.rbs +4 -6
  412. data/sig/orb/models/billable_metric.rbs +7 -9
  413. data/sig/orb/models/coupon.rbs +5 -8
  414. data/sig/orb/models/coupon_archive_params.rbs +0 -2
  415. data/sig/orb/models/coupon_create_params.rbs +3 -9
  416. data/sig/orb/models/coupon_fetch_params.rbs +0 -2
  417. data/sig/orb/models/coupon_list_params.rbs +0 -2
  418. data/sig/orb/models/coupons/subscription_list_params.rbs +0 -2
  419. data/sig/orb/models/credit_note.rbs +48 -66
  420. data/sig/orb/models/credit_note_create_params.rbs +3 -7
  421. data/sig/orb/models/credit_note_fetch_params.rbs +0 -2
  422. data/sig/orb/models/credit_note_list_params.rbs +0 -2
  423. data/sig/orb/models/customer.rbs +43 -63
  424. data/sig/orb/models/customer_create_params.rbs +32 -52
  425. data/sig/orb/models/customer_delete_params.rbs +0 -2
  426. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +0 -2
  427. data/sig/orb/models/customer_fetch_params.rbs +0 -2
  428. data/sig/orb/models/customer_list_params.rbs +0 -2
  429. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +0 -2
  430. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +0 -2
  431. data/sig/orb/models/customer_update_by_external_id_params.rbs +32 -52
  432. data/sig/orb/models/customer_update_params.rbs +32 -52
  433. data/sig/orb/models/customers/balance_transaction_create_params.rbs +0 -2
  434. data/sig/orb/models/customers/balance_transaction_create_response.rbs +0 -6
  435. data/sig/orb/models/customers/balance_transaction_list_params.rbs +0 -2
  436. data/sig/orb/models/customers/balance_transaction_list_response.rbs +0 -6
  437. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +0 -2
  438. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +0 -6
  439. data/sig/orb/models/customers/cost_list_params.rbs +0 -2
  440. data/sig/orb/models/customers/cost_list_response.rbs +0 -6
  441. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +0 -2
  442. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +0 -2
  443. data/sig/orb/models/customers/credit_list_params.rbs +0 -2
  444. data/sig/orb/models/customers/credit_list_response.rbs +0 -2
  445. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +3 -7
  446. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +1 -43
  447. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +3 -7
  448. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +1 -43
  449. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +0 -2
  450. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +1 -43
  451. data/sig/orb/models/customers/credits/ledger_list_params.rbs +0 -2
  452. data/sig/orb/models/customers/credits/ledger_list_response.rbs +1 -43
  453. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +3 -7
  454. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +0 -4
  455. data/sig/orb/models/customers/credits/top_up_create_params.rbs +3 -7
  456. data/sig/orb/models/customers/credits/top_up_create_response.rbs +0 -4
  457. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +0 -2
  458. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +0 -2
  459. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +0 -2
  460. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +0 -4
  461. data/sig/orb/models/customers/credits/top_up_list_params.rbs +0 -2
  462. data/sig/orb/models/customers/credits/top_up_list_response.rbs +0 -4
  463. data/sig/orb/models/dimensional_price_group.rbs +0 -2
  464. data/sig/orb/models/dimensional_price_group_create_params.rbs +0 -2
  465. data/sig/orb/models/dimensional_price_group_list_params.rbs +0 -2
  466. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +0 -2
  467. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +0 -2
  468. data/sig/orb/models/dimensional_price_groups.rbs +6 -8
  469. data/sig/orb/models/discount.rbs +5 -5
  470. data/sig/orb/models/evaluate_price_group.rbs +4 -6
  471. data/sig/orb/models/event_deprecate_params.rbs +0 -2
  472. data/sig/orb/models/event_deprecate_response.rbs +0 -2
  473. data/sig/orb/models/event_ingest_params.rbs +3 -7
  474. data/sig/orb/models/event_ingest_response.rbs +0 -6
  475. data/sig/orb/models/event_search_params.rbs +0 -2
  476. data/sig/orb/models/event_search_response.rbs +0 -4
  477. data/sig/orb/models/event_update_params.rbs +0 -2
  478. data/sig/orb/models/event_update_response.rbs +0 -2
  479. data/sig/orb/models/events/backfill_close_params.rbs +0 -2
  480. data/sig/orb/models/events/backfill_close_response.rbs +0 -2
  481. data/sig/orb/models/events/backfill_create_params.rbs +0 -2
  482. data/sig/orb/models/events/backfill_create_response.rbs +0 -2
  483. data/sig/orb/models/events/backfill_fetch_params.rbs +0 -2
  484. data/sig/orb/models/events/backfill_fetch_response.rbs +0 -2
  485. data/sig/orb/models/events/backfill_list_params.rbs +0 -2
  486. data/sig/orb/models/events/backfill_list_response.rbs +0 -2
  487. data/sig/orb/models/events/backfill_revert_params.rbs +0 -2
  488. data/sig/orb/models/events/backfill_revert_response.rbs +0 -2
  489. data/sig/orb/models/events/event_volumes.rbs +3 -10
  490. data/sig/orb/models/events/volume_list_params.rbs +0 -2
  491. data/sig/orb/models/invoice.rbs +110 -172
  492. data/sig/orb/models/invoice_create_params.rbs +10 -16
  493. data/sig/orb/models/invoice_fetch_params.rbs +0 -2
  494. data/sig/orb/models/invoice_fetch_upcoming_params.rbs +0 -2
  495. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -64
  496. data/sig/orb/models/invoice_issue_params.rbs +0 -2
  497. data/sig/orb/models/invoice_level_discount.rbs +2 -4
  498. data/sig/orb/models/invoice_line_item_create_params.rbs +0 -2
  499. data/sig/orb/models/invoice_line_item_create_response.rbs +2 -36
  500. data/sig/orb/models/invoice_list_params.rbs +4 -6
  501. data/sig/orb/models/invoice_mark_paid_params.rbs +0 -2
  502. data/sig/orb/models/invoice_pay_params.rbs +0 -2
  503. data/sig/orb/models/invoice_update_params.rbs +0 -2
  504. data/sig/orb/models/invoice_void_params.rbs +0 -2
  505. data/sig/orb/models/item.rbs +7 -11
  506. data/sig/orb/models/item_create_params.rbs +0 -2
  507. data/sig/orb/models/item_fetch_params.rbs +0 -2
  508. data/sig/orb/models/item_list_params.rbs +0 -2
  509. data/sig/orb/models/item_update_params.rbs +7 -11
  510. data/sig/orb/models/metric_create_params.rbs +0 -2
  511. data/sig/orb/models/metric_fetch_params.rbs +0 -2
  512. data/sig/orb/models/metric_list_params.rbs +0 -2
  513. data/sig/orb/models/metric_update_params.rbs +0 -2
  514. data/sig/orb/models/pagination_metadata.rbs +0 -2
  515. data/sig/orb/models/percentage_discount.rbs +4 -6
  516. data/sig/orb/models/plan.rbs +45 -73
  517. data/sig/orb/models/plan_create_params.rbs +518 -696
  518. data/sig/orb/models/plan_fetch_params.rbs +0 -2
  519. data/sig/orb/models/plan_list_params.rbs +0 -2
  520. data/sig/orb/models/plan_update_params.rbs +0 -2
  521. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +0 -2
  522. data/sig/orb/models/plans/external_plan_id_update_params.rbs +0 -2
  523. data/sig/orb/models/price.rbs +1194 -1730
  524. data/sig/orb/models/price_create_params.rbs +59 -97
  525. data/sig/orb/models/price_evaluate_params.rbs +0 -2
  526. data/sig/orb/models/price_evaluate_response.rbs +3 -6
  527. data/sig/orb/models/price_fetch_params.rbs +0 -2
  528. data/sig/orb/models/price_list_params.rbs +0 -2
  529. data/sig/orb/models/price_update_params.rbs +0 -2
  530. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +0 -2
  531. data/sig/orb/models/prices/external_price_id_update_params.rbs +0 -2
  532. data/sig/orb/models/subscription.rbs +56 -94
  533. data/sig/orb/models/subscription_cancel_params.rbs +0 -2
  534. data/sig/orb/models/subscription_cancel_response.rbs +20 -60
  535. data/sig/orb/models/subscription_change_apply_params.rbs +0 -2
  536. data/sig/orb/models/subscription_change_apply_response.rbs +20 -62
  537. data/sig/orb/models/subscription_change_cancel_params.rbs +0 -2
  538. data/sig/orb/models/subscription_change_cancel_response.rbs +20 -62
  539. data/sig/orb/models/subscription_change_retrieve_params.rbs +0 -2
  540. data/sig/orb/models/subscription_change_retrieve_response.rbs +20 -62
  541. data/sig/orb/models/subscription_create_params.rbs +1103 -1499
  542. data/sig/orb/models/subscription_create_response.rbs +20 -60
  543. data/sig/orb/models/subscription_fetch_costs_params.rbs +0 -2
  544. data/sig/orb/models/subscription_fetch_costs_response.rbs +0 -6
  545. data/sig/orb/models/subscription_fetch_params.rbs +0 -2
  546. data/sig/orb/models/subscription_fetch_schedule_params.rbs +0 -2
  547. data/sig/orb/models/subscription_fetch_schedule_response.rbs +0 -4
  548. data/sig/orb/models/subscription_fetch_usage_params.rbs +0 -2
  549. data/sig/orb/models/subscription_list_params.rbs +0 -2
  550. data/sig/orb/models/subscription_price_intervals_params.rbs +666 -896
  551. data/sig/orb/models/subscription_price_intervals_response.rbs +20 -60
  552. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1103 -1499
  553. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +20 -60
  554. data/sig/orb/models/subscription_trigger_phase_params.rbs +0 -2
  555. data/sig/orb/models/subscription_trigger_phase_response.rbs +20 -60
  556. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +0 -2
  557. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +20 -60
  558. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +0 -2
  559. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +20 -60
  560. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +0 -2
  561. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +20 -60
  562. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +0 -2
  563. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +20 -60
  564. data/sig/orb/models/subscription_update_params.rbs +0 -2
  565. data/sig/orb/models/subscription_update_trial_params.rbs +1 -3
  566. data/sig/orb/models/subscription_update_trial_response.rbs +20 -60
  567. data/sig/orb/models/subscription_usage.rbs +35 -53
  568. data/sig/orb/models/subscriptions.rbs +6 -8
  569. data/sig/orb/models/top_level_ping_params.rbs +0 -2
  570. data/sig/orb/models/top_level_ping_response.rbs +0 -2
  571. data/sig/orb/models/trial_discount.rbs +4 -6
  572. data/sig/orb/models/usage_discount.rbs +4 -6
  573. data/sig/orb/request_options.rbs +1 -1
  574. data/sig/orb/resources/alerts.rbs +12 -12
  575. data/sig/orb/resources/coupons/subscriptions.rbs +1 -1
  576. data/sig/orb/resources/coupons.rbs +4 -4
  577. data/sig/orb/resources/credit_notes.rbs +4 -4
  578. data/sig/orb/resources/customers/credits/ledger.rbs +2 -2
  579. data/sig/orb/resources/customers/credits/top_ups.rbs +2 -2
  580. data/sig/orb/resources/customers.rbs +24 -24
  581. data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +1 -1
  582. data/sig/orb/resources/dimensional_price_groups.rbs +3 -3
  583. data/sig/orb/resources/events/volume.rbs +1 -1
  584. data/sig/orb/resources/events.rbs +1 -1
  585. data/sig/orb/resources/invoices.rbs +10 -10
  586. data/sig/orb/resources/items.rbs +5 -5
  587. data/sig/orb/resources/metrics.rbs +4 -4
  588. data/sig/orb/resources/plans/external_plan_id.rbs +2 -2
  589. data/sig/orb/resources/plans.rbs +5 -5
  590. data/sig/orb/resources/prices.rbs +11 -11
  591. data/sig/orb/resources/subscriptions.rbs +21 -21
  592. metadata +2 -2
@@ -88,8 +88,8 @@ module Orb
88
88
  # your account's timezone. See [Timezone localization](/essentials/timezones) for
89
89
  # information on what this timezone parameter influences within Orb.
90
90
  #
91
- # @return [Orb::Models::Customer]
92
- required :customer, -> { Orb::Models::Customer }
91
+ # @return [Orb::Customer]
92
+ required :customer, -> { Orb::Customer }
93
93
 
94
94
  # @!attribute default_invoice_memo
95
95
  # Determines the default memo on this subscriptions' invoices. Note that if this
@@ -168,8 +168,8 @@ module Orb
168
168
  # subscription. You can see more about how to configure prices in the
169
169
  # [Price resource](/reference/price).
170
170
  #
171
- # @return [Orb::Models::Plan]
172
- required :plan, -> { Orb::Models::Plan }
171
+ # @return [Orb::Plan]
172
+ required :plan, -> { Orb::Plan }
173
173
 
174
174
  # @!attribute price_intervals
175
175
  # The price intervals for this subscription.
@@ -218,32 +218,24 @@ module Orb
218
218
  # @param id [String]
219
219
  #
220
220
  # @param active_plan_phase_order [Integer, nil] The current plan phase that is active, only if the subscription's plan has phase
221
- # ...
222
221
  #
223
222
  # @param adjustment_intervals [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval>] The adjustment intervals for this subscription sorted by the start_date of the a
224
- # ...
225
223
  #
226
224
  # @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
227
- # ...
228
225
  #
229
226
  # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration]
230
227
  #
231
228
  # @param billing_cycle_day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
232
- # ...
233
229
  #
234
230
  # @param created_at [Time]
235
231
  #
236
232
  # @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
237
- # ...
238
233
  #
239
234
  # @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
240
- # ...
241
235
  #
242
- # @param customer [Orb::Models::Customer] A customer is a buyer of your products, and the other party to the billing relat
243
- # ...
236
+ # @param customer [Orb::Customer] A customer is a buyer of your products, and the other party to the billing relat
244
237
  #
245
238
  # @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
246
- # ...
247
239
  #
248
240
  # @param discount_intervals [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Amount, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Usage>] The discount intervals for this subscription sorted by the start_date.
249
241
  #
@@ -256,17 +248,14 @@ module Orb
256
248
  # @param maximum_intervals [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
257
249
  #
258
250
  # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
259
- # ...
260
251
  #
261
252
  # @param minimum_intervals [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
262
253
  #
263
254
  # @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
264
- # ...
265
255
  #
266
256
  # @param pending_subscription_change [Orb::Models::SubscriptionSchedulePlanChangeResponse::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
267
257
  #
268
- # @param plan [Orb::Models::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
269
- # ...
258
+ # @param plan [Orb::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
270
259
  #
271
260
  # @param price_intervals [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval>] The price intervals for this subscription.
272
261
  #
@@ -279,7 +268,6 @@ module Orb
279
268
  # @param trial_info [Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo]
280
269
  #
281
270
  # @param changed_resources [Orb::Models::SubscriptionSchedulePlanChangeResponse::ChangedResources, nil] The resources that were changed as part of this operation. Only present when fet
282
- # ...
283
271
 
284
272
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
285
273
  # @!attribute id
@@ -396,14 +384,12 @@ module Orb
396
384
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
397
385
  #
398
386
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
399
- # ...
400
387
  #
401
388
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
402
389
  #
403
390
  # @param reason [String, nil] The reason for the adjustment.
404
391
  #
405
392
  # @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
406
- # ...
407
393
  #
408
394
  # @param adjustment_type [Symbol, :usage_discount]
409
395
  end
@@ -459,12 +445,10 @@ module Orb
459
445
  # @param id [String]
460
446
  #
461
447
  # @param amount_discount [String] The amount by which to discount the prices this adjustment applies to in a given
462
- # ...
463
448
  #
464
449
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
465
450
  #
466
451
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
467
- # ...
468
452
  #
469
453
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
470
454
  #
@@ -526,10 +510,8 @@ module Orb
526
510
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
527
511
  #
528
512
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
529
- # ...
530
513
  #
531
514
  # @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
532
- # ...
533
515
  #
534
516
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
535
517
  #
@@ -597,12 +579,10 @@ module Orb
597
579
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
598
580
  #
599
581
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
600
- # ...
601
582
  #
602
583
  # @param item_id [String] The item ID that revenue from this minimum will be attributed to.
603
584
  #
604
585
  # @param minimum_amount [String] The minimum amount to charge in a given billing period for the prices this adjus
605
- # ...
606
586
  #
607
587
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
608
588
  #
@@ -664,10 +644,8 @@ module Orb
664
644
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
665
645
  #
666
646
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
667
- # ...
668
647
  #
669
648
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
670
- # ...
671
649
  #
672
650
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
673
651
  #
@@ -678,6 +656,18 @@ module Orb
678
656
 
679
657
  # @!method self.variants
680
658
  # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::Maximum)]
659
+
660
+ define_sorbet_constant!(:Variants) do
661
+ T.type_alias do
662
+ T.any(
663
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::UsageDiscount,
664
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::AmountDiscount,
665
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
666
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::Minimum,
667
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::Maximum
668
+ )
669
+ end
670
+ end
681
671
  end
682
672
  end
683
673
 
@@ -713,13 +703,10 @@ module Orb
713
703
  # for more details.
714
704
  #
715
705
  # @param day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
716
- # ...
717
706
  #
718
707
  # @param month [Integer, nil] The month on which the billing cycle is anchored (e.g. a quarterly price anchore
719
- # ...
720
708
  #
721
709
  # @param year [Integer, nil] The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anc
722
- # ...
723
710
  end
724
711
 
725
712
  module DiscountInterval
@@ -833,7 +820,6 @@ module Orb
833
820
  # @param end_date [Time, nil] The end date of the discount interval.
834
821
  #
835
822
  # @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
836
- # ...
837
823
  #
838
824
  # @param start_date [Time] The start date of the discount interval.
839
825
  #
@@ -891,13 +877,22 @@ module Orb
891
877
  # @param start_date [Time] The start date of the discount interval.
892
878
  #
893
879
  # @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
894
- # ...
895
880
  #
896
881
  # @param discount_type [Symbol, :usage]
897
882
  end
898
883
 
899
884
  # @!method self.variants
900
885
  # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Amount, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Usage)]
886
+
887
+ define_sorbet_constant!(:Variants) do
888
+ T.type_alias do
889
+ T.any(
890
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Amount,
891
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Percentage,
892
+ Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::Usage
893
+ )
894
+ end
895
+ end
901
896
  end
902
897
 
903
898
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -972,7 +967,6 @@ module Orb
972
967
  # @param end_date [Time, nil] The end date of the maximum interval.
973
968
  #
974
969
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
975
- # ...
976
970
  #
977
971
  # @param start_date [Time] The start date of the maximum interval.
978
972
  end
@@ -1021,7 +1015,6 @@ module Orb
1021
1015
  # @param end_date [Time, nil] The end date of the minimum interval.
1022
1016
  #
1023
1017
  # @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
1024
- # ...
1025
1018
  #
1026
1019
  # @param start_date [Time] The start date of the minimum interval.
1027
1020
  end
@@ -1101,8 +1094,8 @@ module Orb
1101
1094
  # For more on the types of prices, see
1102
1095
  # [the core concepts documentation](/core-concepts#plan-and-price)
1103
1096
  #
1104
- # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk]
1105
- required :price, union: -> { Orb::Models::Price }
1097
+ # @return [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk]
1098
+ required :price, union: -> { Orb::Price }
1106
1099
 
1107
1100
  # @!attribute start_date
1108
1101
  # The start date of the price interval. This is the date that Orb starts billing
@@ -1132,27 +1125,20 @@ module Orb
1132
1125
  # @param billing_cycle_day [Integer] The day of the month that Orb bills for this price
1133
1126
  #
1134
1127
  # @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
1135
- # ...
1136
1128
  #
1137
1129
  # @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
1138
- # ...
1139
1130
  #
1140
1131
  # @param end_date [Time, nil] The end date of the price interval. This is the date that Orb stops billing for
1141
- # ...
1142
1132
  #
1143
1133
  # @param filter [String, nil] An additional filter to apply to usage queries.
1144
1134
  #
1145
1135
  # @param fixed_fee_quantity_transitions [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
1146
- # ...
1147
1136
  #
1148
- # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
1149
- # ...
1137
+ # @param price [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
1150
1138
  #
1151
1139
  # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
1152
- # ...
1153
1140
  #
1154
1141
  # @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
1155
- # ...
1156
1142
 
1157
1143
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1158
1144
  # @!attribute effective_date
@@ -1228,39 +1214,39 @@ module Orb
1228
1214
  # @!attribute created_credit_notes
1229
1215
  # The credit notes that were created as part of this operation.
1230
1216
  #
1231
- # @return [Array<Orb::Models::CreditNote>]
1232
- required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
1217
+ # @return [Array<Orb::CreditNote>]
1218
+ required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
1233
1219
 
1234
1220
  # @!attribute created_invoices
1235
1221
  # The invoices that were created as part of this operation.
1236
1222
  #
1237
- # @return [Array<Orb::Models::Invoice>]
1238
- required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
1223
+ # @return [Array<Orb::Invoice>]
1224
+ required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
1239
1225
 
1240
1226
  # @!attribute voided_credit_notes
1241
1227
  # The credit notes that were voided as part of this operation.
1242
1228
  #
1243
- # @return [Array<Orb::Models::CreditNote>]
1244
- required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
1229
+ # @return [Array<Orb::CreditNote>]
1230
+ required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
1245
1231
 
1246
1232
  # @!attribute voided_invoices
1247
1233
  # The invoices that were voided as part of this operation.
1248
1234
  #
1249
- # @return [Array<Orb::Models::Invoice>]
1250
- required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
1235
+ # @return [Array<Orb::Invoice>]
1236
+ required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
1251
1237
 
1252
1238
  # @!method initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:)
1253
1239
  # The resources that were changed as part of this operation. Only present when
1254
1240
  # fetched through the subscription changes API or if the
1255
1241
  # `include_changed_resources` parameter was passed in the request.
1256
1242
  #
1257
- # @param created_credit_notes [Array<Orb::Models::CreditNote>] The credit notes that were created as part of this operation.
1243
+ # @param created_credit_notes [Array<Orb::CreditNote>] The credit notes that were created as part of this operation.
1258
1244
  #
1259
- # @param created_invoices [Array<Orb::Models::Invoice>] The invoices that were created as part of this operation.
1245
+ # @param created_invoices [Array<Orb::Invoice>] The invoices that were created as part of this operation.
1260
1246
  #
1261
- # @param voided_credit_notes [Array<Orb::Models::CreditNote>] The credit notes that were voided as part of this operation.
1247
+ # @param voided_credit_notes [Array<Orb::CreditNote>] The credit notes that were voided as part of this operation.
1262
1248
  #
1263
- # @param voided_invoices [Array<Orb::Models::Invoice>] The invoices that were voided as part of this operation.
1249
+ # @param voided_invoices [Array<Orb::Invoice>] The invoices that were voided as part of this operation.
1264
1250
  end
1265
1251
  end
1266
1252
  end
@@ -27,10 +27,8 @@ module Orb
27
27
  # {Orb::Models::SubscriptionTriggerPhaseParams} for more details.
28
28
  #
29
29
  # @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a
30
- # ...
31
30
  #
32
31
  # @param effective_date [Date, nil] The date on which the phase change should take effect. If not provided, defaults
33
- # ...
34
32
  #
35
33
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
36
34
  end
@@ -88,8 +88,8 @@ module Orb
88
88
  # your account's timezone. See [Timezone localization](/essentials/timezones) for
89
89
  # information on what this timezone parameter influences within Orb.
90
90
  #
91
- # @return [Orb::Models::Customer]
92
- required :customer, -> { Orb::Models::Customer }
91
+ # @return [Orb::Customer]
92
+ required :customer, -> { Orb::Customer }
93
93
 
94
94
  # @!attribute default_invoice_memo
95
95
  # Determines the default memo on this subscriptions' invoices. Note that if this
@@ -168,8 +168,8 @@ module Orb
168
168
  # subscription. You can see more about how to configure prices in the
169
169
  # [Price resource](/reference/price).
170
170
  #
171
- # @return [Orb::Models::Plan]
172
- required :plan, -> { Orb::Models::Plan }
171
+ # @return [Orb::Plan]
172
+ required :plan, -> { Orb::Plan }
173
173
 
174
174
  # @!attribute price_intervals
175
175
  # The price intervals for this subscription.
@@ -218,32 +218,24 @@ module Orb
218
218
  # @param id [String]
219
219
  #
220
220
  # @param active_plan_phase_order [Integer, nil] The current plan phase that is active, only if the subscription's plan has phase
221
- # ...
222
221
  #
223
222
  # @param adjustment_intervals [Array<Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval>] The adjustment intervals for this subscription sorted by the start_date of the a
224
- # ...
225
223
  #
226
224
  # @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
227
- # ...
228
225
  #
229
226
  # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration]
230
227
  #
231
228
  # @param billing_cycle_day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
232
- # ...
233
229
  #
234
230
  # @param created_at [Time]
235
231
  #
236
232
  # @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
237
- # ...
238
233
  #
239
234
  # @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
240
- # ...
241
235
  #
242
- # @param customer [Orb::Models::Customer] A customer is a buyer of your products, and the other party to the billing relat
243
- # ...
236
+ # @param customer [Orb::Customer] A customer is a buyer of your products, and the other party to the billing relat
244
237
  #
245
238
  # @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
246
- # ...
247
239
  #
248
240
  # @param discount_intervals [Array<Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage>] The discount intervals for this subscription sorted by the start_date.
249
241
  #
@@ -256,17 +248,14 @@ module Orb
256
248
  # @param maximum_intervals [Array<Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
257
249
  #
258
250
  # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
259
- # ...
260
251
  #
261
252
  # @param minimum_intervals [Array<Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
262
253
  #
263
254
  # @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
264
- # ...
265
255
  #
266
256
  # @param pending_subscription_change [Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
267
257
  #
268
- # @param plan [Orb::Models::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
269
- # ...
258
+ # @param plan [Orb::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
270
259
  #
271
260
  # @param price_intervals [Array<Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval>] The price intervals for this subscription.
272
261
  #
@@ -279,7 +268,6 @@ module Orb
279
268
  # @param trial_info [Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo]
280
269
  #
281
270
  # @param changed_resources [Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources, nil] The resources that were changed as part of this operation. Only present when fet
282
- # ...
283
271
 
284
272
  class AdjustmentInterval < Orb::Internal::Type::BaseModel
285
273
  # @!attribute id
@@ -396,14 +384,12 @@ module Orb
396
384
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
397
385
  #
398
386
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
399
- # ...
400
387
  #
401
388
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
402
389
  #
403
390
  # @param reason [String, nil] The reason for the adjustment.
404
391
  #
405
392
  # @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
406
- # ...
407
393
  #
408
394
  # @param adjustment_type [Symbol, :usage_discount]
409
395
  end
@@ -459,12 +445,10 @@ module Orb
459
445
  # @param id [String]
460
446
  #
461
447
  # @param amount_discount [String] The amount by which to discount the prices this adjustment applies to in a given
462
- # ...
463
448
  #
464
449
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
465
450
  #
466
451
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
467
- # ...
468
452
  #
469
453
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
470
454
  #
@@ -526,10 +510,8 @@ module Orb
526
510
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
527
511
  #
528
512
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
529
- # ...
530
513
  #
531
514
  # @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
532
- # ...
533
515
  #
534
516
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
535
517
  #
@@ -597,12 +579,10 @@ module Orb
597
579
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
598
580
  #
599
581
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
600
- # ...
601
582
  #
602
583
  # @param item_id [String] The item ID that revenue from this minimum will be attributed to.
603
584
  #
604
585
  # @param minimum_amount [String] The minimum amount to charge in a given billing period for the prices this adjus
605
- # ...
606
586
  #
607
587
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
608
588
  #
@@ -664,10 +644,8 @@ module Orb
664
644
  # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
665
645
  #
666
646
  # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
667
- # ...
668
647
  #
669
648
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
670
- # ...
671
649
  #
672
650
  # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
673
651
  #
@@ -678,6 +656,18 @@ module Orb
678
656
 
679
657
  # @!method self.variants
680
658
  # @return [Array(Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum)]
659
+
660
+ define_sorbet_constant!(:Variants) do
661
+ T.type_alias do
662
+ T.any(
663
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount,
664
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount,
665
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
666
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum,
667
+ Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum
668
+ )
669
+ end
670
+ end
681
671
  end
682
672
  end
683
673
 
@@ -713,13 +703,10 @@ module Orb
713
703
  # for more details.
714
704
  #
715
705
  # @param day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
716
- # ...
717
706
  #
718
707
  # @param month [Integer, nil] The month on which the billing cycle is anchored (e.g. a quarterly price anchore
719
- # ...
720
708
  #
721
709
  # @param year [Integer, nil] The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anc
722
- # ...
723
710
  end
724
711
 
725
712
  module DiscountInterval
@@ -832,7 +819,6 @@ module Orb
832
819
  # @param end_date [Time, nil] The end date of the discount interval.
833
820
  #
834
821
  # @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
835
- # ...
836
822
  #
837
823
  # @param start_date [Time] The start date of the discount interval.
838
824
  #
@@ -890,13 +876,22 @@ module Orb
890
876
  # @param start_date [Time] The start date of the discount interval.
891
877
  #
892
878
  # @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
893
- # ...
894
879
  #
895
880
  # @param discount_type [Symbol, :usage]
896
881
  end
897
882
 
898
883
  # @!method self.variants
899
884
  # @return [Array(Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage)]
885
+
886
+ define_sorbet_constant!(:Variants) do
887
+ T.type_alias do
888
+ T.any(
889
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount,
890
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage,
891
+ Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage
892
+ )
893
+ end
894
+ end
900
895
  end
901
896
 
902
897
  class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
@@ -971,7 +966,6 @@ module Orb
971
966
  # @param end_date [Time, nil] The end date of the maximum interval.
972
967
  #
973
968
  # @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
974
- # ...
975
969
  #
976
970
  # @param start_date [Time] The start date of the maximum interval.
977
971
  end
@@ -1020,7 +1014,6 @@ module Orb
1020
1014
  # @param end_date [Time, nil] The end date of the minimum interval.
1021
1015
  #
1022
1016
  # @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
1023
- # ...
1024
1017
  #
1025
1018
  # @param start_date [Time] The start date of the minimum interval.
1026
1019
  end
@@ -1100,8 +1093,8 @@ module Orb
1100
1093
  # For more on the types of prices, see
1101
1094
  # [the core concepts documentation](/core-concepts#plan-and-price)
1102
1095
  #
1103
- # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk]
1104
- required :price, union: -> { Orb::Models::Price }
1096
+ # @return [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk]
1097
+ required :price, union: -> { Orb::Price }
1105
1098
 
1106
1099
  # @!attribute start_date
1107
1100
  # The start date of the price interval. This is the date that Orb starts billing
@@ -1130,27 +1123,20 @@ module Orb
1130
1123
  # @param billing_cycle_day [Integer] The day of the month that Orb bills for this price
1131
1124
  #
1132
1125
  # @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
1133
- # ...
1134
1126
  #
1135
1127
  # @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
1136
- # ...
1137
1128
  #
1138
1129
  # @param end_date [Time, nil] The end date of the price interval. This is the date that Orb stops billing for
1139
- # ...
1140
1130
  #
1141
1131
  # @param filter [String, nil] An additional filter to apply to usage queries.
1142
1132
  #
1143
1133
  # @param fixed_fee_quantity_transitions [Array<Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
1144
- # ...
1145
1134
  #
1146
- # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
1147
- # ...
1135
+ # @param price [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
1148
1136
  #
1149
1137
  # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
1150
- # ...
1151
1138
  #
1152
1139
  # @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
1153
- # ...
1154
1140
 
1155
1141
  class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
1156
1142
  # @!attribute effective_date
@@ -1226,39 +1212,39 @@ module Orb
1226
1212
  # @!attribute created_credit_notes
1227
1213
  # The credit notes that were created as part of this operation.
1228
1214
  #
1229
- # @return [Array<Orb::Models::CreditNote>]
1230
- required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
1215
+ # @return [Array<Orb::CreditNote>]
1216
+ required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
1231
1217
 
1232
1218
  # @!attribute created_invoices
1233
1219
  # The invoices that were created as part of this operation.
1234
1220
  #
1235
- # @return [Array<Orb::Models::Invoice>]
1236
- required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
1221
+ # @return [Array<Orb::Invoice>]
1222
+ required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
1237
1223
 
1238
1224
  # @!attribute voided_credit_notes
1239
1225
  # The credit notes that were voided as part of this operation.
1240
1226
  #
1241
- # @return [Array<Orb::Models::CreditNote>]
1242
- required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
1227
+ # @return [Array<Orb::CreditNote>]
1228
+ required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
1243
1229
 
1244
1230
  # @!attribute voided_invoices
1245
1231
  # The invoices that were voided as part of this operation.
1246
1232
  #
1247
- # @return [Array<Orb::Models::Invoice>]
1248
- required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
1233
+ # @return [Array<Orb::Invoice>]
1234
+ required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
1249
1235
 
1250
1236
  # @!method initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:)
1251
1237
  # The resources that were changed as part of this operation. Only present when
1252
1238
  # fetched through the subscription changes API or if the
1253
1239
  # `include_changed_resources` parameter was passed in the request.
1254
1240
  #
1255
- # @param created_credit_notes [Array<Orb::Models::CreditNote>] The credit notes that were created as part of this operation.
1241
+ # @param created_credit_notes [Array<Orb::CreditNote>] The credit notes that were created as part of this operation.
1256
1242
  #
1257
- # @param created_invoices [Array<Orb::Models::Invoice>] The invoices that were created as part of this operation.
1243
+ # @param created_invoices [Array<Orb::Invoice>] The invoices that were created as part of this operation.
1258
1244
  #
1259
- # @param voided_credit_notes [Array<Orb::Models::CreditNote>] The credit notes that were voided as part of this operation.
1245
+ # @param voided_credit_notes [Array<Orb::CreditNote>] The credit notes that were voided as part of this operation.
1260
1246
  #
1261
- # @param voided_invoices [Array<Orb::Models::Invoice>] The invoices that were voided as part of this operation.
1247
+ # @param voided_invoices [Array<Orb::Invoice>] The invoices that were voided as part of this operation.
1262
1248
  end
1263
1249
  end
1264
1250
  end