toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.passengerIndex != null) {
    json[r'passengerIndex'] = this.passengerIndex;
  } else {
    json[r'passengerIndex'] = null;
  }
  if (this.title != null) {
    json[r'title'] = this.title;
  } else {
    json[r'title'] = null;
  }
  if (this.givenName != null) {
    json[r'givenName'] = this.givenName;
  } else {
    json[r'givenName'] = null;
  }
  if (this.familyName != null) {
    json[r'familyName'] = this.familyName;
  } else {
    json[r'familyName'] = 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'identityDocuments'] = this.identityDocuments;
    json[r'selectedSeats'] = this.selectedSeats;
  return json;
}