fromMap static method

SettingsShippingPackage? fromMap(
  1. Object? body
)

Implementation

static SettingsShippingPackage? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'shipping_package');
  if (source == null) return null;
  return SettingsShippingPackage(
    createdBy: readAny(source['created_by']),
    createdOn: readText(source['created_on']),
    cubic: readAny(source['cubic']),
    cubicUom: readAny(source['cubic_uom']),
    description: readText(source['description']),
    displayName: readText(source['display_name']),
    height: readDecimal(source['height']),
    heightUom: readAny(source['height_uom']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    length: readDecimal(source['length']),
    lengthUom: readAny(source['length_uom']),
    name: readText(source['name']),
    object: readText(source['object']),
    status: readText(source['status']),
    weight: readDecimal(source['weight']),
    weightUom: readAny(source['weight_uom']),
    width: readDecimal(source['width']),
    widthUom: readAny(source['width_uom']),
  );
}