Skip to content

Commit

Permalink
added attribute for previous event object
Browse files Browse the repository at this point in the history
  • Loading branch information
hzargar2 committed Jul 1, 2023
1 parent 56303e9 commit 3bdf893
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/resources/webhook_events.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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<HashMap<String, Value>>,
}

#[derive(Clone, Debug, Deserialize, Serialize)]
Expand Down

0 comments on commit 3bdf893

Please sign in to comment.