ReceiptRule.fromXml constructor

ReceiptRule.fromXml(
  1. XmlElement elem
)

Implementation

factory ReceiptRule.fromXml(_s.XmlElement elem) {
  return ReceiptRule(
    name: _s.extractXmlStringValue(elem, 'Name')!,
    actions: _s.extractXmlChild(elem, 'Actions')?.let((elem) => elem
        .findElements('member')
        .map((c) => ReceiptAction.fromXml(c))
        .toList()),
    enabled: _s.extractXmlBoolValue(elem, 'Enabled'),
    recipients: _s
        .extractXmlChild(elem, 'Recipients')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    scanEnabled: _s.extractXmlBoolValue(elem, 'ScanEnabled'),
    tlsPolicy: _s.extractXmlStringValue(elem, 'TlsPolicy')?.toTlsPolicy(),
  );
}