UParkingTariffResponse.fromMap constructor

UParkingTariffResponse.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory UParkingTariffResponse.fromMap(Map<String, dynamic> json) => UParkingTariffResponse(
  id: json["id"],
  createdAt: DateTime.parse(json["createdAt"]),
  tags: List<int>.from(json["tags"].map((dynamic x) => x)),
  parkingId: json["parkingId"],
  vehicleType: json["vehicleType"],
  entrancePrice: (json["entrancePrice"] as num).toDouble(),
  dayHourlyPrice: (json["dayHourlyPrice"] as num).toDouble(),
  nightHourlyPrice: (json["nightHourlyPrice"] as num).toDouble(),
  dailyCap: (json["dailyCap"] as num).toDouble(),
  weeklyPrice: (json["weeklyPrice"] as num).toDouble(),
  monthlyPrice: (json["monthlyPrice"] as num).toDouble(),
  quarterlyPrice: (json["quarterlyPrice"] as num).toDouble(),
  freeMinutes: json["freeMinutes"] ?? 0,
  nightStartHour: json["nightStartHour"] ?? 22,
  nightEndHour: json["nightEndHour"] ?? 6,
  holidayExtraPercent: json["holidayExtraPercent"] ?? 0,
  roundToFullHour: json["roundToFullHour"] ?? false,
  perMinuteAfterFirstHour: json["perMinuteAfterFirstHour"] ?? true,
  subscriptionDailyEntryLimit: json["subscriptionDailyEntryLimit"] ?? 0,
  subscriptionOfficeHoursOnly: json["subscriptionOfficeHoursOnly"] ?? false,
  subscriptionExpiryReminderDays: json["subscriptionExpiryReminderDays"] ?? 5,
  creatorId: json["creatorId"],
  jsonData: json["jsonData"] == null ? null : UBaseJson.fromMap(json["jsonData"]),
  creator: json["creator"] == null ? null : UUserResponse.fromMap(json["creator"]),
  adminUserIds: json["adminUserIds"] == null ? <String>[] : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);