orb-billing 1.45.0 → 1.47.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 (316) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -1
  3. data/README.md +1 -1
  4. data/lib/orb/models/invoice_issue_summary_response.rb +2 -1
  5. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +5 -3
  6. data/lib/orb/models/invoice_list_summary_response.rb +2 -1
  7. data/lib/orb/models/metric_list_params.rb +21 -1
  8. data/lib/orb/models/metric_update_params.rb +17 -1
  9. data/lib/orb/models/plan_update_params.rb +9 -1
  10. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  11. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +5 -9
  12. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +5 -9
  13. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +5 -9
  14. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +5 -9
  15. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +5 -9
  16. data/lib/orb/models/webhook_endpoint.rb +28 -1
  17. data/lib/orb/models/webhook_endpoint_create_params.rb +22 -1
  18. data/lib/orb/models/webhook_endpoint_update_params.rb +22 -1
  19. data/lib/orb/models/webhook_endpoint_with_secret.rb +28 -1
  20. data/lib/orb/models/webhooks/backfill_reflected_standard_webhook_event.rb +206 -0
  21. data/lib/orb/models/webhooks/backfill_reverted_standard_webhook_event.rb +206 -0
  22. data/lib/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rb +131 -0
  23. data/lib/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rb +537 -0
  24. data/lib/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rb +531 -0
  25. data/lib/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rb +188 -0
  26. data/lib/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rb +183 -0
  27. data/lib/orb/models/webhooks/credit_note_issued_standard_webhook_event.rb +90 -0
  28. data/lib/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rb +92 -0
  29. data/lib/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rb +198 -0
  30. data/lib/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rb +193 -0
  31. data/lib/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rb +240 -0
  32. data/lib/orb/models/webhooks/customer_created_standard_webhook_event.rb +106 -0
  33. data/lib/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rb +597 -0
  34. data/lib/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rb +603 -0
  35. data/lib/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rb +597 -0
  36. data/lib/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rb +509 -0
  37. data/lib/orb/models/webhooks/customer_edited_standard_webhook_event.rb +371 -0
  38. data/lib/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rb +130 -0
  39. data/lib/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rb +124 -0
  40. data/lib/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rb +134 -0
  41. data/lib/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rb +94 -0
  42. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +974 -0
  43. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +968 -0
  44. data/lib/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rb +367 -0
  45. data/lib/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rb +113 -0
  46. data/lib/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rb +101 -0
  47. data/lib/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rb +101 -0
  48. data/lib/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rb +95 -0
  49. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +996 -0
  50. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +990 -0
  51. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +994 -0
  52. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +944 -0
  53. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +1367 -0
  54. data/lib/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rb +151 -0
  55. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +887 -0
  56. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +886 -0
  57. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +889 -0
  58. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +901 -0
  59. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +878 -0
  60. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +901 -0
  61. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +895 -0
  62. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +910 -0
  63. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +892 -0
  64. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +894 -0
  65. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +877 -0
  66. data/lib/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rb +125 -0
  67. data/lib/orb/models/webhooks/payment_method_created_standard_webhook_event.rb +184 -0
  68. data/lib/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rb +184 -0
  69. data/lib/orb/models/webhooks/plan_created_standard_webhook_event.rb +119 -0
  70. data/lib/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rb +139 -0
  71. data/lib/orb/models/webhooks/plan_edited_standard_webhook_event.rb +159 -0
  72. data/lib/orb/models/webhooks/plan_version_created_standard_webhook_event.rb +138 -0
  73. data/lib/orb/models/webhooks/price_edited_standard_webhook_event.rb +132 -0
  74. data/lib/orb/models/webhooks/resource_event_test_standard_webhook_event.rb +92 -0
  75. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +974 -0
  76. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +969 -0
  77. data/lib/orb/models/webhooks/standard_unwrap_standard_params.rb +16 -0
  78. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +322 -0
  79. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +316 -0
  80. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +663 -0
  81. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +237 -0
  82. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +237 -0
  83. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +692 -0
  84. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +221 -0
  85. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +273 -0
  86. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +219 -0
  87. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +255 -0
  88. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +689 -0
  89. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +218 -0
  90. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +240 -0
  91. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +683 -0
  92. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +249 -0
  93. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +233 -0
  94. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +250 -0
  95. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +248 -0
  96. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +693 -0
  97. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +221 -0
  98. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +222 -0
  99. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +700 -0
  100. data/lib/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rb +270 -0
  101. data/lib/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rb +264 -0
  102. data/lib/orb/models/webhooks/unwrap_standard_webhook_event.rb +258 -0
  103. data/lib/orb/models.rb +2 -0
  104. data/lib/orb/resources/metrics.rb +15 -5
  105. data/lib/orb/resources/plans/external_plan_id.rb +6 -3
  106. data/lib/orb/resources/plans.rb +6 -3
  107. data/lib/orb/resources/webhook_endpoints.rb +6 -2
  108. data/lib/orb/resources/webhooks/standard.rb +24 -0
  109. data/lib/orb/resources/webhooks.rb +4 -0
  110. data/lib/orb/version.rb +1 -1
  111. data/lib/orb.rb +84 -0
  112. data/rbi/orb/models/invoice_issue_summary_response.rbi +2 -1
  113. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +6 -3
  114. data/rbi/orb/models/invoice_list_summary_response.rbi +2 -1
  115. data/rbi/orb/models/metric_list_params.rbi +29 -0
  116. data/rbi/orb/models/metric_update_params.rbi +16 -0
  117. data/rbi/orb/models/plan_update_params.rbi +8 -0
  118. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  119. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +6 -12
  120. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +6 -12
  121. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +6 -12
  122. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +6 -12
  123. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +6 -12
  124. data/rbi/orb/models/webhook_endpoint.rbi +39 -0
  125. data/rbi/orb/models/webhook_endpoint_create_params.rbi +51 -0
  126. data/rbi/orb/models/webhook_endpoint_update_params.rbi +51 -0
  127. data/rbi/orb/models/webhook_endpoint_with_secret.rbi +50 -0
  128. data/rbi/orb/models/webhooks/backfill_reflected_standard_webhook_event.rbi +349 -0
  129. data/rbi/orb/models/webhooks/backfill_reverted_standard_webhook_event.rbi +347 -0
  130. data/rbi/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbi +273 -0
  131. data/rbi/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbi +1106 -0
  132. data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi +1095 -0
  133. data/rbi/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rbi +377 -0
  134. data/rbi/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rbi +366 -0
  135. data/rbi/orb/models/webhooks/credit_note_issued_standard_webhook_event.rbi +166 -0
  136. data/rbi/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rbi +166 -0
  137. data/rbi/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rbi +403 -0
  138. data/rbi/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rbi +392 -0
  139. data/rbi/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rbi +493 -0
  140. data/rbi/orb/models/webhooks/customer_created_standard_webhook_event.rbi +198 -0
  141. data/rbi/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbi +1151 -0
  142. data/rbi/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbi +1158 -0
  143. data/rbi/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbi +1151 -0
  144. data/rbi/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbi +1044 -0
  145. data/rbi/orb/models/webhooks/customer_edited_standard_webhook_event.rbi +678 -0
  146. data/rbi/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rbi +236 -0
  147. data/rbi/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rbi +230 -0
  148. data/rbi/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rbi +275 -0
  149. data/rbi/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rbi +192 -0
  150. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +1708 -0
  151. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +1697 -0
  152. data/rbi/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rbi +670 -0
  153. data/rbi/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rbi +210 -0
  154. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rbi +195 -0
  155. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rbi +195 -0
  156. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rbi +188 -0
  157. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +1716 -0
  158. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +1711 -0
  159. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +1716 -0
  160. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +1631 -0
  161. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +2340 -0
  162. data/rbi/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rbi +324 -0
  163. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +1532 -0
  164. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +1532 -0
  165. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +1537 -0
  166. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +1552 -0
  167. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +1497 -0
  168. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +1557 -0
  169. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +1550 -0
  170. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +1566 -0
  171. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +1545 -0
  172. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +1547 -0
  173. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +1497 -0
  174. data/rbi/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rbi +233 -0
  175. data/rbi/orb/models/webhooks/payment_method_created_standard_webhook_event.rbi +331 -0
  176. data/rbi/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbi +331 -0
  177. data/rbi/orb/models/webhooks/plan_created_standard_webhook_event.rbi +216 -0
  178. data/rbi/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbi +277 -0
  179. data/rbi/orb/models/webhooks/plan_edited_standard_webhook_event.rbi +337 -0
  180. data/rbi/orb/models/webhooks/plan_version_created_standard_webhook_event.rbi +271 -0
  181. data/rbi/orb/models/webhooks/price_edited_standard_webhook_event.rbi +311 -0
  182. data/rbi/orb/models/webhooks/resource_event_test_standard_webhook_event.rbi +191 -0
  183. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +1708 -0
  184. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +1697 -0
  185. data/rbi/orb/models/webhooks/standard_unwrap_standard_params.rbi +32 -0
  186. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +609 -0
  187. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +598 -0
  188. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +1296 -0
  189. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +433 -0
  190. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +435 -0
  191. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +1298 -0
  192. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +398 -0
  193. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +520 -0
  194. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +398 -0
  195. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +458 -0
  196. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +1315 -0
  197. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +422 -0
  198. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +471 -0
  199. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +1313 -0
  200. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +453 -0
  201. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +433 -0
  202. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +457 -0
  203. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +457 -0
  204. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +1299 -0
  205. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +398 -0
  206. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +398 -0
  207. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +1305 -0
  208. data/rbi/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rbi +516 -0
  209. data/rbi/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rbi +505 -0
  210. data/rbi/orb/models/webhooks/unwrap_standard_webhook_event.rbi +107 -0
  211. data/rbi/orb/models.rbi +2 -0
  212. data/rbi/orb/resources/metrics.rbi +16 -3
  213. data/rbi/orb/resources/plans/external_plan_id.rbi +6 -2
  214. data/rbi/orb/resources/plans.rbi +6 -2
  215. data/rbi/orb/resources/webhook_endpoints.rbi +10 -0
  216. data/rbi/orb/resources/webhooks/standard.rbi +107 -0
  217. data/rbi/orb/resources/webhooks.rbi +3 -0
  218. data/sig/orb/models/metric_list_params.rbs +18 -1
  219. data/sig/orb/models/metric_update_params.rbs +14 -1
  220. data/sig/orb/models/plan_update_params.rbs +6 -1
  221. data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -1
  222. data/sig/orb/models/webhook_endpoint.rbs +16 -0
  223. data/sig/orb/models/webhook_endpoint_create_params.rbs +20 -1
  224. data/sig/orb/models/webhook_endpoint_update_params.rbs +16 -0
  225. data/sig/orb/models/webhook_endpoint_with_secret.rbs +16 -0
  226. data/sig/orb/models/webhooks/backfill_reflected_standard_webhook_event.rbs +148 -0
  227. data/sig/orb/models/webhooks/backfill_reverted_standard_webhook_event.rbs +148 -0
  228. data/sig/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbs +112 -0
  229. data/sig/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbs +435 -0
  230. data/sig/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbs +430 -0
  231. data/sig/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rbs +165 -0
  232. data/sig/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rbs +160 -0
  233. data/sig/orb/models/webhooks/credit_note_issued_standard_webhook_event.rbs +68 -0
  234. data/sig/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rbs +68 -0
  235. data/sig/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rbs +160 -0
  236. data/sig/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rbs +155 -0
  237. data/sig/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rbs +189 -0
  238. data/sig/orb/models/webhooks/customer_created_standard_webhook_event.rbs +68 -0
  239. data/sig/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbs +396 -0
  240. data/sig/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbs +401 -0
  241. data/sig/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbs +396 -0
  242. data/sig/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbs +386 -0
  243. data/sig/orb/models/webhooks/customer_edited_standard_webhook_event.rbs +157 -0
  244. data/sig/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rbs +110 -0
  245. data/sig/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rbs +105 -0
  246. data/sig/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rbs +122 -0
  247. data/sig/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rbs +73 -0
  248. data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +614 -0
  249. data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +609 -0
  250. data/sig/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rbs +331 -0
  251. data/sig/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rbs +91 -0
  252. data/sig/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rbs +75 -0
  253. data/sig/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rbs +75 -0
  254. data/sig/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rbs +73 -0
  255. data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +638 -0
  256. data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +633 -0
  257. data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +623 -0
  258. data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +586 -0
  259. data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +859 -0
  260. data/sig/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rbs +129 -0
  261. data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +527 -0
  262. data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +527 -0
  263. data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +527 -0
  264. data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +540 -0
  265. data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +517 -0
  266. data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +544 -0
  267. data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +538 -0
  268. data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +549 -0
  269. data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +536 -0
  270. data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +536 -0
  271. data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +517 -0
  272. data/sig/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rbs +100 -0
  273. data/sig/orb/models/webhooks/payment_method_created_standard_webhook_event.rbs +130 -0
  274. data/sig/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbs +130 -0
  275. data/sig/orb/models/webhooks/plan_created_standard_webhook_event.rbs +90 -0
  276. data/sig/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbs +112 -0
  277. data/sig/orb/models/webhooks/plan_edited_standard_webhook_event.rbs +134 -0
  278. data/sig/orb/models/webhooks/plan_version_created_standard_webhook_event.rbs +109 -0
  279. data/sig/orb/models/webhooks/price_edited_standard_webhook_event.rbs +95 -0
  280. data/sig/orb/models/webhooks/resource_event_test_standard_webhook_event.rbs +75 -0
  281. data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +614 -0
  282. data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +609 -0
  283. data/sig/orb/models/webhooks/standard_unwrap_standard_params.rbs +17 -0
  284. data/sig/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbs +256 -0
  285. data/sig/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbs +251 -0
  286. data/sig/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbs +466 -0
  287. data/sig/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbs +169 -0
  288. data/sig/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbs +169 -0
  289. data/sig/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbs +475 -0
  290. data/sig/orb/models/webhooks/subscription_created_standard_webhook_event.rbs +159 -0
  291. data/sig/orb/models/webhooks/subscription_edited_standard_webhook_event.rbs +218 -0
  292. data/sig/orb/models/webhooks/subscription_ended_standard_webhook_event.rbs +159 -0
  293. data/sig/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbs +191 -0
  294. data/sig/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbs +487 -0
  295. data/sig/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbs +176 -0
  296. data/sig/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbs +198 -0
  297. data/sig/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbs +482 -0
  298. data/sig/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbs +182 -0
  299. data/sig/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbs +169 -0
  300. data/sig/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbs +186 -0
  301. data/sig/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbs +186 -0
  302. data/sig/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbs +475 -0
  303. data/sig/orb/models/webhooks/subscription_started_standard_webhook_event.rbs +159 -0
  304. data/sig/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbs +159 -0
  305. data/sig/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbs +480 -0
  306. data/sig/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rbs +223 -0
  307. data/sig/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rbs +218 -0
  308. data/sig/orb/models/webhooks/unwrap_standard_webhook_event.rbs +94 -0
  309. data/sig/orb/models.rbs +2 -0
  310. data/sig/orb/resources/metrics.rbs +3 -0
  311. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  312. data/sig/orb/resources/plans.rbs +1 -0
  313. data/sig/orb/resources/webhook_endpoints.rbs +2 -0
  314. data/sig/orb/resources/webhooks/standard.rbs +93 -0
  315. data/sig/orb/resources/webhooks.rbs +2 -0
  316. metadata +253 -1
@@ -0,0 +1,1315 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class SubscriptionGroupedCostExceededStandardWebhookEvent < Orb::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The ID of this webhook event.
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ # The time at which this event was created, to the second.
20
+ sig { returns(Time) }
21
+ attr_accessor :created_at
22
+
23
+ # The serialization style this payload was rendered in, as configured on the
24
+ # endpoint.
25
+ sig do
26
+ returns(
27
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
28
+ )
29
+ end
30
+ attr_accessor :payload_style
31
+
32
+ # Every group that crossed a threshold for one alert, batched into a single
33
+ # message.
34
+ sig do
35
+ returns(
36
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties
37
+ )
38
+ end
39
+ attr_reader :properties
40
+
41
+ sig do
42
+ params(
43
+ properties:
44
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::OrHash
45
+ ).void
46
+ end
47
+ attr_writer :properties
48
+
49
+ # The subscription in a license or grouped cost webhook payload: its status,
50
+ # dates, plan and customer.
51
+ sig do
52
+ returns(
53
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription
54
+ )
55
+ end
56
+ attr_reader :subscription
57
+
58
+ sig do
59
+ params(
60
+ subscription:
61
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::OrHash
62
+ ).void
63
+ end
64
+ attr_writer :subscription
65
+
66
+ # The event this payload describes.
67
+ sig do
68
+ returns(
69
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Type::TaggedSymbol
70
+ )
71
+ end
72
+ attr_accessor :type
73
+
74
+ # Issued when grouped subscription costs exceed a pre-configured amount threshold.
75
+ sig do
76
+ params(
77
+ id: String,
78
+ created_at: Time,
79
+ payload_style:
80
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle::OrSymbol,
81
+ properties:
82
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::OrHash,
83
+ subscription:
84
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::OrHash,
85
+ type:
86
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Type::OrSymbol
87
+ ).returns(T.attached_class)
88
+ end
89
+ def self.new(
90
+ # The ID of this webhook event.
91
+ id:,
92
+ # The time at which this event was created, to the second.
93
+ created_at:,
94
+ # The serialization style this payload was rendered in, as configured on the
95
+ # endpoint.
96
+ payload_style:,
97
+ # Every group that crossed a threshold for one alert, batched into a single
98
+ # message.
99
+ properties:,
100
+ # The subscription in a license or grouped cost webhook payload: its status,
101
+ # dates, plan and customer.
102
+ subscription:,
103
+ # The event this payload describes.
104
+ type:
105
+ )
106
+ end
107
+
108
+ sig do
109
+ override.returns(
110
+ {
111
+ id: String,
112
+ created_at: Time,
113
+ payload_style:
114
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle::TaggedSymbol,
115
+ properties:
116
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties,
117
+ subscription:
118
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription,
119
+ type:
120
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Type::TaggedSymbol
121
+ }
122
+ )
123
+ end
124
+ def to_hash
125
+ end
126
+
127
+ # The serialization style this payload was rendered in, as configured on the
128
+ # endpoint.
129
+ module PayloadStyle
130
+ extend Orb::Internal::Type::Enum
131
+
132
+ TaggedSymbol =
133
+ T.type_alias do
134
+ T.all(
135
+ Symbol,
136
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle
137
+ )
138
+ end
139
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
140
+
141
+ EXPANDED =
142
+ T.let(
143
+ :expanded,
144
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
145
+ )
146
+ STANDARD =
147
+ T.let(
148
+ :standard,
149
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
150
+ )
151
+
152
+ sig do
153
+ override.returns(
154
+ T::Array[
155
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
156
+ ]
157
+ )
158
+ end
159
+ def self.values
160
+ end
161
+ end
162
+
163
+ class Properties < Orb::Internal::Type::BaseModel
164
+ OrHash =
165
+ T.type_alias do
166
+ T.any(
167
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties,
168
+ Orb::Internal::AnyHash
169
+ )
170
+ end
171
+
172
+ # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
173
+ # usage, or credit balance and trigger webhooks when a threshold is exceeded.
174
+ #
175
+ # Alerts created through the API can be scoped to either customers or
176
+ # subscriptions.
177
+ sig do
178
+ returns(
179
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration
180
+ )
181
+ end
182
+ attr_reader :alert_configuration
183
+
184
+ sig do
185
+ params(
186
+ alert_configuration:
187
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::OrHash
188
+ ).void
189
+ end
190
+ attr_writer :alert_configuration
191
+
192
+ sig { returns(T::Array[String]) }
193
+ attr_accessor :grouping_keys
194
+
195
+ sig do
196
+ returns(
197
+ T::Array[
198
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::Group
199
+ ]
200
+ )
201
+ end
202
+ attr_accessor :groups
203
+
204
+ sig { returns(Time) }
205
+ attr_accessor :timeframe_end
206
+
207
+ sig { returns(Time) }
208
+ attr_accessor :timeframe_start
209
+
210
+ # Every group that crossed a threshold for one alert, batched into a single
211
+ # message.
212
+ sig do
213
+ params(
214
+ alert_configuration:
215
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::OrHash,
216
+ grouping_keys: T::Array[String],
217
+ groups:
218
+ T::Array[
219
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::Group::OrHash
220
+ ],
221
+ timeframe_end: Time,
222
+ timeframe_start: Time
223
+ ).returns(T.attached_class)
224
+ end
225
+ def self.new(
226
+ # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
227
+ # usage, or credit balance and trigger webhooks when a threshold is exceeded.
228
+ #
229
+ # Alerts created through the API can be scoped to either customers or
230
+ # subscriptions.
231
+ alert_configuration:,
232
+ grouping_keys:,
233
+ groups:,
234
+ timeframe_end:,
235
+ timeframe_start:
236
+ )
237
+ end
238
+
239
+ sig do
240
+ override.returns(
241
+ {
242
+ alert_configuration:
243
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration,
244
+ grouping_keys: T::Array[String],
245
+ groups:
246
+ T::Array[
247
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::Group
248
+ ],
249
+ timeframe_end: Time,
250
+ timeframe_start: Time
251
+ }
252
+ )
253
+ end
254
+ def to_hash
255
+ end
256
+
257
+ class AlertConfiguration < Orb::Internal::Type::BaseModel
258
+ OrHash =
259
+ T.type_alias do
260
+ T.any(
261
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration,
262
+ Orb::Internal::AnyHash
263
+ )
264
+ end
265
+
266
+ # Also referred to as alert_id in this documentation.
267
+ sig { returns(String) }
268
+ attr_accessor :id
269
+
270
+ # The creation time of the resource in Orb.
271
+ sig { returns(Time) }
272
+ attr_accessor :created_at
273
+
274
+ # The name of the currency the credit balance or invoice cost is denominated in.
275
+ sig { returns(T.nilable(String)) }
276
+ attr_accessor :currency
277
+
278
+ # The customer the alert applies to.
279
+ sig { returns(T.nilable(Orb::CustomerMinified)) }
280
+ attr_reader :customer
281
+
282
+ sig do
283
+ params(customer: T.nilable(Orb::CustomerMinified::OrHash)).void
284
+ end
285
+ attr_writer :customer
286
+
287
+ # Whether the alert is enabled or disabled.
288
+ sig { returns(T::Boolean) }
289
+ attr_accessor :enabled
290
+
291
+ # The metric the alert applies to.
292
+ sig do
293
+ returns(
294
+ T.nilable(
295
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Metric
296
+ )
297
+ )
298
+ end
299
+ attr_reader :metric
300
+
301
+ sig do
302
+ params(
303
+ metric:
304
+ T.nilable(
305
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Metric::OrHash
306
+ )
307
+ ).void
308
+ end
309
+ attr_writer :metric
310
+
311
+ # The plan the alert applies to.
312
+ sig do
313
+ returns(
314
+ T.nilable(
315
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Plan
316
+ )
317
+ )
318
+ end
319
+ attr_reader :plan
320
+
321
+ sig do
322
+ params(
323
+ plan:
324
+ T.nilable(
325
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Plan::OrHash
326
+ )
327
+ ).void
328
+ end
329
+ attr_writer :plan
330
+
331
+ # The subscription the alert applies to.
332
+ sig { returns(T.nilable(Orb::SubscriptionMinified)) }
333
+ attr_reader :subscription
334
+
335
+ sig do
336
+ params(
337
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash)
338
+ ).void
339
+ end
340
+ attr_writer :subscription
341
+
342
+ # The thresholds that define the conditions under which the alert will be
343
+ # triggered.
344
+ sig do
345
+ returns(
346
+ T.nilable(
347
+ T::Array[
348
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Threshold
349
+ ]
350
+ )
351
+ )
352
+ end
353
+ attr_accessor :thresholds
354
+
355
+ # The type of alert. This must be a valid alert type.
356
+ sig do
357
+ returns(
358
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
359
+ )
360
+ end
361
+ attr_accessor :type
362
+
363
+ # The current status of the alert. This field is only present for credit balance
364
+ # alerts.
365
+ sig do
366
+ returns(
367
+ T.nilable(
368
+ T::Array[
369
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus
370
+ ]
371
+ )
372
+ )
373
+ end
374
+ attr_accessor :balance_alert_status
375
+
376
+ # The property keys to group cost alerts by. Only present for cost alerts with
377
+ # grouping enabled.
378
+ sig { returns(T.nilable(T::Array[String])) }
379
+ attr_accessor :grouping_keys
380
+
381
+ # Minified license type for alert serialization.
382
+ sig do
383
+ returns(
384
+ T.nilable(
385
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::LicenseType
386
+ )
387
+ )
388
+ end
389
+ attr_reader :license_type
390
+
391
+ sig do
392
+ params(
393
+ license_type:
394
+ T.nilable(
395
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::LicenseType::OrHash
396
+ )
397
+ ).void
398
+ end
399
+ attr_writer :license_type
400
+
401
+ # Filters scoping which prices are included in spend and grouped cost alert
402
+ # evaluation. Alerts use the price_id, item_id, and price_type fields only; the
403
+ # alert's pricing unit is reported by currency.
404
+ sig do
405
+ returns(
406
+ T.nilable(
407
+ T::Array[
408
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter
409
+ ]
410
+ )
411
+ )
412
+ end
413
+ attr_accessor :price_filters
414
+
415
+ # Per-group threshold overrides. Each override maps a specific combination of
416
+ # grouping_keys values to a replacement threshold list. Only present for grouped
417
+ # cost alerts that have at least one override.
418
+ sig do
419
+ returns(
420
+ T.nilable(
421
+ T::Array[
422
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride
423
+ ]
424
+ )
425
+ )
426
+ end
427
+ attr_accessor :threshold_overrides
428
+
429
+ # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
430
+ # usage, or credit balance and trigger webhooks when a threshold is exceeded.
431
+ #
432
+ # Alerts created through the API can be scoped to either customers or
433
+ # subscriptions.
434
+ sig do
435
+ params(
436
+ id: String,
437
+ created_at: Time,
438
+ currency: T.nilable(String),
439
+ customer: T.nilable(Orb::CustomerMinified::OrHash),
440
+ enabled: T::Boolean,
441
+ metric:
442
+ T.nilable(
443
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Metric::OrHash
444
+ ),
445
+ plan:
446
+ T.nilable(
447
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Plan::OrHash
448
+ ),
449
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
450
+ thresholds:
451
+ T.nilable(
452
+ T::Array[
453
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Threshold::OrHash
454
+ ]
455
+ ),
456
+ type:
457
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::OrSymbol,
458
+ balance_alert_status:
459
+ T.nilable(
460
+ T::Array[
461
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus::OrHash
462
+ ]
463
+ ),
464
+ grouping_keys: T.nilable(T::Array[String]),
465
+ license_type:
466
+ T.nilable(
467
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::LicenseType::OrHash
468
+ ),
469
+ price_filters:
470
+ T.nilable(
471
+ T::Array[
472
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::OrHash
473
+ ]
474
+ ),
475
+ threshold_overrides:
476
+ T.nilable(
477
+ T::Array[
478
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::OrHash
479
+ ]
480
+ )
481
+ ).returns(T.attached_class)
482
+ end
483
+ def self.new(
484
+ # Also referred to as alert_id in this documentation.
485
+ id:,
486
+ # The creation time of the resource in Orb.
487
+ created_at:,
488
+ # The name of the currency the credit balance or invoice cost is denominated in.
489
+ currency:,
490
+ # The customer the alert applies to.
491
+ customer:,
492
+ # Whether the alert is enabled or disabled.
493
+ enabled:,
494
+ # The metric the alert applies to.
495
+ metric:,
496
+ # The plan the alert applies to.
497
+ plan:,
498
+ # The subscription the alert applies to.
499
+ subscription:,
500
+ # The thresholds that define the conditions under which the alert will be
501
+ # triggered.
502
+ thresholds:,
503
+ # The type of alert. This must be a valid alert type.
504
+ type:,
505
+ # The current status of the alert. This field is only present for credit balance
506
+ # alerts.
507
+ balance_alert_status: nil,
508
+ # The property keys to group cost alerts by. Only present for cost alerts with
509
+ # grouping enabled.
510
+ grouping_keys: nil,
511
+ # Minified license type for alert serialization.
512
+ license_type: nil,
513
+ # Filters scoping which prices are included in spend and grouped cost alert
514
+ # evaluation. Alerts use the price_id, item_id, and price_type fields only; the
515
+ # alert's pricing unit is reported by currency.
516
+ price_filters: nil,
517
+ # Per-group threshold overrides. Each override maps a specific combination of
518
+ # grouping_keys values to a replacement threshold list. Only present for grouped
519
+ # cost alerts that have at least one override.
520
+ threshold_overrides: nil
521
+ )
522
+ end
523
+
524
+ sig do
525
+ override.returns(
526
+ {
527
+ id: String,
528
+ created_at: Time,
529
+ currency: T.nilable(String),
530
+ customer: T.nilable(Orb::CustomerMinified),
531
+ enabled: T::Boolean,
532
+ metric:
533
+ T.nilable(
534
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Metric
535
+ ),
536
+ plan:
537
+ T.nilable(
538
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Plan
539
+ ),
540
+ subscription: T.nilable(Orb::SubscriptionMinified),
541
+ thresholds:
542
+ T.nilable(
543
+ T::Array[
544
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Threshold
545
+ ]
546
+ ),
547
+ type:
548
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol,
549
+ balance_alert_status:
550
+ T.nilable(
551
+ T::Array[
552
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus
553
+ ]
554
+ ),
555
+ grouping_keys: T.nilable(T::Array[String]),
556
+ license_type:
557
+ T.nilable(
558
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::LicenseType
559
+ ),
560
+ price_filters:
561
+ T.nilable(
562
+ T::Array[
563
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter
564
+ ]
565
+ ),
566
+ threshold_overrides:
567
+ T.nilable(
568
+ T::Array[
569
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride
570
+ ]
571
+ )
572
+ }
573
+ )
574
+ end
575
+ def to_hash
576
+ end
577
+
578
+ class Metric < Orb::Internal::Type::BaseModel
579
+ OrHash =
580
+ T.type_alias do
581
+ T.any(
582
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Metric,
583
+ Orb::Internal::AnyHash
584
+ )
585
+ end
586
+
587
+ sig { returns(String) }
588
+ attr_accessor :id
589
+
590
+ # The metric the alert applies to.
591
+ sig { params(id: String).returns(T.attached_class) }
592
+ def self.new(id:)
593
+ end
594
+
595
+ sig { override.returns({ id: String }) }
596
+ def to_hash
597
+ end
598
+ end
599
+
600
+ class Plan < Orb::Internal::Type::BaseModel
601
+ OrHash =
602
+ T.type_alias do
603
+ T.any(
604
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Plan,
605
+ Orb::Internal::AnyHash
606
+ )
607
+ end
608
+
609
+ sig { returns(T.nilable(String)) }
610
+ attr_accessor :id
611
+
612
+ # An optional user-defined ID for this plan resource, used throughout the system
613
+ # as an alias for this Plan. Use this field to identify a plan by an existing
614
+ # identifier in your system.
615
+ sig { returns(T.nilable(String)) }
616
+ attr_accessor :external_plan_id
617
+
618
+ sig { returns(T.nilable(String)) }
619
+ attr_accessor :name
620
+
621
+ sig { returns(String) }
622
+ attr_accessor :plan_version
623
+
624
+ # The plan the alert applies to.
625
+ sig do
626
+ params(
627
+ id: T.nilable(String),
628
+ external_plan_id: T.nilable(String),
629
+ name: T.nilable(String),
630
+ plan_version: String
631
+ ).returns(T.attached_class)
632
+ end
633
+ def self.new(
634
+ id:,
635
+ # An optional user-defined ID for this plan resource, used throughout the system
636
+ # as an alias for this Plan. Use this field to identify a plan by an existing
637
+ # identifier in your system.
638
+ external_plan_id:,
639
+ name:,
640
+ plan_version:
641
+ )
642
+ end
643
+
644
+ sig do
645
+ override.returns(
646
+ {
647
+ id: T.nilable(String),
648
+ external_plan_id: T.nilable(String),
649
+ name: T.nilable(String),
650
+ plan_version: String
651
+ }
652
+ )
653
+ end
654
+ def to_hash
655
+ end
656
+ end
657
+
658
+ class Threshold < Orb::Internal::Type::BaseModel
659
+ OrHash =
660
+ T.type_alias do
661
+ T.any(
662
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Threshold,
663
+ Orb::Internal::AnyHash
664
+ )
665
+ end
666
+
667
+ # The value at which an alert will fire. For credit balance alerts, the alert will
668
+ # fire at or below this value. For usage and cost alerts, the alert will fire at
669
+ # or above this value.
670
+ sig { returns(String) }
671
+ attr_accessor :value
672
+
673
+ # Thresholds are used to define the conditions under which an alert will be
674
+ # triggered.
675
+ sig { params(value: String).returns(T.attached_class) }
676
+ def self.new(
677
+ # The value at which an alert will fire. For credit balance alerts, the alert will
678
+ # fire at or below this value. For usage and cost alerts, the alert will fire at
679
+ # or above this value.
680
+ value:
681
+ )
682
+ end
683
+
684
+ sig { override.returns({ value: String }) }
685
+ def to_hash
686
+ end
687
+ end
688
+
689
+ # The type of alert. This must be a valid alert type.
690
+ module Type
691
+ extend Orb::Internal::Type::Enum
692
+
693
+ TaggedSymbol =
694
+ T.type_alias do
695
+ T.all(
696
+ Symbol,
697
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type
698
+ )
699
+ end
700
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
701
+
702
+ CREDIT_BALANCE_DEPLETED =
703
+ T.let(
704
+ :credit_balance_depleted,
705
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
706
+ )
707
+ CREDIT_BALANCE_DROPPED =
708
+ T.let(
709
+ :credit_balance_dropped,
710
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
711
+ )
712
+ CREDIT_BALANCE_RECOVERED =
713
+ T.let(
714
+ :credit_balance_recovered,
715
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
716
+ )
717
+ USAGE_EXCEEDED =
718
+ T.let(
719
+ :usage_exceeded,
720
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
721
+ )
722
+ COST_EXCEEDED =
723
+ T.let(
724
+ :cost_exceeded,
725
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
726
+ )
727
+ SPEND_EXCEEDED =
728
+ T.let(
729
+ :spend_exceeded,
730
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
731
+ )
732
+ LICENSE_BALANCE_THRESHOLD_REACHED =
733
+ T.let(
734
+ :license_balance_threshold_reached,
735
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
736
+ )
737
+
738
+ sig do
739
+ override.returns(
740
+ T::Array[
741
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::Type::TaggedSymbol
742
+ ]
743
+ )
744
+ end
745
+ def self.values
746
+ end
747
+ end
748
+
749
+ class BalanceAlertStatus < Orb::Internal::Type::BaseModel
750
+ OrHash =
751
+ T.type_alias do
752
+ T.any(
753
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus,
754
+ Orb::Internal::AnyHash
755
+ )
756
+ end
757
+
758
+ # Whether the alert is currently in-alert or not.
759
+ sig { returns(T::Boolean) }
760
+ attr_accessor :in_alert
761
+
762
+ # The value of the threshold that defines the alert status.
763
+ sig { returns(String) }
764
+ attr_accessor :threshold_value
765
+
766
+ # Alert status is used to determine if an alert is currently in-alert or not.
767
+ sig do
768
+ params(in_alert: T::Boolean, threshold_value: String).returns(
769
+ T.attached_class
770
+ )
771
+ end
772
+ def self.new(
773
+ # Whether the alert is currently in-alert or not.
774
+ in_alert:,
775
+ # The value of the threshold that defines the alert status.
776
+ threshold_value:
777
+ )
778
+ end
779
+
780
+ sig do
781
+ override.returns(
782
+ { in_alert: T::Boolean, threshold_value: String }
783
+ )
784
+ end
785
+ def to_hash
786
+ end
787
+ end
788
+
789
+ class LicenseType < Orb::Internal::Type::BaseModel
790
+ OrHash =
791
+ T.type_alias do
792
+ T.any(
793
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::LicenseType,
794
+ Orb::Internal::AnyHash
795
+ )
796
+ end
797
+
798
+ sig { returns(String) }
799
+ attr_accessor :id
800
+
801
+ # Minified license type for alert serialization.
802
+ sig { params(id: String).returns(T.attached_class) }
803
+ def self.new(id:)
804
+ end
805
+
806
+ sig { override.returns({ id: String }) }
807
+ def to_hash
808
+ end
809
+ end
810
+
811
+ class PriceFilter < Orb::Internal::Type::BaseModel
812
+ OrHash =
813
+ T.type_alias do
814
+ T.any(
815
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter,
816
+ Orb::Internal::AnyHash
817
+ )
818
+ end
819
+
820
+ # The property of the price to filter on.
821
+ sig do
822
+ returns(
823
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
824
+ )
825
+ end
826
+ attr_accessor :field
827
+
828
+ # Should prices that match the filter be included or excluded.
829
+ sig do
830
+ returns(
831
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator::TaggedSymbol
832
+ )
833
+ end
834
+ attr_accessor :operator
835
+
836
+ # The IDs or values that match this filter.
837
+ sig { returns(T::Array[String]) }
838
+ attr_accessor :values
839
+
840
+ sig do
841
+ params(
842
+ field:
843
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::OrSymbol,
844
+ operator:
845
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator::OrSymbol,
846
+ values: T::Array[String]
847
+ ).returns(T.attached_class)
848
+ end
849
+ def self.new(
850
+ # The property of the price to filter on.
851
+ field:,
852
+ # Should prices that match the filter be included or excluded.
853
+ operator:,
854
+ # The IDs or values that match this filter.
855
+ values:
856
+ )
857
+ end
858
+
859
+ sig do
860
+ override.returns(
861
+ {
862
+ field:
863
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol,
864
+ operator:
865
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator::TaggedSymbol,
866
+ values: T::Array[String]
867
+ }
868
+ )
869
+ end
870
+ def to_hash
871
+ end
872
+
873
+ # The property of the price to filter on.
874
+ module Field
875
+ extend Orb::Internal::Type::Enum
876
+
877
+ TaggedSymbol =
878
+ T.type_alias do
879
+ T.all(
880
+ Symbol,
881
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field
882
+ )
883
+ end
884
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
885
+
886
+ PRICE_ID =
887
+ T.let(
888
+ :price_id,
889
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
890
+ )
891
+ ITEM_ID =
892
+ T.let(
893
+ :item_id,
894
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
895
+ )
896
+ PRICE_TYPE =
897
+ T.let(
898
+ :price_type,
899
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
900
+ )
901
+ CURRENCY =
902
+ T.let(
903
+ :currency,
904
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
905
+ )
906
+ PRICING_UNIT_ID =
907
+ T.let(
908
+ :pricing_unit_id,
909
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
910
+ )
911
+
912
+ sig do
913
+ override.returns(
914
+ T::Array[
915
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field::TaggedSymbol
916
+ ]
917
+ )
918
+ end
919
+ def self.values
920
+ end
921
+ end
922
+
923
+ # Should prices that match the filter be included or excluded.
924
+ module Operator
925
+ extend Orb::Internal::Type::Enum
926
+
927
+ TaggedSymbol =
928
+ T.type_alias do
929
+ T.all(
930
+ Symbol,
931
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator
932
+ )
933
+ end
934
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
935
+
936
+ INCLUDES =
937
+ T.let(
938
+ :includes,
939
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator::TaggedSymbol
940
+ )
941
+ EXCLUDES =
942
+ T.let(
943
+ :excludes,
944
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator::TaggedSymbol
945
+ )
946
+
947
+ sig do
948
+ override.returns(
949
+ T::Array[
950
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator::TaggedSymbol
951
+ ]
952
+ )
953
+ end
954
+ def self.values
955
+ end
956
+ end
957
+ end
958
+
959
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
960
+ OrHash =
961
+ T.type_alias do
962
+ T.any(
963
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride,
964
+ Orb::Internal::AnyHash
965
+ )
966
+ end
967
+
968
+ # The values identifying this group, ordered to match group_keys when set and the
969
+ # alert's grouping_keys otherwise.
970
+ sig { returns(T::Array[String]) }
971
+ attr_accessor :group_values
972
+
973
+ # The thresholds applied to this group. An empty list means the group is silenced.
974
+ sig do
975
+ returns(
976
+ T::Array[
977
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold
978
+ ]
979
+ )
980
+ end
981
+ attr_accessor :thresholds
982
+
983
+ # The subset of the alert's grouping_keys this override binds. Null when the
984
+ # override targets one exact group across every grouping key.
985
+ sig { returns(T.nilable(T::Array[String])) }
986
+ attr_accessor :group_keys
987
+
988
+ # A per-group threshold override on a grouped cost alert.
989
+ #
990
+ # An empty `thresholds` list means the group is silenced (never fires). A
991
+ # non-empty list fully replaces the default thresholds for that group.
992
+ sig do
993
+ params(
994
+ group_values: T::Array[String],
995
+ thresholds:
996
+ T::Array[
997
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold::OrHash
998
+ ],
999
+ group_keys: T.nilable(T::Array[String])
1000
+ ).returns(T.attached_class)
1001
+ end
1002
+ def self.new(
1003
+ # The values identifying this group, ordered to match group_keys when set and the
1004
+ # alert's grouping_keys otherwise.
1005
+ group_values:,
1006
+ # The thresholds applied to this group. An empty list means the group is silenced.
1007
+ thresholds:,
1008
+ # The subset of the alert's grouping_keys this override binds. Null when the
1009
+ # override targets one exact group across every grouping key.
1010
+ group_keys: nil
1011
+ )
1012
+ end
1013
+
1014
+ sig do
1015
+ override.returns(
1016
+ {
1017
+ group_values: T::Array[String],
1018
+ thresholds:
1019
+ T::Array[
1020
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold
1021
+ ],
1022
+ group_keys: T.nilable(T::Array[String])
1023
+ }
1024
+ )
1025
+ end
1026
+ def to_hash
1027
+ end
1028
+
1029
+ class Threshold < Orb::Internal::Type::BaseModel
1030
+ OrHash =
1031
+ T.type_alias do
1032
+ T.any(
1033
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold,
1034
+ Orb::Internal::AnyHash
1035
+ )
1036
+ end
1037
+
1038
+ # The value at which an alert will fire. For credit balance alerts, the alert will
1039
+ # fire at or below this value. For usage and cost alerts, the alert will fire at
1040
+ # or above this value.
1041
+ sig { returns(String) }
1042
+ attr_accessor :value
1043
+
1044
+ # Thresholds are used to define the conditions under which an alert will be
1045
+ # triggered.
1046
+ sig { params(value: String).returns(T.attached_class) }
1047
+ def self.new(
1048
+ # The value at which an alert will fire. For credit balance alerts, the alert will
1049
+ # fire at or below this value. For usage and cost alerts, the alert will fire at
1050
+ # or above this value.
1051
+ value:
1052
+ )
1053
+ end
1054
+
1055
+ sig { override.returns({ value: String }) }
1056
+ def to_hash
1057
+ end
1058
+ end
1059
+ end
1060
+ end
1061
+
1062
+ class Group < Orb::Internal::Type::BaseModel
1063
+ OrHash =
1064
+ T.type_alias do
1065
+ T.any(
1066
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Properties::Group,
1067
+ Orb::Internal::AnyHash
1068
+ )
1069
+ end
1070
+
1071
+ sig { returns(T.nilable(String)) }
1072
+ attr_accessor :amount_threshold
1073
+
1074
+ sig { returns(T.nilable(String)) }
1075
+ attr_accessor :evaluated_amount
1076
+
1077
+ sig { returns(T::Array[String]) }
1078
+ attr_accessor :group_values
1079
+
1080
+ sig do
1081
+ params(
1082
+ amount_threshold: T.nilable(String),
1083
+ evaluated_amount: T.nilable(String),
1084
+ group_values: T::Array[String]
1085
+ ).returns(T.attached_class)
1086
+ end
1087
+ def self.new(amount_threshold:, evaluated_amount:, group_values:)
1088
+ end
1089
+
1090
+ sig do
1091
+ override.returns(
1092
+ {
1093
+ amount_threshold: T.nilable(String),
1094
+ evaluated_amount: T.nilable(String),
1095
+ group_values: T::Array[String]
1096
+ }
1097
+ )
1098
+ end
1099
+ def to_hash
1100
+ end
1101
+ end
1102
+ end
1103
+
1104
+ class Subscription < Orb::Internal::Type::BaseModel
1105
+ OrHash =
1106
+ T.type_alias do
1107
+ T.any(
1108
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription,
1109
+ Orb::Internal::AnyHash
1110
+ )
1111
+ end
1112
+
1113
+ sig { returns(String) }
1114
+ attr_accessor :id
1115
+
1116
+ sig { returns(Orb::CustomerMinified) }
1117
+ attr_reader :customer
1118
+
1119
+ sig { params(customer: Orb::CustomerMinified::OrHash).void }
1120
+ attr_writer :customer
1121
+
1122
+ sig { returns(T.nilable(Time)) }
1123
+ attr_accessor :end_date
1124
+
1125
+ sig do
1126
+ returns(
1127
+ T.nilable(
1128
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Plan
1129
+ )
1130
+ )
1131
+ end
1132
+ attr_reader :plan
1133
+
1134
+ sig do
1135
+ params(
1136
+ plan:
1137
+ T.nilable(
1138
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Plan::OrHash
1139
+ )
1140
+ ).void
1141
+ end
1142
+ attr_writer :plan
1143
+
1144
+ sig { returns(Time) }
1145
+ attr_accessor :start_date
1146
+
1147
+ sig do
1148
+ returns(
1149
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::TaggedSymbol
1150
+ )
1151
+ end
1152
+ attr_accessor :status
1153
+
1154
+ # The subscription in a license or grouped cost webhook payload: its status,
1155
+ # dates, plan and customer.
1156
+ sig do
1157
+ params(
1158
+ id: String,
1159
+ customer: Orb::CustomerMinified::OrHash,
1160
+ end_date: T.nilable(Time),
1161
+ plan:
1162
+ T.nilable(
1163
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Plan::OrHash
1164
+ ),
1165
+ start_date: Time,
1166
+ status:
1167
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::OrSymbol
1168
+ ).returns(T.attached_class)
1169
+ end
1170
+ def self.new(id:, customer:, end_date:, plan:, start_date:, status:)
1171
+ end
1172
+
1173
+ sig do
1174
+ override.returns(
1175
+ {
1176
+ id: String,
1177
+ customer: Orb::CustomerMinified,
1178
+ end_date: T.nilable(Time),
1179
+ plan:
1180
+ T.nilable(
1181
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Plan
1182
+ ),
1183
+ start_date: Time,
1184
+ status:
1185
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::TaggedSymbol
1186
+ }
1187
+ )
1188
+ end
1189
+ def to_hash
1190
+ end
1191
+
1192
+ class Plan < Orb::Internal::Type::BaseModel
1193
+ OrHash =
1194
+ T.type_alias do
1195
+ T.any(
1196
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Plan,
1197
+ Orb::Internal::AnyHash
1198
+ )
1199
+ end
1200
+
1201
+ sig { returns(T.nilable(String)) }
1202
+ attr_accessor :id
1203
+
1204
+ # An optional user-defined ID for this plan resource, used throughout the system
1205
+ # as an alias for this Plan. Use this field to identify a plan by an existing
1206
+ # identifier in your system.
1207
+ sig { returns(T.nilable(String)) }
1208
+ attr_accessor :external_plan_id
1209
+
1210
+ sig { returns(T.nilable(String)) }
1211
+ attr_accessor :name
1212
+
1213
+ sig do
1214
+ params(
1215
+ id: T.nilable(String),
1216
+ external_plan_id: T.nilable(String),
1217
+ name: T.nilable(String)
1218
+ ).returns(T.attached_class)
1219
+ end
1220
+ def self.new(
1221
+ id:,
1222
+ # An optional user-defined ID for this plan resource, used throughout the system
1223
+ # as an alias for this Plan. Use this field to identify a plan by an existing
1224
+ # identifier in your system.
1225
+ external_plan_id:,
1226
+ name:
1227
+ )
1228
+ end
1229
+
1230
+ sig do
1231
+ override.returns(
1232
+ {
1233
+ id: T.nilable(String),
1234
+ external_plan_id: T.nilable(String),
1235
+ name: T.nilable(String)
1236
+ }
1237
+ )
1238
+ end
1239
+ def to_hash
1240
+ end
1241
+ end
1242
+
1243
+ module Status
1244
+ extend Orb::Internal::Type::Enum
1245
+
1246
+ TaggedSymbol =
1247
+ T.type_alias do
1248
+ T.all(
1249
+ Symbol,
1250
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status
1251
+ )
1252
+ end
1253
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1254
+
1255
+ ACTIVE =
1256
+ T.let(
1257
+ :active,
1258
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::TaggedSymbol
1259
+ )
1260
+ ENDED =
1261
+ T.let(
1262
+ :ended,
1263
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::TaggedSymbol
1264
+ )
1265
+ UPCOMING =
1266
+ T.let(
1267
+ :upcoming,
1268
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::TaggedSymbol
1269
+ )
1270
+
1271
+ sig do
1272
+ override.returns(
1273
+ T::Array[
1274
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription::Status::TaggedSymbol
1275
+ ]
1276
+ )
1277
+ end
1278
+ def self.values
1279
+ end
1280
+ end
1281
+ end
1282
+
1283
+ # The event this payload describes.
1284
+ module Type
1285
+ extend Orb::Internal::Type::Enum
1286
+
1287
+ TaggedSymbol =
1288
+ T.type_alias do
1289
+ T.all(
1290
+ Symbol,
1291
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Type
1292
+ )
1293
+ end
1294
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1295
+
1296
+ SUBSCRIPTION_GROUPED_COST_EXCEEDED =
1297
+ T.let(
1298
+ :"subscription.grouped_cost_exceeded",
1299
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Type::TaggedSymbol
1300
+ )
1301
+
1302
+ sig do
1303
+ override.returns(
1304
+ T::Array[
1305
+ Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Type::TaggedSymbol
1306
+ ]
1307
+ )
1308
+ end
1309
+ def self.values
1310
+ end
1311
+ end
1312
+ end
1313
+ end
1314
+ end
1315
+ end