Datum.fromJson constructor

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

Implementation

factory Datum.fromJson(Map<String, dynamic> json) => Datum(
  id: json["id"],
  level: json["level"],
  name: json["name"],
  description: json["decription"],
  price: json["price"]?.toDouble(),
  originalPackagePrice: json["originalPackagePrice"]?.toDouble(),
  renewalPrice: json["renewalPrice"]?.toDouble(),
  renewalPricePercent: json["renewalPricePercent"],
  allowFlightBooking: json["allowFlightBooking"],
  available: json["available"],
  durationDays: json["durationDays"],
  trialDays: json["trialDays"],
  currency: json["currency"],
  type: json["type"] != null ? List<String>.from(json["type"]) : null,
  availableAddons: ((json["availableAddons"] ?? []) as List<dynamic>).map((ad) => Addon.fromJson(ad)).toList(),
  adultPassengerLimit: json["adultPassengerLimit"],
  maxExclusiveBookings: json["maxOneWayTripBooking"],
  memberDiscountPercentage: json["memberDiscountPercentage"],
  rateRequest: json["rateRequest"],
  neoMilesPaymentPercentage: json["neoMilesPaymentPercentage"],
  neoOneMonthlySubscription: json["neoOneMonthlySubscription"],
  searchCredit: json["searchCredit"],
  searchCreditUsd: json["searchCreditInUSD"],
  neoMilesBonus: json["neoMilesBonus"],
  discountedPrice: json["discountedPrice"],
  bookingBonus: json["bookingBonus"],
  resortRequest: json["resortRequest"],
  totalPrice: json["totalPrice"],
  priceInBTC: json["priceInBTC"],
  isUpgrade: json["isUpgrade"],
  vat: json["vat"],
  isAddon: json["isAddon"],
);