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
191219
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;
    }
968316
public function setMethod($method = self::GET)
	{
		if (in_array($method, $this->allowedMethods)) {
			$this->method = $method;
		} else {
			throw new RuntimeException('Invalid method setted.');
		}
		
		return $this;
	}
1275005
public function method($method)
    {
        $method  = strtolower($method);
        $builder = new RequestBuilder([
            'domain' => $this->domain,
            'basePath' => $this->basePath,
            'method' => $method,
            'guzzleOptions' => $this->guzzleOptions,
            'returnType' => $this->returnType,
        ]);
        $builder->withHeaders($this->headers);

        if (in_array($method, [ 'patch', 'post', 'put' ])) {
            $builder->withHeader(new ContentType('application/json'));
        }

        return $builder;
    }
1112861
public function setMethod(string $method): self
    {
        assert(
            ($availableMethods = openssl_get_cipher_methods(true)) !== false &&
            in_array($method, $availableMethods) === true
        );

        $this->method = $method;

        return $this;
    }
284410
public function withMethod($method)
    {
        $new = clone $this;

        if (!is_string($method) ||
            !preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)
        ) {
            throw new InvalidArgumentException(sprintf(
                'Unsupported HTTP method "%s" provided',
                $method
            ));
        }
        $new->_environment['REQUEST_METHOD'] = $method;

        return $new;
    }
1022850
public function setMethod($method)
    {
        $valid = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT'];
        $method = strtoupper($method);

        if (!in_array($method, $valid)) {
            throw new \Exception('Error: That request method is not valid.');
        }
        $this->method = $method;

        return $this;
    }
370055
public function method($method = 'POST')
    {
        if (strtolower($method) == 'put') {
            $this->hidden('_method')->default($method);

            return $this;
        }

        return $this->attribute('method', strtoupper($method));
    }
558759
public function setMethod($method) {
        $this->method = (true === in_array($method, [self::HTTP_METHOD_GET, self::HTTP_METHOD_POST]) ? $method : self::HTTP_METHOD_POST);
        return $this;
    }
1139046
public function AddMethod(\Peg\Lib\Definitions\Element\FunctionElement $method)
    {
        $method->parent_class =& $this;
        $this->methods[$method->name] = $method;
        
        return $this;
    }
1217946
public function method($method, $path = null)
	{
		if($path !== null)
			$this->setPath($path);

		return $this->setMethod($method);
	}
264016
protected function configureHTTPMethod($method) {
        switch($method){
            case self::HTTP_GET:
                $this->removeHeader('Content-Type');
                break;
            case self::HTTP_POST:
            case self::HTTP_PUT:
                $this->addHeader("Content-Type", "multipart/form-data");
        }
        return parent::configureHTTPMethod($method);
    }
583487
public function appendMethod($method) {
    if (is_string($method)) {
      $method = InterfaceMethodNode::create($method);
    }
    $this->statements->lastChild()->before($method);
    FormatterFactory::format($this);
    return $this;
  }
492207
public function setTransactionMethod($method)
    {
        // check if is array
        if (!is_array($this->transactionMethods)) {
            $this->transactionMethods = [$method];

            return $this;
        }

        // check if method is already in array
        if (!in_array($method, $this->transactionMethods)) {
            $this->transactionMethods[] = $method;
        }

        return $this;
    }
368191
private function createRequestPayload($method)
    {
        $config = array_merge([
            'USER'      => $this->config['username'],
            'PWD'       => $this->config['password'],
            'SIGNATURE' => $this->config['signature'],
            'VERSION'   => 123,
            'METHOD'    => $method,
        ], $this->options);

        $this->post = $this->post->merge($config);
        if ($method === 'verifyipn') {
            $this->post->forget('METHOD');
        }
    }
1161652
protected function getEndpoint($method)
    {
        $endpoint = 'me/password';
        $reset = $this->getArgument('reset');
        $nonce = $this->getArgument('nonce');
        if (!is_null($reset)) {
            $endpoint .= '/reset';
            $this->delArgument('reset');
        }
        if (!is_null($nonce)) {
            $endpoint .= "/$nonce";
            $this->delArgument('nonce');
        }
        return $endpoint;
    }
730355
public function setMethod($method)
    {
        $method = strtolower($method);

        if (in_array($method, [Form::METHOD_GET, Form::METHOD_POST])) {
            $this->method = $method;
        } else {
            throw new \Exception('Incorrect method value given');
        }
        return $this;
    }
147465
public function setMethod($method)
    {
        $method = strtoupper($method);

        if (!defined('static::'.$method)) {
            throw new InvalidArgumentException('Invalid HTTP method passed');
        }

        $this->_method = $method;
        return $this;
    }