-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
97 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Setono\PeakWMS\Client\Endpoint; | ||
|
||
use Setono\PeakWMS\DataTransferObject\Webhook\Webhook; | ||
|
||
/** | ||
* @extends Endpoint<Webhook> | ||
*/ | ||
final class WebhookEndpoint extends Endpoint implements WebhookEndpointInterface | ||
{ | ||
/** | ||
* @use CreatableEndpointTrait<Webhook> | ||
*/ | ||
use CreatableEndpointTrait; | ||
|
||
use DeletableEndpointTrait; | ||
|
||
protected static function getDataClass(): string | ||
{ | ||
return Webhook::class; | ||
} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Setono\PeakWMS\Client\Endpoint; | ||
|
||
use Setono\PeakWMS\DataTransferObject\Webhook\Webhook; | ||
|
||
/** | ||
* @extends EndpointInterface<Webhook> | ||
* @extends CreatableEndpointInterface<Webhook> | ||
*/ | ||
interface WebhookEndpointInterface extends EndpointInterface, CreatableEndpointInterface, DeletableEndpointInterface | ||
{ | ||
} |
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,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Setono\PeakWMS\DataTransferObject\Webhook; | ||
|
||
enum Name: int | ||
{ | ||
case StockAdjust = 100; | ||
case EanUpdates = 101; | ||
case PickOrderPacked = 102; | ||
case InboundOrderClosed = 103; | ||
case OrderRefunded = 104; | ||
case ProductCreateUpdate = 105; | ||
case FulfillmentNotPossible = 106; | ||
case InboundDeliveryClosed = 107; | ||
case OrderSendAgain = 108; | ||
case OrderStateChanged = 109; | ||
case PickOrderFullyPacked = 110; | ||
} |
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,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Setono\PeakWMS\DataTransferObject\Webhook; | ||
|
||
use Setono\PeakWMS\DataTransferObject\AbstractDataTransferObject; | ||
|
||
/** | ||
* See https://api.peakwms.com/api/documentation/index.html#model-WebhookDto | ||
*/ | ||
final class Webhook extends AbstractDataTransferObject | ||
{ | ||
public function __construct( | ||
public Name $name, | ||
public string $url, | ||
public ?int $id = null, | ||
) { | ||
} | ||
} |