toJson method
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.emailAddress != null) {
json[r'emailAddress'] = this.emailAddress;
} else {
json[r'emailAddress'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
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.emailAddresses != null) {
json[r'emailAddresses'] = this.emailAddresses;
} else {
json[r'emailAddresses'] = null;
}
json[r'optOut'] = this.optOut;
return json;
}