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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b84af6e70f3d30d1ef9552374daf2b0144fee6814f2966244bc9b34dbdbb0e6b
4
- data.tar.gz: b191864a2ff5b1b1d3bcacb4d6f4ceb4970b061a5d8cbc1e8e7b0c3d7e7855b5
3
+ metadata.gz: 1d305b878bb757ab7c0461ba4d35bd2560e829eae8bb2676103b62b27773d82f
4
+ data.tar.gz: d5253fbeb8bdec63084816df8c75aa129a131a3f041cccef9fa4c20b87aac356
5
5
  SHA512:
6
- metadata.gz: 05db33717edabb673e11a3b263cb4a8fa7a3e56bbf4e965b99164de2b72e7123f76610201f37f8b32873ac43d340ba1cbce45557cd68bf12f4d2dde5e0225a9b
7
- data.tar.gz: f936d843a726d2d4286f28b047422caf79a6fc6748c3ee8fede765edb7e1fa659156eb6f656de2c2849a1b34b2a40bd520fe2110d54f11fdf942e7d3b34cd9f9
6
+ metadata.gz: cef11be3d2248ba0e2acd7567cbf84ea311cbb155037959b97c936a5209278fd8eb77182fc10705cbc46dd34f3742bb0c7575bf946388a5787f9af720a945b54
7
+ data.tar.gz: 6385a21d5e76d000caebb5cfffde20e82a03b1629237969091403563b615fd76d22af28dd8c59210021d62a73aaa51a42342bd9e2464902e2092440e0c9e261a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.15.0](https://github.com/orbcorp/orb-ruby/compare/v1.14.0...v1.15.0) (2026-07-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** update SDK to the current API surface ([76b0a4c](https://github.com/orbcorp/orb-ruby/commit/76b0a4cae87319dc6bed426faf248048a1b12209))
9
+
10
+
11
+ ### Chores
12
+
13
+ * **internal:** remove unsupported release-please extra-file ([adb7182](https://github.com/orbcorp/orb-ruby/commit/adb7182e0c2d661afa1de1df07dca11286a133a2))
14
+
3
15
  ## 1.14.0 (2026-04-13)
4
16
 
5
17
  Full Changelog: [v1.13.0...v1.14.0](https://github.com/orbcorp/orb-ruby/compare/v1.13.0...v1.14.0)
data/lib/orb/client.rb CHANGED
@@ -193,6 +193,19 @@ module Orb
193
193
  raise ArgumentError.new("api_key is required, and can be set via environ: \"ORB_API_KEY\"")
194
194
  end
195
195
 
196
+ headers = {}
197
+ custom_headers_env = ENV["ORB_CUSTOM_HEADERS"]
198
+ unless custom_headers_env.nil?
199
+ parsed = {}
200
+ custom_headers_env.split("\n").each do |line|
201
+ colon = line.index(":")
202
+ unless colon.nil?
203
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
204
+ end
205
+ end
206
+ headers = parsed.merge(headers)
207
+ end
208
+
196
209
  @api_key = api_key.to_s
197
210
  @webhook_secret = webhook_secret&.to_s
198
211
 
@@ -202,6 +215,7 @@ module Orb
202
215
  max_retries: max_retries,
203
216
  initial_retry_delay: initial_retry_delay,
204
217
  max_retry_delay: max_retry_delay,
218
+ headers: headers,
205
219
  idempotency_header: idempotency_header
206
220
  )
207
221
 
@@ -306,6 +306,11 @@ module Orb
306
306
  Orb::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
313
+
309
314
  url = Orb::Internal::Util.join_parsed_uri(@base_url_components, {**req, path: path, query: query})
310
315
  headers, encoded = Orb::Internal::Util.encode_content(headers, body)
311
316
  {
@@ -6,38 +6,24 @@ module Orb
6
6
  # @api private
7
7
  #
8
8
  # @example
9
- # # `discount` is a `Orb::Discount`
10
- # case discount
11
- # when Orb::PercentageDiscount
12
- # puts(discount.discount_type)
13
- # when Orb::TrialDiscount
14
- # puts(discount.applies_to_price_ids)
15
- # when Orb::UsageDiscount
16
- # puts(discount.usage_discount)
9
+ # # `conversion_rate_config` is a `Orb::ConversionRateConfig`
10
+ # case conversion_rate_config
11
+ # when Orb::UnitConversionRateConfig
12
+ # puts(conversion_rate_config.conversion_rate_type)
13
+ # when Orb::TieredConversionRateConfig
14
+ # puts(conversion_rate_config.tiered_config)
17
15
  # else
18
- # puts(discount)
16
+ # puts(conversion_rate_config)
19
17
  # end
20
18
  #
21
19
  # @example
22
- # case discount
23
- # in {
24
- # discount_type: :percentage,
25
- # percentage_discount: percentage_discount,
26
- # applies_to_price_ids: applies_to_price_ids,
27
- # filters: filters
28
- # }
29
- # puts(percentage_discount)
30
- # in {discount_type: :trial, applies_to_price_ids: applies_to_price_ids, filters: filters, reason: reason}
31
- # puts(applies_to_price_ids)
32
- # in {
33
- # discount_type: :usage,
34
- # usage_discount: usage_discount,
35
- # applies_to_price_ids: applies_to_price_ids,
36
- # filters: filters
37
- # }
38
- # puts(usage_discount)
20
+ # case conversion_rate_config
21
+ # in {conversion_rate_type: :unit, unit_config: unit_config}
22
+ # puts(unit_config)
23
+ # in {conversion_rate_type: :tiered, tiered_config: tiered_config}
24
+ # puts(tiered_config)
39
25
  # else
40
- # puts(discount)
26
+ # puts(conversion_rate_config)
41
27
  # end
42
28
  module Union
43
29
  include Orb::Internal::Type::Converter
@@ -10,12 +10,23 @@ module Orb
10
10
 
11
11
  # @!attribute provider_type
12
12
  #
13
- # @return [String]
14
- required :provider_type, String
13
+ # @return [Symbol, Orb::Models::AccountingProviderConfig::ProviderType]
14
+ required :provider_type, enum: -> { Orb::AccountingProviderConfig::ProviderType }
15
15
 
16
16
  # @!method initialize(external_provider_id:, provider_type:)
17
17
  # @param external_provider_id [String]
18
- # @param provider_type [String]
18
+ # @param provider_type [Symbol, Orb::Models::AccountingProviderConfig::ProviderType]
19
+
20
+ # @see Orb::Models::AccountingProviderConfig#provider_type
21
+ module ProviderType
22
+ extend Orb::Internal::Type::Enum
23
+
24
+ QUICKBOOKS = :quickbooks
25
+ NETSUITE = :netsuite
26
+
27
+ # @!method self.values
28
+ # @return [Array<Symbol>]
29
+ end
19
30
  end
20
31
  end
21
32
  end
@@ -10,7 +10,7 @@ module Orb
10
10
 
11
11
  # @!attribute adjustment
12
12
  #
13
- # @return [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
13
+ # @return [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
14
14
  required :adjustment, union: -> { Orb::AdjustmentInterval::Adjustment }
15
15
 
16
16
  # @!attribute applies_to_price_interval_ids
@@ -34,7 +34,7 @@ module Orb
34
34
  # @!method initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
35
35
  # @param id [String]
36
36
  #
37
- # @param adjustment [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
37
+ # @param adjustment [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
38
38
  #
39
39
  # @param applies_to_price_interval_ids [Array<String>] The price interval IDs that this adjustment applies to.
40
40
  #
@@ -54,12 +54,194 @@ module Orb
54
54
 
55
55
  variant :percentage_discount, -> { Orb::PlanPhasePercentageDiscountAdjustment }
56
56
 
57
+ variant :tiered_percentage_discount, -> { Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount }
58
+
57
59
  variant :minimum, -> { Orb::PlanPhaseMinimumAdjustment }
58
60
 
59
61
  variant :maximum, -> { Orb::PlanPhaseMaximumAdjustment }
60
62
 
63
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
64
+ # @!attribute id
65
+ #
66
+ # @return [String]
67
+ required :id, String
68
+
69
+ # @!attribute adjustment_type
70
+ #
71
+ # @return [Symbol, :tiered_percentage_discount]
72
+ required :adjustment_type, const: :tiered_percentage_discount
73
+
74
+ # @!attribute applies_to_price_ids
75
+ # @deprecated
76
+ #
77
+ # The price IDs that this adjustment applies to.
78
+ #
79
+ # @return [Array<String>]
80
+ required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
81
+
82
+ # @!attribute filters
83
+ # The filters that determine which prices to apply this adjustment to.
84
+ #
85
+ # @return [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter>]
86
+ required :filters,
87
+ -> { Orb::Internal::Type::ArrayOf[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter] }
88
+
89
+ # @!attribute is_invoice_level
90
+ # True for adjustments that apply to an entire invoice, false for adjustments that
91
+ # apply to only one price.
92
+ #
93
+ # @return [Boolean]
94
+ required :is_invoice_level, Orb::Internal::Type::Boolean
95
+
96
+ # @!attribute plan_phase_order
97
+ # The plan phase in which this adjustment is active.
98
+ #
99
+ # @return [Integer, nil]
100
+ required :plan_phase_order, Integer, nil?: true
101
+
102
+ # @!attribute reason
103
+ # The reason for the adjustment.
104
+ #
105
+ # @return [String, nil]
106
+ required :reason, String, nil?: true
107
+
108
+ # @!attribute replaces_adjustment_id
109
+ # The adjustment id this adjustment replaces. This adjustment will take the place
110
+ # of the replaced adjustment in plan version migrations.
111
+ #
112
+ # @return [String, nil]
113
+ required :replaces_adjustment_id, String, nil?: true
114
+
115
+ # @!attribute tiers
116
+ # The ordered, contiguous bands of cumulative eligible spend, each discounted at
117
+ # its own percentage (progressive fill-a-tier), applied to the prices this
118
+ # adjustment covers in a given billing period.
119
+ #
120
+ # @return [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier>]
121
+ required :tiers,
122
+ -> { Orb::Internal::Type::ArrayOf[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier] }
123
+
124
+ # @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount)
125
+ # Some parameter documentations has been truncated, see
126
+ # {Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount} for more
127
+ # details.
128
+ #
129
+ # @param id [String]
130
+ #
131
+ # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
132
+ #
133
+ # @param filters [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
134
+ #
135
+ # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that
136
+ #
137
+ # @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
138
+ #
139
+ # @param reason [String, nil] The reason for the adjustment.
140
+ #
141
+ # @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place
142
+ #
143
+ # @param tiers [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i
144
+ #
145
+ # @param adjustment_type [Symbol, :tiered_percentage_discount]
146
+
147
+ class Filter < Orb::Internal::Type::BaseModel
148
+ # @!attribute field
149
+ # The property of the price to filter on.
150
+ #
151
+ # @return [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field]
152
+ required :field, enum: -> { Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field }
153
+
154
+ # @!attribute operator
155
+ # Should prices that match the filter be included or excluded.
156
+ #
157
+ # @return [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator]
158
+ required :operator,
159
+ enum: -> { Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator }
160
+
161
+ # @!attribute values
162
+ # The IDs or values that match this filter.
163
+ #
164
+ # @return [Array<String>]
165
+ required :values, Orb::Internal::Type::ArrayOf[String]
166
+
167
+ # @!method initialize(field:, operator:, values:)
168
+ # @param field [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
169
+ #
170
+ # @param operator [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
171
+ #
172
+ # @param values [Array<String>] The IDs or values that match this filter.
173
+
174
+ # The property of the price to filter on.
175
+ #
176
+ # @see Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter#field
177
+ module Field
178
+ extend Orb::Internal::Type::Enum
179
+
180
+ PRICE_ID = :price_id
181
+ ITEM_ID = :item_id
182
+ PRICE_TYPE = :price_type
183
+ CURRENCY = :currency
184
+ PRICING_UNIT_ID = :pricing_unit_id
185
+
186
+ # @!method self.values
187
+ # @return [Array<Symbol>]
188
+ end
189
+
190
+ # Should prices that match the filter be included or excluded.
191
+ #
192
+ # @see Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter#operator
193
+ module Operator
194
+ extend Orb::Internal::Type::Enum
195
+
196
+ INCLUDES = :includes
197
+ EXCLUDES = :excludes
198
+
199
+ # @!method self.values
200
+ # @return [Array<Symbol>]
201
+ end
202
+ end
203
+
204
+ class Tier < Orb::Internal::Type::BaseModel
205
+ # @!attribute lower_bound
206
+ # Exclusive lower bound of cumulative spend for this tier.
207
+ #
208
+ # @return [Float]
209
+ required :lower_bound, Float
210
+
211
+ # @!attribute percentage
212
+ # The percentage (between 0 and 1) discounted from spend that falls within this
213
+ # tier.
214
+ #
215
+ # @return [Float]
216
+ required :percentage, Float
217
+
218
+ # @!attribute upper_bound
219
+ # Inclusive upper bound of cumulative spend for this tier; null for the final
220
+ # open-ended tier.
221
+ #
222
+ # @return [Float, nil]
223
+ optional :upper_bound, Float, nil?: true
224
+
225
+ # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
226
+ # Some parameter documentations has been truncated, see
227
+ # {Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier}
228
+ # for more details.
229
+ #
230
+ # One band of a tiered percentage discount. Bounds are denominated in the
231
+ # discount's currency. `lower_bound` is the exclusive start of the band and
232
+ # `upper_bound` is the inclusive end; `upper_bound` is null only for the
233
+ # open-ended final tier.
234
+ #
235
+ # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
236
+ #
237
+ # @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
238
+ #
239
+ # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
240
+ end
241
+ end
242
+
61
243
  # @!method self.variants
62
- # @return [Array(Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment)]
244
+ # @return [Array(Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment)]
63
245
  end
64
246
  end
65
247
  end
@@ -87,7 +87,23 @@ module Orb
87
87
  # @return [Orb::Models::Alert::LicenseType, nil]
88
88
  optional :license_type, -> { Orb::Alert::LicenseType }, nil?: true
89
89
 
90
- # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil)
90
+ # @!attribute price_filters
91
+ # Filters scoping which prices are included in grouped cost alert evaluation.
92
+ #
93
+ # @return [Array<Orb::Models::Alert::PriceFilter>, nil]
94
+ optional :price_filters, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter] }, nil?: true
95
+
96
+ # @!attribute threshold_overrides
97
+ # Per-group threshold overrides. Each override maps a specific combination of
98
+ # grouping_keys values to a replacement threshold list. Only present for grouped
99
+ # cost alerts that have at least one override.
100
+ #
101
+ # @return [Array<Orb::Models::Alert::ThresholdOverride>, nil]
102
+ optional :threshold_overrides,
103
+ -> { Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride] },
104
+ nil?: true
105
+
106
+ # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil, price_filters: nil, threshold_overrides: nil)
91
107
  # Some parameter documentations has been truncated, see {Orb::Models::Alert} for
92
108
  # more details.
93
109
  #
@@ -122,6 +138,10 @@ module Orb
122
138
  # @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only present for cost alerts with gro
123
139
  #
124
140
  # @param license_type [Orb::Models::Alert::LicenseType, nil] Minified license type for alert serialization.
141
+ #
142
+ # @param price_filters [Array<Orb::Models::Alert::PriceFilter>, nil] Filters scoping which prices are included in grouped cost alert evaluation.
143
+ #
144
+ # @param threshold_overrides [Array<Orb::Models::Alert::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
125
145
 
126
146
  # @see Orb::Models::Alert#metric
127
147
  class Metric < Orb::Internal::Type::BaseModel
@@ -226,6 +246,90 @@ module Orb
226
246
  #
227
247
  # @param id [String]
228
248
  end
249
+
250
+ class PriceFilter < Orb::Internal::Type::BaseModel
251
+ # @!attribute field
252
+ # The property of the price to filter on.
253
+ #
254
+ # @return [Symbol, Orb::Models::Alert::PriceFilter::Field]
255
+ required :field, enum: -> { Orb::Alert::PriceFilter::Field }
256
+
257
+ # @!attribute operator
258
+ # Should prices that match the filter be included or excluded.
259
+ #
260
+ # @return [Symbol, Orb::Models::Alert::PriceFilter::Operator]
261
+ required :operator, enum: -> { Orb::Alert::PriceFilter::Operator }
262
+
263
+ # @!attribute values
264
+ # The IDs or values that match this filter.
265
+ #
266
+ # @return [Array<String>]
267
+ required :values, Orb::Internal::Type::ArrayOf[String]
268
+
269
+ # @!method initialize(field:, operator:, values:)
270
+ # @param field [Symbol, Orb::Models::Alert::PriceFilter::Field] The property of the price to filter on.
271
+ #
272
+ # @param operator [Symbol, Orb::Models::Alert::PriceFilter::Operator] Should prices that match the filter be included or excluded.
273
+ #
274
+ # @param values [Array<String>] The IDs or values that match this filter.
275
+
276
+ # The property of the price to filter on.
277
+ #
278
+ # @see Orb::Models::Alert::PriceFilter#field
279
+ module Field
280
+ extend Orb::Internal::Type::Enum
281
+
282
+ PRICE_ID = :price_id
283
+ ITEM_ID = :item_id
284
+ PRICE_TYPE = :price_type
285
+ CURRENCY = :currency
286
+ PRICING_UNIT_ID = :pricing_unit_id
287
+
288
+ # @!method self.values
289
+ # @return [Array<Symbol>]
290
+ end
291
+
292
+ # Should prices that match the filter be included or excluded.
293
+ #
294
+ # @see Orb::Models::Alert::PriceFilter#operator
295
+ module Operator
296
+ extend Orb::Internal::Type::Enum
297
+
298
+ INCLUDES = :includes
299
+ EXCLUDES = :excludes
300
+
301
+ # @!method self.values
302
+ # @return [Array<Symbol>]
303
+ end
304
+ end
305
+
306
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
307
+ # @!attribute group_values
308
+ # The values of the grouping keys that identify this group. The list length
309
+ # matches the alert's grouping_keys.
310
+ #
311
+ # @return [Array<String>]
312
+ required :group_values, Orb::Internal::Type::ArrayOf[String]
313
+
314
+ # @!attribute thresholds
315
+ # The thresholds applied to this group. An empty list means the group is silenced.
316
+ #
317
+ # @return [Array<Orb::Models::Threshold>]
318
+ required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }
319
+
320
+ # @!method initialize(group_values:, thresholds:)
321
+ # Some parameter documentations has been truncated, see
322
+ # {Orb::Models::Alert::ThresholdOverride} for more details.
323
+ #
324
+ # A per-group threshold override on a grouped cost alert.
325
+ #
326
+ # An empty `thresholds` list means the group is silenced (never fires). A
327
+ # non-empty list fully replaces the default thresholds for that group.
328
+ #
329
+ # @param group_values [Array<String>] The values of the grouping keys that identify this group. The list length matche
330
+ #
331
+ # @param thresholds [Array<Orb::Models::Threshold>] The thresholds applied to this group. An empty list means the group is silenced.
332
+ end
229
333
  end
230
334
  end
231
335
  end
@@ -24,6 +24,13 @@ module Orb
24
24
  # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type]
25
25
  required :type, enum: -> { Orb::AlertCreateForSubscriptionParams::Type }
26
26
 
27
+ # @!attribute currency
28
+ # The case sensitive currency or custom pricing unit to use for grouped cost
29
+ # alerts. Required when grouping_keys is set.
30
+ #
31
+ # @return [String, nil]
32
+ optional :currency, String, nil?: true
33
+
27
34
  # @!attribute grouping_keys
28
35
  # The property keys to group cost alerts by. Only applicable for cost_exceeded
29
36
  # alerts.
@@ -37,14 +44,29 @@ module Orb
37
44
  # @return [String, nil]
38
45
  optional :metric_id, String, nil?: true
39
46
 
40
- # @!attribute pricing_unit_id
41
- # The pricing unit to use for grouped cost alerts. Required when grouping_keys is
42
- # set.
47
+ # @!attribute price_filters
48
+ # Filters to scope which prices are included in grouped cost alert evaluation.
49
+ # Supports filtering by price_id, item_id, or price_type with includes/excludes
50
+ # operators. Only applicable when grouping_keys is set.
43
51
  #
44
- # @return [String, nil]
45
- optional :pricing_unit_id, String, nil?: true
52
+ # @return [Array<Orb::Models::AlertCreateForSubscriptionParams::PriceFilter>, nil]
53
+ optional :price_filters,
54
+ -> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::PriceFilter] },
55
+ nil?: true
56
+
57
+ # @!attribute threshold_overrides
58
+ # Per-group threshold overrides. Each override maps a specific combination of
59
+ # grouping_keys values to a list of thresholds that fully replaces the default
60
+ # thresholds for that group. An empty thresholds list silences the group. Groups
61
+ # without an override use the default thresholds. Only applicable when
62
+ # grouping_keys is set.
63
+ #
64
+ # @return [Array<Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride>, nil]
65
+ optional :threshold_overrides,
66
+ -> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::ThresholdOverride] },
67
+ nil?: true
46
68
 
47
- # @!method initialize(subscription_id:, thresholds:, type:, grouping_keys: nil, metric_id: nil, pricing_unit_id: nil, request_options: {})
69
+ # @!method initialize(subscription_id:, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, price_filters: nil, threshold_overrides: nil, request_options: {})
48
70
  # Some parameter documentations has been truncated, see
49
71
  # {Orb::Models::AlertCreateForSubscriptionParams} for more details.
50
72
  #
@@ -54,11 +76,15 @@ module Orb
54
76
  #
55
77
  # @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type.
56
78
  #
79
+ # @param currency [String, nil] The case sensitive currency or custom pricing unit to use for grouped cost alert
80
+ #
57
81
  # @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale
58
82
  #
59
83
  # @param metric_id [String, nil] The metric to track usage for.
60
84
  #
61
- # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is
85
+ # @param price_filters [Array<Orb::Models::AlertCreateForSubscriptionParams::PriceFilter>, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup
86
+ #
87
+ # @param threshold_overrides [Array<Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
62
88
  #
63
89
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
64
90
 
@@ -72,6 +98,93 @@ module Orb
72
98
  # @!method self.values
73
99
  # @return [Array<Symbol>]
74
100
  end
101
+
102
+ class PriceFilter < Orb::Internal::Type::BaseModel
103
+ # @!attribute field
104
+ # The property of the price to filter on.
105
+ #
106
+ # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field]
107
+ required :field, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Field }
108
+
109
+ # @!attribute operator
110
+ # Should prices that match the filter be included or excluded.
111
+ #
112
+ # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator]
113
+ required :operator, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator }
114
+
115
+ # @!attribute values
116
+ # The IDs or values that match this filter.
117
+ #
118
+ # @return [Array<String>]
119
+ required :values, Orb::Internal::Type::ArrayOf[String]
120
+
121
+ # @!method initialize(field:, operator:, values:)
122
+ # @param field [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field] The property of the price to filter on.
123
+ #
124
+ # @param operator [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator] Should prices that match the filter be included or excluded.
125
+ #
126
+ # @param values [Array<String>] The IDs or values that match this filter.
127
+
128
+ # The property of the price to filter on.
129
+ #
130
+ # @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#field
131
+ module Field
132
+ extend Orb::Internal::Type::Enum
133
+
134
+ PRICE_ID = :price_id
135
+ ITEM_ID = :item_id
136
+ PRICE_TYPE = :price_type
137
+ CURRENCY = :currency
138
+ PRICING_UNIT_ID = :pricing_unit_id
139
+
140
+ # @!method self.values
141
+ # @return [Array<Symbol>]
142
+ end
143
+
144
+ # Should prices that match the filter be included or excluded.
145
+ #
146
+ # @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#operator
147
+ module Operator
148
+ extend Orb::Internal::Type::Enum
149
+
150
+ INCLUDES = :includes
151
+ EXCLUDES = :excludes
152
+
153
+ # @!method self.values
154
+ # @return [Array<Symbol>]
155
+ end
156
+ end
157
+
158
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
159
+ # @!attribute group_values
160
+ # The values of the grouping keys that identify this group. The list length must
161
+ # match the alert's grouping_keys, and values appear in the same order as
162
+ # grouping_keys.
163
+ #
164
+ # @return [Array<String>]
165
+ required :group_values, Orb::Internal::Type::ArrayOf[String]
166
+
167
+ # @!attribute thresholds
168
+ # The thresholds to apply to this group. An empty list silences alerts for this
169
+ # group. A non-empty list fully replaces the default thresholds for this group.
170
+ #
171
+ # @return [Array<Orb::Models::Threshold>]
172
+ required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }
173
+
174
+ # @!method initialize(group_values:, thresholds:)
175
+ # Some parameter documentations has been truncated, see
176
+ # {Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride} for more
177
+ # details.
178
+ #
179
+ # Per-group threshold override on a grouped cost alert.
180
+ #
181
+ # - An empty `thresholds` list silences alerts for this group (never fires).
182
+ # - A non-empty list fully replaces the default thresholds for this group.
183
+ #
184
+ # @param group_values [Array<String>] The values of the grouping keys that identify this group. The list length must m
185
+ #
186
+ # @param thresholds [Array<Orb::Models::Threshold>] The thresholds to apply to this group. An empty list silences alerts for this gr
187
+ end
75
188
  end
76
189
  end
77
190
  end