docs(emission): fix stale schemas.py docstring re FiscalResultPayload/TributoLinhaPayload

MINOR (F2 review): the module docstring claimed FiscalResult/TributoLinha
'are NOT re-mirrored here' but the file defines FiscalResultPayload/
TributoLinhaPayload right below it. Corrects the prose to describe reality:
they ARE re-mirrored, deliberately kept separate from the lib's own pydantic
classes (this module is the wire contract the service owns), converted via
emission.service._to_fiscal_result/_to_tributo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jonatanritter
2026-08-08 15:37:15 -03:00
co-authored by Claude Opus 4.8
parent c2d2d30b70
commit 4b8532c604
+10 -3
View File
@@ -1,9 +1,16 @@
"""Task 5: `EmissaoRequest` -- the pydantic mirror of `sowai_fiscal.
xml_builder.DadosEmissao` (+ `sowai_fiscal.resolver.FiscalResult`/
`TributoLinha`, which the lib itself already defines as pydantic
`BaseModel`s -- these two are NOT re-mirrored here as separate payload
classes, `emission.service` constructs them straight via `FiscalResult(**
...)`/`TributoLinha(**...)`), adapted per the porte table and design spec:
`BaseModel`s -- FIX 6, F2 review: these two ARE re-mirrored here, as
`FiscalResultPayload`/`TributoLinhaPayload` below, kept SEPARATE from the
lib's own classes on purpose -- this module is the wire contract this
SERVICE owns (a field the lib adds/renames should never silently change
what a caller across the network is allowed to send), while the lib's
`FiscalResult`/`TributoLinha` are what `sowai_fiscal.xml_builder.build_nfe`
actually consumes internally. `emission.service._to_fiscal_result`/
`_to_tributo` convert Payload -> lib class (`FiscalResult(**payload.
model_dump())`, not the payload objects themselves), adapted per the porte
table and design spec:
* `tenant_ref`/`branch_ref` (opaque strings, decision #4) replace what in
the auto was implicit (`sale.branch_id`).