toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  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;
  }
    json[r'emailAddresses'] = this.emailAddresses;
  if (this.primaryEmailAddress != null) {
    json[r'primaryEmailAddress'] = this.primaryEmailAddress;
  } else {
    json[r'primaryEmailAddress'] = null;
  }
    json[r'tags'] = this.tags;
  if (this.metaData != null) {
    json[r'metaData'] = this.metaData;
  } else {
    json[r'metaData'] = null;
  }
  if (this.optOut != null) {
    json[r'optOut'] = this.optOut;
  } else {
    json[r'optOut'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  return json;
}