aeat.adapters.inbound.financial.providers._pdf_n26 module

N26 PDF statement provider backed by pdfplumber.

Implements PdfN26Provider, an FinancialProvider that parses German-language N26 monthly PDF statements. The parser is anchored on the Beschreibung Verbuchungsdatum Betrag table header and a regex matched against each line below it; continuation lines (value-date stamps, IBAN annotations, free-form remittance text) attach to the most recent header row.

The PDF provider emits ParsedLedgerRow records with PDF-backed RawProvenance. Its current fixture corpus is generated from sanitised, published N26 statement text; it proves this line-structure family but does not claim exhaustive coverage of every N26 current-account or FX statement variant.

class PdfN26Provider[source]

Bases: FinancialProvider

Ingest raw transactions from N26 monthly PDF statements.

The provider rejects any PDF that does not carry the N26 bank marker, the Kontoauszug heading, and the canonical transaction-table header line, so an arbitrary PDF cannot be silently accepted as an N26 statement. Internal-flow narratives (interest credits, savings transfers, withholding tax) are flagged via _INTERNAL_NARRATIVES so the _derive_counterparty_and_description() helper drops the counterparty for those rows.

The provider declares verification_source = "synthetic_from_bank_published_text" and keeps the parser PDF-only; CSV, OFX, and XLSX exports are handled by their sibling providers.

name: ClassVar[str]
supported_extensions: ClassVar[frozenset[str]]
source_format: ClassVar[SourceFormat]
verification_source: ClassVar[CorpusVerificationSource]
provisional_pending_specimen: ClassVar[bool]
validate_source(path)[source]

Validate that path is an N26 PDF statement with at least one row.

Return type:

ProviderValidation

Returns:

A ProviderValidation with the validation outcome.

Parameters:

path (Path)

ingest(path)[source]

Yield ParsedLedgerRow records (magnitude + direction) from the N26 PDF statement.

Return type:

Iterator[ParsedLedgerRow]

Parameters:

path (Path)