# `SefazDanfe.Nfce.Data`
[🔗](https://github.com/devaction-labs/sefaz_danfe/blob/v0.1.0/lib/sefaz_danfe/nfce/data.ex#L1)

The data of a DANFE NFC-e, read from the `nfeProc` SEFAZ authorized: what the 80 mm or 58 mm receipt is
drawn from.

Pure, like `SefazDanfe.Nfe.Data` (the NF-e's): it takes the XML and answers a map with string keys
that the JSON encoder takes as is, every value presented the Brazilian way
(`SefazDanfe.Format`) and `nil` when the XML does not have it. The blocks follow the manual of
the DANFE NFC-e: `emitter`, `items`, `totals`, `payments`, `consumer`, the access key and the
`protocol`, and the QR code (`qr_code`) with the address to consult the document
(`consultation_url`) from its `infNFeSupl`.

`opts` takes `:canceled` (default `false`): the DANFE of a cancelled NFC-e says so.

# `t`

```elixir
@type t() :: %{required(String.t()) =&gt; term()}
```

# `from_xml`

```elixir
@spec from_xml(String.t(), keyword()) :: {:ok, t()} | {:error, term()}
```

The DANFE NFC-e data of the `nfeProc` (or the `NFe`) in `xml`; `{:error, reason}` when it cannot be read.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
