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 TaxpayerProfile from a profile-values mapping.

The mapping is projected through the descriptor’s project_answers so canonical-token semantics for every boolean / select / text field stay in lockstep with the wizard’s on-prompt validation. Missing identity fields fall back to tax_id_default. Missing IVA regime falls back to NO_APLICA for natural persons without economic-activity income and to iva_regime_default for profiles that still require an IVA regime declaration.

Return type:

TaxpayerProfile

Parameters: