fromMap static method
Implementation
static PaymentNoteRead? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'note');
if (source == null) return null;
return PaymentNoteRead(
attachments: readList<PaymentNoteReadAttachment>(
source['attachments'], PaymentNoteReadAttachment.fromMap),
content: readText(source['content']),
createdBy: PaymentNoteReadCreatedBy.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']),
note: readAny(source['note']),
object: readText(source['object']),
payment: PaymentNoteReadPayment.fromMap(source['payment']),
user: readAny(source['user']),
version: readInteger(source['version']),
watchers: readList<PaymentNoteReadWatcher>(
source['watchers'], PaymentNoteReadWatcher.fromMap),
);
}