Sets parameters to the endpoint.

@param string $endpointName
@param array  $parameters
505936
public function setEndpointParameters($endpointName, array $parameters)
    {
        /** @var AbstractSearchEndpoint $endpoint */
        $endpoint = $this->getEndpoint($endpointName);
        $endpoint->setParameters($parameters);
    }
549274
public function setPostParameters(array $postParameters)
    {
        foreach ($postParameters as $name => $value) {
            $this->setPostParameter($name, $value);
        }
    }
472693
public function setParameter($key, $parameter)
    {
        // If the object is null, an exception is thrown.
        if($this->getObject() === null) {
            throw new NullPointerException("The object cannot be null.");
        }

        // Let's get the key-method mapping.
        $mapping = $this->getKeyMethodMapping();

        // If the key is not mapped, an exception is thrown.
        if(!array_key_exists($key, $mapping)) {
            throw new ParameterNotFoundException("The $key parameter cannot be set with this setter.");
        }

        // Call the mapped setter method.
        $object   = $this->getObject();
        $method   = $mapping[$key];
        $callable = array($object, $method);
        call_user_func($callable, $parameter);
    }
400324
public function send(string $method, string $endpoint, array $parameters = null)
    {
        /** @var string|array $parameters */
        $data = $this->processor->prepare($method, $parameters);

        switch ($method) {
            case 'get':
                return $this->adapter->get(
                    $this->getEndpoint() . '/' . trim($endpoint, '/') . trim($data, '/')
                );
            case 'post':
                return $this->adapter->post(
                    $this->getEndpoint() . '/' . trim($endpoint, '/'),
                    $data ?? []
                );
        }
    }
789736
public function fillEndPoint(string &$endPoint): void
    {
        $endPoint = str_replace("{sms}", $this->smsID, $endPoint);
        $endPoint = str_replace("{bundle}", $this->bundleID ?? "", $endPoint);
    }
1059806
protected function setEndpointDomains(EndpointCollection $endpoints)
    {
        foreach ($endpoints->getAllPaths() as $path) {
            if (is_null($path->domain)) {
                $path->domain = $this->domain;
            }
        }
    }
882997
protected function prefixEndpoints(EndpointCollection $endpoints)
    {
        foreach ($endpoints->getAllPaths() as $path) {
            $path->path = $this->trimPath($this->prefix, $path->path);
        }
    }
811320
private function setter(array $parameters)
    {
        // Parse array and set values
        array_map(
            function($key, $value) {
                $this->set($key, $value);
            },
            array_keys($parameters),
            $parameters
        );
    }
713378
public function setParams(array $params)
    {
        foreach ($params as $param) {
            $this->config->setEndpoint(
                str_replace('{' . $param['placeholder'] . '}', $param['value'], $this->config->getConfig()['endpoint'])
            );
        }

        $this->parentParams = $params;
    }
210270
public function addParameters($parameters)
    {
        foreach ($parameters as $parameter) {
            $index = $this->parameterIndex++;
            $this->queryBuilder->setParameter($index, $parameter);
        }
    }
689720
protected function addParameter(array $parameters)
    {
        foreach ($parameters as $paramName => $paramValue) {
            $this->parameters[$paramName] = $paramValue;
            $this->parametersTypes[$paramName] = $this->inferType($paramValue);
        }
    }
590887
public function post($endpoint, array $parameters = array())
    {
        return $this->execute("POST", sprintf("%s%s", $this->host, $endpoint), $parameters);
    }
313274
public function parameters(array $parameters): HttpRequest
    {
        foreach ($parameters as $name => $value) {
            $this->parameter($name, $value);
        }

        return $this;
    }
533161
public function update($endpoint, array $parameters = array(), array $queryparameters = array())
    {
        if (!empty($queryparameters)) {
            $path = sprintf("%s/?%s", $endpoint, http_build_query($queryparameters));
        } else {
            $path = $endpoint;
        }

        return $this->execute("PATCH", sprintf("%s%s", $this->host, $path), $parameters);
    }
328611
public function setParameters($parameters)
    {
        // type check, error must never occur, bad code of it does
        if (!is_array($parameters)) {
            throw new Exception("Expected parameters array got something else");
        }

        $this->_parameters = $parameters;
        $this->setInitialized(false);
    }
913077
public function setEndpoint($endpoint = '')
    {
        $this->endpoint = $endpoint;
        $this->debug->info(__FUNCTION__, 'setEndpoint: ', $this->endpoint);

        return $this;
    }
771277
public function setEndpoint($endpoint)
    {
        if (!in_array($endpoint, [self::ENDPOINT_SANDBOX, self::ENDPOINT_PRODUCTION])) {
            throw new InvalidArgumentException('Endpoint inválido.');
        }

        $this->endpoint = $endpoint;

        return $this;
    }