Resolves {uf, environment, service} to a SOAP URL.
Snapshot in priv/endpoints/nfe_4.00.json (nfephp mirror of the RFB table).
Source of truth remains https://www.nfe.fazenda.gov.br/portal/webServices.aspx
Summary
Functions
IBGE code for uf, which the 4.00 envelopes carry as cUF.
Resolves the SOAP URL for {uf, environment, service}.
Types
Functions
@spec snapshot_date() :: String.t()
@spec uf_code(String.t() | atom()) :: {:ok, pos_integer()} | {:error, {:unknown_uf, String.t()}}
IBGE code for uf, which the 4.00 envelopes carry as cUF.
The Ambiente Nacional is 91.
@spec url(String.t() | atom(), environment(), service()) :: {:ok, String.t()} | {:error, {:unknown_endpoint, String.t(), service()}} | {:error, {:invalid_environment, term()}} | {:error, {:unknown_service, term()}}
Resolves the SOAP URL for {uf, environment, service}.
The three failures are distinct on purpose: {:unknown_endpoint, uf, service}
is a UF this snapshot cannot resolve, while {:invalid_environment, _} and
{:unknown_service, _} mean the caller passed something that is not an
environment or not a 4.00 service at all.