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