orb-billing 1.34.0 → 1.36.0

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