fromMap static method

Implementation

static GiftCertificateAllocationRead? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'gift_certificate_allocation');
  if (source == null) return null;
  return GiftCertificateAllocationRead(
    account: GiftCertificateAllocationAccount.fromMap(source['account']),
    createdBy: readAny(source['created_by']),
    createdOn: readText(source['created_on']),
    date: readText(source['date']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    object: readText(source['object']),
    status: readText(source['status']),
    type: readText(source['type']),
    version: readInteger(source['version']),
  );
}