From 2598da25cd73fb8a95a38f7961abf10e83516131 Mon Sep 17 00:00:00 2001 From: mihajlstje <54983935+mihajlstje@users.noreply.github.com> Date: Sat, 7 Sep 2024 16:26:28 +0200 Subject: [PATCH] add webhook resource (#4) --- src/Client.php | 13 ++++++++++--- src/Resources/Webhook.php | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 src/Resources/Webhook.php diff --git a/src/Client.php b/src/Client.php index 588fc3d..157f8cf 100644 --- a/src/Client.php +++ b/src/Client.php @@ -27,15 +27,14 @@ use Leventcz\Parasut\Resources\Transaction; use Leventcz\Parasut\Resources\WareHouse; use Leventcz\Parasut\Resources\SalesOffer; +use Leventcz\Parasut\Resources\Webhook; readonly class Client { /** * @param HttpClientInterface $httpClient */ - public function __construct(private HttpClientInterface $httpClient) - { - } + public function __construct(private HttpClientInterface $httpClient) {} /** * @return SalesInvoice @@ -212,4 +211,12 @@ public function salesOffer(): SalesOffer { return new SalesOffer($this->httpClient); } + + /** + * @return Webhook + */ + public function webhook(): Webhook + { + return new Webhook($this->httpClient); + } } diff --git a/src/Resources/Webhook.php b/src/Resources/Webhook.php new file mode 100644 index 0000000..5e62cdc --- /dev/null +++ b/src/Resources/Webhook.php @@ -0,0 +1,23 @@ +