aeat.domain.deadlines._profiles module¶
Profile construction helpers for deadline and schedule consumers.
The helper projects a ProfileRecord.values-shaped mapping into an
TaxpayerProfile by deferring to the wizard descriptor’s
typed projection (project_answers). The wizard catalogue is the
single source of truth for the canonical-token shape of every field;
this helper composes the typed answer over the deadline-engine’s
record.
- taxpayer_profile_from_mapping(values, *, tax_id_default, iva_regime_default=IVARegime.GENERAL)[source]¶
Build an
TaxpayerProfilefrom a profile-values mapping.The mapping is projected through the descriptor’s
project_answersso canonical-token semantics for every boolean / select / text field stay in lockstep with the wizard’s on-prompt validation. Missing identity fields fall back totax_id_default. Missing IVA regime falls back toNO_APLICAfor natural persons without economic-activity income and toiva_regime_defaultfor profiles that still require an IVA regime declaration.