protected function createEndPoint($method, $data = array())
    {
        //create array for api key
        $data['api_token'] = $this->apiKey;
        //make API end point
        $endPoint = $this->url  . '/' . $method . '?' . http_build_query($data);
        //set API endpoint
        $this->setOpt(CURLOPT_URL, $endPoint);
        //return this object
        return $this;
    }
protected function createEndPoint($method, $data = array())
    {
        //create array for api key
        $data['api_token'] = $this->apiKey;
        //make API end point
        $endPoint = $this->url  . '/' . $method . '?' . http_build_query($data);
        //set API endpoint
        $this->setOpt(CURLOPT_URL, $endPoint);
        //return this object
        return $this;
    }
protected function createEndPoint ( $ method , $ data = array ( ) ) { //create array for api key $ data [ 'api_token' ] = $ this -> apiKey ; //make API end point $ endPoint = $ this -> url . '/' . $ method . '?' . http_build_query ( $ data ) ; //set API endpoint $ this -> setOpt ( CURLOPT_URL , $ endPoint ) ; //return this object return $ this ; }
takes the pipedrive method and turns it into the correct URL endpoint
by adding the method and API key

@param  string $method Pipedrive method
@return $this Current Object
takes the pipedrive method and turns it into the correct URL endpoint by adding the method and API key