fromMap static method

LabourProfileSession? fromMap(
  1. Object? body
)

Implementation

static LabourProfileSession? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return LabourProfileSession(
    allowOvertime: readFlag(source['allow_overtime']),
    availability: readList<LabourProfileSessionAvailability>(
        source['availability'], LabourProfileSessionAvailability.fromMap),
    endDate: readText(source['end_date']),
    href: readText(source['href']),
    id: readText(source['id']),
    name: readText(source['name']),
    object: readText(source['object']),
    prices: readList<LabourProfileSessionPrice>(
        source['prices'], LabourProfileSessionPrice.fromMap),
    startDate: readText(source['start_date']),
    status: readText(source['status']),
    workingHours: readList<LabourProfileSessionWorkingHour>(
        source['working_hours'], LabourProfileSessionWorkingHour.fromMap),
  );
}