Cfdi.Complementos.Complemento behaviour (cfdi_complementos v4.0.1)

Copy Markdown

Estructura base y comportamiento común de los complementos SAT.

Cada complemento concreto define new/1 y get_complement/1, devolviendo metadatos (key, xmlns, schema_location, xmlns_key) junto con la carga útil (complement).

Summary

Types

Mapa estándar para ensamblar cfdi:Complemento y xsi:schemaLocation.

t()

Types

complement_result()

@type complement_result() :: %{
  complement: term(),
  key: String.t(),
  schema_location: String.t(),
  xmlns: String.t(),
  xmlns_key: String.t()
}

Mapa estándar para ensamblar cfdi:Complemento y xsi:schemaLocation.

t()

@type t() :: %Cfdi.Complementos.Complemento{
  data: term() | nil,
  key: String.t() | nil,
  xmlns: String.t() | nil,
  xsd: String.t() | nil
}

Callbacks

get_complement(term)

@callback get_complement(term()) :: complement_result()