cadrumo.domain.calculations.registry.iva_category_catalogue module¶
Typed projection of the governed IVA-category catalogue.
- class IvaCategoryDefinition(token, description)[source]¶
Bases:
objectOne registry-declared IVA category token and its metadata.
- Parameters:
token (IvaCategory)
description (str)
-
token:
IvaCategory¶
- class IvaCategoryCatalogue(definitions, projections, reasons, hints, operation_types, operation_type_categories, untdid_categories)[source]¶
Bases:
objectTyped projection of the dated IVA category vocabulary.
- Parameters:
-
definitions:
tuple[IvaCategoryDefinition,...]¶
-
projections:
Mapping[str,frozenset[IvaCategory]]¶
- property all_categories: tuple[IvaCategory, ...]¶
Return the registry-declared categories in authored order.
- property all_category_set: frozenset[IvaCategory]¶
Return the registry-declared category membership.
- require(value)[source]¶
Return one category only when this projection declares it.
- Return type:
- Parameters:
value (object)
- projection(name)[source]¶
Return one explicit category membership projection.
- Return type:
- Parameters:
name (str)
- category_for_operation_type(operation_type)[source]¶
Return the category declared for an operation-type token.
- Return type:
- Parameters:
operation_type (str)
- resolve_iva_category_catalogue(*, effective_date=None, authority=None)[source]¶
Resolve the complete IVA category vocabulary through fact 0084.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- require_iva_category(value, *, effective_date=None, authority=None)[source]¶
Return one registry-declared IVA category or refuse it.
- Return type:
- Parameters:
value (object)
effective_date (date | None)
authority (GovernedFactSource | None)
- registry_category_projection(name, *, effective_date=None, authority=None)[source]¶
Return one explicit category projection from fact 0084.
- Return type:
- Parameters:
name (str)
effective_date (date | None)
authority (GovernedFactSource | None)