fromMap static method

LabourProfileSessionView? fromMap(
  1. Object? body
)

Implementation

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