fromMap static method

PurchaseOrdersNote? fromMap(
  1. Object? body
)

Implementation

static PurchaseOrdersNote? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return PurchaseOrdersNote(
    attachments: readList<Object>(source['attachments'], readAny),
    content: readText(source['content']),
    createdBy: PurchaseOrdersNoteCreatedBy.fromMap(source['created_by']),
    createdOn: readText(source['created_on']),
    group: readAny(source['group']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readAny(source['last_updated_on']),
    object: readText(source['object']),
    user: readAny(source['user']),
    version: readInteger(source['version']),
    watchers: readList<PurchaseOrdersNoteWatcher>(
        source['watchers'], PurchaseOrdersNoteWatcher.fromMap),
  );
}