fromMap static method

SettingsShippingRule? fromMap(
  1. Object? body
)

Implementation

static SettingsShippingRule? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'shipping_rule');
  if (source == null) return null;
  return SettingsShippingRule(
    configuration:
        SettingsShippingRuleConfiguration.fromMap(source['configuration']),
    createdBy: readAny(source['created_by']),
    createdOn: readText(source['created_on']),
    description: readText(source['description']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    name: readText(source['name']),
    object: readText(source['object']),
    shippingClass: readAny(source['shipping_class']),
    status: readText(source['status']),
    version: readInteger(source['version']),
  );
}