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