fromMap static method

Timesheet? fromMap(
  1. Object? body
)

Implementation

static Timesheet? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return Timesheet(
    createdBy: TimesheetCreatedBy.fromMap(source['created_by']),
    createdOn: readText(source['created_on']),
    endTime: readText(source['end_time']),
    href: readText(source['href']),
    id: readText(source['id']),
    labour: TimesheetLabour.fromMap(source['labour']),
    lastUpdatedBy: TimesheetLastUpdatedBy.fromMap(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    object: readText(source['object']),
    saleOrder: TimesheetSaleOrder.fromMap(source['sale_order']),
    saleOrderItem: TimesheetSaleOrderItem.fromMap(source['sale_order_item']),
    startTime: readText(source['start_time']),
    status: readText(source['status']),
    version: readInteger(source['version']),
  );
}