Adapter/PlentymarketsAdapter/ResponseParser/Product/Price/PriceResponseParser.php
private function getPriceConfigurations()
    {
        static $priceConfigurations;

        if (null === $priceConfigurations) {
            $priceConfigurations = $this->itemsSalesPricesApi->findAll();

            $shopIdentities = $this->identityService->findBy([
                'adapterName' => PlentymarketsAdapter::NAME,
                'objectType' => Shop::TYPE,
            ]);

            $shopIdentities = array_filter($shopIdentities, function (Identity $identity) {
                $isMappedIdentity = $this->identityService->isMappedIdentity(
                    $identity->getObjectIdentifier(),
                    $identity->getObjectType(),
                    $identity->getAdapterName()
                );

                if (!$isMappedIdentity) {
                    return false;
                }

                return true;
            });

            if (empty($shopIdentities)) {
                $priceConfigurations = [];

                return $priceConfigurations;
            }

            $priceConfigurations = array_filter($priceConfigurations,
                function ($priceConfiguration) use ($shopIdentities) {
                    foreach ($shopIdentities as $identity) {
                        foreach ((array) $priceConfiguration['clients'] as $client) {
                            if ($client['plentyId'] === -1 || $identity->getAdapterIdentifier() === (string) $client['plentyId']) {
                                return true;
                            }
                        }
                    }

                    return false;
                });

            if (empty($priceConfigurations)) {
                $this->logger->notice('no valid price configuration found');
            }
        }

        return $priceConfigurations;
    }
private function getPriceConfigurations()
    {
        static $priceConfigurations;

        if (null === $priceConfigurations) {
            $priceConfigurations = $this->itemsSalesPricesApi->findAll();

            $shopIdentities = $this->identityService->findBy([
                'adapterName' => PlentymarketsAdapter::NAME,
                'objectType' => Shop::TYPE,
            ]);

            $shopIdentities = array_filter($shopIdentities, function (Identity $identity) {
                $isMappedIdentity = $this->identityService->isMappedIdentity(
                    $identity->getObjectIdentifier(),
                    $identity->getObjectType(),
                    $identity->getAdapterName()
                );

                if (!$isMappedIdentity) {
                    return false;
                }

                return true;
            });

            if (empty($shopIdentities)) {
                $priceConfigurations = [];

                return $priceConfigurations;
            }

            $priceConfigurations = array_filter($priceConfigurations,
                function ($priceConfiguration) use ($shopIdentities) {
                    foreach ($shopIdentities as $identity) {
                        foreach ((array) $priceConfiguration['clients'] as $client) {
                            if ($client['plentyId'] === -1 || $identity->getAdapterIdentifier() === (string) $client['plentyId']) {
                                return true;
                            }
                        }
                    }

                    return false;
                });

            if (empty($priceConfigurations)) {
                $this->logger->notice('no valid price configuration found');
            }
        }

        return $priceConfigurations;
    }
Returns the matching price configurations.

@return array