fromMap static method
Implementation
static PurchaseInvoiceNote? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return PurchaseInvoiceNote(
attachments: readList<PurchaseInvoiceNoteAttachment>(
source['attachments'], PurchaseInvoiceNoteAttachment.fromMap),
content: readText(source['content']),
createdBy: PurchaseInvoiceNoteCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
group: readAny(source['group']),
href: readText(source['href']),
id: readText(source['id']),
lastUpdatedBy:
PurchaseInvoiceNoteLastUpdatedBy.fromMap(source['last_updated_by']),
lastUpdatedOn: readText(source['last_updated_on']),
object: readText(source['object']),
purchaseInvoice: PurchaseInvoiceNotePurchaseInvoice.fromMap(
source['purchase_invoice']),
user: readAny(source['user']),
version: readInteger(source['version']),
watchers: readList<PurchaseInvoiceNoteWatcher>(
source['watchers'], PurchaseInvoiceNoteWatcher.fromMap),
);
}