Class EmailLogMessageEvent
Base type for an email log message event. Use EventType or pattern matching on the derived type to determine which details apply. The polymorphic discriminator in JSON is "event_type"; this type does not declare a matching property so the converter can use it exclusively.
[JsonPolymorphic(TypeDiscriminatorPropertyName = "event_type")]
[JsonDerivedType(typeof(EmailLogMessageEventDelivery), "delivery")]
[JsonDerivedType(typeof(EmailLogMessageEventOpen), "open")]
[JsonDerivedType(typeof(EmailLogMessageEventClick), "click")]
[JsonDerivedType(typeof(EmailLogMessageEventSoftBounce), "soft_bounce")]
[JsonDerivedType(typeof(EmailLogMessageEventBounce), "bounce")]
[JsonDerivedType(typeof(EmailLogMessageEventSpam), "spam")]
[JsonDerivedType(typeof(EmailLogMessageEventUnsubscribe), "unsubscribe")]
[JsonDerivedType(typeof(EmailLogMessageEventSuspension), "suspension")]
[JsonDerivedType(typeof(EmailLogMessageEventReject), "reject")]
public abstract record EmailLogMessageEvent : IEquatable<EmailLogMessageEvent>
- Inheritance
-
EmailLogMessageEvent
- Implements
- Derived
Properties
CreatedAt
When the event occurred.
[JsonPropertyName("created_at")]
public DateTimeOffset? CreatedAt { get; set; }
Property Value
EventType
Event type identifier (matches the API event_type value). Not serialized from JSON; derived types supply the value.
[JsonIgnore]
public abstract string EventType { get; }