pub struct SefazClient { /* private fields */ }Expand description
Cliente SEFAZ
Implementations§
Source§impl SefazClient
impl SefazClient
Sourcepub fn new(
certificado: CertificadoA1,
uf: &str,
ambiente: AmbienteNfe,
) -> Result<Self, String>
pub fn new( certificado: CertificadoA1, uf: &str, ambiente: AmbienteNfe, ) -> Result<Self, String>
Cria novo cliente SEFAZ
Sourcepub async fn status_servico(&self) -> Result<StatusServicoResult, String>
pub async fn status_servico(&self) -> Result<StatusServicoResult, String>
Consulta status do serviço SEFAZ
Sourcepub async fn consultar_nfe(
&self,
chave_acesso: &str,
) -> Result<ResultadoConsulta, String>
pub async fn consultar_nfe( &self, chave_acesso: &str, ) -> Result<ResultadoConsulta, String>
Consulta NF-e por chave de acesso
Sourcepub async fn autorizar_nfe(
&self,
xml_nfe: &str,
) -> Result<AutorizacaoResult, String>
pub async fn autorizar_nfe( &self, xml_nfe: &str, ) -> Result<AutorizacaoResult, String>
Envia NF-e para autorização
Sourcepub async fn cancelar_nfe(
&self,
chave_acesso: &str,
protocolo: &str,
justificativa: &str,
) -> Result<EventoResult, String>
pub async fn cancelar_nfe( &self, chave_acesso: &str, protocolo: &str, justificativa: &str, ) -> Result<EventoResult, String>
Cancela NF-e
Sourcepub async fn carta_correcao(
&self,
chave_acesso: &str,
sequencia: u32,
correcao: &str,
) -> Result<EventoResult, String>
pub async fn carta_correcao( &self, chave_acesso: &str, sequencia: u32, correcao: &str, ) -> Result<EventoResult, String>
Envia carta de correção
Auto Trait Implementations§
impl Freeze for SefazClient
impl !RefUnwindSafe for SefazClient
impl Send for SefazClient
impl Sync for SefazClient
impl Unpin for SefazClient
impl !UnwindSafe for SefazClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more