From a008f99434a7e36a57112b5355b03f03f0d2d450 Mon Sep 17 00:00:00 2001 From: Flavyo Henrique Date: Fri, 8 Jan 2021 18:00:42 -0300 Subject: [PATCH] =?UTF-8?q?Retirado=20m=C3=A9todos=20n=C3=A3o=20padr=C3=B5?= =?UTF-8?q?es=20na=20emiss=C3=A3o=20de=20NFSe=20para=20a=20prefeitura=20de?= =?UTF-8?q?=20Goi=C3=A2nia/GO.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfse/goiania/__init__.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/pytrustnfe/nfse/goiania/__init__.py b/pytrustnfe/nfse/goiania/__init__.py index 9390109..7a7b013 100644 --- a/pytrustnfe/nfse/goiania/__init__.py +++ b/pytrustnfe/nfse/goiania/__init__.py @@ -10,9 +10,6 @@ from pytrustnfe.xml import render_xml, sanitize_response from .assinatura import Assinatura -NAMESPACE = './/{http://nfse.goiania.go.gov.br/xsd/nfse_gyn_v02.xsd}' - - def _render(certificado, method, **kwargs): path = os.path.join(os.path.dirname(__file__), "templates") xml_send = render_xml(path, f"{method}.xml", False, **kwargs) @@ -62,26 +59,3 @@ def consulta_nfse_por_rps(certificado, **kwargs): if "xml" not in kwargs: kwargs["xml"] = _render(certificado, "ConsultarNfseRps", **kwargs) return _send(certificado, "ConsultarNfseRps", **kwargs) - - -def split_result(xml_received: str): - """ Retorna o código e a mensagem de retorno vindo do webservice """ - - xml = etree.fromstring(xml_received) - - if xml is None: - return None, None - - msg_return = xml.find(f'{NAMESPACE}MensagemRetorno') - code = msg_return.find(f"{NAMESPACE}Codigo").text - msg = msg_return.find(f"{NAMESPACE}Mensagem").text - return code, msg - - -def is_success(xml_received: str): - """ Retorna se a emissão da NFS-e deu certo """ - - code, _ = split_result(xml_received) - - # Code L000 significa que a nota foi aprovada - return code == 'L000'