1+ using Fiscalapi . Common ;
2+ using System ;
3+ using System . Collections . Generic ;
4+
5+ namespace Fiscalapi . Models
6+ {
7+ public class DownloadRequest : BaseDto
8+ {
9+ public int Consecutive { get ; set ; }
10+
11+ /// <summary>
12+ /// Sat Request ID used to track the request in the SAT system.
13+ /// </summary>
14+ public string SatRequestId { get ; set ; }
15+
16+ /// <summary>
17+ /// RuleId associated with the request.
18+ /// </summary>
19+ public string DownloadRuleId { get ; set ; }
20+
21+ public string DownloadTypeId { get ; set ; }
22+ public CatalogDto DownloadType { get ; set ; }
23+
24+ public string DownloadRequestTypeId { get ; set ; }
25+ public CatalogDto DownloadRequestType { get ; set ; }
26+
27+
28+ /// <summary>
29+ /// RfcReceptor
30+ /// Specific CFDIs or metadata of the given recipient TIN (RFC).
31+ /// </summary>
32+ public string RecipientTin { get ; set ; }
33+
34+ /// <summary>
35+ /// RfcEmisor
36+ /// Specific CFDIs or metadata of the given issuer TIN (RFC).
37+ /// </summary>
38+ public string IssuerTin { get ; set ; }
39+
40+ /// <summary>
41+ /// RfcSolicitante
42+ /// RFC who is requesting the query.
43+ /// </summary>
44+ public string RequesterTin { get ; set ; }
45+
46+ /// <summary>
47+ /// FechaInicial
48+ /// Start date for the associated request.
49+ /// </summary>
50+ public DateTime StartDate { get ; set ; }
51+
52+ /// <summary>
53+ /// FechaFinal
54+ /// End date for the associated request.
55+ /// </summary>
56+ public DateTime EndDate { get ; set ; }
57+
58+
59+ /// <summary>
60+ /// TipoSolicitud
61+ /// Request type for the request.
62+ /// CFDI or Metadata.
63+ /// </summary>
64+ public string SatQueryTypeId { get ; set ; }
65+ public CatalogDto SatQueryType { get ; set ; }
66+
67+
68+ /// <summary>
69+ /// TipoComprobante
70+ /// Specific invoice type to request.
71+ /// Ingreso
72+ /// Egreso
73+ /// Traslado
74+ /// Nómina
75+ /// Pago
76+ /// Todos
77+ /// </summary>
78+
79+ public string SatInvoiceTypeId { get ; set ; }
80+ public CatalogDto SatInvoiceType { get ; set ; }
81+
82+
83+ /// <summary>
84+ /// EstadoComprobante
85+ /// CFDIs status to request.
86+ /// </summary>
87+
88+ public string SatInvoiceStatusId { get ; set ; }
89+ public CatalogDto SatInvoiceStatus { get ; set ; }
90+
91+
92+ /// <summary>
93+ /// Complemento
94+ /// CFDIs complements for the request.
95+ /// </summary>
96+
97+ public string SatInvoiceComplementId { get ; set ; }
98+ public CatalogDto SatInvoiceComplement { get ; set ; }
99+
100+
101+ /// <summary>
102+ /// Estado actual de la solicitud.
103+ /// DESCONOCIDO
104+ /// ACEPTADA
105+ /// EN PROCESO
106+ /// TERMINADA
107+ /// ERROR
108+ /// RECHAZADA
109+ /// VENCIDA
110+ /// </summary>
111+
112+ public string SatRequestStatusId { get ; set ; }
113+ public CatalogDto SatRequestStatus { get ; set ; }
114+
115+
116+ /// <summary>
117+ /// Fiscalapi Request Status ID.
118+ /// </summary>
119+ public string DownloadRequestStatusId { get ; set ; }
120+ public CatalogDto DownloadRequestStatus { get ; set ; }
121+
122+
123+ /// <summary>
124+ /// FechaUltimoIntento
125+ /// Last attempt date for the associated request.
126+ /// </summary>
127+ public DateTime ? LastAttemptDate { get ; set ; }
128+
129+ /// <summary>
130+ /// FechaSiguienteIntento
131+ /// Next attempt date for the associated request.
132+ /// </summary>
133+ public DateTime ? NextAttemptDate { get ; set ; }
134+
135+
136+ /// <summary>
137+ /// Number of CFDIs found for the request when request is terminated.
138+ /// </summary>
139+ public int InvoiceCount { get ; set ; }
140+
141+ /// <summary>
142+ /// List of package IDs available for download when the request is terminated.
143+ /// </summary>
144+ public List < string > PackageIds { get ; set ; } = new List < string > ( ) ;
145+
146+ /// <summary>
147+ /// Indicates if the request is ready for download, becomes true when the request is terminated and packages are available.
148+ /// </summary>
149+ public bool IsReadyToDownload { get ; set ; }
150+
151+
152+ /// <summary>
153+ /// Number of total retries attempted for this request across all re-submissions.
154+ /// </summary>
155+ public int RetriesCount { get ; set ; }
156+ }
157+ }
0 commit comments