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