code: private function isExistingOrder(Order $order)
      {
          $shopIdentity = $this->identityService->findOneBy([
              'objectIdentifier' => $order->getShopIdentifier(),
              'objectType' => Shop::TYPE,
              'adapterName' => PlentymarketsAdapter::NAME,
          ]);
  
          if (null === $shopIdentity) {
              throw new NotFoundException('shop not mapped');
          }
  
          $result = $this->client->request('GET', 'orders', [
              'externalOrderId' => $order->getOrderNumber(),
          ]);
  
          $result = array_filter($result, function (array $order) use ($shopIdentity) {
              return (int) $order['plentyId'] === $shopIdentity->getAdapterIdentifier();
          });
  
          if (!empty($result)) {
              return true;
          }
  
          return false;
      }
docs: @param Order $order
  
  @return bool