plaid/model/
recurring_transactions_update_webhook.rs

1use serde::{Serialize, Deserialize};
2use super::WebhookEnvironmentValues;
3/**Fired when recurring transactions data is updated. This includes when a new recurring stream is detected or when a new transaction is added to an existing recurring stream. The `RECURRING_TRANSACTIONS_UPDATE` webhook will also fire when one or more attributes of the recurring stream changes, which is usually a result of the addition, update, or removal of transactions to the stream.
4
5After receipt of this webhook, the updated data can be fetched from `/transactions/recurring/get`.*/
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct RecurringTransactionsUpdateWebhook {
8    ///A list of `account_ids` for accounts that have new or updated recurring transactions data.
9    #[serde(default, skip_serializing_if = "Vec::is_empty")]
10    pub account_ids: Vec<String>,
11    ///The Plaid environment the webhook was sent from
12    pub environment: WebhookEnvironmentValues,
13    ///The `item_id` of the Item associated with this webhook, warning, or error
14    pub item_id: String,
15    ///`RECURRING_TRANSACTIONS_UPDATE`
16    pub webhook_code: String,
17    ///`TRANSACTIONS`
18    pub webhook_type: String,
19}
20impl std::fmt::Display for RecurringTransactionsUpdateWebhook {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
22        write!(f, "{}", serde_json::to_string(self).unwrap())
23    }
24}