fromMap static method

PurchasePaymentNotes? fromMap(
  1. Object? body
)

Implementation

static PurchasePaymentNotes? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'note');
  if (source == null) return null;
  return PurchasePaymentNotes(
    attachments: readList<PurchasePaymentNotesAttachment>(
        source['attachments'], PurchasePaymentNotesAttachment.fromMap),
    content: readText(source['content']),
    createdBy: PurchasePaymentNotesCreatedBy.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']),
    link: readText(source['link']),
    name: readText(source['name']),
    object: readText(source['object']),
    purchasePayment: PurchasePaymentNotesPurchasePayment.fromMap(
        source['purchase_payment']),
    user: readAny(source['user']),
    uuid: readText(source['uuid']),
    version: readInteger(source['version']),
    watchers: readList<PurchasePaymentNotesWatcher>(
        source['watchers'], PurchasePaymentNotesWatcher.fromMap),
  );
}