toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
} else {
json[r'expiresAt'] = null;
}
if (this.availability != null) {
json[r'availability'] = this.availability;
} else {
json[r'availability'] = null;
}
if (this.checkInDate != null) {
json[r'checkInDate'] = _dateFormatter.format(this.checkInDate!);
} else {
json[r'checkInDate'] = null;
}
if (this.checkOutDate != null) {
json[r'checkOutDate'] = _dateFormatter.format(this.checkOutDate!);
} else {
json[r'checkOutDate'] = null;
}
json[r'requestedRooms'] = this.requestedRooms;
if (this.terms != null) {
json[r'terms'] = this.terms;
} else {
json[r'terms'] = null;
}
if (this.rate != null) {
json[r'rate'] = this.rate;
} else {
json[r'rate'] = null;
}
return json;
}