-
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.
- Loading branch information
1 parent
3ae4fa3
commit fc59e37
Showing
40 changed files
with
1,157 additions
and
27 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
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/AddressCreatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Address; | ||
use Paddle\SDK\Notifications\Events\AddressCreated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class AddressCreatedNotification extends Notification | ||
{ | ||
public readonly Address $address; | ||
|
||
private function __construct(string $id, AddressCreated $event) | ||
{ | ||
$this->address = $event->address; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param AddressCreated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/AddressUpdatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Address; | ||
use Paddle\SDK\Notifications\Events\AddressUpdated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class AddressUpdatedNotification extends Notification | ||
{ | ||
public readonly Address $address; | ||
|
||
private function __construct(string $id, AddressUpdated $event) | ||
{ | ||
$this->address = $event->address; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param AddressUpdated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/AdjustmentCreatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Adjustment; | ||
use Paddle\SDK\Notifications\Events\AdjustmentCreated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class AdjustmentCreatedNotification extends Notification | ||
{ | ||
public readonly Adjustment $adjustment; | ||
|
||
private function __construct(string $id, AdjustmentCreated $event) | ||
{ | ||
$this->adjustment = $event->adjustment; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param AdjustmentCreated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/AdjustmentUpdatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Adjustment; | ||
use Paddle\SDK\Notifications\Events\AdjustmentUpdated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class AdjustmentUpdatedNotification extends Notification | ||
{ | ||
public readonly Adjustment $adjustment; | ||
|
||
private function __construct(string $id, AdjustmentUpdated $event) | ||
{ | ||
$this->adjustment = $event->adjustment; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param AdjustmentUpdated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/BusinessCreatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Business; | ||
use Paddle\SDK\Notifications\Events\BusinessCreated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class BusinessCreatedNotification extends Notification | ||
{ | ||
public readonly Business $business; | ||
|
||
private function __construct(string $id, BusinessCreated $event) | ||
{ | ||
$this->business = $event->business; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param BusinessCreated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/BusinessUpdatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Business; | ||
use Paddle\SDK\Notifications\Events\BusinessUpdated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class BusinessUpdatedNotification extends Notification | ||
{ | ||
public readonly Business $business; | ||
|
||
private function __construct(string $id, BusinessUpdated $event) | ||
{ | ||
$this->business = $event->business; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param BusinessUpdated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/CustomerCreatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Customer; | ||
use Paddle\SDK\Notifications\Events\CustomerCreated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class CustomerCreatedNotification extends Notification | ||
{ | ||
public readonly Customer $customer; | ||
|
||
private function __construct(string $id, CustomerCreated $event) | ||
{ | ||
$this->customer = $event->customer; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param CustomerCreated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/CustomerUpdatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Customer; | ||
use Paddle\SDK\Notifications\Events\CustomerUpdated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class CustomerUpdatedNotification extends Notification | ||
{ | ||
public readonly Customer $customer; | ||
|
||
private function __construct(string $id, CustomerUpdated $event) | ||
{ | ||
$this->customer = $event->customer; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param CustomerUpdated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Notifications/Notification/DiscountCreatedNotification.php
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Paddle\SDK\Notifications\Notification; | ||
|
||
use Paddle\SDK\Entities\Event; | ||
use Paddle\SDK\Notifications\Entities\Discount; | ||
use Paddle\SDK\Notifications\Events\DiscountCreated; | ||
use Paddle\SDK\Notifications\Notification; | ||
|
||
final class DiscountCreatedNotification extends Notification | ||
{ | ||
public readonly Discount $discount; | ||
|
||
private function __construct(string $id, DiscountCreated $event) | ||
{ | ||
$this->discount = $event->discount; | ||
|
||
parent::__construct($id, $event); | ||
} | ||
|
||
/** | ||
* @param DiscountCreated $event | ||
*/ | ||
protected static function fromEvent(string $id, Event $event): static | ||
{ | ||
return new self($id, $event); | ||
} | ||
} |
Oops, something went wrong.