toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.searchCriteria != null) {
json[r'searchCriteria'] = this.searchCriteria;
} else {
json[r'searchCriteria'] = null;
}
json[r'checkIn'] = _dateFormatter.format(this.checkIn);
json[r'checkOut'] = _dateFormatter.format(this.checkOut);
json[r'rooms'] = this.rooms;
if (this.guestNationality != null) {
json[r'guestNationality'] = this.guestNationality;
} else {
json[r'guestNationality'] = null;
}
if (this.guestCountryOfResidence != null) {
json[r'guestCountryOfResidence'] = this.guestCountryOfResidence;
} else {
json[r'guestCountryOfResidence'] = null;
}
if (this.filters != null) {
json[r'filters'] = this.filters;
} else {
json[r'filters'] = null;
}
if (this.cursor != null) {
json[r'cursor'] = this.cursor;
} else {
json[r'cursor'] = null;
}
if (this.limit != null) {
json[r'limit'] = this.limit;
} else {
json[r'limit'] = null;
}
if (this.currency != null) {
json[r'currency'] = this.currency;
} else {
json[r'currency'] = null;
}
return json;
}