|
|
|
@ -27,6 +27,7 @@ from mdfelib.v3_00.consStatServMDFe import TConsStatServ |
|
|
|
from mdfelib.v3_00.consSitMDFe import TConsSitMDFe |
|
|
|
from mdfelib.v3_00.consMDFeNaoEnc import TConsMDFeNaoEnc |
|
|
|
from mdfelib.v3_00.enviMDFe import TEnviMDFe |
|
|
|
from mdfelib.v3_00.consReciMDFe import TConsReciMDFe |
|
|
|
|
|
|
|
|
|
|
|
class ComunicacaoMDFE(ComunicacaoSefaz): |
|
|
|
@ -130,3 +131,22 @@ class ComunicacaoMDFE(ComunicacaoSefaz): |
|
|
|
|
|
|
|
# TODO: Processar o retorno |
|
|
|
return retorno |
|
|
|
|
|
|
|
def consulta_recibo(self, numero): |
|
|
|
url, webservice, metodo = self._get_url_webservice_metodo( |
|
|
|
WS_MDFE_RET_RECEPCAO |
|
|
|
) |
|
|
|
|
|
|
|
raiz = TConsReciMDFe( |
|
|
|
versao=self._versao, |
|
|
|
tpAmb=str(self._ambiente), |
|
|
|
nRec=numero, |
|
|
|
) |
|
|
|
raiz.original_tagname_ = 'consReciMDFe' |
|
|
|
xml = self._construir_xml_soap( |
|
|
|
webservice, |
|
|
|
self._construir_etree_ds(raiz) |
|
|
|
) |
|
|
|
return self._post( |
|
|
|
url, xml, soap_webservice_method=webservice + b'/' + metodo |
|
|
|
) |