SefazNfe.Taxpayer (sefaz_nfe v0.5.0)

Copy Markdown View Source

One infCad of a NFeConsultaCadastro answer.

Field names are the XSD's, in snake_case (AD-008). Values stay strings, as SEFAZ sent them (dates are AAAA-MM-DD), except the two coded fields below, which are integers; any field the authorizer left out is nil.

c_sit (cSit):

  • 0 - not enabled (nao habilitado)
  • 1 - enabled (habilitado)

ind_cred_nfe / ind_cred_cte (indCredNFe / indCredCTe):

  • 0 - not accredited
  • 1 - accredited
  • 2 - accredited with full obligation
  • 3 - accredited with partial obligation
  • 4 - SEFAZ does not provide the information

address is a map with x_lgr, nro, x_cpl, x_bairro, c_mun, x_mun, cep (ender), or nil when SEFAZ sent none.

Summary

Types

address()

@type address() :: %{
  x_lgr: String.t() | nil,
  nro: String.t() | nil,
  x_cpl: String.t() | nil,
  x_bairro: String.t() | nil,
  c_mun: String.t() | nil,
  x_mun: String.t() | nil,
  cep: String.t() | nil
}

t()

@type t() :: %SefazNfe.Taxpayer{
  address: address() | nil,
  c_sit: 0 | 1 | nil,
  cnae: String.t() | nil,
  cnpj: String.t() | nil,
  cpf: String.t() | nil,
  d_baixa: String.t() | nil,
  d_ini_ativ: String.t() | nil,
  d_ult_sit: String.t() | nil,
  ie: String.t() | nil,
  ie_atual: String.t() | nil,
  ie_unica: String.t() | nil,
  ind_cred_cte: 0..4 | nil,
  ind_cred_nfe: 0..4 | nil,
  uf: String.t() | nil,
  x_fant: String.t() | nil,
  x_nome: String.t() | nil,
  x_reg_apur: String.t() | nil
}