fromMap static method
Implementation
static PurchaseOrderNotesData? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return PurchaseOrderNotesData(
attachments: readList<PurchaseOrderNotesDataAttachment>(
source['attachments'], PurchaseOrderNotesDataAttachment.fromMap),
content: readText(source['content']),
createdBy: PurchaseOrderNotesDataCreatedBy.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']),
purchaseOrder:
PurchaseOrderNotesDataPurchaseOrder.fromMap(source['purchase_order']),
user: readAny(source['user']),
version: readInteger(source['version']),
watchers: readList<PurchaseOrderNotesDataWatcher>(
source['watchers'], PurchaseOrderNotesDataWatcher.fromMap),
);
}