Source code for cadrumo.domain.justificante.protocols
"""Domain-facing persistence port for parsed AEAT receipt metadata."""from__future__importannotationsfromcollections.abcimportIteratorfromtypingimportProtocol,runtime_checkablefrom.schemaimportJustificante
[docs]@runtime_checkableclassJustificanteRepositoryProtocol(Protocol):"""Read/write surface used by application receipt-evidence workflows. The encrypted implementation lives in :mod:`cadrumo.adapters.persistence.profile.justificante`; this port keeps application and domain code independent of that storage adapter. """
[docs]defload(self,csv:str,/)->Justificante|None:"""Return the persisted receipt identified by its AEAT CSV."""...
[docs]defsave(self,justificante:Justificante,/)->None:"""Persist one parsed receipt metadata record."""...
[docs]defiter_justificantes(self)->Iterator[Justificante]:"""Yield every persisted receipt in deterministic CSV order."""...