Skip to main content

firefly_iii/models/
webhook_trigger.rs

1/*
2 * Firefly III API v6.4.14
3 *
4 * This is the documentation of the Firefly III API. Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. <br><br> Please keep in mind that the demo site does **not** accept requests from `curl`, `colly`, `wget`, etc. You must use a browser or a tool like Insomnia to make your test requests. <br><br> To learn more about the idiosyncrasies of this API, please read about the API in the [Firefly III API documentation](https://docs.firefly-iii.org/references/firefly-iii/api/). <br><br> <small>This file was last generated on 2025-12-26 @ 15:17:41 (Europe/Amsterdam)</small>
5 *
6 * The version of the OpenAPI document: v6.4.14
7 * Contact: james@firefly-iii.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11#![allow(unused_imports)]
12
13use crate::models::{self, *};
14use std::fmt;
15
16/// WebhookTrigger : The trigger for the webhook.
17
18/// The trigger for the webhook.
19#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
20pub enum WebhookTrigger {
21    #[serde(rename = "ANY")]
22    Any,
23    #[serde(rename = "STORE_TRANSACTION")]
24    StoreTransaction,
25    #[serde(rename = "UPDATE_TRANSACTION")]
26    UpdateTransaction,
27    #[serde(rename = "DESTROY_TRANSACTION")]
28    DestroyTransaction,
29    #[serde(rename = "STORE_BUDGET")]
30    StoreBudget,
31    #[serde(rename = "UPDATE_BUDGET")]
32    UpdateBudget,
33    #[serde(rename = "DESTROY_BUDGET")]
34    DestroyBudget,
35    #[serde(rename = "STORE_UPDATE_BUDGET_LIMIT")]
36    StoreUpdateBudgetLimit,
37}
38
39impl std::fmt::Display for WebhookTrigger {
40    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
41        match self {
42            Self::Any => write!(f, "ANY"),
43            Self::StoreTransaction => write!(f, "STORE_TRANSACTION"),
44            Self::UpdateTransaction => write!(f, "UPDATE_TRANSACTION"),
45            Self::DestroyTransaction => write!(f, "DESTROY_TRANSACTION"),
46            Self::StoreBudget => write!(f, "STORE_BUDGET"),
47            Self::UpdateBudget => write!(f, "UPDATE_BUDGET"),
48            Self::DestroyBudget => write!(f, "DESTROY_BUDGET"),
49            Self::StoreUpdateBudgetLimit => write!(f, "STORE_UPDATE_BUDGET_LIMIT"),
50        }
51    }
52}
53
54impl std::default::Default for WebhookTrigger {
55    fn default() -> WebhookTrigger {
56        Self::Any
57    }
58}