-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add optional notification ID to events (#74)
- Loading branch information
1 parent
bc1d683
commit 750cac7
Showing
89 changed files
with
5,204 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Events; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Entities\Event\EventTypeName; | ||
use Paddle\SDK\Notifications\Entities\Address; | ||
use Paddle\SDK\Notifications\Entities\Entity; | ||
|
||
final class AddressImported extends Event | ||
{ | ||
private function __construct( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
public readonly Address $address, | ||
string|null $notificationId, | ||
) { | ||
parent::__construct($eventId, $eventType, $occurredAt, $address, $notificationId); | ||
} | ||
|
||
/** | ||
* @param Address $data | ||
*/ | ||
public static function fromEvent( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
Entity $data, | ||
string|null $notificationId = null, | ||
): static { | ||
return new self($eventId, $eventType, $occurredAt, $data, $notificationId); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Events; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Entities\Event\EventTypeName; | ||
use Paddle\SDK\Notifications\Entities\Business; | ||
use Paddle\SDK\Notifications\Entities\Entity; | ||
|
||
final class BusinessImported extends Event | ||
{ | ||
private function __construct( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
public readonly Business $business, | ||
string|null $notificationId, | ||
) { | ||
parent::__construct($eventId, $eventType, $occurredAt, $business, $notificationId); | ||
} | ||
|
||
/** | ||
* @param Business $data | ||
*/ | ||
public static function fromEvent( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
Entity $data, | ||
string|null $notificationId = null, | ||
): static { | ||
return new self($eventId, $eventType, $occurredAt, $data, $notificationId); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Events; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Entities\Event\EventTypeName; | ||
use Paddle\SDK\Notifications\Entities\Customer; | ||
use Paddle\SDK\Notifications\Entities\Entity; | ||
|
||
final class CustomerImported extends Event | ||
{ | ||
private function __construct( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
public readonly Customer $customer, | ||
string|null $notificationId, | ||
) { | ||
parent::__construct($eventId, $eventType, $occurredAt, $customer, $notificationId); | ||
} | ||
|
||
/** | ||
* @param Customer $data | ||
*/ | ||
public static function fromEvent( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
Entity $data, | ||
string|null $notificationId = null, | ||
): static { | ||
return new self($eventId, $eventType, $occurredAt, $data, $notificationId); | ||
} | ||
} |
This file contains 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
Oops, something went wrong.