toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'passengerIndex'] = this.passengerIndex;
json[r'givenName'] = this.givenName;
json[r'familyName'] = this.familyName;
if (this.title != null) {
json[r'title'] = this.title;
} else {
json[r'title'] = null;
}
if (this.gender != null) {
json[r'gender'] = this.gender;
} else {
json[r'gender'] = null;
}
if (this.bornOn != null) {
json[r'bornOn'] = _dateFormatter.format(this.bornOn!);
} else {
json[r'bornOn'] = null;
}
if (this.email != null) {
json[r'email'] = this.email;
} else {
json[r'email'] = null;
}
if (this.phoneNumber != null) {
json[r'phoneNumber'] = this.phoneNumber;
} else {
json[r'phoneNumber'] = null;
}
json[r'selectedSeats'] = this.selectedSeats;
json[r'identityDocuments'] = this.identityDocuments;
return json;
}