toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'route': route,
'bookingId': bookingId,
'tripType': tripType,
'totalOnlinePrice': totalOnlinePrice,
'totalDiscountedPrice': totalDiscountedPrice,
'discountPercentage': discountPercentage,
'totalPassengers': totalPassengers,
'fromAirport': fromAirport?.toJson(),
'toAirport': toAirport?.toJson(),
'totalMilesEarned': totalMilesEarned,
'email': email,
'donationAmount': donationAmount,
'isNonDiscounted': isNonDiscounted,
'bookingTrips': bookingTrips.map((v) => v.toJson()).toList(),
'offer': offer?.toJson(),
'departureTrip': departureTrip?.toJson(),
'returnTrip': returnTrip?.toJson(),
'milesUsed': milesUsed,
'adults': adults,
'children': children,
'infantsInLap': infantsInLap,
'infantsInSeat': infantsInSeat,
'searchCreditEarned': searchCreditEarned,
'searchCreditUsed': searchCreditUsed,
'totalTax': totalTax,
'passengers': passengers?.map((v)=>v.toJson()).toList(),
'totalDiscountedPriceBTC': totalDiscountedPriceBTC,
'rateConfirmedAt': rateConfirmedAt?.toString(),
'isStillAvailable': isStillAvailable,
'availabilityCheckedAt':availabilityCheckedAt,
'availabilityCheckCounter': availabilityCheckCounter,
'approvedAt': approvedAt,
'createdAt':createdAt,
'status':status,
};
}