/**
  * @param        $endPoint
  * @param        $accountId
  * @param string $apiVersion
  *
  * @return \BingAds\v10\Proxy\ClientProxy|\BingAds\v9\Proxy\ClientProxy
  */
 protected function _getClientProxyWithAccountId($endPoint, $accountId, $apiVersion = BingAdsApi::VERSION_10)
 {
     if (!$this->isUseCache()) {
         return $this->_clientProxyFactory->createClientProxyWithAccountId($endPoint, $accountId, $apiVersion);
     } elseif (isset($this->_clientProxies[$apiVersion][$endPoint][$accountId])) {
         return $this->_clientProxies[$apiVersion][$endPoint][$accountId];
     }
     return $this->_clientProxies[$apiVersion][$endPoint][$accountId] = $this->_clientProxyFactory->createClientProxyWithAccountId($endPoint, $accountId, $apiVersion);
 }
 /**
  * @param $accessToken
  * @param $apiVersion
  *
  * @return ClientProxyFactory
  */
 protected function _getClientProxyFactory($accessToken)
 {
     $developerToken = Configure::read('BingAds.developer_token');
     $clientProxyFactory = new ClientProxyFactory();
     $clientProxyFactory->setAccessToken($accessToken);
     $clientProxyFactory->setDeveloperToken($developerToken);
     return $clientProxyFactory;
 }