cadrumo.domain.calculations.registry.iva_rate_kind_catalogue module¶
Typed projection of the governed IVA rate-kind catalogue.
- class IvaRateKindDefinition(token, description, category)[source]¶
Bases:
objectOne registry-declared IVA rate tier and its category projection.
- Parameters:
token (IvaRateKind)
description (str)
category (str)
-
token:
IvaRateKind¶
- class IvaRateKindCatalogue(definitions, positive_kinds, zero_token, exempt_token, non_rate_token)[source]¶
Bases:
objectTyped projection of the dated IVA rate-kind vocabulary.
- Parameters:
definitions (tuple[IvaRateKindDefinition, ...])
positive_kinds (tuple[IvaRateKind, ...])
zero_token (IvaRateKind)
exempt_token (IvaRateKind)
non_rate_token (str)
-
definitions:
tuple[IvaRateKindDefinition,...]¶
-
positive_kinds:
tuple[IvaRateKind,...]¶
-
zero_token:
IvaRateKind¶
-
exempt_token:
IvaRateKind¶
- property all_kinds: frozenset[IvaRateKind]¶
Return every rate-kind token declared by the registry.
- require(value)[source]¶
Return one token only when it belongs to this registry projection.
- Return type:
- Parameters:
value (object)
- definition(value)[source]¶
Return the registry definition for one rate-kind token.
- Return type:
- Parameters:
value (object)
- resolve_iva_rate_kind_catalogue(*, effective_date=None, authority=None)[source]¶
Resolve the complete IVA rate-kind vocabulary through fact 0094.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- require_iva_rate_kind(value, *, effective_date=None, authority=None)[source]¶
Return one rate-kind token only when fact 0094 declares it.
- Return type:
- Parameters:
value (object)
effective_date (date | None)
authority (GovernedFactSource | None)
- require_registry_declared_iva_rate_kind(value, *, effective_date)[source]¶
Return one rate-kind token declared by the facts a validation is validating.
A registry validator resolves its vocabulary from the candidate in scope, never from the published authority: the artifact reader validates the document it has just decoded while holding the shared-artifact lock, so a validator reaching for the bundle asks that lock for the artifact it is in the middle of producing and the process stops there. Absence of a scope is a refusal rather than a fallback, because the fallback is the deadlock.
- Return type:
- Parameters: