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