|
6 | 6 | from cfdiclient import Autenticacion |
7 | 7 | from cfdiclient import DescargaMasiva |
8 | 8 | from cfdiclient import Fiel |
9 | | -from cfdiclient import SolicitaDescarga |
| 9 | +from cfdiclient import solicitadescargaEmitidos |
| 10 | +from cfdiclient import solicitadescargaRecibidos |
10 | 11 | from cfdiclient import VerificaSolicitudDescarga |
11 | 12 | ## |
12 | 13 | # Constantes de Loggin |
|
20 | 21 | cer_der = open(os.path.join(PATH, FIEL_CER), 'rb').read() |
21 | 22 | key_der = open(os.path.join(PATH, FIEL_KEY), 'rb').read() |
22 | 23 |
|
23 | | -FECHA_INICIAL = datetime.datetime(2024, 3, 1) |
24 | | -FECHA_FINAL = datetime.datetime(2024, 3, 30) |
| 24 | +FECHA_INICIAL = datetime.datetime(2025, 6, 1) |
| 25 | +FECHA_FINAL = datetime.datetime(2025, 6, 2) |
25 | 26 |
|
26 | 27 | fiel = Fiel(cer_der, key_der, FIEL_PAS) |
27 | 28 |
|
|
31 | 32 |
|
32 | 33 | print('TOKEN: ', token) |
33 | 34 |
|
34 | | -descarga = SolicitaDescarga(fiel) |
| 35 | +#descarga = solicitadescargaEmitidos.SolicitaDescargaEmitidos(fiel) |
| 36 | +descarga = solicitadescargaRecibidos.SolicitaDescargaRecibidos(fiel) |
35 | 37 |
|
36 | | -# EMITIDOS |
37 | | -# solicitud = descarga.solicitar_descarga( |
38 | | -# token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_emisor=RFC, tipo_solicitud='CFDI', |
39 | | -# ) |
40 | 38 |
|
41 | | -# RECIBIDOS |
| 39 | + |
| 40 | +# Emitidos |
| 41 | +#solicitud = descarga.solicitar_descarga( |
| 42 | +# token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_emisor=RFC,tipo_solicitud='CFDI', |
| 43 | +#) |
| 44 | + |
| 45 | +# Recibidos |
42 | 46 | solicitud = descarga.solicitar_descarga( |
43 | | - token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_receptor=RFC, tipo_solicitud='CFDI', |
| 47 | + token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_receptor=RFC,tipo_solicitud='Metadata', estado_comprobante='Todos', |
44 | 48 | ) |
| 49 | + |
| 50 | + |
45 | 51 | print('solicitar_descarga:', solicitud) |
46 | 52 |
|
47 | 53 | if solicitud['cod_estatus'] != '5000': |
|
0 commit comments