-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Implement missing events, add readonly entity properties and add…
…itional test coverage
- Loading branch information
1 parent
009ef00
commit 7de34b3
Showing
88 changed files
with
4,990 additions
and
89 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
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
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
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\Entity; | ||
use Paddle\SDK\Notifications\Entities\Price; | ||
|
||
final class PriceImported extends Event | ||
{ | ||
private function __construct( | ||
string $eventId, | ||
EventTypeName $eventType, | ||
\DateTimeInterface $occurredAt, | ||
public readonly Price $price, | ||
string|null $notificationId, | ||
) { | ||
parent::__construct($eventId, $eventType, $occurredAt, $price, $notificationId); | ||
} | ||
|
||
/** | ||
* @param Price $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
Oops, something went wrong.