SefazNfe.TaxpayerLookup (sefaz_nfe v0.5.0)

Copy Markdown View Source

Answer of NFeConsultaCadastro (retConsCad/infCons).

c_stat 111 means one record was found and 112 several. Anything else is a business outcome and still {:ok, lookup} with taxpayers: [] - 259 (not registered) is the usual one - exactly as SefazNfe.Result treats a rejection. Only a SOAP fault or an unreadable body is an error.

See SefazNfe.Taxpayer for the record, including the meaning of cSit, indCredNFe and indCredCTe.

Summary

Functions

Parses a retConsCad response.

Types

t()

@type t() :: %SefazNfe.TaxpayerLookup{
  c_stat: pos_integer(),
  dh_cons: String.t() | nil,
  taxpayers: [SefazNfe.Taxpayer.t()],
  uf: String.t() | nil,
  x_motivo: String.t()
}

Functions

parse(body)

@spec parse(String.t()) :: {:ok, t()} | {:error, term()}

Parses a retConsCad response.