cadrumo.domain.calculations.registry.iva_rate_role_catalogue module

Typed projection of the IVA rate-role vocabulary and default.

class IvaRateRole(value, *, _registry_validated=False)[source]

Bases: str

Opaque IVA rate-role token projected from the facts registry.

Parameters:
  • value (str)

  • _registry_validated (bool)

Return type:

Self

classmethod from_registry(value)[source]

Construct the typed value from its canonical registry token.

Return type:

Self

Parameters:

value (str)

property value: str

Return the persisted registry token.

class IvaRateRoleDefinition(token, is_default, supersedes_tier_default)[source]

Bases: object

One registry-declared rate role and its selector semantics.

Parameters:
token: IvaRateRole
is_default: bool
supersedes_tier_default: bool
class IvaRateRoleCatalogue(definitions, default_role)[source]

Bases: object

Dated projection of the rate-role selector vocabulary.

Parameters:
definitions: tuple[IvaRateRoleDefinition, ...]
default_role: IvaRateRole
property roles: tuple[IvaRateRole, ...]

Return roles in registry-authored order.

require(value=None)[source]

Return a declared role, or the declared default when omitted.

Return type:

IvaRateRole

Parameters:

value (object | None)

resolve_iva_rate_role_catalogue(*, effective_date=None, authority=None)[source]

Resolve the IVA rate-role vocabulary through the selected facts authority.

Return type:

IvaRateRoleCatalogue

Parameters: