toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['flightClass'] = flightClass;
data['direction'] = direction;
data['ticketDownloadURL'] = ticketDownloadURL;
data['totalDuration'] = totalDuration;
data['stops'] = stops;
data['currency'] = currency;
data['adultCost'] = adultCost;
data['adultDiscountedPrice'] = adultDiscountedPrice;
data['adultOnlinePrice'] = adultOnlinePrice;
data['mileageCost'] = mileageCost;
data['source'] = source;
data['program'] = program;
data['neoPassMilesFee'] = neoPassMilesFee;
data['searchCreditFee'] = searchCreditFee;
data['cryptoFee'] = cryptoFee;
data['totalCost'] = totalCost;
data['totalDiscountedPrice'] = totalDiscountedPrice;
data['totalOnlinePrice'] = totalOnlinePrice;
data['discountPercentage'] = discountPercentage;
data['bookingURL'] = bookingURL;
data['createdAt'] = createdAt;
data['updatedAt'] = updatedAt;
data['bookingReference'] = bookingReference;
data['comment'] = comment;
data['usedNeoMiles'] = usedNeoMiles;
data['duffelOfferId'] = duffelOfferId;
data['tripSearchId'] = tripSearchId;
data['totalTax'] = totalTax;
data['costPerMile'] = costPerMile;
data['profit'] = profit;
data['searchCreditUsed'] = searchCreditUsed;
data['isDiscountedFlight'] = isDiscountedFlight;
data['bookingId'] = bookingId;
data['flightSubClass'] = flightSubClass;
if (flights != null) {
data['flights'] = flights!.map((v) => v.toJson()).toList();
}
return data;
}