Skip to content

Commit

Permalink
fix: request body on webhook api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin committed Dec 1, 2023
1 parent 35b703c commit 40bb76d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Resources/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace EcomPHP\TiktokShop\Resources;

use EcomPHP\TiktokShop\Resource;
use GuzzleHttp\RequestOptions;

class Event extends Resource
{
Expand All @@ -24,15 +25,19 @@ public function getShopWebhooks()
public function updateShopWebhook($event_type, $webhook_url)
{
return $this->call('PUT', 'webhooks', [
'address' => $webhook_url,
'event_type' => $event_type,
RequestOptions::JSON => [
'address' => $webhook_url,
'event_type' => $event_type,
]
]);
}

public function deleteShopWebhook($event_type)
{
return $this->call('DELETE', 'webhooks', [
'event_type' => $event_type,
RequestOptions::JSON => [
'event_type' => $event_type,
]
]);
}
}

0 comments on commit 40bb76d

Please sign in to comment.