cadrumo.domain.transactions.irpf_categories module¶
Typed shape and normalization boundary for ledger IRPF category tokens.
- class LedgerIrpfCategoryDescriptor(id, purpose, directions, net_paid, related_ids)[source]¶
Bases:
objectOne registry-projected category descriptor.
- Parameters:
-
directions:
tuple[TransactionDirection,...]¶
- ledger_irpf_category_catalogue(*, authority=None)[source]¶
Return the dated registry-projected IRPF category descriptors.
- Return type:
- Parameters:
authority (GovernedFactSource | None)
- normalize_irpf_category(value)[source]¶
Normalize a raw category token without resolving registry meaning.
- ledger_irpf_category(value, *, direction=None, authority=None)[source]¶
Resolve a normalized token through the registry-owned taxonomy.
- Return type:
- Parameters:
value (str | None)
direction (TransactionDirection | None)
authority (GovernedFactSource | None)
- has_non_work_irpf_category(value, *, direction, authority=None)[source]¶
Resolve the registry-owned non-employment predicate.
- Return type:
- Parameters:
value (str | None)
direction (TransactionDirection)
authority (GovernedFactSource | None)
- has_activity_irpf_category(value, *, direction, authority=None)[source]¶
Resolve the registry-owned activity-income predicate.
- Return type:
- Parameters:
value (str | None)
direction (TransactionDirection)
authority (GovernedFactSource | None)
- has_rent_irpf_category(value, *, direction, authority=None)[source]¶
Resolve the registry-owned rental predicate.
- Return type:
- Parameters:
value (str | None)
direction (TransactionDirection)
authority (GovernedFactSource | None)
- has_employment_irpf_category(value, *, direction, authority=None)[source]¶
Resolve the registry-owned employment predicate.
- Return type:
- Parameters:
value (str | None)
direction (TransactionDirection)
authority (GovernedFactSource | None)
Return whether a spending token is a registry-declared net-paid relation.
- Return type:
- Parameters:
value (str | None)
authority (GovernedFactSource | None)