Source code for cadrumo.domain.renta.rental_reduction
"""Opaque token contract for the registry-owned rental-reduction axis.The membership, selection semantics, and legal provenance are governed by thedated facts registry. This module deliberately retains only the transport typeused by profile and binding surfaces; callers must resolve a token through thetyped registry projection before using it as a calculation selector."""from__future__importannotationsfrom...core.errors.hierarchyimportpydantic_validation_boundary__all__=["RentalReductionArt232Tier"]
[docs]classRentalReductionArt232Tier(str):"""Opaque registry-projected rental-reduction token. Membership is intentionally absent here. The registry projection validates the token against the selected dated catalogue and refuses unknown values; this class exists only to preserve the typed transport boundary. """__slots__=()@classmethoddef__get_pydantic_core_schema__(cls,_source_type:object,_handler:object)->object:"""Expose the opaque token as a string to Pydantic."""frompydantic_coreimportcore_schemareturncore_schema.no_info_after_validator_function(pydantic_validation_boundary(cls),core_schema.str_schema())@propertydefvalue(self)->str:"""Return the token for string-oriented serialization."""returnstr(self)