Commit 9fc8862
fix: update webhook endpoints to company-scoped /webhooks
- Change webhook URI from `/hooks` to `/webhooks` in APIResource
- Make NFe_Webhook methods company-scoped (matching ServiceInvoice pattern)
- `create($companyId, $attributes)` instead of `create($attributes)`
- `fetch($companyId, $webhookId)` instead of `fetch($key)`
- `search($companyId, $options)` instead of `search($options)`
This aligns the PHP SDK with the Node.js SDK v3 where webhooks are
scoped under `/companies/{companyId}/webhooks/{webhookId}`.
The old global `/hooks/{id}` endpoint returns 404, causing webhook
operations to fail silently.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3890f79 commit 9fc8862
2 files changed
Lines changed: 35 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
5 | 14 | | |
6 | 15 | | |
7 | 16 | | |
8 | | - | |
9 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
10 | 26 | | |
11 | 27 | | |
12 | | - | |
13 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
14 | 37 | | |
15 | 38 | | |
16 | | - | |
17 | | - | |
| 39 | + | |
| 40 | + | |
18 | 41 | | |
19 | 42 | | |
20 | | - | |
21 | | - | |
| 43 | + | |
| 44 | + | |
22 | 45 | | |
23 | 46 | | |
24 | | - | |
25 | | - | |
| 47 | + | |
| 48 | + | |
26 | 49 | | |
27 | 50 | | |
0 commit comments