diff --git a/src/Client/Client.php b/src/Client/Client.php index 46d352a..d41b4d2 100644 --- a/src/Client/Client.php +++ b/src/Client/Client.php @@ -28,6 +28,10 @@ public function __construct( */ public function upsertContacts(array $body): void { + if (empty($body)) { + return; + } + $response = $this->client->sendRequest( $this->requestFactory->createRequest( 'POST', @@ -49,6 +53,10 @@ public function upsertContacts(array $body): void */ public function upsertProducts(array $body): void { + if (empty($body)) { + return; + } + $response = $this->client->sendRequest( $this->requestFactory->createRequest( 'POST', @@ -72,6 +80,10 @@ public function upsertProducts(array $body): void */ public function upsertOrders(array $body): void { + if (empty($body)) { + return; + } + $response = $this->client->sendRequest( $this->requestFactory->createRequest( 'POST', @@ -210,6 +222,10 @@ private function processResponse(ResponseInterface $response): void */ public function upsertDeals(array $body): void { + if (empty($body)) { + return; + } + $response = $this->client->sendRequest( $this->requestFactory->createRequest( 'POST',