UParkingTariffCreateParams.fromMap constructor

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

Implementation

factory UParkingTariffCreateParams.fromMap(Map<String, dynamic> json) => UParkingTariffCreateParams(
  parkingId: json["parkingId"],
  vehicleType: json["vehicleType"],
  tags: json["tags"] == null ? <int>[] : List<int>.from(json["tags"]!.map((dynamic x) => x)),
  entrancePrice: (json["entrancePrice"] as num?)?.toDouble() ?? 0,
  dayHourlyPrice: (json["dayHourlyPrice"] as num?)?.toDouble() ?? 0,
  nightHourlyPrice: (json["nightHourlyPrice"] as num?)?.toDouble() ?? 0,
  dailyCap: (json["dailyCap"] as num?)?.toDouble() ?? 0,
  weeklyPrice: (json["weeklyPrice"] as num?)?.toDouble() ?? 0,
  monthlyPrice: (json["monthlyPrice"] as num?)?.toDouble() ?? 0,
  quarterlyPrice: (json["quarterlyPrice"] as num?)?.toDouble() ?? 0,
  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,
  detail1: json["detail1"] ?? "",
  detail2: json["detail2"] ?? "",
  id: json["id"],
  creatorId: json["creatorId"],
  adminUserIds: json["adminUserIds"] == null ? null : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);