aeat.application.modelo._m145_communication module¶
Modelo 145 local payer-communication service ownership contract.
Modelo 145 is not an AEAT filing surface. The application layer owns only a local communication workflow: create the communication, validate it, export the official record, mark payer delivery, and mark local completion. This module is the P04 ownership contract for that backend service; later steps add the mutating behavior behind the same vocabulary.
See also
modeloPublic facade that exports the Modelo 145 communication contract.
M145CommunicationServiceContractImmutable, registry-backed ownership record returned by this module.
M145CommunicationActionClosed backend action vocabulary for the local communication workflow.
build_m145_communication_service_contract()Builder that reads the registry snapshot and refuses filing-like drift.
ModeloRevisionRegistry revision whose application links, legal refs, source refs, and export layouts ground the returned contract.
ValidatedRegistryAuthorityBundled authority loader that supplies the Modelo 145 snapshot.
- class M145CommunicationAction(*values)[source]¶
Bases:
StrEnumClosed backend action vocabulary for Modelo 145 local communication.
- CREATE¶
- VALIDATE¶
- EXPORT¶
- MARK_DELIVERED_TO_PAYER¶
- MARK_LOCALLY_COMPLETED¶
- class M145CommunicationServiceContract(**data)[source]¶
Bases:
BaseModelImmutable ownership contract for the Modelo 145 backend service.
The contract is built from the registry snapshot so later behavior cannot drift into a filing lifecycle without tripping the ownership tests first.
- Parameters:
- schema_version: str¶
- service_owner: str¶
- modelo: str¶
- period_token: str¶
- revision_id: str¶
- actions: tuple[M145CommunicationAction, ...]¶
- surfaces: tuple[str, ...]¶
- export_layout_ids: tuple[str, ...]¶
- legal_refs: tuple[str, ...]¶
- source_refs: tuple[str, ...]¶
- build_m145_communication_service_contract(*, filing_year=2026)[source]¶
Return the registry-backed Modelo 145 local communication contract.
Reads the active Modelo 145 registry snapshot for the communication period and refuses if the registry exposes filing, deadline, live-read, portal, or other non-local surfaces. The returned record is read-only ownership data; it does not create, persist, export, or transition any communication.
- Return type:
- Parameters:
filing_year (int)