Total Complexity | 46 |
Total Lines | 1035 |
Duplicated Lines | 1.74 % |
Changes | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like satcfdi.create.pld.din often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
1 | """din http://www.uif.shcp.gob.mx/recepcion/din""" |
||
2 | from decimal import Decimal |
||
3 | from datetime import datetime, date, time |
||
4 | from collections.abc import Sequence |
||
5 | from ...cfdi import CFDI |
||
6 | from ...xelement import XElement |
||
7 | from ...utils import ScalarMap |
||
8 | |||
9 | |||
10 | class FinanciamientoBursatilType(ScalarMap): |
||
11 | """ |
||
12 | |||
13 | :param fecha_emision: |
||
14 | :param monto_solicitado: |
||
15 | :param monto_recibido: |
||
16 | """ |
||
17 | |||
18 | def __init__( |
||
19 | self, |
||
20 | fecha_emision: date = None, |
||
21 | monto_solicitado: str = None, |
||
22 | monto_recibido: str = None, |
||
23 | ): |
||
24 | super().__init__({ |
||
25 | 'FechaEmision': fecha_emision, |
||
26 | 'MontoSolicitado': monto_solicitado, |
||
27 | 'MontoRecibido': monto_recibido, |
||
28 | }) |
||
29 | |||
30 | |||
31 | class DetalleAcreedoresType(ScalarMap): |
||
32 | """ |
||
33 | |||
34 | :param tipo_persona_acreedor: |
||
35 | """ |
||
36 | |||
37 | def __init__( |
||
38 | self, |
||
39 | tipo_persona_acreedor: TipoPersonaType | dict | Sequence[TipoPersonaType | dict] = None, |
||
40 | ): |
||
41 | super().__init__({ |
||
42 | 'TipoPersonaAcreedor': tipo_persona_acreedor, |
||
43 | }) |
||
44 | |||
45 | |||
46 | class DatosPrestamoNoFinType(ScalarMap): |
||
47 | """ |
||
48 | |||
49 | :param detalle_acreedores: |
||
50 | :param monto_prestamo: |
||
51 | :param moneda: |
||
52 | :param plazo_meses: |
||
53 | """ |
||
54 | |||
55 | def __init__( |
||
56 | self, |
||
57 | detalle_acreedores: DetalleAcreedoresType | dict, |
||
58 | monto_prestamo: str = None, |
||
59 | moneda: str = None, |
||
60 | plazo_meses: str = None, |
||
61 | ): |
||
62 | super().__init__({ |
||
63 | 'DetalleAcreedores': detalle_acreedores, |
||
64 | 'MontoPrestamo': monto_prestamo, |
||
65 | 'Moneda': moneda, |
||
66 | 'PlazoMeses': plazo_meses, |
||
67 | }) |
||
68 | |||
69 | |||
70 | class PrestamoNoFinancieroType(ScalarMap): |
||
71 | """ |
||
72 | |||
73 | :param datos_prestamo: |
||
74 | """ |
||
75 | |||
76 | def __init__( |
||
77 | self, |
||
78 | datos_prestamo: DatosPrestamoNoFinType | dict | Sequence[DatosPrestamoNoFinType | dict] = None, |
||
79 | ): |
||
80 | super().__init__({ |
||
81 | 'DatosPrestamo': datos_prestamo, |
||
82 | }) |
||
83 | |||
84 | |||
85 | class DatosPrestamoType(ScalarMap): |
||
86 | """ |
||
87 | |||
88 | :param tipo_institucion: |
||
89 | :param institucion: |
||
90 | :param tipo_credito: |
||
91 | :param monto_prestamo: |
||
92 | :param moneda: |
||
93 | :param plazo_meses: |
||
94 | """ |
||
95 | |||
96 | def __init__( |
||
97 | self, |
||
98 | tipo_institucion: str = None, |
||
99 | institucion: str = None, |
||
100 | tipo_credito: str = None, |
||
101 | monto_prestamo: str = None, |
||
102 | moneda: str = None, |
||
103 | plazo_meses: str = None, |
||
104 | ): |
||
105 | super().__init__({ |
||
106 | 'TipoInstitucion': tipo_institucion, |
||
107 | 'Institucion': institucion, |
||
108 | 'TipoCredito': tipo_credito, |
||
109 | 'MontoPrestamo': monto_prestamo, |
||
110 | 'Moneda': moneda, |
||
111 | 'PlazoMeses': plazo_meses, |
||
112 | }) |
||
113 | |||
114 | |||
115 | class PrestamoFinancieroType(ScalarMap): |
||
116 | """ |
||
117 | |||
118 | :param datos_prestamo: |
||
119 | """ |
||
120 | |||
121 | def __init__( |
||
122 | self, |
||
123 | datos_prestamo: DatosPrestamoType | dict | Sequence[DatosPrestamoType | dict] = None, |
||
124 | ): |
||
125 | super().__init__({ |
||
126 | 'DatosPrestamo': datos_prestamo, |
||
127 | }) |
||
128 | |||
129 | |||
130 | class AportacionNumerarioTercerosType(ScalarMap): |
||
131 | """ |
||
132 | |||
133 | :param instrumento_monetario: |
||
134 | :param moneda: |
||
135 | :param monto_aportacion: |
||
136 | :param aportacion_fideicomiso: |
||
137 | :param nombre_institucion: |
||
138 | :param valor_inmueble_preventa: |
||
139 | """ |
||
140 | |||
141 | def __init__( |
||
142 | self, |
||
143 | instrumento_monetario: str = None, |
||
144 | moneda: str = None, |
||
145 | monto_aportacion: str = None, |
||
146 | aportacion_fideicomiso: str = None, |
||
147 | nombre_institucion: str = None, |
||
148 | valor_inmueble_preventa: str = None, |
||
149 | ): |
||
150 | super().__init__({ |
||
151 | 'InstrumentoMonetario': instrumento_monetario, |
||
152 | 'Moneda': moneda, |
||
153 | 'MontoAportacion': monto_aportacion, |
||
154 | 'AportacionFideicomiso': aportacion_fideicomiso, |
||
155 | 'NombreInstitucion': nombre_institucion, |
||
156 | 'ValorInmueblePreventa': valor_inmueble_preventa, |
||
157 | }) |
||
158 | |||
159 | |||
160 | class DatosAportacionTercerosType(ScalarMap): |
||
161 | """ |
||
162 | |||
163 | :param aportacion_numerario: |
||
164 | :param aportacion_especie: |
||
165 | """ |
||
166 | |||
167 | def __init__( |
||
168 | self, |
||
169 | aportacion_numerario: AportacionNumerarioTercerosType | dict = None, |
||
170 | aportacion_especie: AportacionEspecieType | dict = None, |
||
171 | ): |
||
172 | super().__init__({ |
||
173 | 'AportacionNumerario': aportacion_numerario, |
||
174 | 'AportacionEspecie': aportacion_especie, |
||
175 | }) |
||
176 | |||
177 | |||
178 | class TercerosAportacionType(ScalarMap): |
||
179 | """ |
||
180 | |||
181 | :param datos_aportacion: |
||
182 | """ |
||
183 | |||
184 | def __init__( |
||
185 | self, |
||
186 | datos_aportacion: DatosAportacionTercerosType | dict, |
||
187 | ): |
||
188 | super().__init__({ |
||
189 | 'DatosAportacion': datos_aportacion, |
||
190 | }) |
||
191 | |||
192 | |||
193 | class FideicomisoType(ScalarMap): |
||
194 | """ |
||
195 | |||
196 | :param denominacion_razon: |
||
197 | :param rfc: |
||
198 | :param identificador_fideicomiso: |
||
199 | """ |
||
200 | |||
201 | def __init__( |
||
202 | self, |
||
203 | denominacion_razon: str = None, |
||
204 | rfc: str = None, |
||
205 | identificador_fideicomiso: str = None, |
||
206 | ): |
||
207 | super().__init__({ |
||
208 | 'DenominacionRazon': denominacion_razon, |
||
209 | 'Rfc': rfc, |
||
210 | 'IdentificadorFideicomiso': identificador_fideicomiso, |
||
211 | }) |
||
212 | |||
213 | |||
214 | class PersonaMoralType(ScalarMap): |
||
215 | """ |
||
216 | |||
217 | :param representante_apoderado: |
||
218 | :param denominacion_razon: |
||
219 | :param fecha_constitucion: |
||
220 | :param rfc: |
||
221 | :param pais_nacionalidad: |
||
222 | :param giro_mercantil: |
||
223 | """ |
||
224 | |||
225 | def __init__( |
||
226 | self, |
||
227 | representante_apoderado: RepresentanteApoderadoType | dict, |
||
228 | denominacion_razon: str = None, |
||
229 | fecha_constitucion: date = None, |
||
230 | rfc: str = None, |
||
231 | pais_nacionalidad: str = None, |
||
232 | giro_mercantil: str = None, |
||
233 | ): |
||
234 | super().__init__({ |
||
235 | 'RepresentanteApoderado': representante_apoderado, |
||
236 | 'DenominacionRazon': denominacion_razon, |
||
237 | 'FechaConstitucion': fecha_constitucion, |
||
238 | 'Rfc': rfc, |
||
239 | 'PaisNacionalidad': pais_nacionalidad, |
||
240 | 'GiroMercantil': giro_mercantil, |
||
241 | }) |
||
242 | |||
243 | |||
244 | class PersonaFisicaType(ScalarMap): |
||
245 | """ |
||
246 | |||
247 | :param nombre: |
||
248 | :param apellido_paterno: |
||
249 | :param apellido_materno: |
||
250 | :param fecha_nacimiento: |
||
251 | :param rfc: |
||
252 | :param curp: |
||
253 | :param pais_nacionalidad: |
||
254 | :param actividad_economica: |
||
255 | """ |
||
256 | |||
257 | def __init__( |
||
258 | self, |
||
259 | nombre: str = None, |
||
260 | apellido_paterno: str = None, |
||
261 | apellido_materno: str = None, |
||
262 | fecha_nacimiento: date = None, |
||
263 | rfc: str = None, |
||
264 | curp: str = None, |
||
265 | pais_nacionalidad: str = None, |
||
266 | actividad_economica: str = None, |
||
267 | ): |
||
268 | super().__init__({ |
||
269 | 'Nombre': nombre, |
||
270 | 'ApellidoPaterno': apellido_paterno, |
||
271 | 'ApellidoMaterno': apellido_materno, |
||
272 | 'FechaNacimiento': fecha_nacimiento, |
||
273 | 'Rfc': rfc, |
||
274 | 'Curp': curp, |
||
275 | 'PaisNacionalidad': pais_nacionalidad, |
||
276 | 'ActividadEconomica': actividad_economica, |
||
277 | }) |
||
278 | |||
279 | |||
280 | class TipoPersonaType(ScalarMap): |
||
281 | """ |
||
282 | |||
283 | :param persona_fisica: |
||
284 | :param persona_moral: |
||
285 | :param fideicomiso: |
||
286 | """ |
||
287 | |||
288 | def __init__( |
||
289 | self, |
||
290 | persona_fisica: PersonaFisicaType | dict = None, |
||
291 | persona_moral: PersonaMoralType | dict = None, |
||
292 | fideicomiso: FideicomisoType | dict = None, |
||
293 | ): |
||
294 | super().__init__({ |
||
295 | 'PersonaFisica': persona_fisica, |
||
296 | 'PersonaMoral': persona_moral, |
||
297 | 'Fideicomiso': fideicomiso, |
||
298 | }) |
||
299 | |||
300 | |||
301 | class DatosTerceroType(ScalarMap): |
||
302 | """ |
||
303 | |||
304 | :param tipo_persona_tercero: |
||
305 | :param detalle_aportaciones: |
||
306 | :param tipo_tercero: |
||
307 | :param descripcion_tercero: |
||
308 | """ |
||
309 | |||
310 | def __init__( |
||
311 | self, |
||
312 | tipo_persona_tercero: TipoPersonaType | dict, |
||
313 | detalle_aportaciones: TercerosAportacionType | dict, |
||
314 | tipo_tercero: str = None, |
||
315 | descripcion_tercero: str = None, |
||
316 | ): |
||
317 | super().__init__({ |
||
318 | 'TipoPersonaTercero': tipo_persona_tercero, |
||
319 | 'DetalleAportaciones': detalle_aportaciones, |
||
320 | 'TipoTercero': tipo_tercero, |
||
321 | 'DescripcionTercero': descripcion_tercero, |
||
322 | }) |
||
323 | |||
324 | |||
325 | class DetalleTercerosType(ScalarMap): |
||
326 | """ |
||
327 | |||
328 | :param datos_tercero: |
||
329 | """ |
||
330 | |||
331 | def __init__( |
||
332 | self, |
||
333 | datos_tercero: DatosTerceroType | dict | Sequence[DatosTerceroType | dict] = None, |
||
334 | ): |
||
335 | super().__init__({ |
||
336 | 'DatosTercero': datos_tercero, |
||
337 | }) |
||
338 | |||
339 | |||
340 | class TercerosType(ScalarMap): |
||
341 | """ |
||
342 | |||
343 | :param detalle_terceros: |
||
344 | :param numero_terceros: |
||
345 | """ |
||
346 | |||
347 | def __init__( |
||
348 | self, |
||
349 | detalle_terceros: DetalleTercerosType | dict, |
||
350 | numero_terceros: str = None, |
||
351 | ): |
||
352 | super().__init__({ |
||
353 | 'DetalleTerceros': detalle_terceros, |
||
354 | 'NumeroTerceros': numero_terceros, |
||
355 | }) |
||
356 | |||
357 | |||
358 | class DatosAportacionSociosType(ScalarMap): |
||
359 | """ |
||
360 | |||
361 | :param aportacion_numerario: |
||
362 | :param aportacion_especie: |
||
363 | """ |
||
364 | |||
365 | def __init__( |
||
366 | self, |
||
367 | aportacion_numerario: AportacionNumerarioType | dict = None, |
||
368 | aportacion_especie: AportacionEspecieType | dict = None, |
||
369 | ): |
||
370 | super().__init__({ |
||
371 | 'AportacionNumerario': aportacion_numerario, |
||
372 | 'AportacionEspecie': aportacion_especie, |
||
373 | }) |
||
374 | |||
375 | |||
376 | class SociosAportacionType(ScalarMap): |
||
377 | """ |
||
378 | |||
379 | :param datos_aportacion: |
||
380 | """ |
||
381 | |||
382 | def __init__( |
||
383 | self, |
||
384 | datos_aportacion: DatosAportacionSociosType | dict, |
||
385 | ): |
||
386 | super().__init__({ |
||
387 | 'DatosAportacion': datos_aportacion, |
||
388 | }) |
||
389 | |||
390 | |||
391 | class TelefonoType(ScalarMap): |
||
392 | """ |
||
393 | |||
394 | :param clave_pais: |
||
395 | :param numero_telefono: |
||
396 | :param correo_electronico: |
||
397 | """ |
||
398 | |||
399 | def __init__( |
||
400 | self, |
||
401 | clave_pais: str = None, |
||
402 | numero_telefono: str = None, |
||
403 | correo_electronico: str = None, |
||
404 | ): |
||
405 | super().__init__({ |
||
406 | 'ClavePais': clave_pais, |
||
407 | 'NumeroTelefono': numero_telefono, |
||
408 | 'CorreoElectronico': correo_electronico, |
||
409 | }) |
||
410 | |||
411 | |||
412 | class ExtranjeroType(ScalarMap): |
||
413 | """ |
||
414 | |||
415 | :param pais: |
||
416 | :param estado_provincia: |
||
417 | :param ciudad_poblacion: |
||
418 | :param colonia: |
||
419 | :param calle: |
||
420 | :param numero_exterior: |
||
421 | :param numero_interior: |
||
422 | :param codigo_postal: |
||
423 | """ |
||
424 | |||
425 | def __init__( |
||
426 | self, |
||
427 | pais: str = None, |
||
428 | estado_provincia: str = None, |
||
429 | ciudad_poblacion: str = None, |
||
430 | colonia: str = None, |
||
431 | calle: str = None, |
||
432 | numero_exterior: str = None, |
||
433 | numero_interior: str = None, |
||
434 | codigo_postal: str = None, |
||
435 | ): |
||
436 | super().__init__({ |
||
437 | 'Pais': pais, |
||
438 | 'EstadoProvincia': estado_provincia, |
||
439 | 'CiudadPoblacion': ciudad_poblacion, |
||
440 | 'Colonia': colonia, |
||
441 | 'Calle': calle, |
||
442 | 'NumeroExterior': numero_exterior, |
||
443 | 'NumeroInterior': numero_interior, |
||
444 | 'CodigoPostal': codigo_postal, |
||
445 | }) |
||
446 | |||
447 | |||
448 | class NacionalType(ScalarMap): |
||
449 | """ |
||
450 | |||
451 | :param colonia: |
||
452 | :param calle: |
||
453 | :param numero_exterior: |
||
454 | :param numero_interior: |
||
455 | :param codigo_postal: |
||
456 | """ |
||
457 | |||
458 | def __init__( |
||
459 | self, |
||
460 | colonia: str = None, |
||
461 | calle: str = None, |
||
462 | numero_exterior: str = None, |
||
463 | numero_interior: str = None, |
||
464 | codigo_postal: str = None, |
||
465 | ): |
||
466 | super().__init__({ |
||
467 | 'Colonia': colonia, |
||
468 | 'Calle': calle, |
||
469 | 'NumeroExterior': numero_exterior, |
||
470 | 'NumeroInterior': numero_interior, |
||
471 | 'CodigoPostal': codigo_postal, |
||
472 | }) |
||
473 | |||
474 | |||
475 | class TipoDomicilioType(ScalarMap): |
||
476 | """ |
||
477 | |||
478 | :param nacional: |
||
479 | :param extranjero: |
||
480 | """ |
||
481 | |||
482 | def __init__( |
||
483 | self, |
||
484 | nacional: NacionalType | dict = None, |
||
485 | extranjero: ExtranjeroType | dict = None, |
||
486 | ): |
||
487 | super().__init__({ |
||
488 | 'Nacional': nacional, |
||
489 | 'Extranjero': extranjero, |
||
490 | }) |
||
491 | |||
492 | |||
493 | class RepresentanteApoderadoType(ScalarMap): |
||
494 | """ |
||
495 | |||
496 | :param nombre: |
||
497 | :param apellido_paterno: |
||
498 | :param apellido_materno: |
||
499 | :param fecha_nacimiento: |
||
500 | :param rfc: |
||
501 | :param curp: |
||
502 | """ |
||
503 | |||
504 | def __init__( |
||
505 | self, |
||
506 | nombre: str = None, |
||
507 | apellido_paterno: str = None, |
||
508 | apellido_materno: str = None, |
||
509 | fecha_nacimiento: date = None, |
||
510 | rfc: str = None, |
||
511 | curp: str = None, |
||
512 | ): |
||
513 | super().__init__({ |
||
514 | 'Nombre': nombre, |
||
515 | 'ApellidoPaterno': apellido_paterno, |
||
516 | 'ApellidoMaterno': apellido_materno, |
||
517 | 'FechaNacimiento': fecha_nacimiento, |
||
518 | 'Rfc': rfc, |
||
519 | 'Curp': curp, |
||
520 | }) |
||
521 | |||
522 | |||
523 | class PersonaMoralSocioType(ScalarMap): |
||
524 | """ |
||
525 | |||
526 | :param representante_apoderado: |
||
527 | :param denominacion_razon: |
||
528 | :param fecha_constitucion: |
||
529 | :param pais_nacionalidad: |
||
530 | :param giro_mercantil: |
||
531 | """ |
||
532 | |||
533 | def __init__( |
||
534 | self, |
||
535 | representante_apoderado: RepresentanteApoderadoType | dict, |
||
536 | denominacion_razon: str = None, |
||
537 | fecha_constitucion: date = None, |
||
538 | pais_nacionalidad: str = None, |
||
539 | giro_mercantil: str = None, |
||
540 | ): |
||
541 | super().__init__({ |
||
542 | 'RepresentanteApoderado': representante_apoderado, |
||
543 | 'DenominacionRazon': denominacion_razon, |
||
544 | 'FechaConstitucion': fecha_constitucion, |
||
545 | 'PaisNacionalidad': pais_nacionalidad, |
||
546 | 'GiroMercantil': giro_mercantil, |
||
547 | }) |
||
548 | |||
549 | |||
550 | class PersonaFisicaSocioType(ScalarMap): |
||
551 | """ |
||
552 | |||
553 | :param nombre: |
||
554 | :param apellido_paterno: |
||
555 | :param apellido_materno: |
||
556 | :param fecha_nacimiento: |
||
557 | :param curp: |
||
558 | :param pais_nacionalidad: |
||
559 | :param actividad_economica: |
||
560 | """ |
||
561 | |||
562 | def __init__( |
||
563 | self, |
||
564 | nombre: str = None, |
||
565 | apellido_paterno: str = None, |
||
566 | apellido_materno: str = None, |
||
567 | fecha_nacimiento: date = None, |
||
568 | curp: str = None, |
||
569 | pais_nacionalidad: str = None, |
||
570 | actividad_economica: str = None, |
||
571 | ): |
||
572 | super().__init__({ |
||
573 | 'Nombre': nombre, |
||
574 | 'ApellidoPaterno': apellido_paterno, |
||
575 | 'ApellidoMaterno': apellido_materno, |
||
576 | 'FechaNacimiento': fecha_nacimiento, |
||
577 | 'Curp': curp, |
||
578 | 'PaisNacionalidad': pais_nacionalidad, |
||
579 | 'ActividadEconomica': actividad_economica, |
||
580 | }) |
||
581 | |||
582 | |||
583 | class TipoPersonaSocioType(ScalarMap): |
||
584 | """ |
||
585 | |||
586 | :param persona_fisica: |
||
587 | :param persona_moral: |
||
588 | :param fideicomiso: |
||
589 | """ |
||
590 | |||
591 | def __init__( |
||
592 | self, |
||
593 | persona_fisica: PersonaFisicaSocioType | dict = None, |
||
594 | persona_moral: PersonaMoralSocioType | dict = None, |
||
595 | fideicomiso: FideicomisoType | dict = None, |
||
596 | ): |
||
597 | super().__init__({ |
||
598 | 'PersonaFisica': persona_fisica, |
||
599 | 'PersonaMoral': persona_moral, |
||
600 | 'Fideicomiso': fideicomiso, |
||
601 | }) |
||
602 | |||
603 | |||
604 | class DatosSocioType(ScalarMap): |
||
605 | """ |
||
606 | |||
607 | :param tipo_persona_socio: |
||
608 | :param tipo_domicilio_socio: |
||
609 | :param detalle_aportaciones: |
||
610 | :param aportacion_anterior_socio: |
||
611 | :param rfc_socio: |
||
612 | :param telefono: |
||
613 | """ |
||
614 | |||
615 | def __init__( |
||
616 | self, |
||
617 | tipo_persona_socio: TipoPersonaSocioType | dict, |
||
618 | tipo_domicilio_socio: TipoDomicilioType | dict, |
||
619 | detalle_aportaciones: SociosAportacionType | dict, |
||
620 | aportacion_anterior_socio: str = None, |
||
621 | rfc_socio: str = None, |
||
622 | telefono: TelefonoType | dict = None, |
||
623 | ): |
||
624 | super().__init__({ |
||
625 | 'TipoPersonaSocio': tipo_persona_socio, |
||
626 | 'TipoDomicilioSocio': tipo_domicilio_socio, |
||
627 | 'DetalleAportaciones': detalle_aportaciones, |
||
628 | 'AportacionAnteriorSocio': aportacion_anterior_socio, |
||
629 | 'RfcSocio': rfc_socio, |
||
630 | 'Telefono': telefono, |
||
631 | }) |
||
632 | |||
633 | |||
634 | class DetalleSociosType(ScalarMap): |
||
635 | """ |
||
636 | |||
637 | :param datos_socio: |
||
638 | """ |
||
639 | |||
640 | def __init__( |
||
641 | self, |
||
642 | datos_socio: DatosSocioType | dict | Sequence[DatosSocioType | dict] = None, |
||
643 | ): |
||
644 | super().__init__({ |
||
645 | 'DatosSocio': datos_socio, |
||
646 | }) |
||
647 | |||
648 | |||
649 | class SociosType(ScalarMap): |
||
650 | """ |
||
651 | |||
652 | :param detalle_socios: |
||
653 | :param numero_socios: |
||
654 | """ |
||
655 | |||
656 | def __init__( |
||
657 | self, |
||
658 | detalle_socios: DetalleSociosType | dict, |
||
659 | numero_socios: str = None, |
||
660 | ): |
||
661 | super().__init__({ |
||
662 | 'DetalleSocios': detalle_socios, |
||
663 | 'NumeroSocios': numero_socios, |
||
664 | }) |
||
665 | |||
666 | |||
667 | class AportacionEspecieType(ScalarMap): |
||
668 | """ |
||
669 | |||
670 | :param descripcion_bien: |
||
671 | :param monto_estimado: |
||
672 | """ |
||
673 | |||
674 | def __init__( |
||
675 | self, |
||
676 | descripcion_bien: str = None, |
||
677 | monto_estimado: str = None, |
||
678 | ): |
||
679 | super().__init__({ |
||
680 | 'DescripcionBien': descripcion_bien, |
||
681 | 'MontoEstimado': monto_estimado, |
||
682 | }) |
||
683 | |||
684 | |||
685 | class AportacionNumerarioType(ScalarMap): |
||
686 | """ |
||
687 | |||
688 | :param instrumento_monetario: |
||
689 | :param moneda: |
||
690 | :param monto_aportacion: |
||
691 | :param aportacion_fideicomiso: |
||
692 | :param nombre_institucion: |
||
693 | """ |
||
694 | |||
695 | def __init__( |
||
696 | self, |
||
697 | instrumento_monetario: str = None, |
||
698 | moneda: str = None, |
||
699 | monto_aportacion: str = None, |
||
700 | aportacion_fideicomiso: str = None, |
||
701 | nombre_institucion: str = None, |
||
702 | ): |
||
703 | super().__init__({ |
||
704 | 'InstrumentoMonetario': instrumento_monetario, |
||
705 | 'Moneda': moneda, |
||
706 | 'MontoAportacion': monto_aportacion, |
||
707 | 'AportacionFideicomiso': aportacion_fideicomiso, |
||
708 | 'NombreInstitucion': nombre_institucion, |
||
709 | }) |
||
710 | |||
711 | |||
712 | class DatosAportacionType(ScalarMap): |
||
713 | """ |
||
714 | |||
715 | :param aportacion_numerario: |
||
716 | :param aportacion_especie: |
||
717 | """ |
||
718 | |||
719 | def __init__( |
||
720 | self, |
||
721 | aportacion_numerario: AportacionNumerarioType | dict = None, |
||
722 | aportacion_especie: AportacionEspecieType | dict = None, |
||
723 | ): |
||
724 | super().__init__({ |
||
725 | 'AportacionNumerario': aportacion_numerario, |
||
726 | 'AportacionEspecie': aportacion_especie, |
||
727 | }) |
||
728 | |||
729 | |||
730 | class RecursosPropiosType(ScalarMap): |
||
731 | """ |
||
732 | |||
733 | :param datos_aportacion: |
||
734 | """ |
||
735 | |||
736 | def __init__( |
||
737 | self, |
||
738 | datos_aportacion: DatosAportacionType | dict | Sequence[DatosAportacionType | dict] = None, |
||
739 | ): |
||
740 | super().__init__({ |
||
741 | 'DatosAportacion': datos_aportacion, |
||
742 | }) |
||
743 | |||
744 | |||
745 | class TipoAportacionType(ScalarMap): |
||
746 | """ |
||
747 | |||
748 | :param recursos_propios: |
||
749 | :param socios: |
||
750 | :param terceros: |
||
751 | :param prestamo_financiero: |
||
752 | :param prestamo_no_financiero: |
||
753 | :param financiamiento_bursatil: |
||
754 | """ |
||
755 | |||
756 | def __init__( |
||
757 | self, |
||
758 | recursos_propios: RecursosPropiosType | dict = None, |
||
759 | socios: SociosType | dict = None, |
||
760 | terceros: TercerosType | dict = None, |
||
761 | prestamo_financiero: PrestamoFinancieroType | dict = None, |
||
762 | prestamo_no_financiero: PrestamoNoFinancieroType | dict = None, |
||
763 | financiamiento_bursatil: FinanciamientoBursatilType | dict = None, |
||
764 | ): |
||
765 | super().__init__({ |
||
766 | 'RecursosPropios': recursos_propios, |
||
767 | 'Socios': socios, |
||
768 | 'Terceros': terceros, |
||
769 | 'PrestamoFinanciero': prestamo_financiero, |
||
770 | 'PrestamoNoFinanciero': prestamo_no_financiero, |
||
771 | 'FinanciamientoBursatil': financiamiento_bursatil, |
||
772 | }) |
||
773 | |||
774 | |||
775 | class AportacionesType(ScalarMap): |
||
776 | """ |
||
777 | |||
778 | :param fecha_aportacion: |
||
779 | :param tipo_aportacion: |
||
780 | """ |
||
781 | |||
782 | def __init__( |
||
783 | self, |
||
784 | fecha_aportacion: date = None, |
||
785 | tipo_aportacion: TipoAportacionType | dict | Sequence[TipoAportacionType | dict] = None, |
||
786 | ): |
||
787 | super().__init__({ |
||
788 | 'FechaAportacion': fecha_aportacion, |
||
789 | 'TipoAportacion': tipo_aportacion, |
||
790 | }) |
||
791 | |||
792 | |||
793 | class CaracteristicasDesarrolloType(ScalarMap): |
||
794 | """ |
||
795 | |||
796 | :param codigo_postal: |
||
797 | :param colonia: |
||
798 | :param calle: |
||
799 | :param tipo_desarrollo: |
||
800 | :param monto_desarrollo: |
||
801 | :param unidades_comercializadas: |
||
802 | :param costo_unidad: |
||
803 | :param otras_empresas: |
||
804 | :param descripcion_desarrollo: |
||
805 | """ |
||
806 | |||
807 | def __init__( |
||
808 | self, |
||
809 | codigo_postal: str, |
||
810 | colonia: str, |
||
811 | calle: str, |
||
812 | tipo_desarrollo: str, |
||
813 | monto_desarrollo: str, |
||
814 | unidades_comercializadas: str, |
||
815 | costo_unidad: str, |
||
816 | otras_empresas: str, |
||
817 | descripcion_desarrollo: str = None, |
||
818 | ): |
||
819 | super().__init__({ |
||
820 | 'CodigoPostal': codigo_postal, |
||
821 | 'Colonia': colonia, |
||
822 | 'Calle': calle, |
||
823 | 'TipoDesarrollo': tipo_desarrollo, |
||
824 | 'MontoDesarrollo': monto_desarrollo, |
||
825 | 'UnidadesComercializadas': unidades_comercializadas, |
||
826 | 'CostoUnidad': costo_unidad, |
||
827 | 'OtrasEmpresas': otras_empresas, |
||
828 | 'DescripcionDesarrollo': descripcion_desarrollo, |
||
829 | }) |
||
830 | |||
831 | |||
832 | class DatosDesarrolloType(ScalarMap): |
||
833 | """ |
||
834 | |||
835 | :param objeto_aviso_anterior: |
||
836 | :param modificacion: |
||
837 | :param entidad_federativa: |
||
838 | :param registro_licencia: |
||
839 | :param caracteristicas_desarrollo: |
||
840 | """ |
||
841 | |||
842 | def __init__( |
||
843 | self, |
||
844 | objeto_aviso_anterior: str, |
||
845 | modificacion: str, |
||
846 | entidad_federativa: str, |
||
847 | registro_licencia: str, |
||
848 | caracteristicas_desarrollo: CaracteristicasDesarrolloType | dict | Sequence[CaracteristicasDesarrolloType | dict], |
||
849 | ): |
||
850 | super().__init__({ |
||
851 | 'ObjetoAvisoAnterior': objeto_aviso_anterior, |
||
852 | 'Modificacion': modificacion, |
||
853 | 'EntidadFederativa': entidad_federativa, |
||
854 | 'RegistroLicencia': registro_licencia, |
||
855 | 'CaracteristicasDesarrollo': caracteristicas_desarrollo, |
||
856 | }) |
||
857 | |||
858 | |||
859 | class DesarrollosInmobiliariosType(ScalarMap): |
||
860 | """ |
||
861 | |||
862 | :param datos_desarrollo: |
||
863 | """ |
||
864 | |||
865 | def __init__( |
||
866 | self, |
||
867 | datos_desarrollo: DatosDesarrolloType | dict | Sequence[DatosDesarrolloType | dict], |
||
868 | ): |
||
869 | super().__init__({ |
||
870 | 'DatosDesarrollo': datos_desarrollo, |
||
871 | }) |
||
872 | |||
873 | |||
874 | class DatosOperacionType(ScalarMap): |
||
875 | """ |
||
876 | |||
877 | :param tipo_operacion: |
||
878 | :param desarrollos_inmobiliarios: |
||
879 | :param aportaciones: |
||
880 | """ |
||
881 | |||
882 | def __init__( |
||
883 | self, |
||
884 | tipo_operacion: str, |
||
885 | desarrollos_inmobiliarios: DesarrollosInmobiliariosType | dict, |
||
886 | aportaciones: AportacionesType | dict, |
||
887 | ): |
||
888 | super().__init__({ |
||
889 | 'TipoOperacion': tipo_operacion, |
||
890 | 'DesarrollosInmobiliarios': desarrollos_inmobiliarios, |
||
891 | 'Aportaciones': aportaciones, |
||
892 | }) |
||
893 | |||
894 | |||
895 | class DetalleOperacionesType(ScalarMap): |
||
896 | """ |
||
897 | |||
898 | :param datos_operacion: |
||
899 | """ |
||
900 | |||
901 | def __init__( |
||
902 | self, |
||
903 | datos_operacion: DatosOperacionType | dict | Sequence[DatosOperacionType | dict], |
||
904 | ): |
||
905 | super().__init__({ |
||
906 | 'DatosOperacion': datos_operacion, |
||
907 | }) |
||
908 | |||
909 | |||
910 | class AlertaType(ScalarMap): |
||
911 | """ |
||
912 | |||
913 | :param tipo_alerta: |
||
914 | :param descripcion_alerta: |
||
915 | """ |
||
916 | |||
917 | def __init__( |
||
918 | self, |
||
919 | tipo_alerta: str, |
||
920 | descripcion_alerta: str = None, |
||
921 | ): |
||
922 | super().__init__({ |
||
923 | 'TipoAlerta': tipo_alerta, |
||
924 | 'DescripcionAlerta': descripcion_alerta, |
||
925 | }) |
||
926 | |||
927 | |||
928 | class ModificatorioType(ScalarMap): |
||
929 | """ |
||
930 | |||
931 | :param folio_modificacion: |
||
932 | :param descripcion_modificacion: |
||
933 | """ |
||
934 | |||
935 | def __init__( |
||
936 | self, |
||
937 | folio_modificacion: str, |
||
938 | descripcion_modificacion: str, |
||
939 | ): |
||
940 | super().__init__({ |
||
941 | 'FolioModificacion': folio_modificacion, |
||
942 | 'DescripcionModificacion': descripcion_modificacion, |
||
943 | }) |
||
944 | |||
945 | |||
946 | class AvisoType(ScalarMap): |
||
947 | """ |
||
948 | |||
949 | :param referencia_aviso: |
||
950 | :param prioridad: |
||
951 | :param alerta: |
||
952 | :param detalle_operaciones: |
||
953 | :param modificatorio: |
||
954 | """ |
||
955 | |||
956 | def __init__( |
||
957 | self, |
||
958 | referencia_aviso: str, |
||
959 | prioridad: str, |
||
960 | alerta: AlertaType | dict, |
||
961 | detalle_operaciones: DetalleOperacionesType | dict, |
||
962 | modificatorio: ModificatorioType | dict = None, |
||
963 | ): |
||
964 | super().__init__({ |
||
965 | 'ReferenciaAviso': referencia_aviso, |
||
966 | 'Prioridad': prioridad, |
||
967 | 'Alerta': alerta, |
||
968 | 'DetalleOperaciones': detalle_operaciones, |
||
969 | 'Modificatorio': modificatorio, |
||
970 | }) |
||
971 | |||
972 | |||
973 | class SujetoObligadoType(ScalarMap): |
||
974 | """ |
||
975 | |||
976 | :param clave_sujeto_obligado: |
||
977 | :param clave_actividad: |
||
978 | :param clave_entidad_colegiada: |
||
979 | :param exento: |
||
980 | """ |
||
981 | |||
982 | def __init__( |
||
983 | self, |
||
984 | clave_sujeto_obligado: str, |
||
985 | clave_actividad: str, |
||
986 | clave_entidad_colegiada: str = None, |
||
987 | exento: str = None, |
||
988 | ): |
||
989 | super().__init__({ |
||
990 | 'ClaveSujetoObligado': clave_sujeto_obligado, |
||
991 | 'ClaveActividad': clave_actividad, |
||
992 | 'ClaveEntidadColegiada': clave_entidad_colegiada, |
||
993 | 'Exento': exento, |
||
994 | }) |
||
995 | |||
996 | |||
997 | View Code Duplication | class InformeType(ScalarMap): |
|
|
|||
998 | """ |
||
999 | |||
1000 | :param mes_reportado: |
||
1001 | :param sujeto_obligado: |
||
1002 | :param aviso: |
||
1003 | """ |
||
1004 | |||
1005 | def __init__( |
||
1006 | self, |
||
1007 | mes_reportado: str, |
||
1008 | sujeto_obligado: SujetoObligadoType | dict, |
||
1009 | aviso: AvisoType | dict | Sequence[AvisoType | dict] = None, |
||
1010 | ): |
||
1011 | super().__init__({ |
||
1012 | 'MesReportado': mes_reportado, |
||
1013 | 'SujetoObligado': sujeto_obligado, |
||
1014 | 'Aviso': aviso, |
||
1015 | }) |
||
1016 | |||
1017 | |||
1018 | class ArchivoType(ScalarMap): |
||
1019 | """ |
||
1020 | |||
1021 | :param informe: |
||
1022 | """ |
||
1023 | |||
1024 | def __init__( |
||
1025 | self, |
||
1026 | informe: InformeType | dict | Sequence[InformeType | dict], |
||
1027 | ): |
||
1028 | super().__init__({ |
||
1029 | 'Informe': informe, |
||
1030 | }) |
||
1031 | |||
1032 | |||
1033 | class Archivo(ArchivoType, XElement): |
||
1034 | tag = '{http://www.uif.shcp.gob.mx/recepcion/din}archivo' |
||
1035 | |||
1036 |