├── .github └── workflows │ └── CICD.yml ├── .gitignore ├── Builder ├── MessageBuilder.cs └── SoapEnvelopeBuilder.cs ├── Exceptions └── InvalidRawResponseExceptionException.cs ├── Helpers └── Settings.cs ├── LICENSE.txt ├── Models ├── CfdiInfo.cs ├── DateTimePeriod.cs ├── Endpoint.cs ├── FileModel.cs ├── MetadataItem.cs └── SatModels │ ├── Complements │ ├── Payments │ │ ├── Pago10 │ │ │ ├── Pagos.cs │ │ │ ├── PagosPago.cs │ │ │ ├── PagosPagoDoctoRelacionado.cs │ │ │ ├── PagosPagoImpuestos.cs │ │ │ ├── PagosPagoImpuestosRetencion.cs │ │ │ └── PagosPagoImpuestosTraslado.cs │ │ └── Pago20 │ │ │ ├── Pagos.cs │ │ │ ├── PagosPago.cs │ │ │ ├── PagosPagoDoctoRelacionado.cs │ │ │ ├── PagosPagoDoctoRelacionadoImpuestosDR.cs │ │ │ ├── PagosPagoDoctoRelacionadoImpuestosDRRetencionDR.cs │ │ │ ├── PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR.cs │ │ │ ├── PagosPagoImpuestosP.cs │ │ │ ├── PagosPagoImpuestosPRetencionP.cs │ │ │ ├── PagosPagoImpuestosPTrasladoP.cs │ │ │ └── PagosTotales.cs │ └── TFD │ │ └── TimbreFiscalDigital.cs │ └── Invoicing │ └── Cfdi40 │ ├── Comprobante.cs │ ├── ComprobanteAddenda.cs │ ├── ComprobanteCfdiRelacionados.cs │ ├── ComprobanteCfdiRelacionadosCfdiRelacionado.cs │ ├── ComprobanteComplemento.cs │ ├── ComprobanteConcepto.cs │ ├── ComprobanteConceptoACuentaTerceros.cs │ ├── ComprobanteConceptoComplementoConcepto.cs │ ├── ComprobanteConceptoCuentaPredial.cs │ ├── ComprobanteConceptoImpuestos.cs │ ├── ComprobanteConceptoImpuestosRetencion.cs │ ├── ComprobanteConceptoImpuestosTraslado.cs │ ├── ComprobanteConceptoInformacionAduanera.cs │ ├── ComprobanteConceptoParte.cs │ ├── ComprobanteConceptoParteInformacionAduanera.cs │ ├── ComprobanteEmisor.cs │ ├── ComprobanteImpuestos.cs │ ├── ComprobanteImpuestosRetencion.cs │ ├── ComprobanteImpuestosTraslado.cs │ ├── ComprobanteInformacionGlobal.cs │ └── ComprobanteReceptor.cs ├── Packaging └── PackageManager.cs ├── README.md ├── Services ├── Authenticate │ ├── AuthenticateResult.cs │ └── AuthenticateService.cs ├── Common │ ├── DownloadType.cs │ ├── EndPointName.cs │ ├── EndPointType.cs │ ├── IHasInternalRequestResponse.cs │ ├── IHasSuccessResponse.cs │ ├── QueryParameters.cs │ ├── RequestType.cs │ └── Result.cs ├── Download │ ├── DownloadResult.cs │ └── DownloadService.cs ├── Helper.cs ├── Query │ ├── QueryResult.cs │ └── QueryService.cs ├── Verify │ ├── VerifyResult.cs │ └── VerifyService.cs └── XmlService.cs ├── SoapClient ├── InternalHttpClient.cs ├── InternalRequest.cs └── InternalResponse.cs ├── XmlDownloader.csproj ├── XmlDownloader.sln ├── fiscalapi.ico └── fiscalapi.png /.github/workflows/CICD.yml: -------------------------------------------------------------------------------- 1 | name: Publish NuGet Package 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | build-and-publish: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | # Checkout the repository 12 | - name: Checkout repository 13 | uses: actions/checkout@v3 14 | 15 | # Setup .NET 16 | - name: Setup .NET 17 | uses: actions/setup-dotnet@v3 18 | with: 19 | dotnet-version: '8.0.x' 20 | 21 | # Restore dependencies 22 | - name: Restore dependencies 23 | run: dotnet restore 24 | 25 | # Step to extract the AssemblyVersion from the .csproj file 26 | - name: Extract Package Version 27 | id: get_version 28 | run: | 29 | version=$(grep -oPm1 "(?<=)[^<]+" $(find . -name "*.csproj")) 30 | echo "PACKAGE_VERSION=$version" >> $GITHUB_ENV 31 | echo "Package Version extracted: $version" 32 | 33 | # Build the project 34 | - name: Build the project 35 | run: dotnet build --configuration Release 36 | 37 | # Pack the NuGet package 38 | - name: Pack NuGet Package 39 | run: dotnet pack --configuration Release --output ./nupkg 40 | 41 | # Publish the package to NuGet 42 | - name: Publish to NuGet 43 | env: 44 | NUGET_KEY: ${{ secrets.NUGET_KEY }} 45 | run: | 46 | dotnet nuget push ./nupkg/*.nupkg \ 47 | --api-key $NUGET_KEY \ 48 | --source https://api.nuget.org/v3/index.json 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Builder/MessageBuilder.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.SoapClient; 2 | 3 | namespace Fiscalapi.XmlDownloader.Builder; 4 | 5 | public static class MessageBuilder 6 | { 7 | public static HttpRequestMessage BuildHttpRequestMessage(InternalRequest internalRequest) 8 | { 9 | var content = new StringContent( 10 | internalRequest.RawRequest ?? string.Empty, 11 | internalRequest.Encoding, 12 | internalRequest.MediaType); 13 | 14 | 15 | var request = new HttpRequestMessage( 16 | internalRequest.HttpMethod, 17 | internalRequest.Url); 18 | 19 | request.Headers.Add("SOAPAction", internalRequest.SoapAction); 20 | 21 | if (internalRequest.Token is not null) 22 | request.Headers.Add("Authorization", internalRequest.Token.Value); 23 | 24 | request.Content = content; 25 | 26 | return request; 27 | } 28 | 29 | 30 | public static async Task BuildInternalResponseMessage(InternalRequest internalRequest, 31 | HttpResponseMessage response) 32 | { 33 | var internalResponse = new InternalResponse 34 | { 35 | IsSuccessStatusCode = response.IsSuccessStatusCode, 36 | ReasonPhrase = response.ReasonPhrase, 37 | RawResponse = await response.Content.ReadAsStringAsync(), 38 | HttpStatusCode = response.StatusCode, 39 | EndPointName = internalRequest.EndPointName, 40 | InternalRequest = internalRequest 41 | }; 42 | 43 | 44 | return internalResponse; 45 | } 46 | } -------------------------------------------------------------------------------- /Builder/SoapEnvelopeBuilder.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.Credentials.Common; 2 | using Fiscalapi.Credentials.Core; 3 | using Fiscalapi.XmlDownloader.Models; 4 | using Fiscalapi.XmlDownloader.Services; 5 | using Fiscalapi.XmlDownloader.Services.Common; 6 | 7 | namespace Fiscalapi.XmlDownloader.Builder; 8 | 9 | public class SoapEnvelopeBuilder 10 | { 11 | private readonly ICredential credential; 12 | 13 | public SoapEnvelopeBuilder(ICredential credential) 14 | { 15 | this.credential = credential; 16 | } 17 | 18 | public string BuildAuthenticate(DateTimePeriod? tokenPeriod = null, string securityTokenId = "") 19 | { 20 | tokenPeriod ??= DateTimePeriod.CreateTokenPeriod(); 21 | 22 | securityTokenId = string.IsNullOrEmpty(securityTokenId) ? CreateXmlSecurityTokenId() : securityTokenId; 23 | var certB64 = credential.Certificate.RawDataBytes.ToBase64String(); 24 | 25 | 26 | var toDigest = 27 | @$" 28 | {tokenPeriod.StartDateSat} 29 | {tokenPeriod.EndDateSat} 30 | "; 31 | 32 | 33 | var digest = credential.CreateHash(toDigest.Clean()); 34 | 35 | 36 | var canonicalSignedInfo = CreateCanonicalSignedInfoXml(digest); 37 | 38 | var signature = credential.SignData(canonicalSignedInfo.Clean()).ToBase64String(); 39 | 40 | 41 | var soapEnvelope = 42 | @$" 43 | 44 | 45 | 46 | {tokenPeriod.StartDateSat} 47 | {tokenPeriod.EndDateSat} 48 | 49 | 50 | {certB64} 51 | 52 | 53 | {canonicalSignedInfo} 54 | {signature} 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | "; 67 | 68 | return soapEnvelope.Clean(); 69 | } 70 | 71 | 72 | public string BuildQuery(string startDate, string endDate, string requestType, string downloadType, 73 | string? emitterRfc, string? receiverRfc) 74 | { 75 | var signerRfc = credential.Certificate.Rfc; 76 | 77 | 78 | var toDigestXml = downloadType.Equals(DownloadType.Emitted.ToString()) 79 | ? @$" 80 | 81 | 82 | " 83 | : @$" 84 | 85 | 86 | {receiverRfc} 87 | 88 | 89 | "; 90 | 91 | 92 | var digestValue = credential.CreateHash(toDigestXml.Clean()); 93 | 94 | var canonicalSignedInfo = CreateCanonicalSignedInfoXml(digestValue); 95 | 96 | var signatureValue = credential.SignData(canonicalSignedInfo.Clean()).ToBase64String(); 97 | 98 | var signatureXml = CreateSignatureXml(digestValue, signatureValue); 99 | 100 | 101 | var rawRequest = downloadType.Equals(DownloadType.Emitted.ToString()) 102 | ? @$" 103 | 104 | 105 | 106 | 107 | {signatureXml} 108 | 109 | 110 | 111 | " 112 | : @$" 113 | 114 | 115 | 116 | 117 | 118 | {receiverRfc} 119 | 120 | {signatureXml} 121 | 122 | 123 | 124 | "; 125 | 126 | 127 | return rawRequest.Clean(); 128 | } 129 | 130 | 131 | public string BuildVerify(string requestUuid) 132 | { 133 | var signerRfc = credential.Certificate.Rfc; 134 | 135 | var toDigestXml = 136 | @$" 137 | 138 | "; 139 | 140 | 141 | var digestValue = credential.CreateHash(toDigestXml.Clean()); 142 | 143 | var canonicalSignedInfo = CreateCanonicalSignedInfoXml(digestValue); 144 | 145 | var signatureValue = credential.SignData(canonicalSignedInfo.Clean()).ToBase64String(); 146 | 147 | var signatureXml = CreateSignatureXml(digestValue, signatureValue); 148 | 149 | 150 | var rawRequest = 151 | @$" 152 | 153 | 154 | 155 | 156 | {signatureXml} 157 | 158 | 159 | 160 | "; 161 | 162 | 163 | return rawRequest.Clean(); 164 | } 165 | 166 | public string? BuildDownload(string packageId) 167 | { 168 | var signerRfc = credential.Certificate.Rfc; 169 | 170 | var toDigestXml = 171 | @$" 172 | 173 | "; 174 | 175 | 176 | var digestValue = credential.CreateHash(toDigestXml.Clean()); 177 | 178 | var canonicalSignedInfo = CreateCanonicalSignedInfoXml(digestValue); 179 | 180 | var signatureValue = credential.SignData(canonicalSignedInfo.Clean()).ToBase64String(); 181 | 182 | var signatureXml = CreateSignatureXml(digestValue, signatureValue); 183 | 184 | 185 | var rawRequest = 186 | @$" 187 | 188 | 189 | 190 | 191 | {signatureXml} 192 | 193 | 194 | 195 | "; 196 | 197 | return rawRequest.Clean(); 198 | } 199 | 200 | 201 | #region Builder Helpers 202 | 203 | private static string CreateXmlSecurityTokenId() 204 | { 205 | return $"uuid-{Guid.NewGuid().ToString()}-1"; 206 | } 207 | 208 | private static string CreateCanonicalSignedInfoXml(string digest) 209 | { 210 | var xml = 211 | @$" 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | {digest} 220 | 221 | "; 222 | 223 | return xml; 224 | } 225 | 226 | 227 | private string CreateSignatureXml(string digestValue, string signatureValue) 228 | { 229 | var xml = 230 | @$" 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | {digestValue} 240 | 241 | 242 | {signatureValue} 243 | 244 | 245 | 246 | {credential.Certificate.Issuer} 247 | {credential.Certificate.SerialNumber} 248 | 249 | {credential.Certificate.RawDataBytes.ToBase64String()} 250 | 251 | 252 | "; 253 | 254 | 255 | return xml.Clean(); 256 | } 257 | 258 | #endregion 259 | } -------------------------------------------------------------------------------- /Exceptions/InvalidRawResponseExceptionException.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Exceptions 2 | { 3 | public class InvalidRawResponseExceptionException : Exception 4 | { 5 | public InvalidRawResponseExceptionException(Exception exception, string message) 6 | { 7 | 8 | } 9 | public InvalidRawResponseExceptionException(string message) 10 | { 11 | 12 | } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /Helpers/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Helpers 2 | { 3 | public static class Settings 4 | { 5 | #region Props 6 | 7 | public static bool EnableRedundantWriting { get; set; } = true; 8 | public static string PackageExtension { get; set; } = ".Zip"; 9 | 10 | public static string PackagesDirectory { get; set; } = 11 | Path.Combine(Environment.CurrentDirectory, "PackagesDirectory"); 12 | 13 | public static string WorkDirectory { get; set; } = Path.Combine(Environment.CurrentDirectory, "WorkDirectory"); 14 | 15 | public static string LogsDirectory { get; set; } = Path.Combine(Environment.CurrentDirectory, "XmlLogs"); 16 | 17 | 18 | public const string RootNameSpace33 = @"http://www.sat.gob.mx/cfd/3"; 19 | public const string RootNameSpace40 = @"http://www.sat.gob.mx/cfd/4"; 20 | 21 | #endregion 22 | } 23 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /Models/CfdiInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Models 2 | { 3 | public class CfdiInfo 4 | { 5 | public string CfdiVersion { get; set; } = "4.0"; 6 | public string CfdiType { get; set; } = "I"; 7 | } 8 | } -------------------------------------------------------------------------------- /Models/DateTimePeriod.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Services; 2 | 3 | namespace Fiscalapi.XmlDownloader.Models; 4 | 5 | public class DateTimePeriod 6 | { 7 | public DateTimePeriod(DateTime startDate, DateTime endDate) 8 | { 9 | StartDate = startDate; 10 | EndDate = endDate; 11 | 12 | StartDateSat = StartDate.ToSatFormat(); 13 | EndDateSat = EndDate.ToSatFormat(); 14 | } 15 | 16 | public DateTime StartDate { get; set; } 17 | public DateTime EndDate { get; set; } 18 | 19 | 20 | public string StartDateSat { get; set; } 21 | public string EndDateSat { get; set; } 22 | 23 | /// 24 | /// 25 | /// 26 | /// 27 | public static DateTimePeriod CreateYesterdayQueryPeriod() 28 | { 29 | var yesterday = DateTime.Now.AddDays(-1); 30 | var startDate = yesterday.Date; 31 | var endDate = yesterday.Date.AddDays(1).AddSeconds(-1); 32 | return CreateQueryPeriod(startDate, endDate); 33 | } 34 | 35 | public static DateTimePeriod CreateTodayQueryPeriod() 36 | { 37 | var today = DateTime.Now; 38 | var startDate = today.Date; 39 | var endDate = today.Date.AddDays(1).AddSeconds(-1); 40 | return CreateQueryPeriod(startDate, endDate); 41 | } 42 | 43 | public static DateTimePeriod CreateQueryPeriod(DateTime startDate, DateTime endDate) 44 | { 45 | return new DateTimePeriod(startDate, endDate); 46 | } 47 | 48 | 49 | public static DateTimePeriod CreateTokenPeriod() 50 | { 51 | var created = DateTime.UtcNow; 52 | var expires = created.AddSeconds(300); 53 | return CreateQueryPeriod(created, expires); 54 | } 55 | 56 | public static DateTimePeriod CreateTokenPeriod(DateTime startDate) 57 | { 58 | var endDate = startDate.AddSeconds(300); 59 | return CreateQueryPeriod(startDate, endDate); 60 | } 61 | } -------------------------------------------------------------------------------- /Models/Endpoint.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Services.Common; 2 | 3 | namespace Fiscalapi.XmlDownloader.Models 4 | { 5 | public class Endpoint 6 | { 7 | public EndPointName EndPointName { get; set; } 8 | public EndPointType EndPointType { get; set; } 9 | public string Uri { get; set; } = string.Empty; 10 | public string SoapAction { get; set; } = string.Empty; 11 | } 12 | } -------------------------------------------------------------------------------- /Models/FileModel.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Models 2 | { 3 | public class FileModel 4 | { 5 | public string? FileName { get; set; } 6 | public string? FullFileName { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Models/MetadataItem.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Models 2 | { 3 | public class MetadataItem 4 | { 5 | /// 6 | /// uuid 7 | /// 8 | public string? Uuid { get; set; } 9 | 10 | /// 11 | /// rfcEmisor 12 | /// 13 | public string? EmitterRfc { get; set; } 14 | 15 | /// 16 | /// Razon social del emisor 17 | /// 18 | public string? EmitterLegalName { get; set; } 19 | 20 | /// 21 | /// rfcReceptor 22 | /// 23 | public string? ReceiverRfc { get; set; } 24 | 25 | /// 26 | /// Razon social de receptor 27 | /// 28 | public string? ReceiverLegalName { get; set; } 29 | 30 | /// 31 | /// rfc del PAC 32 | /// 33 | public string? PacRfc { get; set; } 34 | 35 | /// 36 | /// fechaEmision 37 | /// 38 | public string? invoiceDate { get; set; } 39 | 40 | /// 41 | /// fechaCertificacionSat 42 | /// 43 | public string? CertificationDate { get; set; } 44 | 45 | /// 46 | /// monto 47 | /// 48 | public string? invoiceAmount { get; set; } 49 | 50 | /// 51 | /// efectoComprobante 52 | /// 53 | public string? invoiceType { get; set; } 54 | 55 | /// 56 | /// 1 vigente | 0 cancelado 57 | /// 58 | public string? Status { get; set; } 59 | 60 | /// 61 | /// fechaCancelacion 62 | /// 63 | public string? CancellationDate { get; set; } 64 | } 65 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago10/Pagos.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago10 18 | { 19 | 20 | 21 | [Serializable, 22 | XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos"), 23 | XmlRoot(Namespace = "http://www.sat.gob.mx/Pagos", IsNullable = false)] 24 | public class Pagos 25 | { 26 | private PagosPago[] pagoField; 27 | 28 | private string versionField; 29 | 30 | public Pagos() 31 | { 32 | versionField = "1.0"; 33 | } 34 | 35 | 36 | [XmlElement("Pago")] 37 | public PagosPago[] Pago 38 | { 39 | get { return pagoField; } 40 | set { pagoField = value; } 41 | } 42 | 43 | 44 | [XmlAttribute] 45 | public string Version 46 | { 47 | get { return versionField; } 48 | set { versionField = value; } 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago10/PagosPago.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago10; 18 | 19 | 20 | [Serializable, 21 | XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos")] 22 | public class PagosPago 23 | { 24 | 25 | private PagosPagoDoctoRelacionado[] doctoRelacionadoField; 26 | 27 | private PagosPagoImpuestos[] impuestosField; 28 | 29 | private DateTime fechaPagoField; 30 | 31 | private string formaDePagoPField; 32 | 33 | private string monedaPField; 34 | 35 | private decimal tipoCambioPField; 36 | 37 | private bool tipoCambioPFieldSpecified; 38 | 39 | private decimal montoField; 40 | 41 | private string numOperacionField; 42 | 43 | private string rfcEmisorCtaOrdField; 44 | 45 | private string nomBancoOrdExtField; 46 | 47 | private string ctaOrdenanteField; 48 | 49 | private string rfcEmisorCtaBenField; 50 | 51 | private string ctaBeneficiarioField; 52 | 53 | private string tipoCadPagoField; 54 | 55 | private bool tipoCadPagoFieldSpecified; 56 | 57 | private byte[] certPagoField; 58 | 59 | private string cadPagoField; 60 | 61 | private byte[] selloPagoField; 62 | 63 | 64 | [XmlElement("DoctoRelacionado")] 65 | public PagosPagoDoctoRelacionado[] DoctoRelacionado 66 | { 67 | get 68 | { 69 | return doctoRelacionadoField; 70 | } 71 | set 72 | { 73 | doctoRelacionadoField = value; 74 | } 75 | } 76 | 77 | 78 | [XmlElement("Impuestos")] 79 | public PagosPagoImpuestos[] Impuestos 80 | { 81 | get 82 | { 83 | return impuestosField; 84 | } 85 | set 86 | { 87 | impuestosField = value; 88 | } 89 | } 90 | 91 | 92 | [XmlAttribute] 93 | public DateTime FechaPago 94 | { 95 | get 96 | { 97 | return fechaPagoField; 98 | } 99 | set 100 | { 101 | fechaPagoField = value; 102 | } 103 | } 104 | 105 | 106 | [XmlAttribute] 107 | public string FormaDePagoP 108 | { 109 | get 110 | { 111 | return formaDePagoPField; 112 | } 113 | set 114 | { 115 | formaDePagoPField = value; 116 | } 117 | } 118 | 119 | 120 | [XmlAttribute] 121 | public string MonedaP 122 | { 123 | get 124 | { 125 | return monedaPField; 126 | } 127 | set 128 | { 129 | monedaPField = value; 130 | } 131 | } 132 | 133 | 134 | [XmlAttribute] 135 | public decimal TipoCambioP 136 | { 137 | get 138 | { 139 | return tipoCambioPField; 140 | } 141 | set 142 | { 143 | tipoCambioPField = value; 144 | } 145 | } 146 | 147 | 148 | [XmlIgnore] 149 | public bool TipoCambioPSpecified 150 | { 151 | get 152 | { 153 | return tipoCambioPFieldSpecified; 154 | } 155 | set 156 | { 157 | tipoCambioPFieldSpecified = value; 158 | } 159 | } 160 | 161 | 162 | [XmlAttribute] 163 | public decimal Monto 164 | { 165 | get 166 | { 167 | return montoField; 168 | } 169 | set 170 | { 171 | montoField = value; 172 | } 173 | } 174 | 175 | 176 | [XmlAttribute] 177 | public string NumOperacion 178 | { 179 | get 180 | { 181 | return numOperacionField; 182 | } 183 | set 184 | { 185 | numOperacionField = value; 186 | } 187 | } 188 | 189 | 190 | [XmlAttribute] 191 | public string RfcEmisorCtaOrd 192 | { 193 | get 194 | { 195 | return rfcEmisorCtaOrdField; 196 | } 197 | set 198 | { 199 | rfcEmisorCtaOrdField = value; 200 | } 201 | } 202 | 203 | 204 | [XmlAttribute] 205 | public string NomBancoOrdExt 206 | { 207 | get 208 | { 209 | return nomBancoOrdExtField; 210 | } 211 | set 212 | { 213 | nomBancoOrdExtField = value; 214 | } 215 | } 216 | 217 | 218 | [XmlAttribute] 219 | public string CtaOrdenante 220 | { 221 | get 222 | { 223 | return ctaOrdenanteField; 224 | } 225 | set 226 | { 227 | ctaOrdenanteField = value; 228 | } 229 | } 230 | 231 | 232 | [XmlAttribute] 233 | public string RfcEmisorCtaBen 234 | { 235 | get 236 | { 237 | return rfcEmisorCtaBenField; 238 | } 239 | set 240 | { 241 | rfcEmisorCtaBenField = value; 242 | } 243 | } 244 | 245 | 246 | [XmlAttribute] 247 | public string CtaBeneficiario 248 | { 249 | get 250 | { 251 | return ctaBeneficiarioField; 252 | } 253 | set 254 | { 255 | ctaBeneficiarioField = value; 256 | } 257 | } 258 | 259 | 260 | [XmlAttribute] 261 | public string TipoCadPago 262 | { 263 | get 264 | { 265 | return tipoCadPagoField; 266 | } 267 | set 268 | { 269 | tipoCadPagoField = value; 270 | } 271 | } 272 | 273 | 274 | [XmlIgnore] 275 | public bool TipoCadPagoSpecified 276 | { 277 | get 278 | { 279 | return tipoCadPagoFieldSpecified; 280 | } 281 | set 282 | { 283 | tipoCadPagoFieldSpecified = value; 284 | } 285 | } 286 | 287 | 288 | [XmlAttribute(DataType = "base64Binary")] 289 | public byte[] CertPago 290 | { 291 | get 292 | { 293 | return certPagoField; 294 | } 295 | set 296 | { 297 | certPagoField = value; 298 | } 299 | } 300 | 301 | 302 | [XmlAttribute] 303 | public string CadPago 304 | { 305 | get 306 | { 307 | return cadPagoField; 308 | } 309 | set 310 | { 311 | cadPagoField = value; 312 | } 313 | } 314 | 315 | 316 | [XmlAttribute(DataType = "base64Binary")] 317 | public byte[] SelloPago 318 | { 319 | get 320 | { 321 | return selloPagoField; 322 | } 323 | set 324 | { 325 | selloPagoField = value; 326 | } 327 | } 328 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago10/PagosPagoDoctoRelacionado.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago10; 17 | 18 | 19 | [Serializable, 20 | XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos")] 21 | public class PagosPagoDoctoRelacionado 22 | { 23 | 24 | private string idDocumentoField; 25 | 26 | private string serieField; 27 | 28 | private string folioField; 29 | 30 | private string monedaDRField; 31 | 32 | private decimal tipoCambioDRField; 33 | 34 | private bool tipoCambioDRFieldSpecified; 35 | 36 | private string metodoDePagoDRField; 37 | 38 | private string numParcialidadField; 39 | 40 | private decimal impSaldoAntField; 41 | 42 | private bool impSaldoAntFieldSpecified; 43 | 44 | private decimal impPagadoField; 45 | 46 | private bool impPagadoFieldSpecified; 47 | 48 | private decimal impSaldoInsolutoField; 49 | 50 | private bool impSaldoInsolutoFieldSpecified; 51 | 52 | 53 | [XmlAttribute] 54 | public string IdDocumento 55 | { 56 | get 57 | { 58 | return idDocumentoField; 59 | } 60 | set 61 | { 62 | idDocumentoField = value; 63 | } 64 | } 65 | 66 | 67 | [XmlAttribute] 68 | public string Serie 69 | { 70 | get 71 | { 72 | return serieField; 73 | } 74 | set 75 | { 76 | serieField = value; 77 | } 78 | } 79 | 80 | 81 | [XmlAttribute] 82 | public string Folio 83 | { 84 | get 85 | { 86 | return folioField; 87 | } 88 | set 89 | { 90 | folioField = value; 91 | } 92 | } 93 | 94 | 95 | [XmlAttribute] 96 | public string MonedaDR 97 | { 98 | get 99 | { 100 | return monedaDRField; 101 | } 102 | set 103 | { 104 | monedaDRField = value; 105 | } 106 | } 107 | 108 | 109 | [XmlAttribute] 110 | public decimal TipoCambioDR 111 | { 112 | get 113 | { 114 | return tipoCambioDRField; 115 | } 116 | set 117 | { 118 | tipoCambioDRField = value; 119 | } 120 | } 121 | 122 | 123 | [XmlIgnore] 124 | public bool TipoCambioDRSpecified 125 | { 126 | get 127 | { 128 | return tipoCambioDRFieldSpecified; 129 | } 130 | set 131 | { 132 | tipoCambioDRFieldSpecified = value; 133 | } 134 | } 135 | 136 | 137 | [XmlAttribute] 138 | public string MetodoDePagoDR 139 | { 140 | get 141 | { 142 | return metodoDePagoDRField; 143 | } 144 | set 145 | { 146 | metodoDePagoDRField = value; 147 | } 148 | } 149 | 150 | 151 | [XmlAttribute(DataType = "integer")] 152 | public string NumParcialidad 153 | { 154 | get 155 | { 156 | return numParcialidadField; 157 | } 158 | set 159 | { 160 | numParcialidadField = value; 161 | } 162 | } 163 | 164 | 165 | [XmlAttribute] 166 | public decimal ImpSaldoAnt 167 | { 168 | get 169 | { 170 | return impSaldoAntField; 171 | } 172 | set 173 | { 174 | impSaldoAntField = value; 175 | } 176 | } 177 | 178 | 179 | [XmlIgnore] 180 | public bool ImpSaldoAntSpecified 181 | { 182 | get 183 | { 184 | return impSaldoAntFieldSpecified; 185 | } 186 | set 187 | { 188 | impSaldoAntFieldSpecified = value; 189 | } 190 | } 191 | 192 | 193 | [XmlAttribute] 194 | public decimal ImpPagado 195 | { 196 | get 197 | { 198 | return impPagadoField; 199 | } 200 | set 201 | { 202 | impPagadoField = value; 203 | } 204 | } 205 | 206 | 207 | [XmlIgnore] 208 | public bool ImpPagadoSpecified 209 | { 210 | get 211 | { 212 | return impPagadoFieldSpecified; 213 | } 214 | set 215 | { 216 | impPagadoFieldSpecified = value; 217 | } 218 | } 219 | 220 | 221 | [XmlAttribute] 222 | public decimal ImpSaldoInsoluto 223 | { 224 | get 225 | { 226 | return impSaldoInsolutoField; 227 | } 228 | set 229 | { 230 | impSaldoInsolutoField = value; 231 | } 232 | } 233 | 234 | 235 | [XmlIgnore] 236 | public bool ImpSaldoInsolutoSpecified 237 | { 238 | get 239 | { 240 | return impSaldoInsolutoFieldSpecified; 241 | } 242 | set 243 | { 244 | impSaldoInsolutoFieldSpecified = value; 245 | } 246 | } 247 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago10/PagosPagoImpuestos.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago10; 17 | 18 | 19 | [Serializable, 20 | XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos")] 21 | public class PagosPagoImpuestos 22 | { 23 | 24 | private PagosPagoImpuestosRetencion[] retencionesField; 25 | 26 | private PagosPagoImpuestosTraslado[] trasladosField; 27 | 28 | private decimal totalImpuestosRetenidosField; 29 | 30 | private bool totalImpuestosRetenidosFieldSpecified; 31 | 32 | private decimal totalImpuestosTrasladadosField; 33 | 34 | private bool totalImpuestosTrasladadosFieldSpecified; 35 | 36 | 37 | [XmlArrayItem("Retencion", IsNullable = false)] 38 | public PagosPagoImpuestosRetencion[] Retenciones 39 | { 40 | get 41 | { 42 | return retencionesField; 43 | } 44 | set 45 | { 46 | retencionesField = value; 47 | } 48 | } 49 | 50 | 51 | [XmlArrayItem("Traslado", IsNullable = false)] 52 | public PagosPagoImpuestosTraslado[] Traslados 53 | { 54 | get 55 | { 56 | return trasladosField; 57 | } 58 | set 59 | { 60 | trasladosField = value; 61 | } 62 | } 63 | 64 | 65 | [XmlAttribute] 66 | public decimal TotalImpuestosRetenidos 67 | { 68 | get 69 | { 70 | return totalImpuestosRetenidosField; 71 | } 72 | set 73 | { 74 | totalImpuestosRetenidosField = value; 75 | } 76 | } 77 | 78 | 79 | [XmlIgnore] 80 | public bool TotalImpuestosRetenidosSpecified 81 | { 82 | get 83 | { 84 | return totalImpuestosRetenidosFieldSpecified; 85 | } 86 | set 87 | { 88 | totalImpuestosRetenidosFieldSpecified = value; 89 | } 90 | } 91 | 92 | 93 | [XmlAttribute] 94 | public decimal TotalImpuestosTrasladados 95 | { 96 | get 97 | { 98 | return totalImpuestosTrasladadosField; 99 | } 100 | set 101 | { 102 | totalImpuestosTrasladadosField = value; 103 | } 104 | } 105 | 106 | 107 | [XmlIgnore] 108 | public bool TotalImpuestosTrasladadosSpecified 109 | { 110 | get 111 | { 112 | return totalImpuestosTrasladadosFieldSpecified; 113 | } 114 | set 115 | { 116 | totalImpuestosTrasladadosFieldSpecified = value; 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago10/PagosPagoImpuestosRetencion.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago10; 17 | 18 | 19 | [Serializable, 20 | XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos")] 21 | public class PagosPagoImpuestosRetencion 22 | { 23 | 24 | private string impuestoField; 25 | 26 | private decimal importeField; 27 | 28 | 29 | [XmlAttribute] 30 | public string Impuesto 31 | { 32 | get 33 | { 34 | return impuestoField; 35 | } 36 | set 37 | { 38 | impuestoField = value; 39 | } 40 | } 41 | 42 | 43 | [XmlAttribute] 44 | public decimal Importe 45 | { 46 | get 47 | { 48 | return importeField; 49 | } 50 | set 51 | { 52 | importeField = value; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago10/PagosPagoImpuestosTraslado.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago10; 18 | 19 | 20 | [Serializable, 21 | XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos")] 22 | public class PagosPagoImpuestosTraslado 23 | { 24 | 25 | private string impuestoField; 26 | 27 | private string tipoFactorField; 28 | 29 | private decimal tasaOCuotaField; 30 | 31 | private decimal importeField; 32 | 33 | 34 | [XmlAttribute] 35 | public string Impuesto 36 | { 37 | get 38 | { 39 | return impuestoField; 40 | } 41 | set 42 | { 43 | impuestoField = value; 44 | } 45 | } 46 | 47 | 48 | [XmlAttribute] 49 | public string TipoFactor 50 | { 51 | get 52 | { 53 | return tipoFactorField; 54 | } 55 | set 56 | { 57 | tipoFactorField = value; 58 | } 59 | } 60 | 61 | 62 | [XmlAttribute] 63 | public decimal TasaOCuota 64 | { 65 | get 66 | { 67 | return tasaOCuotaField; 68 | } 69 | set 70 | { 71 | tasaOCuotaField = value; 72 | } 73 | } 74 | 75 | 76 | [XmlAttribute] 77 | public decimal Importe 78 | { 79 | get 80 | { 81 | return importeField; 82 | } 83 | set 84 | { 85 | importeField = value; 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/Pagos.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable, XmlRoot(Namespace = "http://www.sat.gob.mx/Pagos20", IsNullable = false)] 19 | // [XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 20 | public class Pagos { 21 | 22 | private PagosTotales totalesField; 23 | 24 | private PagosPago[] pagoField; 25 | 26 | private string versionField; 27 | 28 | public Pagos() { 29 | versionField = "2.0"; 30 | } 31 | 32 | 33 | public PagosTotales Totales { 34 | get { 35 | return totalesField; 36 | } 37 | set { 38 | totalesField = value; 39 | } 40 | } 41 | 42 | 43 | [XmlElement("Pago")] 44 | public PagosPago[] Pago { 45 | get { 46 | return pagoField; 47 | } 48 | set { 49 | pagoField = value; 50 | } 51 | } 52 | 53 | 54 | [XmlAttribute] 55 | public string Version { 56 | get { 57 | return versionField; 58 | } 59 | set { 60 | versionField = value; 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPago.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable] 19 | 20 | 21 | //// [XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 22 | public class PagosPago 23 | { 24 | 25 | private PagosPagoDoctoRelacionado[] doctoRelacionadoField; 26 | 27 | private PagosPagoImpuestosP impuestosPField; 28 | 29 | private string fechaPagoField; 30 | 31 | private string formaDePagoPField; 32 | 33 | private string monedaPField; 34 | 35 | private decimal tipoCambioPField; 36 | 37 | private bool tipoCambioPFieldSpecified; 38 | 39 | private decimal montoField; 40 | 41 | private string numOperacionField; 42 | 43 | private string rfcEmisorCtaOrdField; 44 | 45 | private string nomBancoOrdExtField; 46 | 47 | private string ctaOrdenanteField; 48 | 49 | private string rfcEmisorCtaBenField; 50 | 51 | private string ctaBeneficiarioField; 52 | 53 | private string tipoCadPagoField; 54 | 55 | private bool tipoCadPagoFieldSpecified; 56 | 57 | private byte[] certPagoField; 58 | 59 | private string cadPagoField; 60 | 61 | private byte[] selloPagoField; 62 | 63 | 64 | [XmlElement("DoctoRelacionado")] 65 | public PagosPagoDoctoRelacionado[] DoctoRelacionado 66 | { 67 | get 68 | { 69 | return doctoRelacionadoField; 70 | } 71 | set 72 | { 73 | doctoRelacionadoField = value; 74 | } 75 | } 76 | 77 | 78 | public PagosPagoImpuestosP ImpuestosP 79 | { 80 | get 81 | { 82 | return impuestosPField; 83 | } 84 | set 85 | { 86 | impuestosPField = value; 87 | } 88 | } 89 | 90 | 91 | [XmlAttribute] 92 | public string FechaPago 93 | { 94 | get 95 | { 96 | return fechaPagoField; 97 | } 98 | set 99 | { 100 | fechaPagoField = value; 101 | } 102 | } 103 | 104 | 105 | [XmlAttribute] 106 | public string FormaDePagoP 107 | { 108 | get 109 | { 110 | return formaDePagoPField; 111 | } 112 | set 113 | { 114 | formaDePagoPField = value; 115 | } 116 | } 117 | 118 | 119 | [XmlAttribute] 120 | public string MonedaP 121 | { 122 | get 123 | { 124 | return monedaPField; 125 | } 126 | set 127 | { 128 | monedaPField = value; 129 | } 130 | } 131 | 132 | 133 | [XmlAttribute] 134 | public decimal TipoCambioP 135 | { 136 | get 137 | { 138 | return tipoCambioPField; 139 | } 140 | set 141 | { 142 | tipoCambioPField = value; 143 | tipoCambioPFieldSpecified = true; 144 | } 145 | } 146 | 147 | 148 | [XmlIgnore] 149 | public bool TipoCambioPSpecified 150 | { 151 | get 152 | { 153 | return tipoCambioPFieldSpecified; 154 | } 155 | set 156 | { 157 | tipoCambioPFieldSpecified = value; 158 | } 159 | } 160 | 161 | 162 | [XmlAttribute] 163 | public decimal Monto 164 | { 165 | get 166 | { 167 | return montoField; 168 | } 169 | set 170 | { 171 | montoField = value; 172 | } 173 | } 174 | 175 | 176 | [XmlAttribute] 177 | public string NumOperacion 178 | { 179 | get 180 | { 181 | return numOperacionField; 182 | } 183 | set 184 | { 185 | numOperacionField = value; 186 | 187 | } 188 | } 189 | 190 | 191 | [XmlAttribute] 192 | public string RfcEmisorCtaOrd 193 | { 194 | get 195 | { 196 | return rfcEmisorCtaOrdField; 197 | } 198 | set 199 | { 200 | rfcEmisorCtaOrdField = value; 201 | } 202 | } 203 | 204 | 205 | [XmlAttribute] 206 | public string NomBancoOrdExt 207 | { 208 | get 209 | { 210 | return nomBancoOrdExtField; 211 | } 212 | set 213 | { 214 | nomBancoOrdExtField = value; 215 | } 216 | } 217 | 218 | 219 | [XmlAttribute] 220 | public string CtaOrdenante 221 | { 222 | get 223 | { 224 | return ctaOrdenanteField; 225 | } 226 | set 227 | { 228 | ctaOrdenanteField = value; 229 | } 230 | } 231 | 232 | 233 | [XmlAttribute] 234 | public string RfcEmisorCtaBen 235 | { 236 | get 237 | { 238 | return rfcEmisorCtaBenField; 239 | } 240 | set 241 | { 242 | rfcEmisorCtaBenField = value; 243 | } 244 | } 245 | 246 | 247 | [XmlAttribute] 248 | public string CtaBeneficiario 249 | { 250 | get 251 | { 252 | return ctaBeneficiarioField; 253 | } 254 | set 255 | { 256 | ctaBeneficiarioField = value; 257 | } 258 | } 259 | 260 | 261 | [XmlAttribute] 262 | public string TipoCadPago 263 | { 264 | get 265 | { 266 | return tipoCadPagoField; 267 | } 268 | set 269 | { 270 | tipoCadPagoField = value; 271 | } 272 | } 273 | 274 | 275 | [XmlIgnore] 276 | public bool TipoCadPagoSpecified 277 | { 278 | get 279 | { 280 | return tipoCadPagoFieldSpecified; 281 | } 282 | set 283 | { 284 | tipoCadPagoFieldSpecified = value; 285 | } 286 | } 287 | 288 | 289 | [XmlAttribute(DataType = "base64Binary")] 290 | public byte[] CertPago 291 | { 292 | get 293 | { 294 | return certPagoField; 295 | } 296 | set 297 | { 298 | certPagoField = value; 299 | } 300 | } 301 | 302 | 303 | [XmlAttribute] 304 | public string CadPago 305 | { 306 | get 307 | { 308 | return cadPagoField; 309 | } 310 | set 311 | { 312 | cadPagoField = value; 313 | } 314 | } 315 | 316 | 317 | [XmlAttribute(DataType = "base64Binary")] 318 | public byte[] SelloPago 319 | { 320 | get 321 | { 322 | return selloPagoField; 323 | } 324 | set 325 | { 326 | selloPagoField = value; 327 | } 328 | } 329 | } 330 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoDoctoRelacionado.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 18 | { 19 | [Serializable] 20 | 21 | 22 | // [XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 23 | public class PagosPagoDoctoRelacionado 24 | { 25 | 26 | private PagosPagoDoctoRelacionadoImpuestosDR impuestosDRField; 27 | 28 | private string idDocumentoField; 29 | 30 | private string serieField; 31 | 32 | private string folioField; 33 | 34 | private string monedaDRField; 35 | 36 | private decimal equivalenciaDRField; 37 | 38 | private bool equivalenciaDRFieldSpecified; 39 | 40 | private string numParcialidadField; 41 | 42 | private decimal impSaldoAntField; 43 | 44 | private decimal impPagadoField; 45 | 46 | private decimal impSaldoInsolutoField; 47 | 48 | private string objetoImpDRField; 49 | 50 | 51 | public PagosPagoDoctoRelacionadoImpuestosDR ImpuestosDR 52 | { 53 | get 54 | { 55 | return impuestosDRField; 56 | } 57 | set 58 | { 59 | impuestosDRField = value; 60 | } 61 | } 62 | 63 | 64 | [XmlAttribute] 65 | public string IdDocumento 66 | { 67 | get 68 | { 69 | return idDocumentoField; 70 | } 71 | set 72 | { 73 | idDocumentoField = value; 74 | } 75 | } 76 | 77 | 78 | [XmlAttribute] 79 | public string Serie 80 | { 81 | get 82 | { 83 | return serieField; 84 | } 85 | set 86 | { 87 | serieField = value; 88 | } 89 | } 90 | 91 | 92 | [XmlAttribute] 93 | public string Folio 94 | { 95 | get 96 | { 97 | return folioField; 98 | } 99 | set 100 | { 101 | folioField = value; 102 | } 103 | } 104 | 105 | 106 | [XmlAttribute] 107 | public string MonedaDR 108 | { 109 | get 110 | { 111 | return monedaDRField; 112 | } 113 | set 114 | { 115 | monedaDRField = value; 116 | } 117 | } 118 | 119 | 120 | [XmlAttribute] 121 | public decimal EquivalenciaDR 122 | { 123 | get 124 | { 125 | return equivalenciaDRField; 126 | } 127 | set 128 | { 129 | equivalenciaDRField = value; 130 | equivalenciaDRFieldSpecified = true; 131 | } 132 | } 133 | 134 | 135 | [XmlIgnore] 136 | public bool EquivalenciaDRSpecified 137 | { 138 | get 139 | { 140 | return equivalenciaDRFieldSpecified; 141 | } 142 | set 143 | { 144 | equivalenciaDRFieldSpecified = value; 145 | } 146 | } 147 | 148 | 149 | [XmlAttribute(DataType = "integer")] 150 | public string NumParcialidad 151 | { 152 | get 153 | { 154 | return numParcialidadField; 155 | } 156 | set 157 | { 158 | numParcialidadField = value; 159 | } 160 | } 161 | 162 | 163 | [XmlAttribute] 164 | public decimal ImpSaldoAnt 165 | { 166 | get 167 | { 168 | return impSaldoAntField; 169 | } 170 | set 171 | { 172 | impSaldoAntField = value; 173 | } 174 | } 175 | 176 | 177 | [XmlAttribute] 178 | public decimal ImpPagado 179 | { 180 | get 181 | { 182 | return impPagadoField; 183 | } 184 | set 185 | { 186 | impPagadoField = value; 187 | } 188 | } 189 | 190 | 191 | [XmlAttribute] 192 | public decimal ImpSaldoInsoluto 193 | { 194 | get 195 | { 196 | return impSaldoInsolutoField; 197 | } 198 | set 199 | { 200 | impSaldoInsolutoField = value; 201 | } 202 | } 203 | 204 | 205 | [XmlAttribute] 206 | public string ObjetoImpDR 207 | { 208 | get 209 | { 210 | return objetoImpDRField; 211 | } 212 | set 213 | { 214 | objetoImpDRField = value; 215 | } 216 | } 217 | } 218 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoDoctoRelacionadoImpuestosDR.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable, XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 19 | public class PagosPagoDoctoRelacionadoImpuestosDR { 20 | 21 | private PagosPagoDoctoRelacionadoImpuestosDRRetencionDR[] retencionesDRField; 22 | 23 | private PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR[] trasladosDRField; 24 | 25 | 26 | [XmlArrayItem("RetencionDR", IsNullable=false)] 27 | public PagosPagoDoctoRelacionadoImpuestosDRRetencionDR[] RetencionesDR { 28 | get { 29 | return retencionesDRField; 30 | } 31 | set { 32 | retencionesDRField = value; 33 | } 34 | } 35 | 36 | 37 | [XmlArrayItem("TrasladoDR", IsNullable=false)] 38 | public PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR[] TrasladosDR { 39 | get { 40 | return trasladosDRField; 41 | } 42 | set { 43 | trasladosDRField = value; 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoDoctoRelacionadoImpuestosDRRetencionDR.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable, XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 19 | public class PagosPagoDoctoRelacionadoImpuestosDRRetencionDR { 20 | 21 | private decimal baseDRField; 22 | 23 | private string impuestoDRField; 24 | 25 | private string tipoFactorDRField; 26 | 27 | private decimal tasaOCuotaDRField; 28 | 29 | private decimal importeDRField; 30 | 31 | 32 | [XmlAttribute] 33 | public decimal BaseDR { 34 | get { 35 | return baseDRField; 36 | } 37 | set { 38 | baseDRField = value; 39 | } 40 | } 41 | 42 | 43 | [XmlAttribute] 44 | public string ImpuestoDR { 45 | get { 46 | return impuestoDRField; 47 | } 48 | set { 49 | impuestoDRField = value; 50 | } 51 | } 52 | 53 | 54 | [XmlAttribute] 55 | public string TipoFactorDR { 56 | get { 57 | return tipoFactorDRField; 58 | } 59 | set { 60 | tipoFactorDRField = value; 61 | } 62 | } 63 | 64 | 65 | [XmlAttribute] 66 | public decimal TasaOCuotaDR { 67 | get { 68 | return tasaOCuotaDRField; 69 | } 70 | set { 71 | tasaOCuotaDRField = value; 72 | } 73 | } 74 | 75 | 76 | [XmlAttribute] 77 | public decimal ImporteDR { 78 | get { 79 | return importeDRField; 80 | } 81 | set { 82 | importeDRField = value; 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable] 19 | // [XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 20 | public class PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR 21 | { 22 | 23 | private decimal baseDRField; 24 | 25 | private string impuestoDRField; 26 | 27 | private string tipoFactorDRField; 28 | 29 | private decimal tasaOCuotaDRField; 30 | 31 | private bool tasaOCuotaDRFieldSpecified; 32 | 33 | private decimal importeDRField; 34 | 35 | private bool importeDRFieldSpecified; 36 | 37 | 38 | [XmlAttribute] 39 | public decimal BaseDR 40 | { 41 | get 42 | { 43 | return baseDRField; 44 | } 45 | set 46 | { 47 | baseDRField = value; 48 | } 49 | } 50 | 51 | 52 | [XmlAttribute] 53 | public string ImpuestoDR 54 | { 55 | get 56 | { 57 | return impuestoDRField; 58 | } 59 | set 60 | { 61 | impuestoDRField = value; 62 | } 63 | } 64 | 65 | 66 | [XmlAttribute] 67 | public string TipoFactorDR 68 | { 69 | get 70 | { 71 | return tipoFactorDRField; 72 | } 73 | set 74 | { 75 | tipoFactorDRField = value; 76 | tasaOCuotaDRFieldSpecified = true; 77 | } 78 | } 79 | 80 | 81 | [XmlAttribute] 82 | public decimal TasaOCuotaDR 83 | { 84 | get 85 | { 86 | return tasaOCuotaDRField; 87 | } 88 | set 89 | { 90 | tasaOCuotaDRField = value; 91 | tasaOCuotaDRFieldSpecified = value >= 0; 92 | } 93 | } 94 | 95 | 96 | [XmlIgnore] 97 | public bool TasaOCuotaDRSpecified 98 | { 99 | get 100 | { 101 | return tasaOCuotaDRFieldSpecified; 102 | } 103 | set 104 | { 105 | tasaOCuotaDRFieldSpecified = value; 106 | } 107 | } 108 | 109 | 110 | [XmlAttribute] 111 | public decimal ImporteDR 112 | { 113 | get 114 | { 115 | return importeDRField; 116 | } 117 | set 118 | { 119 | importeDRField = value; 120 | importeDRFieldSpecified = value >= 0; 121 | } 122 | } 123 | 124 | 125 | [XmlIgnore] 126 | public bool ImporteDRSpecified 127 | { 128 | get 129 | { 130 | return importeDRFieldSpecified; 131 | } 132 | set 133 | { 134 | importeDRFieldSpecified = value; 135 | } 136 | } 137 | } 138 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoImpuestosP.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable, XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 19 | public class PagosPagoImpuestosP { 20 | 21 | private PagosPagoImpuestosPRetencionP[] retencionesPField; 22 | 23 | private PagosPagoImpuestosPTrasladoP[] trasladosPField; 24 | 25 | 26 | [XmlArrayItem("RetencionP", IsNullable=false)] 27 | public PagosPagoImpuestosPRetencionP[] RetencionesP { 28 | get { 29 | return retencionesPField; 30 | } 31 | set { 32 | retencionesPField = value; 33 | } 34 | } 35 | 36 | 37 | [XmlArrayItem("TrasladoP", IsNullable=false)] 38 | public PagosPagoImpuestosPTrasladoP[] TrasladosP { 39 | get { 40 | return trasladosPField; 41 | } 42 | set { 43 | trasladosPField = value; 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoImpuestosPRetencionP.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable, XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 19 | public class PagosPagoImpuestosPRetencionP { 20 | 21 | private string impuestoPField; 22 | 23 | private decimal importePField; 24 | 25 | 26 | [XmlAttribute] 27 | public string ImpuestoP { 28 | get { 29 | return impuestoPField; 30 | } 31 | set { 32 | impuestoPField = value; 33 | } 34 | } 35 | 36 | 37 | [XmlAttribute] 38 | public decimal ImporteP { 39 | get { 40 | return importePField; 41 | } 42 | set { 43 | importePField = value; 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosPagoImpuestosPTrasladoP.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable] 19 | 20 | 21 | // [XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 22 | public class PagosPagoImpuestosPTrasladoP 23 | { 24 | 25 | private decimal basePField; 26 | 27 | private string impuestoPField; 28 | 29 | private string tipoFactorPField; 30 | 31 | private decimal tasaOCuotaPField; 32 | 33 | private bool tasaOCuotaPFieldSpecified; 34 | 35 | private decimal importePField; 36 | 37 | private bool importePFieldSpecified; 38 | 39 | 40 | [XmlAttribute] 41 | public decimal BaseP 42 | { 43 | get 44 | { 45 | return basePField; 46 | } 47 | set 48 | { 49 | basePField = value; 50 | } 51 | } 52 | 53 | 54 | [XmlAttribute] 55 | public string ImpuestoP 56 | { 57 | get 58 | { 59 | return impuestoPField; 60 | } 61 | set 62 | { 63 | impuestoPField = value; 64 | } 65 | } 66 | 67 | 68 | [XmlAttribute] 69 | public string TipoFactorP 70 | { 71 | get 72 | { 73 | return tipoFactorPField; 74 | } 75 | set 76 | { 77 | tipoFactorPField = value; 78 | } 79 | } 80 | 81 | 82 | [XmlAttribute] 83 | public decimal TasaOCuotaP 84 | { 85 | get 86 | { 87 | return tasaOCuotaPField; 88 | } 89 | set 90 | { 91 | tasaOCuotaPField = value; 92 | tasaOCuotaPFieldSpecified = value >= 0; 93 | } 94 | } 95 | 96 | 97 | [XmlIgnore] 98 | public bool TasaOCuotaPSpecified 99 | { 100 | get 101 | { 102 | return tasaOCuotaPFieldSpecified; 103 | } 104 | set 105 | { 106 | tasaOCuotaPFieldSpecified = value; 107 | } 108 | } 109 | 110 | 111 | [XmlAttribute] 112 | public decimal ImporteP 113 | { 114 | get 115 | { 116 | return importePField; 117 | } 118 | set 119 | { 120 | importePField = value; 121 | importePFieldSpecified = value >= 0; 122 | } 123 | } 124 | 125 | 126 | [XmlIgnore] 127 | public bool ImportePSpecified 128 | { 129 | get 130 | { 131 | return importePFieldSpecified; 132 | } 133 | set 134 | { 135 | importePFieldSpecified = value; 136 | } 137 | } 138 | } 139 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/Payments/Pago20/PagosTotales.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20 17 | { 18 | [Serializable] 19 | 20 | 21 | // [XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/Pagos20")] 22 | public class PagosTotales 23 | { 24 | 25 | private decimal totalRetencionesIVAField; 26 | 27 | private bool totalRetencionesIVAFieldSpecified; 28 | 29 | private decimal totalRetencionesISRField; 30 | 31 | private bool totalRetencionesISRFieldSpecified; 32 | 33 | private decimal totalRetencionesIEPSField; 34 | 35 | private bool totalRetencionesIEPSFieldSpecified; 36 | 37 | private decimal totalTrasladosBaseIVA16Field; 38 | 39 | private bool totalTrasladosBaseIVA16FieldSpecified; 40 | 41 | private decimal totalTrasladosImpuestoIVA16Field; 42 | 43 | private bool totalTrasladosImpuestoIVA16FieldSpecified; 44 | 45 | private decimal totalTrasladosBaseIVA8Field; 46 | 47 | private bool totalTrasladosBaseIVA8FieldSpecified; 48 | 49 | private decimal totalTrasladosImpuestoIVA8Field; 50 | 51 | private bool totalTrasladosImpuestoIVA8FieldSpecified; 52 | 53 | private decimal totalTrasladosBaseIVA0Field; 54 | 55 | private bool totalTrasladosBaseIVA0FieldSpecified; 56 | 57 | private decimal totalTrasladosImpuestoIVA0Field; 58 | 59 | private bool totalTrasladosImpuestoIVA0FieldSpecified; 60 | 61 | private decimal totalTrasladosBaseIVAExentoField; 62 | 63 | private bool totalTrasladosBaseIVAExentoFieldSpecified; 64 | 65 | private decimal montoTotalPagosField; 66 | 67 | 68 | [XmlAttribute] 69 | public decimal TotalRetencionesIVA 70 | { 71 | get 72 | { 73 | return totalRetencionesIVAField; 74 | } 75 | set 76 | { 77 | totalRetencionesIVAField = value; 78 | } 79 | } 80 | 81 | 82 | [XmlIgnore] 83 | public bool TotalRetencionesIVASpecified 84 | { 85 | get 86 | { 87 | return totalRetencionesIVAFieldSpecified; 88 | } 89 | set 90 | { 91 | totalRetencionesIVAFieldSpecified = value; 92 | } 93 | } 94 | 95 | 96 | [XmlAttribute] 97 | public decimal TotalRetencionesISR 98 | { 99 | get 100 | { 101 | return totalRetencionesISRField; 102 | } 103 | set 104 | { 105 | totalRetencionesISRField = value; 106 | } 107 | } 108 | 109 | 110 | [XmlIgnore] 111 | public bool TotalRetencionesISRSpecified 112 | { 113 | get 114 | { 115 | return totalRetencionesISRFieldSpecified; 116 | } 117 | set 118 | { 119 | totalRetencionesISRFieldSpecified = value; 120 | } 121 | } 122 | 123 | 124 | [XmlAttribute] 125 | public decimal TotalRetencionesIEPS 126 | { 127 | get 128 | { 129 | return totalRetencionesIEPSField; 130 | } 131 | set 132 | { 133 | totalRetencionesIEPSField = value; 134 | } 135 | } 136 | 137 | 138 | [XmlIgnore] 139 | public bool TotalRetencionesIEPSSpecified 140 | { 141 | get 142 | { 143 | return totalRetencionesIEPSFieldSpecified; 144 | } 145 | set 146 | { 147 | totalRetencionesIEPSFieldSpecified = value; 148 | } 149 | } 150 | 151 | 152 | [XmlAttribute] 153 | public decimal TotalTrasladosBaseIVA16 154 | { 155 | get 156 | { 157 | return totalTrasladosBaseIVA16Field; 158 | } 159 | set 160 | { 161 | totalTrasladosBaseIVA16Field = value; 162 | totalTrasladosBaseIVA16FieldSpecified = value > 0; 163 | } 164 | } 165 | 166 | 167 | [XmlIgnore] 168 | public bool TotalTrasladosBaseIVA16Specified 169 | { 170 | get 171 | { 172 | return totalTrasladosBaseIVA16FieldSpecified; 173 | } 174 | set 175 | { 176 | totalTrasladosBaseIVA16FieldSpecified = value; 177 | } 178 | } 179 | 180 | 181 | [XmlAttribute] 182 | public decimal TotalTrasladosImpuestoIVA16 183 | { 184 | get 185 | { 186 | return totalTrasladosImpuestoIVA16Field; 187 | } 188 | set 189 | { 190 | totalTrasladosImpuestoIVA16Field = value; 191 | totalTrasladosImpuestoIVA16FieldSpecified = value > 0; 192 | } 193 | } 194 | 195 | 196 | [XmlIgnore] 197 | public bool TotalTrasladosImpuestoIVA16Specified 198 | { 199 | get 200 | { 201 | return totalTrasladosImpuestoIVA16FieldSpecified; 202 | } 203 | set 204 | { 205 | totalTrasladosImpuestoIVA16FieldSpecified = value; 206 | } 207 | } 208 | 209 | 210 | [XmlAttribute] 211 | public decimal TotalTrasladosBaseIVA8 212 | { 213 | get 214 | { 215 | return totalTrasladosBaseIVA8Field; 216 | } 217 | set 218 | { 219 | totalTrasladosBaseIVA8Field = value; 220 | } 221 | } 222 | 223 | 224 | [XmlIgnore] 225 | public bool TotalTrasladosBaseIVA8Specified 226 | { 227 | get 228 | { 229 | return totalTrasladosBaseIVA8FieldSpecified; 230 | } 231 | set 232 | { 233 | totalTrasladosBaseIVA8FieldSpecified = value; 234 | } 235 | } 236 | 237 | 238 | [XmlAttribute] 239 | public decimal TotalTrasladosImpuestoIVA8 240 | { 241 | get 242 | { 243 | return totalTrasladosImpuestoIVA8Field; 244 | } 245 | set 246 | { 247 | totalTrasladosImpuestoIVA8Field = value; 248 | } 249 | } 250 | 251 | 252 | [XmlIgnore] 253 | public bool TotalTrasladosImpuestoIVA8Specified 254 | { 255 | get 256 | { 257 | return totalTrasladosImpuestoIVA8FieldSpecified; 258 | } 259 | set 260 | { 261 | totalTrasladosImpuestoIVA8FieldSpecified = value; 262 | } 263 | } 264 | 265 | 266 | [XmlAttribute] 267 | public decimal TotalTrasladosBaseIVA0 268 | { 269 | get 270 | { 271 | return totalTrasladosBaseIVA0Field; 272 | } 273 | set 274 | { 275 | totalTrasladosBaseIVA0Field = value; 276 | } 277 | } 278 | 279 | 280 | [XmlIgnore] 281 | public bool TotalTrasladosBaseIVA0Specified 282 | { 283 | get 284 | { 285 | return totalTrasladosBaseIVA0FieldSpecified; 286 | } 287 | set 288 | { 289 | totalTrasladosBaseIVA0FieldSpecified = value; 290 | } 291 | } 292 | 293 | 294 | [XmlAttribute] 295 | public decimal TotalTrasladosImpuestoIVA0 296 | { 297 | get 298 | { 299 | return totalTrasladosImpuestoIVA0Field; 300 | } 301 | set 302 | { 303 | totalTrasladosImpuestoIVA0Field = value; 304 | } 305 | } 306 | 307 | 308 | [XmlIgnore] 309 | public bool TotalTrasladosImpuestoIVA0Specified 310 | { 311 | get 312 | { 313 | return totalTrasladosImpuestoIVA0FieldSpecified; 314 | } 315 | set 316 | { 317 | totalTrasladosImpuestoIVA0FieldSpecified = value; 318 | } 319 | } 320 | 321 | 322 | [XmlAttribute] 323 | public decimal TotalTrasladosBaseIVAExento 324 | { 325 | get 326 | { 327 | return totalTrasladosBaseIVAExentoField; 328 | } 329 | set 330 | { 331 | totalTrasladosBaseIVAExentoField = value; 332 | totalTrasladosBaseIVAExentoFieldSpecified = value > 0; 333 | } 334 | } 335 | 336 | 337 | [XmlIgnore] 338 | public bool TotalTrasladosBaseIVAExentoSpecified 339 | { 340 | get 341 | { 342 | return totalTrasladosBaseIVAExentoFieldSpecified; 343 | } 344 | set 345 | { 346 | totalTrasladosBaseIVAExentoFieldSpecified = value; 347 | } 348 | } 349 | 350 | 351 | [XmlAttribute] 352 | public decimal MontoTotalPagos 353 | { 354 | get 355 | { 356 | return montoTotalPagosField; 357 | } 358 | set 359 | { 360 | montoTotalPagosField = value; 361 | } 362 | } 363 | } 364 | } -------------------------------------------------------------------------------- /Models/SatModels/Complements/TFD/TimbreFiscalDigital.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Complements.TFD 18 | { 19 | [Serializable, XmlType(AnonymousType = true, Namespace = "http://www.sat.gob.mx/TimbreFiscalDigital"), 20 | XmlRoot(Namespace = "http://www.sat.gob.mx/TimbreFiscalDigital", IsNullable = false)] 21 | public class TimbreFiscalDigital 22 | { 23 | 24 | private string versionField; 25 | 26 | private string uUIDField; 27 | 28 | private DateTime fechaTimbradoField; 29 | 30 | private string rfcProvCertifField; 31 | 32 | private string leyendaField; 33 | 34 | private string selloCFDField; 35 | 36 | private string noCertificadoSATField; 37 | 38 | private string selloSATField; 39 | 40 | public TimbreFiscalDigital() 41 | { 42 | versionField = "1.1"; 43 | } 44 | 45 | 46 | [XmlAttribute] 47 | public string Version 48 | { 49 | get 50 | { 51 | return versionField; 52 | } 53 | set 54 | { 55 | versionField = value; 56 | } 57 | } 58 | 59 | 60 | [XmlAttribute] 61 | public string UUID 62 | { 63 | get 64 | { 65 | return uUIDField; 66 | } 67 | set 68 | { 69 | uUIDField = value; 70 | } 71 | } 72 | 73 | 74 | [XmlAttribute] 75 | public DateTime FechaTimbrado 76 | { 77 | get 78 | { 79 | return fechaTimbradoField; 80 | } 81 | set 82 | { 83 | fechaTimbradoField = value; 84 | } 85 | } 86 | 87 | 88 | [XmlAttribute] 89 | public string RfcProvCertif 90 | { 91 | get 92 | { 93 | return rfcProvCertifField; 94 | } 95 | set 96 | { 97 | rfcProvCertifField = value; 98 | } 99 | } 100 | 101 | 102 | [XmlAttribute] 103 | public string Leyenda 104 | { 105 | get 106 | { 107 | return leyendaField; 108 | } 109 | set 110 | { 111 | leyendaField = value; 112 | } 113 | } 114 | 115 | 116 | [XmlAttribute] 117 | public string SelloCFD 118 | { 119 | get 120 | { 121 | return selloCFDField; 122 | } 123 | set 124 | { 125 | selloCFDField = value; 126 | } 127 | } 128 | 129 | 130 | [XmlAttribute] 131 | public string NoCertificadoSAT 132 | { 133 | get 134 | { 135 | return noCertificadoSATField; 136 | } 137 | set 138 | { 139 | noCertificadoSATField = value; 140 | } 141 | } 142 | 143 | 144 | [XmlAttribute] 145 | public string SelloSAT 146 | { 147 | get 148 | { 149 | return selloSATField; 150 | } 151 | set 152 | { 153 | selloSATField = value; 154 | } 155 | } 156 | } 157 | 158 | } 159 | -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/Comprobante.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Schema; 15 | using System.Xml.Serialization; 16 | using Fiscalapi.XmlDownloader.Models.SatModels.Complements.Payments.Pago20; 17 | using Fiscalapi.XmlDownloader.Models.SatModels.Complements.TFD; 18 | 19 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 20 | { 21 | [Serializable, XmlType(AnonymousType = true), XmlRoot(IsNullable = false)] 22 | 23 | 24 | public class Comprobante 25 | { 26 | public TimbreFiscalDigital? TimbreFiscalDigital; 27 | public Pagos? Pago20; 28 | public Complements.Payments.Pago10.Pagos? Pago10; 29 | 30 | private ComprobanteInformacionGlobal informacionGlobalField; 31 | 32 | private ComprobanteCfdiRelacionados cfdiRelacionadosField; 33 | 34 | private ComprobanteEmisor emisorField; 35 | 36 | private ComprobanteReceptor receptorField; 37 | 38 | private ComprobanteConcepto[] conceptosField; 39 | 40 | private ComprobanteImpuestos impuestosField; 41 | 42 | private ComprobanteComplemento[] complementoField; 43 | 44 | private ComprobanteAddenda addendaField; 45 | 46 | private string versionField; 47 | 48 | private string serieField; 49 | 50 | private string folioField; 51 | 52 | private string fechaField; 53 | 54 | private string selloField; 55 | 56 | private string formaPagoField; 57 | 58 | private bool formaPagoFieldSpecified; 59 | 60 | private string noCertificadoField; 61 | 62 | private string certificadoField; 63 | 64 | private string condicionesDePagoField; 65 | 66 | private decimal subTotalField; 67 | 68 | private decimal descuentoField; 69 | 70 | private bool descuentoFieldSpecified; 71 | 72 | private string monedaField; 73 | 74 | private decimal tipoCambioField; 75 | 76 | private bool tipoCambioFieldSpecified; 77 | 78 | private decimal totalField; 79 | 80 | private string tipoDeComprobanteField; 81 | 82 | private string exportacionField; 83 | 84 | private string metodoPagoField; 85 | 86 | private bool metodoPagoFieldSpecified; 87 | 88 | private string lugarExpedicionField; 89 | 90 | private string confirmacionField; 91 | 92 | 93 | //[XmlAttribute("schemaLocation", Namespace = XmlSchema.InstanceNamespace)] 94 | //public string XsiSchemaLocation = 95 | // "http://www.sat.gob.mx/cfd/4 " + 96 | // "http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd " + 97 | // "http://www.sat.gob.mx/Pagos20 " + 98 | // "http://www.sat.gob.mx/sitio_internet/cfd/Pagos/Pagos20.xsd"; 99 | 100 | 101 | [XmlAttribute("schemaLocation", Namespace = XmlSchema.InstanceNamespace)] 102 | public string XsiSchemaLocation; 103 | 104 | 105 | public Comprobante() 106 | { 107 | versionField = "4.0"; 108 | } 109 | 110 | 111 | public ComprobanteInformacionGlobal InformacionGlobal 112 | { 113 | get { return informacionGlobalField; } 114 | set { informacionGlobalField = value; } 115 | } 116 | 117 | 118 | [XmlElement("CfdiRelacionados")] 119 | public ComprobanteCfdiRelacionados CfdiRelacionados 120 | { 121 | get { return cfdiRelacionadosField; } 122 | set { cfdiRelacionadosField = value; } 123 | } 124 | 125 | 126 | public ComprobanteEmisor Emisor 127 | { 128 | get { return emisorField; } 129 | set { emisorField = value; } 130 | } 131 | 132 | 133 | public ComprobanteReceptor Receptor 134 | { 135 | get { return receptorField; } 136 | set { receptorField = value; } 137 | } 138 | 139 | 140 | [XmlArrayItem("Concepto", IsNullable = false)] 141 | public ComprobanteConcepto[] Conceptos 142 | { 143 | get { return conceptosField; } 144 | set { conceptosField = value; } 145 | } 146 | 147 | 148 | public ComprobanteImpuestos Impuestos 149 | { 150 | get { return impuestosField; } 151 | set { impuestosField = value; } 152 | } 153 | 154 | [XmlElement("Complemento")] 155 | public ComprobanteComplemento[] Complemento 156 | { 157 | get { return complementoField; } 158 | set { complementoField = value; } 159 | } 160 | 161 | 162 | public ComprobanteAddenda Addenda 163 | { 164 | get { return addendaField; } 165 | set { addendaField = value; } 166 | } 167 | 168 | 169 | [XmlAttribute] 170 | public string Version 171 | { 172 | get { return versionField; } 173 | set { versionField = value; } 174 | } 175 | 176 | 177 | [XmlAttribute] 178 | public string Serie 179 | { 180 | get { return serieField; } 181 | set { serieField = value; } 182 | } 183 | 184 | 185 | [XmlAttribute] 186 | public string Folio 187 | { 188 | get { return folioField; } 189 | set { folioField = value; } 190 | } 191 | 192 | 193 | [XmlAttribute] 194 | public string Fecha 195 | { 196 | get { return fechaField; } 197 | set { fechaField = value; } 198 | } 199 | 200 | 201 | [XmlAttribute] 202 | public string Sello 203 | { 204 | get { return selloField; } 205 | set { selloField = value; } 206 | } 207 | 208 | 209 | [XmlAttribute] 210 | public string FormaPago 211 | { 212 | get { return formaPagoField; } 213 | set 214 | { 215 | formaPagoField = value; 216 | formaPagoFieldSpecified = true; 217 | } 218 | } 219 | 220 | 221 | [XmlIgnore] 222 | public bool FormaPagoSpecified 223 | { 224 | get { return formaPagoFieldSpecified; } 225 | set { formaPagoFieldSpecified = value; } 226 | } 227 | 228 | [XmlIgnore] public decimal SubTotalEsperado { get; set; } 229 | 230 | [XmlAttribute] 231 | public string NoCertificado 232 | { 233 | get { return noCertificadoField; } 234 | set { noCertificadoField = value; } 235 | } 236 | 237 | 238 | [XmlAttribute] 239 | public string Certificado 240 | { 241 | get { return certificadoField; } 242 | set { certificadoField = value; } 243 | } 244 | 245 | 246 | [XmlAttribute] 247 | public string CondicionesDePago 248 | { 249 | get { return condicionesDePagoField; } 250 | set { condicionesDePagoField = value; } 251 | } 252 | 253 | 254 | [XmlAttribute] 255 | public decimal SubTotal 256 | { 257 | get { return subTotalField; } 258 | set { subTotalField = value; } 259 | } 260 | 261 | 262 | [XmlAttribute] 263 | public decimal Descuento 264 | { 265 | get { return descuentoField; } 266 | set 267 | { 268 | descuentoField = value; 269 | descuentoFieldSpecified = true; 270 | } 271 | } 272 | 273 | 274 | [XmlIgnore] 275 | public bool DescuentoSpecified 276 | { 277 | get { return descuentoFieldSpecified; } 278 | set { descuentoFieldSpecified = value; } 279 | } 280 | 281 | 282 | [XmlAttribute] 283 | public string Moneda 284 | { 285 | get { return monedaField; } 286 | set { monedaField = value; } 287 | } 288 | 289 | 290 | [XmlAttribute] 291 | public decimal TipoCambio 292 | { 293 | get { return tipoCambioField; } 294 | set 295 | { 296 | tipoCambioField = value; 297 | tipoCambioFieldSpecified = true; 298 | } 299 | } 300 | 301 | 302 | [XmlIgnore] 303 | public bool TipoCambioSpecified 304 | { 305 | get { return tipoCambioFieldSpecified; } 306 | set { tipoCambioFieldSpecified = value; } 307 | } 308 | 309 | 310 | [XmlAttribute] 311 | public decimal Total 312 | { 313 | get { return totalField; } 314 | set { totalField = value; } 315 | } 316 | 317 | 318 | [XmlAttribute] 319 | public string TipoDeComprobante 320 | { 321 | get { return tipoDeComprobanteField; } 322 | set { tipoDeComprobanteField = value; } 323 | } 324 | 325 | 326 | [XmlAttribute] 327 | public string Exportacion 328 | { 329 | get { return exportacionField; } 330 | set { exportacionField = value; } 331 | } 332 | 333 | 334 | [XmlAttribute] 335 | public string MetodoPago 336 | { 337 | get { return metodoPagoField; } 338 | set 339 | { 340 | metodoPagoField = value; 341 | metodoPagoFieldSpecified = true; 342 | } 343 | } 344 | 345 | 346 | [XmlIgnore] 347 | public bool MetodoPagoSpecified 348 | { 349 | get { return metodoPagoFieldSpecified; } 350 | set { metodoPagoFieldSpecified = value; } 351 | } 352 | 353 | 354 | [XmlAttribute] 355 | public string LugarExpedicion 356 | { 357 | get { return lugarExpedicionField; } 358 | set { lugarExpedicionField = value; } 359 | } 360 | 361 | 362 | [XmlAttribute] 363 | public string Confirmacion 364 | { 365 | get { return confirmacionField; } 366 | set { confirmacionField = value; } 367 | } 368 | } 369 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteAddenda.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml; 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 18 | { 19 | [Serializable] 20 | public class ComprobanteAddenda 21 | { 22 | private XmlElement[] anyField; 23 | 24 | 25 | [XmlAnyElement] 26 | public XmlElement[] Any 27 | { 28 | get { return anyField; } 29 | set { anyField = value; } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteCfdiRelacionados.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteCfdiRelacionados 21 | { 22 | private ComprobanteCfdiRelacionadosCfdiRelacionado[] cfdiRelacionadoField; 23 | 24 | private string tipoRelacionField; 25 | 26 | 27 | [XmlElement("CfdiRelacionado")] 28 | public ComprobanteCfdiRelacionadosCfdiRelacionado[] CfdiRelacionado 29 | { 30 | get { return cfdiRelacionadoField; } 31 | set { cfdiRelacionadoField = value; } 32 | } 33 | 34 | 35 | [XmlAttribute] 36 | public string TipoRelacion 37 | { 38 | get { return tipoRelacionField; } 39 | set { tipoRelacionField = value; } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteCfdiRelacionadosCfdiRelacionado.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteCfdiRelacionadosCfdiRelacionado 21 | { 22 | private string uUIDField; 23 | 24 | 25 | [XmlAttribute] 26 | public string UUID 27 | { 28 | get { return uUIDField; } 29 | set { uUIDField = value; } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteComplemento.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml; 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 18 | { 19 | [Serializable] 20 | 21 | public class ComprobanteComplemento 22 | { 23 | private XmlElement[] anyField; 24 | 25 | 26 | [XmlAnyElement] 27 | public XmlElement[] Any 28 | { 29 | get { return anyField; } 30 | set { anyField = value; } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConcepto.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConcepto 21 | { 22 | private ComprobanteConceptoImpuestos impuestosField; 23 | 24 | private ComprobanteConceptoACuentaTerceros aCuentaTercerosField; 25 | 26 | private ComprobanteConceptoInformacionAduanera[] informacionAduaneraField; 27 | 28 | private ComprobanteConceptoCuentaPredial[] cuentaPredialField; 29 | 30 | private ComprobanteConceptoComplementoConcepto complementoConceptoField; 31 | 32 | private ComprobanteConceptoParte[] parteField; 33 | 34 | private string claveProdServField; 35 | 36 | private string noIdentificacionField; 37 | 38 | private decimal cantidadField; 39 | 40 | private string claveUnidadField; 41 | 42 | private string unidadField; 43 | 44 | private string descripcionField; 45 | 46 | private decimal valorUnitarioField; 47 | 48 | private decimal importeField; 49 | 50 | private decimal descuentoField; 51 | 52 | private bool descuentoFieldSpecified; 53 | 54 | private string objetoImpField; 55 | 56 | 57 | public ComprobanteConceptoImpuestos Impuestos 58 | { 59 | get { return impuestosField; } 60 | set { impuestosField = value; } 61 | } 62 | 63 | 64 | public ComprobanteConceptoACuentaTerceros ACuentaTerceros 65 | { 66 | get { return aCuentaTercerosField; } 67 | set { aCuentaTercerosField = value; } 68 | } 69 | 70 | 71 | [XmlElement("InformacionAduanera")] 72 | public ComprobanteConceptoInformacionAduanera[] InformacionAduanera 73 | { 74 | get { return informacionAduaneraField; } 75 | set { informacionAduaneraField = value; } 76 | } 77 | 78 | 79 | [XmlElement("CuentaPredial")] 80 | public ComprobanteConceptoCuentaPredial[] CuentaPredial 81 | { 82 | get { return cuentaPredialField; } 83 | set { cuentaPredialField = value; } 84 | } 85 | 86 | 87 | public ComprobanteConceptoComplementoConcepto ComplementoConcepto 88 | { 89 | get { return complementoConceptoField; } 90 | set { complementoConceptoField = value; } 91 | } 92 | 93 | 94 | [XmlElement("Parte")] 95 | public ComprobanteConceptoParte[] Parte 96 | { 97 | get { return parteField; } 98 | set { parteField = value; } 99 | } 100 | 101 | 102 | [XmlAttribute] 103 | public string ClaveProdServ 104 | { 105 | get { return claveProdServField; } 106 | set { claveProdServField = value; } 107 | } 108 | 109 | 110 | [XmlAttribute] 111 | public string NoIdentificacion 112 | { 113 | get { return noIdentificacionField; } 114 | set { noIdentificacionField = value; } 115 | } 116 | 117 | 118 | [XmlAttribute] 119 | public decimal Cantidad 120 | { 121 | get { return cantidadField; } 122 | set { cantidadField = value; } 123 | } 124 | 125 | 126 | [XmlAttribute] 127 | public string ClaveUnidad 128 | { 129 | get { return claveUnidadField; } 130 | set { claveUnidadField = value; } 131 | } 132 | 133 | 134 | [XmlAttribute] 135 | public string Unidad 136 | { 137 | get { return unidadField; } 138 | set { unidadField = value; } 139 | } 140 | 141 | 142 | [XmlAttribute] 143 | public string Descripcion 144 | { 145 | get { return descripcionField; } 146 | set { descripcionField = value; } 147 | } 148 | 149 | 150 | [XmlAttribute] 151 | public decimal ValorUnitario 152 | { 153 | get { return valorUnitarioField; } 154 | set { valorUnitarioField = value; } 155 | } 156 | 157 | 158 | [XmlAttribute] 159 | public decimal Importe 160 | { 161 | get { return importeField; } 162 | set { importeField = value; } 163 | } 164 | 165 | 166 | [XmlAttribute] 167 | public decimal Descuento 168 | { 169 | get { return descuentoField; } 170 | set { descuentoField = value; } 171 | } 172 | 173 | 174 | [XmlIgnore] 175 | public bool DescuentoSpecified 176 | { 177 | get { return descuentoFieldSpecified; } 178 | set { descuentoFieldSpecified = value; } 179 | } 180 | 181 | 182 | [XmlAttribute] 183 | public string ObjetoImp 184 | { 185 | get { return objetoImpField; } 186 | set { objetoImpField = value; } 187 | } 188 | } 189 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoACuentaTerceros.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoACuentaTerceros 21 | { 22 | private string rfcACuentaTercerosField; 23 | 24 | private string nombreACuentaTercerosField; 25 | 26 | private string regimenFiscalACuentaTercerosField; 27 | 28 | private string domicilioFiscalACuentaTercerosField; 29 | 30 | 31 | [XmlAttribute] 32 | public string RfcACuentaTerceros 33 | { 34 | get { return rfcACuentaTercerosField; } 35 | set { rfcACuentaTercerosField = value; } 36 | } 37 | 38 | 39 | [XmlAttribute] 40 | public string NombreACuentaTerceros 41 | { 42 | get { return nombreACuentaTercerosField; } 43 | set { nombreACuentaTercerosField = value; } 44 | } 45 | 46 | 47 | [XmlAttribute] 48 | public string RegimenFiscalACuentaTerceros 49 | { 50 | get { return regimenFiscalACuentaTercerosField; } 51 | set { regimenFiscalACuentaTercerosField = value; } 52 | } 53 | 54 | 55 | [XmlAttribute] 56 | public string DomicilioFiscalACuentaTerceros 57 | { 58 | get { return domicilioFiscalACuentaTercerosField; } 59 | set { domicilioFiscalACuentaTercerosField = value; } 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoComplementoConcepto.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml; 15 | using System.Xml.Serialization; 16 | 17 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 18 | { 19 | [Serializable] 20 | 21 | public class ComprobanteConceptoComplementoConcepto 22 | { 23 | private XmlElement[] anyField; 24 | 25 | 26 | [XmlAnyElement] 27 | public XmlElement[] Any 28 | { 29 | get { return anyField; } 30 | set { anyField = value; } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoCuentaPredial.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoCuentaPredial 21 | { 22 | private string numeroField; 23 | 24 | 25 | [XmlAttribute] 26 | public string Numero 27 | { 28 | get { return numeroField; } 29 | set { numeroField = value; } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoImpuestos.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoImpuestos 21 | { 22 | private ComprobanteConceptoImpuestosTraslado[] trasladosField; 23 | 24 | private ComprobanteConceptoImpuestosRetencion[] retencionesField; 25 | 26 | 27 | [XmlArrayItem("Traslado", IsNullable = false)] 28 | public ComprobanteConceptoImpuestosTraslado[] Traslados 29 | { 30 | get { return trasladosField; } 31 | set { trasladosField = value; } 32 | } 33 | 34 | 35 | [XmlArrayItem("Retencion", IsNullable = false)] 36 | public ComprobanteConceptoImpuestosRetencion[] Retenciones 37 | { 38 | get { return retencionesField; } 39 | set { retencionesField = value; } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoImpuestosRetencion.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoImpuestosRetencion 21 | { 22 | private decimal baseField; 23 | 24 | private string impuestoField; 25 | 26 | private string tipoFactorField; 27 | 28 | private decimal tasaOCuotaField; 29 | 30 | private decimal importeField; 31 | 32 | 33 | [XmlAttribute] 34 | public decimal Base 35 | { 36 | get { return baseField; } 37 | set { baseField = value; } 38 | } 39 | 40 | 41 | [XmlAttribute] 42 | public string Impuesto 43 | { 44 | get { return impuestoField; } 45 | set { impuestoField = value; } 46 | } 47 | 48 | 49 | [XmlAttribute] 50 | public string TipoFactor 51 | { 52 | get { return tipoFactorField; } 53 | set { tipoFactorField = value; } 54 | } 55 | 56 | 57 | [XmlAttribute] 58 | public decimal TasaOCuota 59 | { 60 | get { return tasaOCuotaField; } 61 | set { tasaOCuotaField = value; } 62 | } 63 | 64 | 65 | [XmlAttribute] 66 | public decimal Importe 67 | { 68 | get { return importeField; } 69 | set { importeField = value; } 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoImpuestosTraslado.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoImpuestosTraslado 21 | { 22 | private decimal baseField; 23 | 24 | private string impuestoField; 25 | 26 | private string tipoFactorField; 27 | 28 | private decimal tasaOCuotaField; 29 | 30 | private bool tasaOCuotaFieldSpecified; 31 | 32 | private decimal importeField; 33 | 34 | private bool importeFieldSpecified; 35 | 36 | 37 | [XmlAttribute] 38 | public decimal Base 39 | { 40 | get { return baseField; } 41 | set { baseField = value; } 42 | } 43 | 44 | 45 | [XmlAttribute] 46 | public string Impuesto 47 | { 48 | get { return impuestoField; } 49 | set { impuestoField = value; } 50 | } 51 | 52 | 53 | [XmlAttribute] 54 | public string TipoFactor 55 | { 56 | get { return tipoFactorField; } 57 | set 58 | { 59 | tipoFactorField = value; 60 | 61 | } 62 | } 63 | 64 | 65 | [XmlAttribute] 66 | public decimal TasaOCuota 67 | { 68 | get { return tasaOCuotaField; } 69 | set 70 | { 71 | tasaOCuotaField = value; 72 | tasaOCuotaFieldSpecified = true; 73 | } 74 | } 75 | 76 | 77 | [XmlIgnore] 78 | public bool TasaOCuotaSpecified 79 | { 80 | get { return tasaOCuotaFieldSpecified; } 81 | set { tasaOCuotaFieldSpecified = value; } 82 | } 83 | 84 | 85 | [XmlAttribute] 86 | public decimal Importe 87 | { 88 | get { return importeField; } 89 | set 90 | { 91 | importeField = value; 92 | importeFieldSpecified = true; 93 | } 94 | } 95 | 96 | 97 | [XmlIgnore] 98 | public bool ImporteSpecified 99 | { 100 | get { return importeFieldSpecified; } 101 | set { importeFieldSpecified = value; } 102 | } 103 | } 104 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoInformacionAduanera.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoInformacionAduanera 21 | { 22 | private string numeroPedimentoField; 23 | 24 | 25 | [XmlAttribute] 26 | public string NumeroPedimento 27 | { 28 | get { return numeroPedimentoField; } 29 | set { numeroPedimentoField = value; } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoParte.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoParte 21 | { 22 | private ComprobanteConceptoParteInformacionAduanera[] informacionAduaneraField; 23 | 24 | private string claveProdServField; 25 | 26 | private string noIdentificacionField; 27 | 28 | private decimal cantidadField; 29 | 30 | private string unidadField; 31 | 32 | private string descripcionField; 33 | 34 | private decimal valorUnitarioField; 35 | 36 | private bool valorUnitarioFieldSpecified; 37 | 38 | private decimal importeField; 39 | 40 | private bool importeFieldSpecified; 41 | 42 | 43 | [XmlElement("InformacionAduanera")] 44 | public ComprobanteConceptoParteInformacionAduanera[] InformacionAduanera 45 | { 46 | get { return informacionAduaneraField; } 47 | set { informacionAduaneraField = value; } 48 | } 49 | 50 | 51 | [XmlAttribute] 52 | public string ClaveProdServ 53 | { 54 | get { return claveProdServField; } 55 | set { claveProdServField = value; } 56 | } 57 | 58 | 59 | [XmlAttribute] 60 | public string NoIdentificacion 61 | { 62 | get { return noIdentificacionField; } 63 | set { noIdentificacionField = value; } 64 | } 65 | 66 | 67 | [XmlAttribute] 68 | public decimal Cantidad 69 | { 70 | get { return cantidadField; } 71 | set { cantidadField = value; } 72 | } 73 | 74 | 75 | [XmlAttribute] 76 | public string Unidad 77 | { 78 | get { return unidadField; } 79 | set { unidadField = value; } 80 | } 81 | 82 | 83 | [XmlAttribute] 84 | public string Descripcion 85 | { 86 | get { return descripcionField; } 87 | set { descripcionField = value; } 88 | } 89 | 90 | 91 | [XmlAttribute] 92 | public decimal ValorUnitario 93 | { 94 | get { return valorUnitarioField; } 95 | set { valorUnitarioField = value; } 96 | } 97 | 98 | 99 | [XmlIgnore] 100 | public bool ValorUnitarioSpecified 101 | { 102 | get { return valorUnitarioFieldSpecified; } 103 | set 104 | { 105 | valorUnitarioFieldSpecified = value; 106 | 107 | } 108 | } 109 | 110 | 111 | [XmlAttribute] 112 | public decimal Importe 113 | { 114 | get { return importeField; } 115 | set { importeField = value; } 116 | } 117 | 118 | 119 | [XmlIgnore] 120 | public bool ImporteSpecified 121 | { 122 | get { return importeFieldSpecified; } 123 | set { importeFieldSpecified = value; } 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteConceptoParteInformacionAduanera.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteConceptoParteInformacionAduanera 21 | { 22 | private string numeroPedimentoField; 23 | 24 | 25 | [XmlAttribute] 26 | public string NumeroPedimento 27 | { 28 | get { return numeroPedimentoField; } 29 | set { numeroPedimentoField = value; } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteEmisor.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteEmisor 21 | { 22 | private string rfcField; 23 | 24 | private string nombreField; 25 | 26 | private string regimenFiscalField; 27 | 28 | private string facAtrAdquirenteField; 29 | 30 | 31 | [XmlAttribute] 32 | public string Rfc 33 | { 34 | get { return rfcField; } 35 | set { rfcField = value; } 36 | } 37 | 38 | 39 | [XmlAttribute] 40 | public string Nombre 41 | { 42 | get { return nombreField; } 43 | set { nombreField = value; } 44 | } 45 | 46 | 47 | [XmlAttribute] 48 | public string RegimenFiscal 49 | { 50 | get { return regimenFiscalField; } 51 | set { regimenFiscalField = value; } 52 | } 53 | 54 | 55 | [XmlAttribute] 56 | public string FacAtrAdquirente 57 | { 58 | get { return facAtrAdquirenteField; } 59 | set { facAtrAdquirenteField = value; } 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteImpuestos.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteImpuestos 21 | { 22 | private ComprobanteImpuestosRetencion[] retencionesField; 23 | 24 | private ComprobanteImpuestosTraslado[] trasladosField; 25 | 26 | private decimal totalImpuestosRetenidosField; 27 | 28 | private bool totalImpuestosRetenidosFieldSpecified; 29 | 30 | private decimal totalImpuestosTrasladadosField; 31 | 32 | private bool totalImpuestosTrasladadosFieldSpecified; 33 | 34 | 35 | [XmlArrayItem("Retencion", IsNullable = false)] 36 | public ComprobanteImpuestosRetencion[] Retenciones 37 | { 38 | get { return retencionesField; } 39 | set { retencionesField = value; } 40 | } 41 | 42 | 43 | [XmlArrayItem("Traslado", IsNullable = false)] 44 | public ComprobanteImpuestosTraslado[] Traslados 45 | { 46 | get { return trasladosField; } 47 | set { trasladosField = value; } 48 | } 49 | 50 | 51 | [XmlAttribute] 52 | public decimal TotalImpuestosRetenidos 53 | { 54 | get { return totalImpuestosRetenidosField; } 55 | set 56 | { 57 | totalImpuestosRetenidosField = value; 58 | totalImpuestosRetenidosFieldSpecified = value > 0; 59 | } 60 | } 61 | 62 | 63 | [XmlIgnore] 64 | public bool TotalImpuestosRetenidosSpecified 65 | { 66 | get { return totalImpuestosRetenidosFieldSpecified; } 67 | set { totalImpuestosRetenidosFieldSpecified = value; } 68 | } 69 | 70 | 71 | [XmlAttribute] 72 | public decimal TotalImpuestosTrasladados 73 | { 74 | get { return totalImpuestosTrasladadosField; } 75 | set 76 | { 77 | totalImpuestosTrasladadosField = value; 78 | totalImpuestosTrasladadosFieldSpecified = value > 0; 79 | } 80 | } 81 | 82 | 83 | [XmlIgnore] 84 | public bool TotalImpuestosTrasladadosSpecified 85 | { 86 | get { return totalImpuestosTrasladadosFieldSpecified; } 87 | set { totalImpuestosTrasladadosFieldSpecified = value; } 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteImpuestosRetencion.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteImpuestosRetencion 21 | { 22 | private string impuestoField; 23 | 24 | private decimal importeField; 25 | 26 | 27 | [XmlAttribute] 28 | public string Impuesto 29 | { 30 | get { return impuestoField; } 31 | set { impuestoField = value; } 32 | } 33 | 34 | 35 | [XmlAttribute] 36 | public decimal Importe 37 | { 38 | get { return importeField; } 39 | set { importeField = value; } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteImpuestosTraslado.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteImpuestosTraslado 21 | { 22 | private decimal baseField; 23 | 24 | private string impuestoField; 25 | 26 | private string tipoFactorField; 27 | 28 | private decimal tasaOCuotaField; 29 | 30 | private bool tasaOCuotaFieldSpecified; 31 | 32 | private decimal importeField; 33 | 34 | private bool importeFieldSpecified; 35 | 36 | 37 | [XmlAttribute] 38 | public decimal Base 39 | { 40 | get { return baseField; } 41 | set { baseField = value; } 42 | } 43 | 44 | 45 | [XmlAttribute] 46 | public string Impuesto 47 | { 48 | get { return impuestoField; } 49 | set { impuestoField = value; } 50 | } 51 | 52 | 53 | [XmlAttribute] 54 | public string TipoFactor 55 | { 56 | get { return tipoFactorField; } 57 | set { tipoFactorField = value; } 58 | } 59 | 60 | 61 | [XmlAttribute] 62 | public decimal TasaOCuota 63 | { 64 | get { return tasaOCuotaField; } 65 | set 66 | { 67 | tasaOCuotaField = value; 68 | tasaOCuotaFieldSpecified = value > 0; 69 | 70 | } 71 | } 72 | 73 | 74 | [XmlIgnore] 75 | public bool TasaOCuotaSpecified 76 | { 77 | get { return tasaOCuotaFieldSpecified; } 78 | set { tasaOCuotaFieldSpecified = value; } 79 | } 80 | 81 | 82 | [XmlAttribute] 83 | public decimal Importe 84 | { 85 | get { return importeField; } 86 | set 87 | { 88 | importeField = value; 89 | importeFieldSpecified = value > 0; 90 | } 91 | } 92 | 93 | 94 | [XmlIgnore] 95 | public bool ImporteSpecified 96 | { 97 | get { return importeFieldSpecified; } 98 | set { importeFieldSpecified = value; } 99 | } 100 | } 101 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteInformacionGlobal.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteInformacionGlobal 21 | { 22 | private string periodicidadField; 23 | 24 | private string mesesField; 25 | 26 | private short añoField; 27 | 28 | 29 | [XmlAttribute] 30 | public string Periodicidad 31 | { 32 | get { return periodicidadField; } 33 | set { periodicidadField = value; } 34 | } 35 | 36 | 37 | [XmlAttribute] 38 | public string Meses 39 | { 40 | get { return mesesField; } 41 | set { mesesField = value; } 42 | } 43 | 44 | 45 | [XmlAttribute] 46 | public short Año 47 | { 48 | get { return añoField; } 49 | set { añoField = value; } 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Models/SatModels/Invoicing/Cfdi40/ComprobanteReceptor.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************************** 2 | // * 3 | // Jesús Mendoza Jaurez. * 4 | // mendoza.git@gmail.com * 5 | // https://github.com/mendozagit * 6 | // * 7 | // Los cambios en este archivo podrían causar un comportamiento incorrecto. * 8 | // Este código no ofrece ningún tipo de garantía, se generó para ayudar a la * 9 | // Comunidad open source, siéntanse libre de utilizarlo, sin ninguna garantía. * 10 | // Nota: Mantenga este comentario para respetar al autor. * 11 | // * 12 | //*************************************************************************************** 13 | 14 | using System.Xml.Serialization; 15 | 16 | namespace Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40 17 | { 18 | [Serializable] 19 | 20 | public class ComprobanteReceptor 21 | { 22 | private string rfcField; 23 | 24 | private string nombreField; 25 | 26 | private string domicilioFiscalReceptorField; 27 | 28 | private string residenciaFiscalField; 29 | 30 | private bool residenciaFiscalFieldSpecified; 31 | 32 | private string numRegIdTribField; 33 | 34 | private string regimenFiscalReceptorField; 35 | 36 | private string usoCFDIField; 37 | 38 | 39 | [XmlAttribute] 40 | public string Rfc 41 | { 42 | get { return rfcField; } 43 | set { rfcField = value; } 44 | } 45 | 46 | 47 | [XmlAttribute] 48 | public string Nombre 49 | { 50 | get { return nombreField; } 51 | set { nombreField = value; } 52 | } 53 | 54 | 55 | [XmlAttribute] 56 | public string DomicilioFiscalReceptor 57 | { 58 | get { return domicilioFiscalReceptorField; } 59 | set { domicilioFiscalReceptorField = value; } 60 | } 61 | 62 | 63 | [XmlAttribute] 64 | public string ResidenciaFiscal 65 | { 66 | get { return residenciaFiscalField; } 67 | set { residenciaFiscalField = value; } 68 | } 69 | 70 | 71 | [XmlIgnore] 72 | public bool ResidenciaFiscalSpecified 73 | { 74 | get { return residenciaFiscalFieldSpecified; } 75 | set { residenciaFiscalFieldSpecified = value; } 76 | } 77 | 78 | 79 | [XmlAttribute] 80 | public string NumRegIdTrib 81 | { 82 | get { return numRegIdTribField; } 83 | set { numRegIdTribField = value; } 84 | } 85 | 86 | 87 | [XmlAttribute] 88 | public string RegimenFiscalReceptor 89 | { 90 | get { return regimenFiscalReceptorField; } 91 | set { regimenFiscalReceptorField = value; } 92 | } 93 | 94 | 95 | [XmlAttribute] 96 | public string UsoCFDI 97 | { 98 | get { return usoCFDIField; } 99 | set { usoCFDIField = value; } 100 | } 101 | } 102 | } -------------------------------------------------------------------------------- /Packaging/PackageManager.cs: -------------------------------------------------------------------------------- 1 | using System.IO.Compression; 2 | using System.Reflection; 3 | using Fiscalapi.XmlDownloader.Helpers; 4 | using Fiscalapi.XmlDownloader.Models; 5 | using Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40; 6 | using Fiscalapi.XmlDownloader.Services; 7 | using Fiscalapi.XmlDownloader.Services.Download; 8 | 9 | namespace Fiscalapi.XmlDownloader.Packaging 10 | { 11 | public static class PackageManager 12 | { 13 | public static async Task> GetMetadataAsync(DownloadResult result) 14 | { 15 | EnsureDirectories(); 16 | 17 | var metadata = new List(); 18 | 19 | var successfulWriting = await WriteZipAsync(result).ConfigureAwait(false); 20 | 21 | if (!successfulWriting) 22 | return metadata; 23 | 24 | var file = Path.Combine(Settings.WorkDirectory, $@"{result.PackageId}{Settings.PackageExtension}"); 25 | 26 | ZipFile.ExtractToDirectory(file, Settings.WorkDirectory); 27 | 28 | var files = GetFileList(Settings.WorkDirectory, ".txt"); 29 | 30 | 31 | foreach (var fileModel in files) 32 | metadata.AddRange(await GetMetadataFromSingleFileAsync(fileModel).ConfigureAwait(false)); 33 | 34 | 35 | return metadata; 36 | } 37 | 38 | 39 | public static async Task> GetCfdisAsync(DownloadResult result) 40 | { 41 | EnsureDirectories(); 42 | 43 | var cfdis = new List(); 44 | 45 | var successfulWriting = await WriteZipAsync(result).ConfigureAwait(false); 46 | 47 | if (!successfulWriting) 48 | return cfdis; 49 | 50 | var file = Path.Combine(Settings.WorkDirectory, $@"{result.PackageId}{Settings.PackageExtension}"); 51 | 52 | ZipFile.ExtractToDirectory(file, Settings.WorkDirectory); 53 | 54 | var files = GetFileList(Settings.WorkDirectory, ".xml"); 55 | 56 | 57 | foreach (var fileModel in files) 58 | cfdis.Add(GetCfdiFromSingleFile(fileModel)); 59 | 60 | 61 | return cfdis; 62 | } 63 | 64 | 65 | #region Helpers 66 | 67 | private static async Task> GetMetadataFromSingleFileAsync(FileModel fileModel) 68 | { 69 | var metadata = new List(); 70 | 71 | if (fileModel.FullFileName is null) 72 | return metadata; 73 | 74 | var lines = await File.ReadAllLinesAsync(fileModel.FullFileName).ConfigureAwait(false); 75 | 76 | foreach (var line in lines.Skip(1).ToList()) 77 | { 78 | var fields = line.Split("~"); 79 | 80 | var metadataItem = new MetadataItem 81 | { 82 | Uuid = fields[0], 83 | EmitterRfc = fields[1], 84 | EmitterLegalName = fields[2], 85 | ReceiverRfc = fields[3], 86 | ReceiverLegalName = fields[4], 87 | PacRfc = fields[5], 88 | invoiceDate = fields[6], 89 | CertificationDate = fields[7], 90 | invoiceAmount = fields[8], 91 | invoiceType = fields[9], 92 | Status = fields[10], 93 | CancellationDate = fields.Length == 12 ? fields[11] : null, 94 | }; 95 | 96 | metadata.Add(metadataItem); 97 | } 98 | 99 | return metadata; 100 | } 101 | 102 | 103 | private static Comprobante GetCfdiFromSingleFile(FileModel fileModel) 104 | { 105 | var comprobante = Helper.Deserialize(fileModel.FullFileName ?? ""); 106 | 107 | return comprobante ?? new Comprobante(); 108 | } 109 | 110 | 111 | private static async Task WriteZipAsync(DownloadResult result) 112 | { 113 | if (!result.IsSuccess) return false; 114 | 115 | try 116 | { 117 | string file; 118 | 119 | 120 | if (Settings.EnableRedundantWriting) 121 | { 122 | file = Path.Combine(Settings.PackagesDirectory, $@"{result.PackageId}{Settings.PackageExtension}"); 123 | 124 | await File.WriteAllBytesAsync(file, Convert.FromBase64String(result.PackageBase64 ?? "")); 125 | } 126 | 127 | 128 | file = Path.Combine(Settings.WorkDirectory, $@"{result.PackageId}{Settings.PackageExtension}"); 129 | 130 | await File.WriteAllBytesAsync(file, Convert.FromBase64String(result.PackageBase64 ?? "")); 131 | 132 | return true; 133 | } 134 | catch (Exception ex) 135 | { 136 | var strTitle = $"Error On {MethodBase.GetCurrentMethod()?.Name}"; 137 | Helper.SaveLog(strTitle, ex); 138 | 139 | return false; 140 | } 141 | } 142 | 143 | private static void ClearDirectory(string directoryPath) 144 | { 145 | var directoryInfo = new DirectoryInfo(directoryPath); 146 | 147 | foreach (var file in directoryInfo.GetFiles()) 148 | { 149 | file.Delete(); 150 | } 151 | 152 | foreach (var dir in directoryInfo.GetDirectories()) 153 | { 154 | dir.Delete(true); 155 | } 156 | } 157 | 158 | private static void EnsureDirectories() 159 | { 160 | //Settings.PackagesDirectory=packDir; 161 | 162 | if (!Directory.Exists(Settings.PackagesDirectory)) 163 | Directory.CreateDirectory(Settings.PackagesDirectory); 164 | 165 | 166 | if (!Directory.Exists(Settings.WorkDirectory)) 167 | Directory.CreateDirectory(Settings.WorkDirectory); 168 | 169 | 170 | if (!Directory.Exists(Settings.LogsDirectory)) 171 | Directory.CreateDirectory(Settings.LogsDirectory); 172 | 173 | ClearDirectory(Settings.WorkDirectory); 174 | } 175 | 176 | private static List GetFileList(string directoryPath, string extensionFilter) 177 | { 178 | extensionFilter = $"*{extensionFilter}"; 179 | 180 | var directory = new DirectoryInfo(directoryPath); // your Folder 181 | 182 | var files = directory.GetFiles(extensionFilter); //Getting Text files 183 | 184 | return files.Select(file => new FileModel {FileName = file.Name, FullFileName = file.FullName}).ToList(); 185 | } 186 | 187 | #endregion 188 | } 189 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fiscalapi XML Downloader (sat-ws-descarga-masiva) 2 | 3 | [![Nuget](https://img.shields.io/nuget/v/Fiscalapi.XmlDownloader)](https://www.nuget.org/packages/Fiscalapi.XmlDownloader) 4 | [![License](https://img.shields.io/github/license/FiscalAPI/xml-downloader)](https://github.com/FiscalAPI/xml-downloader/blob/main/LICENSE.txt) 5 | 6 | 7 | ## Descripción 8 | 9 | Librería .NET para consultar y descargar facturas (CFDI) emitidas y recibidas a través del servicio web del SAT, incluyendo la obtención de metadata. Este servicio es parte del sistema "Consulta y recuperación de comprobantes" del SAT ([documentación oficial](https://www.sat.gob.mx/consultas/42968/consulta-y-recuperacion-de-comprobantes-(nuevo))). 10 | 11 | ### Casos de Uso 12 | 13 | - Automatización de cadena de suministros 14 | - Automatización de cuentas por pagar 15 | - Automatización de cuentas por cobrar 16 | - Contabilidad electrónica 17 | - Contabilidad general 18 | - Generación de pólizas contables 19 | 20 | ## Instalación 21 | 22 | ```shell 23 | NuGet\Install-Package Fiscalapi.XmlDownloader 24 | ``` 25 | 26 | :warning: Esta librería depende de [Fiscalapi.Credentials](https://github.com/FiscalAPI/fiscalapi-credentials-net). Se recomienda leer su documentación antes de continuar. 27 | 28 | ## Arquitectura del Proyecto 29 | 30 | ### Estructura de Código 31 | 32 | ``` 33 | src/ 34 | ├── XmlService/ # Clase principal que consume los servicios 35 | ├── Services/ # Implementación de servicios 36 | │ ├── Authenticate/ 37 | │ ├── Query/ 38 | │ ├── Verify/ 39 | │ └── Download/ 40 | ├── Common/ # Objetos compartidos 41 | ├── Models/ # Objetos DTO 42 | ├── Packaging/ # Manejo de paquetes del SAT 43 | ├── Builder/ # Generación de mensajes SOAP 44 | └── SoapClient/ # Cliente HTTP para el Webservice 45 | ``` 46 | 47 | ### Servicios Principales 48 | 49 | Cada servicio (`Authenticate`, `Query`, `Verify`, `Download`) contiene: 50 | - `Result`: Resultado de la operación 51 | - `Parameters`: Parámetros de operación 52 | 53 | ## Funcionamiento del Servicio Web 54 | 55 | ### Flujo de Operación 56 | 57 | 1. **Autenticación**: Utilizando FIEL (manejo automático del token) 58 | 2. **Solicitud**: Especificación de parámetros (fechas, tipo de solicitud) 59 | 3. **Verificación**: Consulta de disponibilidad 60 | 4. **Descarga**: Obtención de paquetes 61 | 62 | ![Diagrama de Flujo](https://user-images.githubusercontent.com/28969854/167732245-23c30b94-3feb-4d89-bee6-2b0f591203cf.svg) 63 | 64 | ### Límites y Consideraciones 65 | 66 | - Hasta 200,000 registros por petición (1,000,000 en metadata) 67 | - Sin límite en número de solicitudes 68 | - Tiempo de respuesta variable (minutos a horas) 69 | 70 | ## Documentación Oficial 71 | 72 | - [Portal SAT - Consulta y Recuperación](https://www.sat.gob.mx/consultas/42968/consulta-y-recuperacion-de-comprobantes-(nuevo)) 73 | - [Solicitud de Descargas](https://www.sat.gob.mx/cs/Satellite?blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1579314716402&ssbinary=true) 74 | - [Verificación de Solicitudes](https://www.sat.gob.mx/cs/Satellite?blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1579314716409&ssbinary=true) 75 | - [Descarga de Solicitudes](https://www.sat.gob.mx/cs/Satellite?blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1579314716395&ssbinary=true) 76 | 77 | ## Ejemplos de Uso 78 | 79 | Consulte [la rama master](https://github.com/FiscalAPI/xml-downloader/tree/master) para ejemplos detallados de uso. 80 | 81 | ## Compatibilidad 82 | 83 | - Compatible con .NET 8 84 | - Soporta aplicaciones Windows Forms, Console y Web 85 | - Seguimos Versionado Semántico 2.0.0 86 | 87 | 88 | ## 🤝 Contribuir 89 | 90 | 1. Haz un fork del repositorio. 91 | 2. Crea una rama para tu feature: `git checkout -b feature/AmazingFeature`. 92 | 3. Realiza commits de tus cambios: `git commit -m 'Add some AmazingFeature'`. 93 | 4. Sube tu rama: `git push origin feature/AmazingFeature`. 94 | 5. Abre un Pull Request en GitHub. 95 | 96 | 97 | ## 🐛 Reportar Problemas 98 | 99 | 1. Asegúrate de usar la última versión del SDK. 100 | 2. Verifica si el problema ya fue reportado. 101 | 3. Proporciona un ejemplo mínimo reproducible. 102 | 4. Incluye los mensajes de error completos. 103 | 104 | 105 | ## 📄 Licencia 106 | 107 | Este proyecto está licenciado bajo la Licencia **MPL**. Consulta el archivo [LICENSE](LICENSE.txt) para más detalles. 108 | 109 | ## Roadmap 110 | 111 | - [x] Descarga de CFDI emitidos y recibidos 112 | - [x] Descarga de metadata de CFDI 113 | - [ ] Documentación exhaustiva 114 | 115 | ## Licencia 116 | 117 | Copyright © FISCAL API S DE R.L DE C.V. Este proyecto está licenciado bajo la [Licencia MIT](LICENSE). 118 | -------------------------------------------------------------------------------- /Services/Authenticate/AuthenticateResult.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Services.Common; 2 | using Fiscalapi.XmlDownloader.SoapClient; 3 | 4 | namespace Fiscalapi.XmlDownloader.Services.Authenticate 5 | { 6 | /// 7 | /// Define token 8 | /// 9 | public class AuthenticateResult : IHasSuccessResponse, IHasInternalRequestResponse 10 | { 11 | 12 | public DateTime ValidFrom { get; set; } 13 | public DateTime ValidTo { get; set; } 14 | public string? Value { get; set; } 15 | public bool IsSuccess { get; set; } 16 | public string? ErrorMessage { get; set; } 17 | 18 | public bool IsValid() 19 | { 20 | return !IsEmptyValue() && !IsExpired(); 21 | } 22 | 23 | public bool IsEmptyValue() 24 | { 25 | return string.IsNullOrEmpty(Value); 26 | } 27 | 28 | public bool IsExpired() 29 | { 30 | return ValidTo <= DateTime.Now; 31 | } 32 | 33 | 34 | public InternalRequest? InternalRequest { get; set; } 35 | public InternalResponse? InternalResponse { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /Services/Authenticate/AuthenticateService.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Builder; 2 | using Fiscalapi.XmlDownloader.Services.Common; 3 | using Fiscalapi.XmlDownloader.SoapClient; 4 | 5 | namespace Fiscalapi.XmlDownloader.Services.Authenticate 6 | { 7 | public class AuthenticateService 8 | { 9 | private readonly SoapEnvelopeBuilder soapEnvelopeBuilder; 10 | 11 | public AuthenticateService(SoapEnvelopeBuilder soapEnvelopeBuilder) 12 | { 13 | this.soapEnvelopeBuilder = soapEnvelopeBuilder; 14 | } 15 | 16 | 17 | public async Task Authenticate() 18 | { 19 | //var date = new DateTime(2022, 4, 25, 19, 0, 0); 20 | //var tokenPeriod = TokenPeriod.Create(date); 21 | 22 | var rawRequest = soapEnvelopeBuilder.BuildAuthenticate(); 23 | 24 | 25 | var endpoint = Helper.GetAuthenticateEndPoint(); 26 | 27 | 28 | var internalRequest = new InternalRequest 29 | { 30 | Url = endpoint.Uri, 31 | SoapAction = endpoint.SoapAction, 32 | RawRequest = rawRequest, 33 | HttpMethod = HttpMethod.Post, 34 | EndPointName = EndPointName.Authenticate, 35 | }; 36 | 37 | 38 | var internalResponse = await InternalHttpClient.SendAsync(internalRequest); 39 | 40 | 41 | //token 42 | var result = Helper.GetAuthenticateResult(internalResponse?.RawResponse); 43 | result.InternalRequest = internalRequest; 44 | result.InternalResponse = internalResponse; 45 | 46 | 47 | return result; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Services/Common/DownloadType.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | public enum DownloadType 4 | { 5 | Emitted, 6 | Received 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /Services/Common/EndPointName.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | public enum EndPointName 4 | { 5 | Authenticate, 6 | Query, 7 | Verify, 8 | Download 9 | } 10 | } -------------------------------------------------------------------------------- /Services/Common/EndPointType.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | public enum EndPointType 4 | { 5 | OrdinaryCfdi, 6 | RetentionCfdi 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Services/Common/IHasInternalRequestResponse.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.SoapClient; 2 | 3 | namespace Fiscalapi.XmlDownloader.Services.Common; 4 | 5 | public interface IHasInternalRequestResponse 6 | { 7 | public InternalRequest? InternalRequest { get; set; } 8 | public InternalResponse? InternalResponse { get; set; } 9 | } -------------------------------------------------------------------------------- /Services/Common/IHasSuccessResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | public interface IHasSuccessResponse 4 | { 5 | public bool IsSuccess { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Services/Common/QueryParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | public class QueryParameters 4 | { 5 | public DateTime StartDate { get; set; } 6 | public DateTime EndDate { get; set; } 7 | public DownloadType DownloadType { get; set; } // Emitted | Received 8 | public RequestType RequestType { get; set; } // Cfdi | Meta, 9 | 10 | public string? EmitterRfc { get; set; } 11 | 12 | public string? ReceiverRfc { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Services/Common/RequestType.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | 4 | public enum RequestType 5 | { 6 | CFDI, 7 | Metadata, 8 | } 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Services/Common/Result.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.XmlDownloader.Services.Common 2 | { 3 | public abstract class Result 4 | { 5 | public string? StatusCode { get; set; } 6 | public string? Message { get; set; } 7 | 8 | } 9 | 10 | 11 | } -------------------------------------------------------------------------------- /Services/Download/DownloadResult.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Services.Common; 2 | using Fiscalapi.XmlDownloader.SoapClient; 3 | 4 | namespace Fiscalapi.XmlDownloader.Services.Download 5 | { 6 | public class DownloadResult : Result, IHasSuccessResponse, IHasInternalRequestResponse 7 | { 8 | public bool IsSuccess { get; set; } 9 | 10 | public string? PackageId { get; set; } 11 | public string? PackageBase64 { get; set; } 12 | public InternalRequest? InternalRequest { get; set; } 13 | public InternalResponse? InternalResponse { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Services/Download/DownloadService.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Builder; 2 | using Fiscalapi.XmlDownloader.Services.Authenticate; 3 | using Fiscalapi.XmlDownloader.SoapClient; 4 | 5 | namespace Fiscalapi.XmlDownloader.Services.Download 6 | { 7 | public class DownloadService 8 | { 9 | private readonly SoapEnvelopeBuilder soapEnvelopeBuilder; 10 | 11 | public DownloadService(SoapEnvelopeBuilder soapEnvelopeBuilder) 12 | { 13 | this.soapEnvelopeBuilder = soapEnvelopeBuilder; 14 | } 15 | 16 | public async Task Download(string packageId, AuthenticateResult token) 17 | { 18 | var rawRequest = soapEnvelopeBuilder.BuildDownload(packageId); 19 | 20 | 21 | var endpoint = Helper.GetDownloadEndPoint(); 22 | 23 | 24 | var internalRequest = new InternalRequest 25 | { 26 | Url = endpoint.Uri, 27 | SoapAction = endpoint.SoapAction, 28 | RawRequest = rawRequest, 29 | HttpMethod = HttpMethod.Post, 30 | EndPointName = endpoint.EndPointName, 31 | Token = token 32 | }; 33 | 34 | 35 | var internalResponse = await InternalHttpClient.SendAsync(internalRequest); 36 | 37 | 38 | var result = Helper.GetDownloadResult(packageId, internalResponse?.RawResponse); 39 | result.InternalRequest = internalRequest; 40 | result.InternalResponse = internalResponse; 41 | 42 | return result; 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Services/Query/QueryResult.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Services.Common; 2 | using Fiscalapi.XmlDownloader.SoapClient; 3 | 4 | namespace Fiscalapi.XmlDownloader.Services.Query 5 | { 6 | public class QueryResult : Result, IHasSuccessResponse, IHasInternalRequestResponse 7 | { 8 | public string? RequestUuid { get; set; } 9 | public bool IsSuccess { get; set; } 10 | public InternalRequest? InternalRequest { get; set; } 11 | public InternalResponse? InternalResponse { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Services/Query/QueryService.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Builder; 2 | using Fiscalapi.XmlDownloader.Services.Authenticate; 3 | using Fiscalapi.XmlDownloader.Services.Common; 4 | using Fiscalapi.XmlDownloader.SoapClient; 5 | 6 | namespace Fiscalapi.XmlDownloader.Services.Query 7 | { 8 | public class QueryService 9 | { 10 | private readonly SoapEnvelopeBuilder soapEnvelopeBuilder; 11 | 12 | public QueryService(SoapEnvelopeBuilder soapEnvelopeBuilder) 13 | { 14 | this.soapEnvelopeBuilder = soapEnvelopeBuilder; 15 | } 16 | 17 | public async Task Query(string startDate, string endDate, string? emitterRfc, string? receiverRfc, 18 | string requestType, string downloadType, AuthenticateResult token) 19 | { 20 | var rawRequest = soapEnvelopeBuilder.BuildQuery( 21 | startDate, 22 | endDate, 23 | requestType, 24 | downloadType, 25 | emitterRfc, 26 | receiverRfc); 27 | 28 | 29 | var endpoint = Helper.GetQueryEndPoint(); 30 | 31 | 32 | var internalRequest = new InternalRequest 33 | { 34 | Url = endpoint.Uri, 35 | SoapAction = endpoint.SoapAction, 36 | RawRequest = rawRequest, 37 | HttpMethod = HttpMethod.Post, 38 | EndPointName = EndPointName.Query, 39 | Token = token 40 | }; 41 | 42 | 43 | var internalResponse = await InternalHttpClient.SendAsync(internalRequest); 44 | 45 | 46 | var result = Helper.GetQueryResult(internalResponse?.RawResponse); 47 | result.InternalRequest = internalRequest; 48 | result.InternalResponse = internalResponse; 49 | 50 | return result; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /Services/Verify/VerifyResult.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Services.Common; 2 | using Fiscalapi.XmlDownloader.SoapClient; 3 | 4 | namespace Fiscalapi.XmlDownloader.Services.Verify 5 | { 6 | /// 7 | /// Define raw response for sat verify service (ws verifica solicitud) 8 | /// StatusCode=CodEstatus and Message=Mensaje properties inherited from Result and it 9 | /// represent the code and status message of the web service call. 10 | /// 11 | public class VerifyResult : Result, IHasSuccessResponse, IHasInternalRequestResponse 12 | { 13 | // StatusCode = CodEstatus 14 | //Message = Mensaje 15 | 16 | //EstadoSolicitud 17 | public string? StatusRequest { get; set; } 18 | 19 | //CodigoEstadoSolicitud 20 | public string? CodeStatusRequest { get; set; } 21 | 22 | //NumeroCFDIs 23 | public string? CfdiQty { get; set; } 24 | 25 | //IdsPaquetes 26 | public List PackagesIds { get; set; } = new(); 27 | 28 | //Internal flag to indicate success or failure 29 | public bool IsSuccess { get; set; } 30 | public InternalRequest? InternalRequest { get; set; } 31 | public InternalResponse? InternalResponse { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /Services/Verify/VerifyService.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Builder; 2 | using Fiscalapi.XmlDownloader.Services.Authenticate; 3 | using Fiscalapi.XmlDownloader.Services.Common; 4 | using Fiscalapi.XmlDownloader.SoapClient; 5 | 6 | namespace Fiscalapi.XmlDownloader.Services.Verify 7 | { 8 | public class VerifyService 9 | { 10 | private readonly SoapEnvelopeBuilder soapEnvelopeBuilder; 11 | 12 | public VerifyService(SoapEnvelopeBuilder envelopeBuilder) 13 | { 14 | soapEnvelopeBuilder = envelopeBuilder; 15 | } 16 | 17 | 18 | public async Task Verify(string requestUuid, AuthenticateResult token) 19 | { 20 | var rawRequest = soapEnvelopeBuilder.BuildVerify(requestUuid); 21 | 22 | 23 | var endpoint = Helper.GetVerifyEndPoint(); 24 | 25 | 26 | var internalRequest = new InternalRequest 27 | { 28 | Url = endpoint.Uri, 29 | SoapAction = endpoint.SoapAction, 30 | RawRequest = rawRequest, 31 | HttpMethod = HttpMethod.Post, 32 | EndPointName = EndPointName.Verify, 33 | Token = token 34 | }; 35 | 36 | 37 | var internalResponse = await InternalHttpClient.SendAsync(internalRequest); 38 | 39 | 40 | var result = Helper.GetVerifyResult(internalResponse?.RawResponse); 41 | result.InternalRequest = internalRequest; 42 | result.InternalResponse = internalResponse; 43 | 44 | return result; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Services/XmlService.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.Credentials.Core; 2 | using Fiscalapi.XmlDownloader.Builder; 3 | using Fiscalapi.XmlDownloader.Models; 4 | using Fiscalapi.XmlDownloader.Models.SatModels.Invoicing.Cfdi40; 5 | using Fiscalapi.XmlDownloader.Packaging; 6 | using Fiscalapi.XmlDownloader.Services.Authenticate; 7 | using Fiscalapi.XmlDownloader.Services.Common; 8 | using Fiscalapi.XmlDownloader.Services.Download; 9 | using Fiscalapi.XmlDownloader.Services.Query; 10 | using Fiscalapi.XmlDownloader.Services.Verify; 11 | 12 | namespace Fiscalapi.XmlDownloader.Services; 13 | 14 | public class XmlService 15 | { 16 | private readonly ICredential credential; 17 | private readonly SoapEnvelopeBuilder soapEnvelopeBuilder; 18 | 19 | 20 | /// 21 | /// Gets or sets the token, after the call to the authenticate method 22 | /// 23 | private AuthenticateResult? Token { get; set; } 24 | 25 | public XmlService(ICredential credential, AuthenticateResult? token = null) 26 | { 27 | this.credential = credential; 28 | soapEnvelopeBuilder = new SoapEnvelopeBuilder(credential); 29 | 30 | if (token is not null) 31 | Token = token; 32 | } 33 | 34 | 35 | /// 36 | /// 37 | /// 38 | /// Token 39 | public async Task GetCurrentToken() 40 | { 41 | if (Token is null || !Token.IsValid()) 42 | Token = await AuthenticateAsync(); 43 | 44 | return Token; 45 | } 46 | 47 | public async Task AuthenticateAsync() 48 | { 49 | var service = new AuthenticateService(soapEnvelopeBuilder); 50 | Token = await service.Authenticate(); 51 | 52 | return Token; 53 | } 54 | 55 | public async Task Query(string startDate, string endDate, string? emitterRfc, string? receiverRfc, 56 | string requestType, string downloadType, AuthenticateResult token) 57 | { 58 | var service = new QueryService(soapEnvelopeBuilder); 59 | 60 | 61 | var queryResult = await service.Query( 62 | startDate, 63 | endDate, 64 | emitterRfc, 65 | receiverRfc, 66 | requestType, 67 | downloadType, 68 | token); 69 | 70 | 71 | return queryResult; 72 | } 73 | 74 | public async Task Query(string startDate, string endDate, string? emitterRfc, string? receiverRfc, 75 | string requestType, string downloadType) 76 | { 77 | var token = await GetCurrentToken(); 78 | 79 | 80 | var service = new QueryService(soapEnvelopeBuilder); 81 | 82 | 83 | var queryResult = await service.Query( 84 | startDate, 85 | endDate, 86 | emitterRfc, 87 | receiverRfc, 88 | requestType, 89 | downloadType, 90 | token); 91 | 92 | 93 | return queryResult; 94 | } 95 | 96 | public async Task Query(QueryParameters parameters, AuthenticateResult token) 97 | { 98 | var service = new QueryService(soapEnvelopeBuilder); 99 | 100 | 101 | var queryResult = await service.Query( 102 | parameters.StartDate.ToSatFormat(), 103 | parameters.EndDate.ToSatFormat(), 104 | parameters.EmitterRfc, 105 | parameters.ReceiverRfc, 106 | parameters.RequestType.ToString(), 107 | parameters.DownloadType.ToString(), 108 | token); 109 | 110 | 111 | return queryResult; 112 | } 113 | 114 | public async Task Query(QueryParameters parameters) 115 | { 116 | var token = await GetCurrentToken(); 117 | 118 | var service = new QueryService(soapEnvelopeBuilder); 119 | 120 | 121 | var queryResult = await service.Query( 122 | parameters.StartDate.ToSatFormat(), 123 | parameters.EndDate.ToSatFormat(), 124 | parameters.EmitterRfc, 125 | parameters.ReceiverRfc, 126 | parameters.RequestType.ToString(), 127 | parameters.DownloadType.ToString(), 128 | token); 129 | 130 | 131 | return queryResult; 132 | } 133 | 134 | public async Task Verify(string? requestUuid, AuthenticateResult token) 135 | { 136 | if (string.IsNullOrEmpty(requestUuid)) 137 | throw new ArgumentNullException(nameof(requestUuid)); 138 | 139 | 140 | var verifyService = new VerifyService(soapEnvelopeBuilder); 141 | var result = await verifyService.Verify(requestUuid, token); 142 | 143 | return result; 144 | } 145 | 146 | public async Task Verify(string? requestUuid) 147 | { 148 | if (string.IsNullOrEmpty(requestUuid)) 149 | throw new ArgumentNullException(nameof(requestUuid)); 150 | 151 | 152 | var token = await GetCurrentToken(); 153 | var verifyService = new VerifyService(soapEnvelopeBuilder); 154 | var result = await verifyService.Verify(requestUuid, token); 155 | 156 | return result; 157 | } 158 | 159 | 160 | public async Task Download(string? packageId) 161 | { 162 | if (string.IsNullOrEmpty(packageId)) 163 | throw new ArgumentNullException(nameof(packageId)); 164 | 165 | 166 | var token = await GetCurrentToken(); 167 | 168 | var downloadService = new DownloadService(soapEnvelopeBuilder); 169 | var downloadResult = await downloadService.Download(packageId, token); 170 | 171 | return downloadResult; 172 | } 173 | 174 | 175 | public async Task> GetMetadataAsync(DownloadResult result) 176 | { 177 | var metadata = await PackageManager.GetMetadataAsync(result); 178 | 179 | return metadata; 180 | } 181 | 182 | 183 | public async Task> GetCfdisAsync(DownloadResult result) 184 | { 185 | var cfdis = await PackageManager.GetCfdisAsync(result); 186 | 187 | return cfdis; 188 | } 189 | } -------------------------------------------------------------------------------- /SoapClient/InternalHttpClient.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.XmlDownloader.Builder; 2 | 3 | namespace Fiscalapi.XmlDownloader.SoapClient 4 | { 5 | public static class InternalHttpClient 6 | { 7 | private static readonly HttpClient httpClient = new HttpClient(); 8 | 9 | 10 | public static async Task SendAsync(InternalRequest internalRequest) 11 | { 12 | using var request = MessageBuilder.BuildHttpRequestMessage(internalRequest); 13 | 14 | using var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseContentRead).ConfigureAwait(false); 15 | 16 | var internalResponse = await MessageBuilder.BuildInternalResponseMessage(internalRequest, response); 17 | 18 | 19 | return internalResponse; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /SoapClient/InternalRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using Fiscalapi.XmlDownloader.Services.Authenticate; 3 | using Fiscalapi.XmlDownloader.Services.Common; 4 | 5 | namespace Fiscalapi.XmlDownloader.SoapClient 6 | { 7 | public class InternalRequest 8 | { 9 | public string? Url { get; set; } 10 | public string? SoapAction { get; set; } 11 | public string? RawRequest { get; set; } 12 | public EndPointName EndPointName { get; set; } 13 | public HttpMethod HttpMethod { get; set; } = HttpMethod.Post; 14 | public Encoding Encoding { get; set; } = Encoding.UTF8; 15 | public string MediaType { get; set; } = "text/xml"; 16 | 17 | public List> Headers { get; set; } = new(); 18 | 19 | public AuthenticateResult? Token { get; set; } 20 | 21 | public void AddHeader(string key, string value) 22 | { 23 | Headers.Add(new KeyValuePair(key, value)); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /SoapClient/InternalResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | using Fiscalapi.XmlDownloader.Services.Common; 3 | 4 | namespace Fiscalapi.XmlDownloader.SoapClient 5 | { 6 | public class InternalResponse 7 | { 8 | public bool IsSuccessStatusCode { get; set; } 9 | public string? ReasonPhrase { get; set; } 10 | public string? RawResponse { get; set; } 11 | public HttpStatusCode HttpStatusCode { get; set; } 12 | public EndPointName EndPointName { get; set; } 13 | public InternalRequest? InternalRequest { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /XmlDownloader.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 4.0.120 8 | $(Version) 9 | $(Version) 10 | $(Version) 11 | Fiscalapi.XmlDownloader 12 | Fiscalapi.XmlDownloader 13 | Fiscalapi.XmlDownloader 14 | Fiscalapi 15 | fiscalapi.png 16 | Descarga masiva de xml o metadata de facturas CFDI 17 | factura cfdi descarga-masiva-xml sat 18 | Descarga Masiva de XML del SAT 19 | Fiscalapi 20 | fiscalapi.ico 21 | True 22 | FISCAL API S DE R.L DE C.V 23 | FISCAL API S DE R.L DE C.V © 2019 24 | https://www.fiscalapi.com 25 | README.md 26 | https://github.com/FiscalAPI/xml-downloader 27 | git 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /XmlDownloader.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.12.35514.174 d17.12 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDownloader", "XmlDownloader.csproj", "{DB606B95-4DFD-41A1-85E8-1B7E6102129B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DB606B95-4DFD-41A1-85E8-1B7E6102129B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {DB606B95-4DFD-41A1-85E8-1B7E6102129B}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {DB606B95-4DFD-41A1-85E8-1B7E6102129B}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {DB606B95-4DFD-41A1-85E8-1B7E6102129B}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /fiscalapi.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/xml-downloader/af56439093476ebe454c64d9b414cc78c08e7c78/fiscalapi.ico -------------------------------------------------------------------------------- /fiscalapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/xml-downloader/af56439093476ebe454c64d9b414cc78c08e7c78/fiscalapi.png --------------------------------------------------------------------------------