fromMap static method

RefundNote? fromMap(
  1. Object? body
)

Implementation

static RefundNote? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'note');
  if (source == null) return null;
  return RefundNote(
    attachments: readList<RefundNoteAttachment>(
        source['attachments'], RefundNoteAttachment.fromMap),
    content: readText(source['content']),
    createdBy: RefundNoteCreatedBy.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']),
    refund: RefundNoteDetail.fromMap(source['refund']),
    user: readAny(source['user']),
    version: readInteger(source['version']),
    watchers: readList<RefundNoteWatcher>(
        source['watchers'], RefundNoteWatcher.fromMap),
  );
}