EmailEvent.fromJson constructor

EmailEvent.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory EmailEvent.fromJson(Map<String, Object?> json) => EmailEvent(
      bounceSubType: json["bounce_sub_type"] == null
          ? null
          : json["bounce_sub_type"] as String,
      bounceType:
          json["bounce_type"] == null ? null : json["bounce_type"] as String,
      complaintSubType: json["complaint_sub_type"] == null
          ? null
          : json["complaint_sub_type"] as String,
      id: json["id"] as String,
      occurredAt: decodeDateTime(json["occurred_at"]),
      provider: json["provider"] as String,
      providerMessageId: json["provider_message_id"] as String,
      reason: json["reason"] == null ? null : json["reason"] as String,
      reasonCode:
          json["reason_code"] == null ? null : json["reason_code"] as String,
      recipient:
          json["recipient"] == null ? null : json["recipient"] as String,
      source: json["source"] == null ? null : json["source"] as String,
      suppressRecipient: json["suppress_recipient"] == null
          ? null
          : json["suppress_recipient"] as bool,
      temporary: json["temporary"] == null ? null : json["temporary"] as bool,
      type: json["type"] as String,
    );