aeat.domain.calculations.registry._export_parse module¶
Parse AEAT filed/exported declaration payloads through registry layouts.
- class ParsedExportFieldValue(**data)[source]¶
Bases:
RegistryModelOne field value read from an AEAT payload using a registry export field.
- Parameters:
- record_id: RecordId¶
- field_id: ExportFieldId¶
- casilla_id: CasillaId | None¶
- binding_id: BindingId | None¶
- raw: str¶
- value: Decimal | str | bool | None¶
- source_locator: str¶
- class ParsedExportPayload(**data)[source]¶
Bases:
RegistryModelCasilla and field values parsed from a complete registry export layout.
- Parameters:
layout_id (ExportLayoutId)
fields (tuple[ParsedExportFieldValue, ...])
casillas (tuple[ParsedExportFieldValue, ...])
- layout_id: ExportLayoutId¶
- fields: tuple[ParsedExportFieldValue, ...]¶
- casillas: tuple[ParsedExportFieldValue, ...]¶
- class XmlDictionaryEntry(field_id, path, data_type, casilla_id)[source]¶
Bases:
objectOne field mapping from an official AEAT XML dictionary source.
- parse_export_payload(layout, payload, *, source_root=None, sources=None)[source]¶
Parse a complete AEAT payload and return a
ParsedExportPayload.- Return type:
- Parameters:
layout (ExportLayoutDefinition)
payload (bytes)
source_root (Path | None)
sources (Mapping[str, SourceReference] | None)
- xml_dictionary_entries(layout, *, source_root, sources)[source]¶
Resolve official AEAT XML dictionary
XmlDictionaryEntryrows forlayout.- Return type:
- Parameters:
layout (ExportLayoutDefinition)
source_root (Path | None)
sources (Mapping[str, SourceReference] | None)