feat(validators): add validation for required fields based on operation type in invoice processing

This commit is contained in:
Galindo97
2026-01-23 11:03:09 -06:00
parent 07729b970f
commit 1f01d926c2
8 changed files with 275 additions and 125 deletions

View File

@@ -113,17 +113,17 @@ class InvoiceComplianceMxBase(BaseModel):
manifest_number: Optional[str] = Field(
None, max_length=15, description="Manifest number"
)
provider_header: str = Field(None, max_length=20, description="Provider header")
provider_id: int = Field(None, description="Provider ID")
sold_to_header: str = Field(None, max_length=20, description="Sold to header")
sold_to_id: int = Field(None, description="Sold to ID")
shipped_to_header: str = Field(None, max_length=20, description="Shipped to header")
shipped_to_id: int = Field(None, description="Shipped to ID")
provider_header: Optional[str] = Field(None, max_length=20, description="Provider header")
provider_id: Optional[int] = Field(None, description="Provider ID")
sold_to_header: Optional[str] = Field(None, max_length=20, description="Sold to header")
sold_to_id: Optional[int] = Field(None, description="Sold to ID")
shipped_to_header: Optional[str] = Field(None, max_length=20, description="Shipped to header")
shipped_to_id: Optional[int] = Field(None, description="Shipped to ID")
shipped_by_header: Optional[int] = Field(
None, max_length=20, description="Shipped by header"
)
shipped_by_id: Optional[int] = Field(None, description="Shipped by ID")
customs_broker_id: int = Field(None, description="Customs broker ID")
customs_broker_id: Optional[int] = Field(None, description="Customs broker ID")
customs_broker_us_id: Optional[int] = Field(
None, description="US customs broker ID"
)