getCrmUrl())) { throw new \LogicException('Crm url is empty'); } if (empty($account->getCrmApiKey())) { throw new \LogicException('Crm apiKey is empty'); } $retailCrmClient = new ApiClient( $account->getCrmUrl(), $account->getCrmApiKey(), ApiClient::V5 ); if ($logger) { $retailCrmClient->setLogger($logger); } return $retailCrmClient; } }