cadrumo.domain.calculations.registry.applicability_payer_facts module

Typed payer-fact predicates and projections for modelo applicability.

class PayerFact(*values)[source]

Bases: StrEnum

Application-mechanics payer facts not owned by the dated catalogue.

PAYS_WITHHELD_INCOME
PAYS_RENT_WITH_RETENCION
TRADES_INTRACOMMUNITY
IVA_GROUP_MEMBER
IVA_GROUP_DOMINANT_ENTITY
OSS_ENROLLED
class PayerFactProjection(token, profile_key, label, legal_refs)[source]

Bases: object

One dated, registry-owned payer-applicability declaration.

Parameters:
token: str
profile_key: str
label: str
legal_refs: tuple[str, ...]
resolve_payer_fact_catalogue(*, effective_date=None, authority=None)[source]

Resolve the selected dated payer-applicability entity set.

Core types: ValidatedRegistryAuthority.

Return type:

tuple[PayerFactProjection, ...]

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

Resolve a raw applicability token through mechanics or the dated fact.

Core types: ValidatedRegistryAuthority.

Return type:

TypeAliasType

Parameters:
payer_fact_holds(profile, fact)[source]

Return whether profile positively declares the supplied payer fact.

Core types: TaxpayerProfile.

Return type:

bool

Parameters:
payer_fact_profile_keys(fact)[source]

Return profile fields needed to answer an applicability fact.

Return type:

tuple[str, ...]

Parameters:

fact (PayerFactValue)