Skip to content

feat(webhooks): add createdAt + testmode fields to WebhookEvent#24

Closed
sandervanhooft wants to merge 1 commit into
mainfrom
claude/confident-khayyam-7438c9
Closed

feat(webhooks): add createdAt + testmode fields to WebhookEvent#24
sandervanhooft wants to merge 1 commit into
mainfrom
claude/confident-khayyam-7438c9

Conversation

@sandervanhooft
Copy link
Copy Markdown
Member

Summary

  • Adds createdAt (ISO 8601 string) and testmode (bool) to the webhook event payload, mirroring the new server-side fields.
  • Webhook::parse() now requires both fields and exposes them on WebhookPayload. The WebhookEvent API resource picks them up the same way.
  • Updates the OpenAPI schema, docs/Webhooks.md property table + example, and tests.

Consumers can now dedupe/route on event time and testmode without reaching into the embedded object.

Test plan

  • vendor/bin/phpunit — 96 tests, 544 assertions, all green (new cases cover testmode=true, both fields required, and the resource hydrates them).
  • vendor/bin/phpstan analyse — no errors.

🤖 Generated with Claude Code

Webhook deliveries now carry the event timestamp and the test/live mode
of the originating resource, so consumers can dedupe on time and route
test traffic without inspecting the embedded object.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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