GeoRestriction.fromXml constructor

GeoRestriction.fromXml(
  1. XmlElement elem
)

Implementation

factory GeoRestriction.fromXml(_s.XmlElement elem) {
  return GeoRestriction(
    quantity: _s.extractXmlIntValue(elem, 'Quantity')!,
    restrictionType: _s
        .extractXmlStringValue(elem, 'RestrictionType')!
        .toGeoRestrictionType(),
    items: _s
        .extractXmlChild(elem, 'Items')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'Location')),
  );
}