fromMap static method

Implementation

static PurchasePaymentNoteUpdated? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'note');
  if (source == null) return null;
  return PurchasePaymentNoteUpdated(
    attachments: readList<PurchasePaymentNoteUpdatedAttachment>(
        source['attachments'], PurchasePaymentNoteUpdatedAttachment.fromMap),
    content: readText(source['content']),
    createdBy: PurchasePaymentNoteUpdatedUser.fromMap(source['created_by']),
    createdOn: readText(source['created_on']),
    group: readAny(source['group']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy:
        PurchasePaymentNoteUpdatedUser.fromMap(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    object: readText(source['object']),
    purchasePayment: PurchasePaymentNoteUpdatedPurchasePayment.fromMap(
        source['purchase_payment']),
    user: readAny(source['user']),
    version: readInteger(source['version']),
    watchers: readList<Object>(source['watchers'], readAny),
  );
}