fromMap static method
Implementation
static OrderNoteView? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'note');
if (source == null) return null;
return OrderNoteView(
attachments: readList<OrderNoteViewAttachment>(
source['attachments'], OrderNoteViewAttachment.fromMap),
content: readText(source['content']),
createdBy: OrderNoteViewCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
group: readAny(source['group']),
href: readText(source['href']),
id: readText(source['id']),
lastUpdatedBy:
OrderNoteViewLastUpdatedBy.fromMap(source['last_updated_by']),
lastUpdatedOn: readText(source['last_updated_on']),
object: readText(source['object']),
order: OrderNoteViewOrder.fromMap(source['order']),
user: readAny(source['user']),
version: readInteger(source['version']),
watchers: readList<OrderNoteViewWatcher>(
source['watchers'], OrderNoteViewWatcher.fromMap),
);
}