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