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: object

One registry-declared taxpayer entity type and its legal semantics.

Parameters:
token: EntityType
description: str
tax_regime: str
legal_refs: tuple[str, ...]
class LegalEntityFormDefinition(token, description, entity_type, legal_refs, choice_description)[source]

Bases: object

One registry-declared legal form and its governing entity axis.

Parameters:
token: LegalEntityForm
description: str
entity_type: EntityType
legal_refs: tuple[str, ...]
choice_description: bool
class EntityVocabulary(entity_types, legal_entity_forms)[source]

Bases: object

Complete typed projection of fact taxpayer-entity-vocabulary.

Parameters:
entity_types: tuple[EntityTypeDefinition, ...]
legal_entity_forms: tuple[LegalEntityFormDefinition, ...]
property all_entity_types: frozenset[EntityType]

Return every taxpayer entity type declared by the registry.

Return every legal-entity form declared by the registry.

require_entity_type(value)[source]

Validate and return one registry-declared entity type.

Return type:

EntityType

Parameters:

value (object)

Validate and return one registry-declared legal-entity form.

Return type:

LegalEntityForm

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:

EntityVocabulary

Parameters:
require_entity_type(value, *, effective_date=None, authority=None)[source]

Return an entity-type token only when fact 0124 declares it.

Return type:

EntityType

Parameters:

Return a legal-form token only when fact 0124 declares it.

Return type:

LegalEntityForm

Parameters:
entity_type_tokens(*, effective_date=None, authority=None)[source]

Return entity-type choices in the authored order.

Return type:

tuple[EntityType, ...]

Parameters:
legal_entity_form_tokens(*, effective_date=None, authority=None)[source]

Return legal-form choices in the authored order.

Return type:

tuple[LegalEntityForm, ...]

Parameters:
legal_entity_form_choice_description_tokens(*, effective_date=None, authority=None)[source]

Return legal-form tokens whose registry metadata enables choice copy.

Return type:

tuple[LegalEntityForm, ...]

Parameters:
entity_type_natural_person_token(*, effective_date=None, authority=None)[source]

Return the registry-declared natural-person entity token.

Return type:

EntityType

Parameters:

Return the registry-declared legal-entity token.

Return type:

EntityType

Parameters:
entity_type_attribution_entity_token(*, effective_date=None, authority=None)[source]

Return the registry-declared attribution-entity token.

Return type:

EntityType

Parameters:
legal_entity_form_sin_fines_lucrativos_token(*, effective_date=None, authority=None)[source]

Return the registry-declared non-profit legal-form token.

Return type:

LegalEntityForm

Parameters: