From 3bdf8931cc9d56c4e5194025fb8d9a8aaee6f1b9 Mon Sep 17 00:00:00 2001 From: hzargar2 Date: Fri, 30 Jun 2023 22:21:11 -0400 Subject: [PATCH] added attribute for previous event object --- src/resources/webhook_events.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/resources/webhook_events.rs b/src/resources/webhook_events.rs index 656ab9c7f..030068f71 100644 --- a/src/resources/webhook_events.rs +++ b/src/resources/webhook_events.rs @@ -1,7 +1,9 @@ +use std::collections::HashMap; use chrono::Utc; #[cfg(feature = "webhook-events")] use hmac::{Hmac, Mac}; use serde::{Deserialize, Serialize}; +use serde_json::Value; #[cfg(feature = "webhook-events")] use sha2::Sha256; use smart_default::SmartDefault; @@ -409,7 +411,8 @@ impl std::fmt::Display for EventType { #[derive(Clone, Debug, Deserialize, Serialize, Default)] pub struct NotificationEventData { pub object: EventObject, - // previous_attributes: ... + #[serde(skip_serializing_if = "Option::is_none")] + pub previous_attributes: Option>, } #[derive(Clone, Debug, Deserialize, Serialize)]