cadrumo.domain.justificante.protocols module

Domain-facing persistence port for parsed AEAT receipt metadata.

class JustificanteRepositoryProtocol(*args, **kwargs)[source]

Bases: Protocol

Read/write surface used by application receipt-evidence workflows.

The encrypted implementation lives in cadrumo.adapters.persistence.profile.justificante; this port keeps application and domain code independent of that storage adapter.

load(csv, /)[source]

Return the persisted receipt identified by its AEAT CSV.

Return type:

Justificante | None

Parameters:

csv (str)

save(justificante, /)[source]

Persist one parsed receipt metadata record.

Return type:

None

Parameters:

justificante (Justificante)

iter_justificantes()[source]

Yield every persisted receipt in deterministic CSV order.

Return type:

Iterator[Justificante]