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

[REF] Ginfes Namespaces #7

Open
wants to merge 6 commits into
base: master_gen
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading