32
32
using NFe . Wsdl . Status ;
33
33
using NFe . Wsdl . Status . SVAN ;
34
34
using NFe . Wsdl . Status . SVCAN ;
35
- using VersaoServico = NFe . Classes . Servicos . Tipos . VersaoServico ;
36
35
37
36
namespace NFe . Servicos
38
37
{
@@ -54,7 +53,7 @@ public static INfeServicoAutorizacao CriaWsdlAutorizacao(ConfiguracaoServico cfg
54
53
if ( cfg . UsaSvcanNFe4 ( cfg . VersaoNFeAutorizacao ) )
55
54
return new NFeAutorizacao4SVCAN ( url , certificado , cfg . TimeOut ) ;
56
55
57
- if ( cfg . VersaoNFeAutorizacao == VersaoServico . ve400 )
56
+ if ( cfg . VersaoNFeAutorizacao == VersaoServico . Versao400 )
58
57
{
59
58
DFeSoapConfig soapConfig = new DFeSoapConfig
60
59
{
@@ -69,7 +68,7 @@ public static INfeServicoAutorizacao CriaWsdlAutorizacao(ConfiguracaoServico cfg
69
68
return new NFeAutorizacao4 ( soapConfig ) ;
70
69
}
71
70
72
- if ( cfg . cUF == Estado . PR & cfg . VersaoNFeAutorizacao == VersaoServico . ve310 )
71
+ if ( cfg . cUF == Estado . PR & cfg . VersaoNFeAutorizacao == VersaoServico . Versao310 )
73
72
return new NfeAutorizacao3 ( url , certificado , cfg . TimeOut ) ;
74
73
75
74
return new NfeAutorizacao ( url , certificado , cfg . TimeOut ) ;
@@ -79,13 +78,13 @@ private static DFe.Classes.Flags.VersaoServico ConverteVersaoLayout(VersaoServic
79
78
{
80
79
switch ( cfgVersaoNFeAutorizacao )
81
80
{
82
- case VersaoServico . ve100 :
81
+ case VersaoServico . Versao100 :
83
82
return DFe . Classes . Flags . VersaoServico . Versao100 ;
84
- case VersaoServico . ve200 :
83
+ case VersaoServico . Versao200 :
85
84
return DFe . Classes . Flags . VersaoServico . Versao200 ;
86
- case VersaoServico . ve310 :
85
+ case VersaoServico . Versao310 :
87
86
return DFe . Classes . Flags . VersaoServico . Versao310 ;
88
- case VersaoServico . ve400 :
87
+ case VersaoServico . Versao400 :
89
88
return DFe . Classes . Flags . VersaoServico . Versao400 ;
90
89
default :
91
90
throw new ArgumentOutOfRangeException ( "cfgVersaoNFeAutorizacao" , cfgVersaoNFeAutorizacao , null ) ;
@@ -112,13 +111,13 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico
112
111
if ( cfg . UsaSvcanNFe4 ( cfg . VersaoNfeStatusServico ) )
113
112
return new NfeStatusServico4NFeSVCAN ( url , certificado , cfg . TimeOut ) ;
114
113
115
- if ( cfg . cUF == Estado . PR & cfg . VersaoNfeStatusServico == VersaoServico . ve310 )
114
+ if ( cfg . cUF == Estado . PR & cfg . VersaoNfeStatusServico == VersaoServico . Versao310 )
116
115
return new NfeStatusServico3 ( url , certificado , cfg . TimeOut ) ;
117
116
118
- if ( cfg . cUF == Estado . BA & cfg . VersaoNfeStatusServico == VersaoServico . ve310 & cfg . ModeloDocumento == ModeloDocumento . NFe )
117
+ if ( cfg . cUF == Estado . BA & cfg . VersaoNfeStatusServico == VersaoServico . Versao310 & cfg . ModeloDocumento == ModeloDocumento . NFe )
119
118
return new NfeStatusServico ( url , certificado , cfg . TimeOut ) ;
120
119
121
- if ( cfg . VersaoNfeStatusServico == VersaoServico . ve400 )
120
+ if ( cfg . VersaoNfeStatusServico == VersaoServico . Versao400 )
122
121
return new NfeStatusServico4 ( url , certificado , cfg . TimeOut ) ;
123
122
124
123
return new NfeStatusServico2 ( url , certificado , cfg . TimeOut ) ;
@@ -130,13 +129,13 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico
130
129
if ( cfg . UsaSvcanNFe4 ( cfg . VersaoNfeConsultaProtocolo ) )
131
130
return new NfeConsultaProtocolo4SVCAN ( url , certificado , cfg . TimeOut ) ;
132
131
133
- if ( cfg . VersaoNfeConsultaProtocolo == VersaoServico . ve400 )
132
+ if ( cfg . VersaoNfeConsultaProtocolo == VersaoServico . Versao400 )
134
133
return new NfeConsultaProtocolo4 ( url , certificado , cfg . TimeOut ) ;
135
134
136
- if ( cfg . cUF == Estado . PR & cfg . VersaoNfeConsultaProtocolo == VersaoServico . ve310 )
135
+ if ( cfg . cUF == Estado . PR & cfg . VersaoNfeConsultaProtocolo == VersaoServico . Versao310 )
137
136
return new NfeConsultaProtocolo3 ( url , certificado , cfg . TimeOut ) ;
138
137
139
- if ( cfg . cUF == Estado . BA & cfg . VersaoNfeConsultaProtocolo == VersaoServico . ve310 &
138
+ if ( cfg . cUF == Estado . BA & cfg . VersaoNfeConsultaProtocolo == VersaoServico . Versao310 &
140
139
cfg . ModeloDocumento == ModeloDocumento . NFe )
141
140
return new NfeConsultaProtocolo ( url , certificado , cfg . TimeOut ) ;
142
141
@@ -159,10 +158,10 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico
159
158
if ( cfg . UsaSvcanNFe4 ( cfg . VersaoNFeRetAutorizacao ) )
160
159
return new NfeRetAutorizacao4SVCAN ( url , certificado , cfg . TimeOut ) ;
161
160
162
- if ( cfg . VersaoNFeRetAutorizacao == VersaoServico . ve400 )
161
+ if ( cfg . VersaoNFeRetAutorizacao == VersaoServico . Versao400 )
163
162
return new NfeRetAutorizacao4 ( url , certificado , cfg . TimeOut ) ;
164
163
165
- if ( cfg . cUF == Estado . PR & cfg . VersaoNFeAutorizacao == VersaoServico . ve310 )
164
+ if ( cfg . cUF == Estado . PR & cfg . VersaoNFeAutorizacao == VersaoServico . Versao310 )
166
165
return new NfeRetAutorizacao3 ( url , certificado , cfg . TimeOut ) ;
167
166
168
167
return new NfeRetAutorizacao ( url , certificado , cfg . TimeOut ) ;
@@ -172,13 +171,13 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico
172
171
if ( cfg . UsaSvanNFe4 ( cfg . VersaoNfeInutilizacao ) )
173
172
return new NFeInutilizacao4SVAN ( url , certificado , cfg . TimeOut ) ;
174
173
175
- if ( cfg . VersaoNfeInutilizacao == VersaoServico . ve400 )
174
+ if ( cfg . VersaoNfeInutilizacao == VersaoServico . Versao400 )
176
175
return new NFeInutilizacao4 ( url , certificado , cfg . TimeOut ) ;
177
176
178
- if ( cfg . cUF == Estado . PR & cfg . VersaoNfeInutilizacao == VersaoServico . ve310 )
177
+ if ( cfg . cUF == Estado . PR & cfg . VersaoNfeInutilizacao == VersaoServico . Versao310 )
179
178
return new NfeInutilizacao3 ( url , certificado , cfg . TimeOut ) ;
180
179
181
- if ( cfg . cUF == Estado . BA & cfg . VersaoNfeInutilizacao == VersaoServico . ve310 & cfg . ModeloDocumento == ModeloDocumento . NFe )
180
+ if ( cfg . cUF == Estado . BA & cfg . VersaoNfeInutilizacao == VersaoServico . Versao310 & cfg . ModeloDocumento == ModeloDocumento . NFe )
182
181
return new NfeInutilizacao ( url , certificado , cfg . TimeOut ) ;
183
182
184
183
return new NfeInutilizacao2 ( url , certificado , cfg . TimeOut ) ;
@@ -191,14 +190,14 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico
191
190
if ( cfg . UsaSvcanNFe4 ( cfg . VersaoRecepcaoEventoCceCancelamento ) )
192
191
return new RecepcaoEvento4SVCAN ( url , certificado , cfg . TimeOut ) ;
193
192
194
- if ( cfg . VersaoRecepcaoEventoCceCancelamento == VersaoServico . ve400 )
193
+ if ( cfg . VersaoRecepcaoEventoCceCancelamento == VersaoServico . Versao400 )
195
194
return new RecepcaoEvento4 ( url , certificado , cfg . TimeOut ) ;
196
195
197
196
return new RecepcaoEvento ( url , certificado , cfg . TimeOut ) ;
198
197
199
198
case ServicoNFe . RecepcaoEventoManifestacaoDestinatario :
200
199
{
201
- if ( cfg . VersaoRecepcaoEventoManifestacaoDestinatario == VersaoServico . ve400 )
200
+ if ( cfg . VersaoRecepcaoEventoManifestacaoDestinatario == VersaoServico . Versao400 )
202
201
return new RecepcaoEventoManifestacaoDestinatario4AN ( url , certificado , cfg . TimeOut ) ;
203
202
204
203
return new RecepcaoEvento ( url , certificado , cfg . TimeOut ) ;
@@ -216,7 +215,7 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico
216
215
}
217
216
218
217
219
- if ( cfg . VersaoNfeConsultaCadastro == VersaoServico . ve400 )
218
+ if ( cfg . VersaoNfeConsultaCadastro == VersaoServico . Versao400 )
220
219
return new Wsdl . ConsultaCadastro . DEMAIS_UFs . CadConsultaCadastro4 ( url , certificado , cfg . TimeOut ) ;
221
220
222
221
return new Wsdl . ConsultaCadastro . DEMAIS_UFs . CadConsultaCadastro2 ( url , certificado ,
0 commit comments