Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
[GINFES][MANUAL][FIX] NAMESPACES
Browse files Browse the repository at this point in the history
[ADD] Consultar and Cancelar GenerateDSNamespaces
  • Loading branch information
luismalta authored and mileo committed Nov 7, 2020
1 parent 4c48f98 commit 4d303f9
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 37 deletions.
8 changes: 4 additions & 4 deletions nfselib/ginfes/v3_01/cabecalho.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs):
#

try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
try:
from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ImportError:
GenerateDSNamespaceTypePrefixes_ = {}

Expand Down Expand Up @@ -967,9 +967,9 @@ def __init__(self, versao=None, versaoDados=None, gds_collector_=None, **kwargs_
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('cabecalho')
self.versao = _cast(None, versao)
self.versao_nsprefix_ = None
self.versao_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('cabecalho')
self.versaoDados = versaoDados
self.validate_tsVersao(self.versaoDados)
self.versaoDados_nsprefix_ = None
Expand Down
14 changes: 14 additions & 0 deletions nfselib/ginfes/v3_01/generatedsnamespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,19 @@
"EnviarLoteRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"',
"ListaRpsType": 'xmlns="http://www.ginfes.com.br/tipos_v03.xsd"',
"ConsultarSituacaoLoteRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"',
"ConsultarNfseRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"',
"CancelarNfseEnvio": 'xmlns:p="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd" xmlns:p1="http://www.ginfes.com.br/tipos_v03.xsd"',
# "tcPedidoCancelamento": 'xmlns=""',
"cabecalho": 'xmlns:ns2="http://www.ginfes.com.br/cabecalho_v03.xsd"',
}

GenerateDSNamespaceTypePrefixes = {
"tcLoteRps": 'tipos',
"tcIdentificacaoPrestador": 'tipos',
"tcIdentificacaoRps": 'tipos',
"tcIdentificacaoNfse": 'p1',
"tcInfPedidoCancelamento": 'p1',
"tcPedidoCancelamento": 'p1',
"CancelarNfseEnvio": 'p',
"cabecalho": 'ns2'
}
20 changes: 10 additions & 10 deletions nfselib/ginfes/v3_01/servico_cancelar_nfse_envio.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs):
#

try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
try:
from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ImportError:
GenerateDSNamespaceTypePrefixes_ = {}

Expand Down Expand Up @@ -967,7 +967,7 @@ def __init__(self, Pedido=None, Signature=None, gds_collector_=None, **kwargs_):
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('CancelarNfseEnvio')
self.Pedido = Pedido
self.Pedido_nsprefix_ = None
self.Signature = Signature
Expand Down Expand Up @@ -3932,19 +3932,19 @@ def __init__(self, Numero=None, Cnpj=None, InscricaoMunicipal=None, CodigoMunici
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse')
self.Numero = Numero
self.validate_tsNumeroNfse(self.Numero)
self.Numero_nsprefix_ = None
self.Numero_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse')
self.Cnpj = Cnpj
self.validate_tsCnpj(self.Cnpj)
self.Cnpj_nsprefix_ = None
self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse')
self.InscricaoMunicipal = InscricaoMunicipal
self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal)
self.InscricaoMunicipal_nsprefix_ = None
self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse')
self.CodigoMunicipio = CodigoMunicipio
self.validate_tsCodigoMunicipioIbge(self.CodigoMunicipio)
self.CodigoMunicipio_nsprefix_ = None
self.CodigoMunicipio_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down Expand Up @@ -4724,14 +4724,14 @@ def __init__(self, Id=None, IdentificacaoNfse=None, CodigoCancelamento=None, gds
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('tcInfPedidoCancelamento')
self.Id = _cast(None, Id)
self.Id_nsprefix_ = None
self.IdentificacaoNfse = IdentificacaoNfse
self.IdentificacaoNfse_nsprefix_ = None
self.CodigoCancelamento = CodigoCancelamento
self.validate_tsCodigoCancelamentoNfse(self.CodigoCancelamento)
self.CodigoCancelamento_nsprefix_ = None
self.CodigoCancelamento_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcInfPedidoCancelamento')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down
8 changes: 4 additions & 4 deletions nfselib/ginfes/v3_01/servico_consultar_lote_rps_envio.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs):
#

try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
try:
from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ImportError:
GenerateDSNamespaceTypePrefixes_ = {}

Expand Down Expand Up @@ -5023,10 +5023,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw
self.ns_prefix_ = None
self.Cnpj = Cnpj
self.validate_tsCnpj(self.Cnpj)
self.Cnpj_nsprefix_ = None
self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
self.InscricaoMunicipal = InscricaoMunicipal
self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal)
self.InscricaoMunicipal_nsprefix_ = None
self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down
14 changes: 7 additions & 7 deletions nfselib/ginfes/v3_01/servico_consultar_nfse_rps_envio.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs):
#

try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
try:
from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ImportError:
GenerateDSNamespaceTypePrefixes_ = {}

Expand Down Expand Up @@ -1801,13 +1801,13 @@ def __init__(self, Numero=None, Serie=None, Tipo=None, gds_collector_=None, **kw
self.ns_prefix_ = None
self.Numero = Numero
self.validate_tsNumeroRps(self.Numero)
self.Numero_nsprefix_ = None
self.Numero_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoRps')
self.Serie = Serie
self.validate_tsSerieRps(self.Serie)
self.Serie_nsprefix_ = None
self.Serie_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoRps')
self.Tipo = Tipo
self.validate_tsTipoRps(self.Tipo)
self.Tipo_nsprefix_ = None
self.Tipo_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoRps')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down Expand Up @@ -1973,10 +1973,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw
self.ns_prefix_ = None
self.Cnpj = Cnpj
self.validate_tsCnpj(self.Cnpj)
self.Cnpj_nsprefix_ = None
self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
self.InscricaoMunicipal = InscricaoMunicipal
self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal)
self.InscricaoMunicipal_nsprefix_ = None
self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs):
#

try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
try:
from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ImportError:
GenerateDSNamespaceTypePrefixes_ = {}

Expand Down Expand Up @@ -2011,10 +2011,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw
self.ns_prefix_ = None
self.Cnpj = Cnpj
self.validate_tsCnpj(self.Cnpj)
self.Cnpj_nsprefix_ = None
self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
self.InscricaoMunicipal = InscricaoMunicipal
self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal)
self.InscricaoMunicipal_nsprefix_ = None
self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down
16 changes: 8 additions & 8 deletions nfselib/ginfes/v3_01/servico_enviar_lote_rps_envio.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs):
#

try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
try:
from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ImportError:
GenerateDSNamespaceTypePrefixes_ = {}

Expand Down Expand Up @@ -1961,10 +1961,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw
self.ns_prefix_ = None
self.Cnpj = Cnpj
self.validate_tsCnpj(self.Cnpj)
self.Cnpj_nsprefix_ = None
self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
self.InscricaoMunicipal = InscricaoMunicipal
self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal)
self.InscricaoMunicipal_nsprefix_ = None
self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador')
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down Expand Up @@ -6052,16 +6052,16 @@ def __init__(self, Id=None, NumeroLote=None, Cnpj=None, InscricaoMunicipal=None,
self.Id_nsprefix_ = None
self.NumeroLote = NumeroLote
self.validate_tsNumeroLote(self.NumeroLote)
self.NumeroLote_nsprefix_ = None
self.NumeroLote_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps')
self.Cnpj = Cnpj
self.validate_tsCnpj(self.Cnpj)
self.Cnpj_nsprefix_ = None
self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps')
self.InscricaoMunicipal = InscricaoMunicipal
self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal)
self.InscricaoMunicipal_nsprefix_ = None
self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps')
self.QuantidadeRps = QuantidadeRps
self.validate_tsQuantidadeRps(self.QuantidadeRps)
self.QuantidadeRps_nsprefix_ = None
self.QuantidadeRps_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps')
self.ListaRps = ListaRps
self.ListaRps_nsprefix_ = None
def factory(*args_, **kwargs_):
Expand Down

0 comments on commit 4d303f9

Please sign in to comment.