Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add optional notification ID to events #74

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

davidgrayston-paddle
Copy link
Contributor

@davidgrayston-paddle davidgrayston-paddle commented Sep 16, 2024

Added

  • Support for notification_id on notification events

Usage

use Paddle\SDK\Entities\Event;
use Paddle\SDK\Entities\Transaction;
use Paddle\SDK\Notifications\Events\TransactionUpdated;

$event = Event::fromRequest($request);
$id = $event->notificationId;
$eventId = $event->eventId;
$eventType = $event->eventType;
$occurredAt = $event->occurredAt;

if ($event instanceof TransactionUpdated) {
    $transactionId = $event->transaction->id;
}

@davidgrayston-paddle davidgrayston-paddle self-assigned this Sep 16, 2024
@davidgrayston-paddle davidgrayston-paddle changed the title Feature: Add optional notification ID to events feat: Add optional notification ID to events Sep 16, 2024
vifer
vifer previously approved these changes Sep 17, 2024
@davidgrayston-paddle davidgrayston-paddle merged commit 750cac7 into main Sep 18, 2024
4 checks passed
@davidgrayston-paddle davidgrayston-paddle deleted the feat/event-notification-id branch September 18, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants