fromMap static method

PurchaseInvoicesNote? fromMap(
  1. Object? body
)

Implementation

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