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