src/RequestFactory.php
public function create($serviceKey, $requestKey, array $parameters = [])
    {
        $config       = $this->getParamOrFail($this->config, $serviceKey);
        $service      = $this->getServiceParams($config);
        $request      = $this->getRequestParams($config, $requestKey, $service);
        $uri          = $this->buildUri($service['endpoint'], $request['path'], $request['query']);

        list($optionalParameters, $placeholders) = $this->separateParameters($request['body'], $parameters);

        $values       = array_values($parameters);
        $body         = $this->buildBody($request['body'], $request['headers'], $placeholders, $values, $optionalParameters);

        return $this->buildRequest(
            $request['method'],
            $this->replace($uri, $placeholders, $values),
            $this->replaceAll($request['headers'], $placeholders, $values),
            $body,
            $request['version'],
            $request['retries'],
            $request['options'],
            $serviceKey,
            $requestKey
        );
    }
public function create($serviceKey, $requestKey, array $parameters = [])
    {
        $config       = $this->getParamOrFail($this->config, $serviceKey);
        $service      = $this->getServiceParams($config);
        $request      = $this->getRequestParams($config, $requestKey, $service);
        $uri          = $this->buildUri($service['endpoint'], $request['path'], $request['query']);

        list($optionalParameters, $placeholders) = $this->separateParameters($request['body'], $parameters);

        $values       = array_values($parameters);
        $body         = $this->buildBody($request['body'], $request['headers'], $placeholders, $values, $optionalParameters);

        return $this->buildRequest(
            $request['method'],
            $this->replace($uri, $placeholders, $values),
            $this->replaceAll($request['headers'], $placeholders, $values),
            $body,
            $request['version'],
            $request['retries'],
            $request['options'],
            $serviceKey,
            $requestKey
        );
    }
public function create ( $ serviceKey , $ requestKey , array $ parameters = [ ] ) { $ config = $ this -> getParamOrFail ( $ this -> config , $ serviceKey ) ; $ service = $ this -> getServiceParams ( $ config ) ; $ request = $ this -> getRequestParams ( $ config , $ requestKey , $ service ) ; $ uri = $ this -> buildUri ( $ service [ 'endpoint' ] , $ request [ 'path' ] , $ request [ 'query' ] ) ; list ( $ optionalParameters , $ placeholders ) = $ this -> separateParameters ( $ request [ 'body' ] , $ parameters ) ; $ values = array_values ( $ parameters ) ; $ body = $ this -> buildBody ( $ request [ 'body' ] , $ request [ 'headers' ] , $ placeholders , $ values , $ optionalParameters ) ; return $ this -> buildRequest ( $ request [ 'method' ] , $ this -> replace ( $ uri , $ placeholders , $ values ) , $ this -> replaceAll ( $ request [ 'headers' ] , $ placeholders , $ values ) , $ body , $ request [ 'version' ] , $ request [ 'retries' ] , $ request [ 'options' ] , $ serviceKey , $ requestKey ) ; }
Builds a request based on the service and request name, with the given parameters

@param string $serviceKey
@param string $requestKey
@param array  $parameters

@return Request
Builds a request based on the service and request name with the given parameters