fromMap static method
Implementation
static PurchasePaymentNoteView? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'note');
if (source == null) return null;
return PurchasePaymentNoteView(
attachments: readList<PurchasePaymentNoteViewAttachment>(
source['attachments'], PurchasePaymentNoteViewAttachment.fromMap),
content: readText(source['content']),
createdBy: PurchasePaymentNoteViewCreatedBy.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']),
purchasePayment: PurchasePaymentNoteViewPurchasePayment.fromMap(
source['purchase_payment']),
user: readAny(source['user']),
version: readInteger(source['version']),
watchers: readList<PurchasePaymentNoteViewWatcher>(
source['watchers'], PurchasePaymentNoteViewWatcher.fromMap),
);
}