BookingTrips.fromJson constructor

BookingTrips.fromJson(
  1. Map<String, dynamic> json
)

Implementation

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