toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.userId != null) {
    json[r'userId'] = this.userId;
  } else {
    json[r'userId'] = null;
  }
  if (this.eventType != null) {
    json[r'eventType'] = this.eventType;
  } else {
    json[r'eventType'] = null;
  }
  if (this.mailSource != null) {
    json[r'mailSource'] = this.mailSource;
  } else {
    json[r'mailSource'] = null;
  }
  if (this.mailMessageId != null) {
    json[r'mailMessageId'] = this.mailMessageId;
  } else {
    json[r'mailMessageId'] = null;
  }
    json[r'complaintRecipient'] = this.complaintRecipient;
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
  return json;
}