- Updated multiple DTO classes across various modules to replace the `Config` class with `model_config = ConfigDict(from_attributes=True)`. - This change enhances consistency in attribute handling and aligns with the latest Pydantic practices. - Adjusted error handling in core modules to change status codes from `HTTP_422_UNPROCESSABLE_ENTITY` to `HTTP_422_UNPROCESSABLE_CONTENT` for improved clarity in validation responses.
24 lines
667 B
Python
24 lines
667 B
Python
"""Fracciones USA Schemas"""
|
|
|
|
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class FraccionesUSAResponse(BaseModel):
|
|
"""USA tariff fractions"""
|
|
|
|
FRACCION_SIN_PUNTO: Optional[str] = None
|
|
FRACCION_CON_PUNTO: Optional[str] = None
|
|
FRACCION_MOSTRAR: Optional[str] = None
|
|
ESPECIFICO: Optional[str] = None
|
|
NIVEL: Optional[int] = None
|
|
DESCRIPCION: Optional[str] = None
|
|
UNIDADCANTIDAD: Optional[str] = None
|
|
TARIFA1: Optional[str] = None
|
|
TLC: Optional[str] = None
|
|
TARIFA2: Optional[str] = None
|
|
NOTAS: Optional[str] = None
|
|
CONSECUTIVO: int
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|