toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'messageId'] = this.messageId;
    json[r'webhookId'] = this.webhookId;
  if (this.webhookName != null) {
    json[r'webhookName'] = this.webhookName;
  } else {
    json[r'webhookName'] = null;
  }
    json[r'eventName'] = this.eventName;
    json[r'contactId'] = this.contactId;
  if (this.groupId != null) {
    json[r'groupId'] = this.groupId;
  } else {
    json[r'groupId'] = null;
  }
  if (this.firstName != null) {
    json[r'firstName'] = this.firstName;
  } else {
    json[r'firstName'] = null;
  }
  if (this.lastName != null) {
    json[r'lastName'] = this.lastName;
  } else {
    json[r'lastName'] = null;
  }
  if (this.company != null) {
    json[r'company'] = this.company;
  } else {
    json[r'company'] = null;
  }
  if (this.primaryEmailAddress != null) {
    json[r'primaryEmailAddress'] = this.primaryEmailAddress;
  } else {
    json[r'primaryEmailAddress'] = null;
  }
    json[r'emailAddresses'] = this.emailAddresses;
    json[r'tags'] = this.tags;
  if (this.metaData != null) {
    json[r'metaData'] = this.metaData;
  } else {
    json[r'metaData'] = null;
  }
    json[r'optOut'] = this.optOut;
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  return json;
}