CorvoNfse.Types.Company (Corvo NFS-e v0.1.1)

Copy Markdown View Source

Wire shape of a fiscal company. Optional fields are absent from the JSON when unset.

Responses come back as plain maps with these string keys, passed through unchanged from the server.

Summary

Types

Nested address object for create/update params: a plain JSON string-keyed map. Every key is optional: street, number, complement, district, city, state (UF) and zip (8 digits).

Params for CorvoNfse.Resources.Companies.create/2. Wire keys (camelCase), passed through unchanged; string keys or camelCase atom keys are accepted

Environment wire value: "test" | "live".

t()

Tax regime wire value: "MEI" | "Simples Nacional" | "Lucro Presumido" | "Lucro Real".

Params for CorvoNfse.Resources.Companies.update/3; same wire keys as create_params, all optional (null clears a field server-side).

Types

address_input()

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

Nested address object for create/update params: a plain JSON string-keyed map. Every key is optional: street, number, complement, district, city, state (UF) and zip (8 digits).

create_params()

@type create_params() :: map()

Params for CorvoNfse.Resources.Companies.create/2. Wire keys (camelCase), passed through unchanged; string keys or camelCase atom keys are accepted:

  • legalName, taxId (CNPJ), taxRegime, municipalityCode (IBGE, 7 digits) - required
  • tradeName, municipalReg, sendMunicipalReg (default false), defaultServiceCode (6 digits), simpleNational, specialRegime, address - optional

environment()

@type environment() :: String.t()

Environment wire value: "test" | "live".

t()

@type t() :: %CorvoNfse.Types.Company{
  addressCity: String.t() | nil,
  addressComplement: String.t() | nil,
  addressDistrict: String.t() | nil,
  addressNumber: String.t() | nil,
  addressState: String.t() | nil,
  addressStreet: String.t() | nil,
  addressZip: String.t() | nil,
  createdAt: String.t(),
  defaultServiceCode: String.t() | nil,
  deletedAt: String.t() | nil,
  environment: environment(),
  fiscalSchemaVersion: String.t(),
  id: String.t(),
  legalName: String.t(),
  municipalReg: String.t() | nil,
  municipalityCode: String.t() | nil,
  sendMunicipalReg: boolean() | nil,
  setupGaps: [String.t()],
  simpleNational: boolean(),
  specialRegime: String.t() | nil,
  status: String.t(),
  taxId: String.t(),
  taxRegime: tax_regime() | nil,
  tenantId: String.t(),
  tradeName: String.t() | nil,
  updatedAt: String.t()
}

tax_regime()

@type tax_regime() :: String.t()

Tax regime wire value: "MEI" | "Simples Nacional" | "Lucro Presumido" | "Lucro Real".

update_params()

@type update_params() :: map()

Params for CorvoNfse.Resources.Companies.update/3; same wire keys as create_params, all optional (null clears a field server-side).