orb-billing 1.14.0 → 1.15.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 (347) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/lib/orb/client.rb +14 -0
  4. data/lib/orb/internal/transport/base_client.rb +5 -0
  5. data/lib/orb/internal/type/union.rb +13 -27
  6. data/lib/orb/models/accounting_provider_config.rb +14 -3
  7. data/lib/orb/models/adjustment_interval.rb +185 -3
  8. data/lib/orb/models/alert.rb +105 -1
  9. data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
  10. data/lib/orb/models/alert_update_params.rb +113 -1
  11. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
  12. data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
  13. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  14. data/lib/orb/models/conversion_rate_config.rb +18 -0
  15. data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
  16. data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
  17. data/lib/orb/models/customer.rb +111 -4
  18. data/lib/orb/models/customer_create_params.rb +6 -1
  19. data/lib/orb/models/customer_tax_id.rb +15 -1
  20. data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
  21. data/lib/orb/models/customer_update_params.rb +16 -2
  22. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
  23. data/lib/orb/models/customers/credit_list_response.rb +152 -1
  24. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
  25. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
  26. data/lib/orb/models/dimensional_price_group.rb +1 -1
  27. data/lib/orb/models/discount.rb +145 -1
  28. data/lib/orb/models/event_ingest_params.rb +5 -2
  29. data/lib/orb/models/invoice.rb +198 -10
  30. data/lib/orb/models/invoice_create_params.rb +6 -5
  31. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  32. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  33. data/lib/orb/models/invoice_level_discount.rb +145 -1
  34. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  35. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  36. data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
  37. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  38. data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
  39. data/lib/orb/models/mutated_subscription.rb +169 -4
  40. data/lib/orb/models/new_allocation_price.rb +11 -1
  41. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  42. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  43. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  44. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  45. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  46. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  47. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  48. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  49. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  50. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  51. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  52. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  53. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  54. data/lib/orb/models/new_floating_package_price.rb +1 -3
  55. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  56. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  57. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  58. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  59. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  60. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  61. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  62. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  63. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  64. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  65. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  66. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  67. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  68. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  69. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  70. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  71. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  72. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  73. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  74. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  75. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  76. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  77. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  78. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  79. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  80. data/lib/orb/models/new_plan_package_price.rb +1 -5
  81. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  82. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  83. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  84. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  85. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  86. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  87. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  88. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  89. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  90. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  91. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  92. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  93. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  94. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  95. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  96. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  97. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  98. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  99. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  100. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  101. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  102. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  103. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  104. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  105. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  106. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  107. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  108. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  109. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  110. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  111. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  112. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  113. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  114. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  115. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  116. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  117. data/lib/orb/models/per_price_cost.rb +2 -2
  118. data/lib/orb/models/plan.rb +189 -9
  119. data/lib/orb/models/plan_create_params.rb +1047 -8228
  120. data/lib/orb/models/plan_update_params.rb +9 -1
  121. data/lib/orb/models/plan_version.rb +186 -5
  122. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  123. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  124. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  125. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  126. data/lib/orb/models/price.rb +2614 -1268
  127. data/lib/orb/models/price_create_params.rb +866 -49
  128. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  129. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  130. data/lib/orb/models/price_interval.rb +2 -2
  131. data/lib/orb/models/subscription.rb +168 -4
  132. data/lib/orb/models/subscription_create_params.rb +2818 -674
  133. data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
  134. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
  135. data/lib/orb/models/subscription_update_params.rb +12 -1
  136. data/lib/orb/models.rb +2 -0
  137. data/lib/orb/resources/alerts.rb +14 -3
  138. data/lib/orb/resources/customers/credits/ledger.rb +28 -14
  139. data/lib/orb/resources/customers.rb +6 -2
  140. data/lib/orb/resources/events.rb +7 -34
  141. data/lib/orb/resources/invoices.rb +6 -2
  142. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  143. data/lib/orb/resources/licenses/usage.rb +2 -2
  144. data/lib/orb/resources/metrics.rb +5 -5
  145. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  146. data/lib/orb/resources/plans.rb +9 -5
  147. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  148. data/lib/orb/resources/prices.rb +5 -5
  149. data/lib/orb/resources/subscriptions.rb +20 -3
  150. data/lib/orb/version.rb +1 -1
  151. data/lib/orb.rb +1 -0
  152. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  153. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  154. data/rbi/orb/models/alert.rbi +172 -3
  155. data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
  156. data/rbi/orb/models/alert_update_params.rbi +208 -0
  157. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
  158. data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
  159. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  160. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  161. data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
  162. data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
  163. data/rbi/orb/models/customer.rbi +190 -10
  164. data/rbi/orb/models/customer_create_params.rbi +12 -2
  165. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  166. data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
  167. data/rbi/orb/models/customer_update_params.rbi +22 -2
  168. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
  169. data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
  170. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
  171. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
  172. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  173. data/rbi/orb/models/discount.rbi +269 -1
  174. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  175. data/rbi/orb/models/invoice.rbi +360 -5
  176. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  177. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  178. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  179. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  180. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  181. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  182. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
  183. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  184. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
  185. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  186. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  187. data/rbi/orb/models/per_price_cost.rbi +3 -0
  188. data/rbi/orb/models/plan.rbi +339 -2
  189. data/rbi/orb/models/plan_create_params.rbi +1877 -14138
  190. data/rbi/orb/models/plan_update_params.rbi +8 -0
  191. data/rbi/orb/models/plan_version.rbi +339 -0
  192. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  193. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  194. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  195. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  196. data/rbi/orb/models/price.rbi +4552 -2285
  197. data/rbi/orb/models/price_create_params.rbi +1540 -114
  198. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  199. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  200. data/rbi/orb/models/price_interval.rbi +3 -0
  201. data/rbi/orb/models/subscription.rbi +324 -2
  202. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  203. data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
  204. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
  205. data/rbi/orb/models/subscription_update_params.rbi +14 -0
  206. data/rbi/orb/models.rbi +2 -0
  207. data/rbi/orb/resources/alerts.rbi +39 -4
  208. data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
  209. data/rbi/orb/resources/customers.rbi +23 -0
  210. data/rbi/orb/resources/events.rbi +8 -35
  211. data/rbi/orb/resources/invoices.rbi +9 -3
  212. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  213. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  214. data/rbi/orb/resources/metrics.rbi +5 -5
  215. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  216. data/rbi/orb/resources/plans.rbi +9 -3
  217. data/rbi/orb/resources/prices.rbi +3 -0
  218. data/rbi/orb/resources/subscriptions.rbi +29 -0
  219. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  220. data/sig/orb/models/adjustment_interval.rbs +134 -0
  221. data/sig/orb/models/alert.rbs +85 -3
  222. data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
  223. data/sig/orb/models/alert_update_params.rbs +86 -1
  224. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
  225. data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
  226. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  227. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  228. data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
  229. data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
  230. data/sig/orb/models/customer.rbs +70 -4
  231. data/sig/orb/models/customer_create_params.rbs +2 -2
  232. data/sig/orb/models/customer_tax_id.rbs +20 -2
  233. data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
  234. data/sig/orb/models/customer_update_params.rbs +7 -2
  235. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
  236. data/sig/orb/models/customers/credit_list_response.rbs +124 -3
  237. data/sig/orb/models/discount.rbs +114 -0
  238. data/sig/orb/models/invoice.rbs +140 -1
  239. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  240. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  241. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  242. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  243. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  244. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
  245. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  246. data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
  247. data/sig/orb/models/mutated_subscription.rbs +124 -0
  248. data/sig/orb/models/new_allocation_price.rbs +5 -0
  249. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  250. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  251. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  252. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  253. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  254. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  255. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  256. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  257. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  258. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  259. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  260. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  261. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  262. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  263. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  264. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  265. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  266. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  267. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  268. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  269. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  270. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  271. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  272. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  273. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  274. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  275. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  276. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  277. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  278. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  279. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  280. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  281. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  282. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  283. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  284. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  285. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  286. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  287. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  288. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  289. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  290. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  291. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  292. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  293. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  294. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  295. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  296. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  297. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  298. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  299. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  300. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  301. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  302. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  303. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  304. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  305. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  306. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  307. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  308. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  309. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  310. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  311. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  312. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  313. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  314. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  315. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  316. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  317. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  318. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  319. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  320. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  321. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  322. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  323. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  324. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  325. data/sig/orb/models/plan.rbs +134 -0
  326. data/sig/orb/models/plan_create_params.rbs +836 -5728
  327. data/sig/orb/models/plan_update_params.rbs +5 -0
  328. data/sig/orb/models/plan_version.rbs +134 -0
  329. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  330. data/sig/orb/models/price.rbs +2200 -1150
  331. data/sig/orb/models/price_create_params.rbs +611 -23
  332. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  333. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  334. data/sig/orb/models/subscription.rbs +124 -0
  335. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  336. data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
  337. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
  338. data/sig/orb/models/subscription_update_params.rbs +5 -0
  339. data/sig/orb/models.rbs +2 -0
  340. data/sig/orb/resources/alerts.rbs +5 -1
  341. data/sig/orb/resources/customers.rbs +2 -0
  342. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  343. data/sig/orb/resources/licenses/usage.rbs +2 -2
  344. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  345. data/sig/orb/resources/plans.rbs +2 -0
  346. data/sig/orb/resources/subscriptions.rbs +3 -0
  347. metadata +6 -7
@@ -275,6 +275,7 @@ module Orb
275
275
  ),
276
276
  align_billing_with_subscription_start_date: T::Boolean,
277
277
  auto_collection: T.nilable(T::Boolean),
278
+ auto_issuance: T.nilable(T::Boolean),
278
279
  aws_region: T.nilable(String),
279
280
  billing_cycle_anchor_configuration:
280
281
  T.nilable(Orb::BillingCycleAnchorConfiguration::OrHash),
@@ -335,6 +336,11 @@ module Orb
335
336
  # charged with the saved payment method on the due date. If not specified, this
336
337
  # defaults to the behavior configured for this customer.
337
338
  auto_collection: nil,
339
+ # Used to determine if invoices for this subscription will be automatically
340
+ # issued. If true, invoices will be automatically issued. If false, invoices will
341
+ # require manual approval. If `null` is specified, this defaults to the behavior
342
+ # configured for this customer.
343
+ auto_issuance: nil,
338
344
  aws_region: nil,
339
345
  billing_cycle_anchor_configuration: nil,
340
346
  # Redemption code to be used for this subscription. If the coupon cannot be found
@@ -423,6 +429,7 @@ module Orb
423
429
  params(
424
430
  subscription_id: String,
425
431
  auto_collection: T.nilable(T::Boolean),
432
+ auto_issuance: T.nilable(T::Boolean),
426
433
  default_invoice_memo: T.nilable(String),
427
434
  invoicing_threshold: T.nilable(String),
428
435
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
@@ -436,6 +443,11 @@ module Orb
436
443
  # charged with the saved payment method on the due date. This property defaults to
437
444
  # the plan's behavior.
438
445
  auto_collection: nil,
446
+ # Used to determine if invoices for this subscription will be automatically
447
+ # issued. If true, invoices will be automatically issued. If false, invoices will
448
+ # require manual approval. If `null` is specified, this defaults to the behavior
449
+ # configured for this customer.
450
+ auto_issuance: nil,
439
451
  # Determines the default memo on this subscription's invoices. Note that if this
440
452
  # is not provided, it is determined by the plan configuration.
441
453
  default_invoice_memo: nil,
@@ -465,6 +477,11 @@ module Orb
465
477
  # customer_id or external_customer_id query parameters. To filter subscriptions
466
478
  # for multiple customers, use the customer_id[] or external_customer_id[] query
467
479
  # parameters.
480
+ #
481
+ # Subscriptions can be filtered by status using the status query parameter (one of
482
+ # `active`, `ended`, or `upcoming`). To filter for multiple statuses in a single
483
+ # request, use the status[] query parameter, e.g.
484
+ # `status[]=active&status[]=ended`.
468
485
  sig do
469
486
  params(
470
487
  created_at_gt: T.nilable(Time),
@@ -1250,6 +1267,7 @@ module Orb
1250
1267
  ),
1251
1268
  align_billing_with_plan_change_date: T.nilable(T::Boolean),
1252
1269
  auto_collection: T.nilable(T::Boolean),
1270
+ auto_issuance: T.nilable(T::Boolean),
1253
1271
  billing_cycle_alignment:
1254
1272
  T.nilable(
1255
1273
  Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::OrSymbol
@@ -1314,6 +1332,11 @@ module Orb
1314
1332
  # charged with the saved payment method on the due date. If not specified, this
1315
1333
  # defaults to the behavior configured for this customer.
1316
1334
  auto_collection: nil,
1335
+ # Used to determine if invoices for this subscription will be automatically
1336
+ # issued. If true, invoices will be automatically issued. If false, invoices will
1337
+ # require manual approval. If `null` is specified, this defaults to the behavior
1338
+ # configured for this customer.
1339
+ auto_issuance: nil,
1317
1340
  # Reset billing periods to be aligned with the plan change's effective date or
1318
1341
  # start of the month. Defaults to `unchanged` which keeps subscription's existing
1319
1342
  # billing cycle alignment.
@@ -1415,6 +1438,12 @@ module Orb
1415
1438
  # To be eligible, the subscription must currently be active and have a future
1416
1439
  # cancellation. This operation will turn on auto-renew, ensuring that the
1417
1440
  # subscription does not end at the currently scheduled cancellation time.
1441
+ #
1442
+ # Note: uncancellation is a lossy operation. Price intervals that were cut short
1443
+ # by the cancellation are extended to infinity (original end dates are lost), and
1444
+ # future intervals or phases scheduled after the cancellation time are permanently
1445
+ # deleted. For complex subscriptions with phases or scheduled plan changes,
1446
+ # consider creating a new plan change instead of uncancelling.
1418
1447
  sig do
1419
1448
  params(
1420
1449
  subscription_id: String,
@@ -1,19 +1,36 @@
1
1
  module Orb
2
2
  module Models
3
3
  type accounting_provider_config =
4
- { external_provider_id: String, provider_type: String }
4
+ {
5
+ external_provider_id: String,
6
+ provider_type: Orb::Models::AccountingProviderConfig::provider_type
7
+ }
5
8
 
6
9
  class AccountingProviderConfig < Orb::Internal::Type::BaseModel
7
10
  attr_accessor external_provider_id: String
8
11
 
9
- attr_accessor provider_type: String
12
+ attr_accessor provider_type: Orb::Models::AccountingProviderConfig::provider_type
10
13
 
11
14
  def initialize: (
12
15
  external_provider_id: String,
13
- provider_type: String
16
+ provider_type: Orb::Models::AccountingProviderConfig::provider_type
14
17
  ) -> void
15
18
 
16
- def to_hash: -> { external_provider_id: String, provider_type: String }
19
+ def to_hash: -> {
20
+ external_provider_id: String,
21
+ provider_type: Orb::Models::AccountingProviderConfig::provider_type
22
+ }
23
+
24
+ type provider_type = :quickbooks | :netsuite
25
+
26
+ module ProviderType
27
+ extend Orb::Internal::Type::Enum
28
+
29
+ QUICKBOOKS: :quickbooks
30
+ NETSUITE: :netsuite
31
+
32
+ def self?.values: -> ::Array[Orb::Models::AccountingProviderConfig::provider_type]
33
+ end
17
34
  end
18
35
  end
19
36
  end
@@ -40,12 +40,146 @@ module Orb
40
40
  Orb::PlanPhaseUsageDiscountAdjustment
41
41
  | Orb::PlanPhaseAmountDiscountAdjustment
42
42
  | Orb::PlanPhasePercentageDiscountAdjustment
43
+ | Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount
43
44
  | Orb::PlanPhaseMinimumAdjustment
44
45
  | Orb::PlanPhaseMaximumAdjustment
45
46
 
46
47
  module Adjustment
47
48
  extend Orb::Internal::Type::Union
48
49
 
50
+ type tiered_percentage_discount =
51
+ {
52
+ id: String,
53
+ adjustment_type: :tiered_percentage_discount,
54
+ applies_to_price_ids: ::Array[String],
55
+ filters: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter],
56
+ is_invoice_level: bool,
57
+ plan_phase_order: Integer?,
58
+ reason: String?,
59
+ replaces_adjustment_id: String?,
60
+ tiers: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier]
61
+ }
62
+
63
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
64
+ attr_accessor id: String
65
+
66
+ attr_accessor adjustment_type: :tiered_percentage_discount
67
+
68
+ attr_accessor applies_to_price_ids: ::Array[String]
69
+
70
+ attr_accessor filters: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter]
71
+
72
+ attr_accessor is_invoice_level: bool
73
+
74
+ attr_accessor plan_phase_order: Integer?
75
+
76
+ attr_accessor reason: String?
77
+
78
+ attr_accessor replaces_adjustment_id: String?
79
+
80
+ attr_accessor tiers: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier]
81
+
82
+ def initialize: (
83
+ id: String,
84
+ applies_to_price_ids: ::Array[String],
85
+ filters: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter],
86
+ is_invoice_level: bool,
87
+ plan_phase_order: Integer?,
88
+ reason: String?,
89
+ replaces_adjustment_id: String?,
90
+ tiers: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier],
91
+ ?adjustment_type: :tiered_percentage_discount
92
+ ) -> void
93
+
94
+ def to_hash: -> {
95
+ id: String,
96
+ adjustment_type: :tiered_percentage_discount,
97
+ applies_to_price_ids: ::Array[String],
98
+ filters: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter],
99
+ is_invoice_level: bool,
100
+ plan_phase_order: Integer?,
101
+ reason: String?,
102
+ replaces_adjustment_id: String?,
103
+ tiers: ::Array[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier]
104
+ }
105
+
106
+ type filter =
107
+ {
108
+ field: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::field,
109
+ operator: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::operator,
110
+ values: ::Array[String]
111
+ }
112
+
113
+ class Filter < Orb::Internal::Type::BaseModel
114
+ attr_accessor field: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::field
115
+
116
+ attr_accessor operator: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::operator
117
+
118
+ attr_accessor values: ::Array[String]
119
+
120
+ def initialize: (
121
+ field: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::field,
122
+ operator: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::operator,
123
+ values: ::Array[String]
124
+ ) -> void
125
+
126
+ def to_hash: -> {
127
+ field: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::field,
128
+ operator: Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::operator,
129
+ values: ::Array[String]
130
+ }
131
+
132
+ type field =
133
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
134
+
135
+ module Field
136
+ extend Orb::Internal::Type::Enum
137
+
138
+ PRICE_ID: :price_id
139
+ ITEM_ID: :item_id
140
+ PRICE_TYPE: :price_type
141
+ CURRENCY: :currency
142
+ PRICING_UNIT_ID: :pricing_unit_id
143
+
144
+ def self?.values: -> ::Array[Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::field]
145
+ end
146
+
147
+ type operator = :includes | :excludes
148
+
149
+ module Operator
150
+ extend Orb::Internal::Type::Enum
151
+
152
+ INCLUDES: :includes
153
+ EXCLUDES: :excludes
154
+
155
+ def self?.values: -> ::Array[Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::operator]
156
+ end
157
+ end
158
+
159
+ type tier =
160
+ { lower_bound: Float, percentage: Float, upper_bound: Float? }
161
+
162
+ class Tier < Orb::Internal::Type::BaseModel
163
+ attr_accessor lower_bound: Float
164
+
165
+ attr_accessor percentage: Float
166
+
167
+ attr_accessor upper_bound: Float?
168
+
169
+ def initialize: (
170
+ lower_bound: Float,
171
+ percentage: Float,
172
+ ?upper_bound: Float?
173
+ ) -> void
174
+
175
+ def to_hash: -> {
176
+ lower_bound: Float,
177
+ percentage: Float,
178
+ upper_bound: Float?
179
+ }
180
+ end
181
+ end
182
+
49
183
  def self?.variants: -> ::Array[Orb::Models::AdjustmentInterval::adjustment]
50
184
  end
51
185
  end
@@ -14,7 +14,9 @@ module Orb
14
14
  type: Orb::Models::Alert::type_,
15
15
  balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?,
16
16
  grouping_keys: ::Array[String]?,
17
- license_type: Orb::Alert::LicenseType?
17
+ license_type: Orb::Alert::LicenseType?,
18
+ price_filters: ::Array[Orb::Alert::PriceFilter]?,
19
+ threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]?
18
20
  }
19
21
 
20
22
  class Alert < Orb::Internal::Type::BaseModel
@@ -44,6 +46,10 @@ module Orb
44
46
 
45
47
  attr_accessor license_type: Orb::Alert::LicenseType?
46
48
 
49
+ attr_accessor price_filters: ::Array[Orb::Alert::PriceFilter]?
50
+
51
+ attr_accessor threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]?
52
+
47
53
  def initialize: (
48
54
  id: String,
49
55
  created_at: Time,
@@ -57,7 +63,9 @@ module Orb
57
63
  type: Orb::Models::Alert::type_,
58
64
  ?balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?,
59
65
  ?grouping_keys: ::Array[String]?,
60
- ?license_type: Orb::Alert::LicenseType?
66
+ ?license_type: Orb::Alert::LicenseType?,
67
+ ?price_filters: ::Array[Orb::Alert::PriceFilter]?,
68
+ ?threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]?
61
69
  ) -> void
62
70
 
63
71
  def to_hash: -> {
@@ -73,7 +81,9 @@ module Orb
73
81
  type: Orb::Models::Alert::type_,
74
82
  balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?,
75
83
  grouping_keys: ::Array[String]?,
76
- license_type: Orb::Alert::LicenseType?
84
+ license_type: Orb::Alert::LicenseType?,
85
+ price_filters: ::Array[Orb::Alert::PriceFilter]?,
86
+ threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]?
77
87
  }
78
88
 
79
89
  type metric = { id: String }
@@ -160,6 +170,78 @@ module Orb
160
170
 
161
171
  def to_hash: -> { id: String }
162
172
  end
173
+
174
+ type price_filter =
175
+ {
176
+ field: Orb::Models::Alert::PriceFilter::field,
177
+ operator: Orb::Models::Alert::PriceFilter::operator,
178
+ values: ::Array[String]
179
+ }
180
+
181
+ class PriceFilter < Orb::Internal::Type::BaseModel
182
+ attr_accessor field: Orb::Models::Alert::PriceFilter::field
183
+
184
+ attr_accessor operator: Orb::Models::Alert::PriceFilter::operator
185
+
186
+ attr_accessor values: ::Array[String]
187
+
188
+ def initialize: (
189
+ field: Orb::Models::Alert::PriceFilter::field,
190
+ operator: Orb::Models::Alert::PriceFilter::operator,
191
+ values: ::Array[String]
192
+ ) -> void
193
+
194
+ def to_hash: -> {
195
+ field: Orb::Models::Alert::PriceFilter::field,
196
+ operator: Orb::Models::Alert::PriceFilter::operator,
197
+ values: ::Array[String]
198
+ }
199
+
200
+ type field =
201
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
202
+
203
+ module Field
204
+ extend Orb::Internal::Type::Enum
205
+
206
+ PRICE_ID: :price_id
207
+ ITEM_ID: :item_id
208
+ PRICE_TYPE: :price_type
209
+ CURRENCY: :currency
210
+ PRICING_UNIT_ID: :pricing_unit_id
211
+
212
+ def self?.values: -> ::Array[Orb::Models::Alert::PriceFilter::field]
213
+ end
214
+
215
+ type operator = :includes | :excludes
216
+
217
+ module Operator
218
+ extend Orb::Internal::Type::Enum
219
+
220
+ INCLUDES: :includes
221
+ EXCLUDES: :excludes
222
+
223
+ def self?.values: -> ::Array[Orb::Models::Alert::PriceFilter::operator]
224
+ end
225
+ end
226
+
227
+ type threshold_override =
228
+ { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] }
229
+
230
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
231
+ attr_accessor group_values: ::Array[String]
232
+
233
+ attr_accessor thresholds: ::Array[Orb::Threshold]
234
+
235
+ def initialize: (
236
+ group_values: ::Array[String],
237
+ thresholds: ::Array[Orb::Threshold]
238
+ ) -> void
239
+
240
+ def to_hash: -> {
241
+ group_values: ::Array[String],
242
+ thresholds: ::Array[Orb::Threshold]
243
+ }
244
+ end
163
245
  end
164
246
  end
165
247
  end
@@ -5,9 +5,11 @@ module Orb
5
5
  subscription_id: String,
6
6
  thresholds: ::Array[Orb::Threshold],
7
7
  type: Orb::Models::AlertCreateForSubscriptionParams::type_,
8
+ currency: String?,
8
9
  grouping_keys: ::Array[String]?,
9
10
  metric_id: String?,
10
- pricing_unit_id: String?
11
+ price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?,
12
+ threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?
11
13
  }
12
14
  & Orb::Internal::Type::request_parameters
13
15
 
@@ -21,19 +23,25 @@ module Orb
21
23
 
22
24
  attr_accessor type: Orb::Models::AlertCreateForSubscriptionParams::type_
23
25
 
26
+ attr_accessor currency: String?
27
+
24
28
  attr_accessor grouping_keys: ::Array[String]?
25
29
 
26
30
  attr_accessor metric_id: String?
27
31
 
28
- attr_accessor pricing_unit_id: String?
32
+ attr_accessor price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?
33
+
34
+ attr_accessor threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?
29
35
 
30
36
  def initialize: (
31
37
  subscription_id: String,
32
38
  thresholds: ::Array[Orb::Threshold],
33
39
  type: Orb::Models::AlertCreateForSubscriptionParams::type_,
40
+ ?currency: String?,
34
41
  ?grouping_keys: ::Array[String]?,
35
42
  ?metric_id: String?,
36
- ?pricing_unit_id: String?,
43
+ ?price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?,
44
+ ?threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?,
37
45
  ?request_options: Orb::request_opts
38
46
  ) -> void
39
47
 
@@ -41,9 +49,11 @@ module Orb
41
49
  subscription_id: String,
42
50
  thresholds: ::Array[Orb::Threshold],
43
51
  type: Orb::Models::AlertCreateForSubscriptionParams::type_,
52
+ currency: String?,
44
53
  grouping_keys: ::Array[String]?,
45
54
  metric_id: String?,
46
- pricing_unit_id: String?,
55
+ price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?,
56
+ threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?,
47
57
  request_options: Orb::RequestOptions
48
58
  }
49
59
 
@@ -57,6 +67,78 @@ module Orb
57
67
 
58
68
  def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::type_]
59
69
  end
70
+
71
+ type price_filter =
72
+ {
73
+ field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field,
74
+ operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator,
75
+ values: ::Array[String]
76
+ }
77
+
78
+ class PriceFilter < Orb::Internal::Type::BaseModel
79
+ attr_accessor field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field
80
+
81
+ attr_accessor operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator
82
+
83
+ attr_accessor values: ::Array[String]
84
+
85
+ def initialize: (
86
+ field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field,
87
+ operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator,
88
+ values: ::Array[String]
89
+ ) -> void
90
+
91
+ def to_hash: -> {
92
+ field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field,
93
+ operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator,
94
+ values: ::Array[String]
95
+ }
96
+
97
+ type field =
98
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
99
+
100
+ module Field
101
+ extend Orb::Internal::Type::Enum
102
+
103
+ PRICE_ID: :price_id
104
+ ITEM_ID: :item_id
105
+ PRICE_TYPE: :price_type
106
+ CURRENCY: :currency
107
+ PRICING_UNIT_ID: :pricing_unit_id
108
+
109
+ def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field]
110
+ end
111
+
112
+ type operator = :includes | :excludes
113
+
114
+ module Operator
115
+ extend Orb::Internal::Type::Enum
116
+
117
+ INCLUDES: :includes
118
+ EXCLUDES: :excludes
119
+
120
+ def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator]
121
+ end
122
+ end
123
+
124
+ type threshold_override =
125
+ { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] }
126
+
127
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
128
+ attr_accessor group_values: ::Array[String]
129
+
130
+ attr_accessor thresholds: ::Array[Orb::Threshold]
131
+
132
+ def initialize: (
133
+ group_values: ::Array[String],
134
+ thresholds: ::Array[Orb::Threshold]
135
+ ) -> void
136
+
137
+ def to_hash: -> {
138
+ group_values: ::Array[String],
139
+ thresholds: ::Array[Orb::Threshold]
140
+ }
141
+ end
60
142
  end
61
143
  end
62
144
  end
@@ -1,7 +1,12 @@
1
1
  module Orb
2
2
  module Models
3
3
  type alert_update_params =
4
- { alert_configuration_id: String, thresholds: ::Array[Orb::Threshold] }
4
+ {
5
+ alert_configuration_id: String,
6
+ thresholds: ::Array[Orb::Threshold],
7
+ price_filters: ::Array[Orb::AlertUpdateParams::PriceFilter]?,
8
+ threshold_overrides: ::Array[Orb::AlertUpdateParams::ThresholdOverride]?
9
+ }
5
10
  & Orb::Internal::Type::request_parameters
6
11
 
7
12
  class AlertUpdateParams < Orb::Internal::Type::BaseModel
@@ -12,17 +17,97 @@ module Orb
12
17
 
13
18
  attr_accessor thresholds: ::Array[Orb::Threshold]
14
19
 
20
+ attr_accessor price_filters: ::Array[Orb::AlertUpdateParams::PriceFilter]?
21
+
22
+ attr_accessor threshold_overrides: ::Array[Orb::AlertUpdateParams::ThresholdOverride]?
23
+
15
24
  def initialize: (
16
25
  alert_configuration_id: String,
17
26
  thresholds: ::Array[Orb::Threshold],
27
+ ?price_filters: ::Array[Orb::AlertUpdateParams::PriceFilter]?,
28
+ ?threshold_overrides: ::Array[Orb::AlertUpdateParams::ThresholdOverride]?,
18
29
  ?request_options: Orb::request_opts
19
30
  ) -> void
20
31
 
21
32
  def to_hash: -> {
22
33
  alert_configuration_id: String,
23
34
  thresholds: ::Array[Orb::Threshold],
35
+ price_filters: ::Array[Orb::AlertUpdateParams::PriceFilter]?,
36
+ threshold_overrides: ::Array[Orb::AlertUpdateParams::ThresholdOverride]?,
24
37
  request_options: Orb::RequestOptions
25
38
  }
39
+
40
+ type price_filter =
41
+ {
42
+ field: Orb::Models::AlertUpdateParams::PriceFilter::field,
43
+ operator: Orb::Models::AlertUpdateParams::PriceFilter::operator,
44
+ values: ::Array[String]
45
+ }
46
+
47
+ class PriceFilter < Orb::Internal::Type::BaseModel
48
+ attr_accessor field: Orb::Models::AlertUpdateParams::PriceFilter::field
49
+
50
+ attr_accessor operator: Orb::Models::AlertUpdateParams::PriceFilter::operator
51
+
52
+ attr_accessor values: ::Array[String]
53
+
54
+ def initialize: (
55
+ field: Orb::Models::AlertUpdateParams::PriceFilter::field,
56
+ operator: Orb::Models::AlertUpdateParams::PriceFilter::operator,
57
+ values: ::Array[String]
58
+ ) -> void
59
+
60
+ def to_hash: -> {
61
+ field: Orb::Models::AlertUpdateParams::PriceFilter::field,
62
+ operator: Orb::Models::AlertUpdateParams::PriceFilter::operator,
63
+ values: ::Array[String]
64
+ }
65
+
66
+ type field =
67
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
68
+
69
+ module Field
70
+ extend Orb::Internal::Type::Enum
71
+
72
+ PRICE_ID: :price_id
73
+ ITEM_ID: :item_id
74
+ PRICE_TYPE: :price_type
75
+ CURRENCY: :currency
76
+ PRICING_UNIT_ID: :pricing_unit_id
77
+
78
+ def self?.values: -> ::Array[Orb::Models::AlertUpdateParams::PriceFilter::field]
79
+ end
80
+
81
+ type operator = :includes | :excludes
82
+
83
+ module Operator
84
+ extend Orb::Internal::Type::Enum
85
+
86
+ INCLUDES: :includes
87
+ EXCLUDES: :excludes
88
+
89
+ def self?.values: -> ::Array[Orb::Models::AlertUpdateParams::PriceFilter::operator]
90
+ end
91
+ end
92
+
93
+ type threshold_override =
94
+ { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] }
95
+
96
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
97
+ attr_accessor group_values: ::Array[String]
98
+
99
+ attr_accessor thresholds: ::Array[Orb::Threshold]
100
+
101
+ def initialize: (
102
+ group_values: ::Array[String],
103
+ thresholds: ::Array[Orb::Threshold]
104
+ ) -> void
105
+
106
+ def to_hash: -> {
107
+ group_values: ::Array[String],
108
+ thresholds: ::Array[Orb::Threshold]
109
+ }
110
+ end
26
111
  end
27
112
  end
28
113
  end