SefazDanfe.Nfce.Data (sefaz_danfe v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

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

Types

t()

@type t() :: %{required(String.t()) => term()}

Functions

from_xml(xml, opts \\ [])

@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.