cadrumo.domain.calculations.registry.entity_type module¶
Typed projections for the taxpayer entity and legal-form vocabulary.
- class EntityTypeDefinition(token, description, tax_regime, legal_refs)[source]¶
Bases:
objectOne registry-declared taxpayer entity type and its legal semantics.
- Parameters:
token (EntityType)
description (str)
tax_regime (str)
-
token:
EntityType¶
- class LegalEntityFormDefinition(token, description, entity_type, legal_refs, choice_description)[source]¶
Bases:
objectOne registry-declared legal form and its governing entity axis.
- Parameters:
token (LegalEntityForm)
description (str)
entity_type (EntityType)
choice_description (bool)
-
token:
LegalEntityForm¶
-
entity_type:
EntityType¶
- class EntityVocabulary(entity_types, legal_entity_forms)[source]¶
Bases:
objectComplete typed projection of fact
taxpayer-entity-vocabulary.- Parameters:
entity_types (tuple[EntityTypeDefinition, ...])
legal_entity_forms (tuple[LegalEntityFormDefinition, ...])
-
entity_types:
tuple[EntityTypeDefinition,...]¶
-
legal_entity_forms:
tuple[LegalEntityFormDefinition,...]¶
- property all_entity_types: frozenset[EntityType]¶
Return every taxpayer entity type declared by the registry.
- property all_legal_entity_forms: frozenset[LegalEntityForm]¶
Return every legal-entity form declared by the registry.
- require_entity_type(value)[source]¶
Validate and return one registry-declared entity type.
- Return type:
- Parameters:
value (object)
- resolve_entity_vocabulary(*, effective_date=None, authority=None)[source]¶
Resolve and validate all entity types and legal forms from fact 0124.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- require_entity_type(value, *, effective_date=None, authority=None)[source]¶
Return an entity-type token only when fact 0124 declares it.
- Return type:
- Parameters:
value (object)
effective_date (date | None)
authority (GovernedFactSource | None)
- require_legal_entity_form(value, *, effective_date=None, authority=None)[source]¶
Return a legal-form token only when fact 0124 declares it.
- Return type:
- Parameters:
value (object)
effective_date (date | None)
authority (GovernedFactSource | None)
- entity_type_tokens(*, effective_date=None, authority=None)[source]¶
Return entity-type choices in the authored order.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- legal_entity_form_tokens(*, effective_date=None, authority=None)[source]¶
Return legal-form choices in the authored order.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- legal_entity_form_choice_description_tokens(*, effective_date=None, authority=None)[source]¶
Return legal-form tokens whose registry metadata enables choice copy.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- entity_type_natural_person_token(*, effective_date=None, authority=None)[source]¶
Return the registry-declared natural-person entity token.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- entity_type_legal_entity_token(*, effective_date=None, authority=None)[source]¶
Return the registry-declared legal-entity token.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- entity_type_attribution_entity_token(*, effective_date=None, authority=None)[source]¶
Return the registry-declared attribution-entity token.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)
- legal_entity_form_sin_fines_lucrativos_token(*, effective_date=None, authority=None)[source]¶
Return the registry-declared non-profit legal-form token.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)