aeat.application.calculations._ports module¶
Structural calculation ports for read-only filed declaration data.
These runtime-checkable protocols declare the subset of AEAT filed-declaration
records that the calculations application layer reads without importing the
Sede adapter. Concrete records such as
FiledDeclaracionObservation,
FiledDeclaracionArtefact, and
ObservedCasillaValue satisfy these
ports structurally while remaining adapter-owned evidence records.
See also
application.calculations._iva_compensation_history:Consumes
FiledDeclaracionObservationProtocolfor Modelo 303 period states and Modelo 390 annual cross-checks.application.live:Captures filed declarations and promotes registry-consumable observations into local encrypted stores.
- class FiledDeclaracionArtefactProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolMinimal artefact surface read by calculation evidence consumers.
The concrete
FiledDeclaracionArtefactcarries more capture metadata, but calculation history only needs the artefact kind and hash witness to choose submitted-file evidence where it is present.
- class ObservedCasillaValueProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolMinimal casilla-observation surface read by calculations.
Values arrive as read-only evidence from an adapter-owned
ObservedCasillaValue. The application treatscasilla_idas a canonicalCasillaIdstring and validates it against the resolved registry snapshot before using the value.- property casilla_id: CasillaId¶
Canonical
CasillaIdstring observed in the filed artefact.
- class FiledDeclaracionObservationProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolStructural interface for a filed AEAT declaration observation.
The application layer depends on this protocol rather than the concrete
FiledDeclaracionObservationmodel, eliminating the application-to-adapter import edge. The surface is intentionally limited to the fields consumed byiva_compensation_state_from_filed_observation()andiva_compensation_annual_summary_from_filed_observation().- property authenticated_identity: str¶
NIF of the authenticated taxpayer who presented the declaration.
- property artefacts: Sequence[FiledDeclaracionArtefactProtocol]¶
Sequence of artefacts attached to this declaration.
Each element satisfies
FiledDeclaracionArtefactProtocol.
- property casillas: Sequence[ObservedCasillaValueProtocol]¶
Sequence of
ObservedCasillaValueProtocolvalues extracted from the declaration.