Skip to content

Add NFCom substituição support and expand test coverage#18

Merged
keithyoder merged 1 commit into
mainfrom
substituicoes
Mar 31, 2026
Merged

Add NFCom substituição support and expand test coverage#18
keithyoder merged 1 commit into
mainfrom
substituicoes

Conversation

@keithyoder
Copy link
Copy Markdown
Owner

@keithyoder keithyoder commented Mar 31, 2026

  • Add substituição validations to Nota#erros (chave presence, 44-digit format, motivo presence)
  • Implement gerar_sub in XmlBuilder, emitting gSub group with chNFCom and motSub when finalidade == :substituicao
  • Update CHANGELOG for 0.1.1 and 0.1.2
  • Add spec/nfcom/builder/signature_spec.rb (crypto verification with ephemeral self-signed cert)
  • Add spec/nfcom/builder/xml_builder_spec.rb (full XML structure, gSub presence/position, element ordering)
  • Expand nota_spec.rb with substituição validation contexts, finalidade_codigo, autorizada?, and informacoes_adicionais limits

- Add `chave_nfcom_substituida` and `motivo_substituicao` attrs to Nota
- Add substituição validations to `Nota#erros` (chave presence, 44-digit
  format, motivo presence)
- Implement `gerar_sub` in XmlBuilder, emitting `gSub` group with
  `chNFCom` and `motSub` when `finalidade == :substituicao`
- Update CHANGELOG for 0.1.1 and 0.1.2
- Add spec/nfcom/builder/signature_spec.rb (crypto verification with
  ephemeral self-signed cert)
- Add spec/nfcom/builder/xml_builder_spec.rb (full XML structure,
  gSub presence/position, element ordering)
- Expand nota_spec.rb with substituição validation contexts,
  finalidade_codigo, autorizada?, and informacoes_adicionais limits
@keithyoder keithyoder merged commit 5592eac into main Mar 31, 2026
5 checks passed
@keithyoder keithyoder deleted the substituicoes branch March 31, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant