fix: update webhook endpoints to api.nfse.io/v2#18
Closed
ianchamba wants to merge 1 commit into
Closed
Conversation
ianchamba
force-pushed
the
fix/update-webhook-endpoints
branch
from
March 3, 2026 20:16
9fc8862 to
6806d8b
Compare
ianchamba
force-pushed
the
fix/update-webhook-endpoints
branch
2 times, most recently
from
March 3, 2026 20:26
d5aa952 to
d3914d7
Compare
- Rename 'hooks' to 'webhooks' in APIResource objectBaseURI mapping - Override endpointAPI() in NFe_Webhook to use https://api.nfse.io/v2/webhooks instead of the deprecated api.nfe.io/v1/hooks endpoint - Override CRUD methods to handle v2 response structure where webhook data is wrapped in "webHook" (camelCase singular) instead of "webhooks" - Update WebhookTest.php to use v2 response properties (uri instead of url) - Webhook methods remain simple (no company scope needed) API v2 response example: {"webHook": {"id": "...", "uri": "...", "secret": "...", "status": "Active"}} Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
Fechando como superado. O contrato de webhooks já foi resolvido no #21 ( Dois motivos tornam este PR obsoleto:
Obrigado pela contribuição — o objetivo (mover os webhooks para |
andrenfe
added a commit
that referenced
this pull request
Jul 14, 2026
A skill versionada no repo estava na baseline v3.1.0 — duas releases atrás. (As atualizações de v3.2.0 haviam sido aplicadas na cópia local ~/.claude, removida quando a skill passou a ser versionada aqui.) v3.2.0 (add-safe-retry-idempotency): - Retry method-aware (tabela de decisão; POST não retenta em 5xx/ambíguo; Idempotency-Key restaura retry pleno mas a API ainda não honra o header). - FailurePhase + failurePhase/curlErrno na ApiConnectionException. - Override de retry por chamada (RequestOptions->retry). - findByExternalId (rota /external, contrato de coleção, miss=200 lista vazia, lag de indexação) + isDuplicateExternalId + ciclo de emissão idempotente. - Pitfalls #17/#18; decision tree; descrições dos reference files. v3.3.0 (expand-service-invoice-dto): - ServiceInvoice: campos tipados number/checkCode/description/cityServiceCode/ baseTaxAmount/issRate/issTaxAmount/amountNet + borrower (Borrower DTO, federalTaxNumber int|string|null). - raw agora populado (SDK-wide, por item em list); provider via raw['provider']. - totalAmount documentado como phantom @deprecated (sempre null) — pitfall #19. - Nota sobre o teste de alinhamento YAML<->DTO (ancorado por path). Fatos verificados contra o src/ (ordem dos args de RequestOptions, cases do FailurePhase, allowlist de errnos 5/6/7/35, assinatura static de isDuplicateExternalId, campos do Borrower).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api.nfe.io/v1/hookstoapi.nfse.io/v2/webhooks/v1/hooks/{id}) returns 404 - webhooks now live atapi.nfse.io/v2/webhooks/{id}Changes
lib/NFe/APIResource.phpobjectBaseURI()mapping:'hooks'->'webhooks'lib/NFe/Webhook.phpendpointAPI()override to usehttps://api.nfse.io/v2/webhooksas base URLapi.nfe.io/v1as beforeTest plan
NFe_Webhook::fetch($webhookId)hitsapi.nfse.io/v2/webhooks/{id}NFe_Webhook::create($data)POSTs toapi.nfse.io/v2/webhooksapi.nfe.io/v1🤖 Generated with Claude Code