Builds Request.

@return \OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest
962834
public function buildRequest()
    {
        $request = $this->getPayPalRequest();
        $request->setParameter('TOKEN', $this->getSession()->getVariable('oepaypal-token'));

        return $request;
    }
271794
public function build(): RequestCachedResponseRequest
	{
		$instance = new RequestCachedResponseRequest();
		if ($this->cacheId === null) {
			throw new BuilderException('Property [cacheId] is required.');
		}
		$instance->cacheId = $this->cacheId;
		if ($this->requestURL === null) {
			throw new BuilderException('Property [requestURL] is required.');
		}
		$instance->requestURL = $this->requestURL;
		if ($this->requestHeaders === null) {
			throw new BuilderException('Property [requestHeaders] is required.');
		}
		$instance->requestHeaders = $this->requestHeaders;
		return $instance;
	}
1199713
public function buildClient()
    {
        //Handle redirect configuration for guzzle 6
        if (class_exists('\GuzzleHttp\Psr7\Request')) {
            $options = ['allow_redirects' => false];
        } else {
            $options = [
                'defaults' => [
                    'allow_redirects' => false
                ]
            ];
        }

        $this->client = new Client(
            $options
        );
    }
586652
protected function _buildRequest()
    {
        $this->_request = $this->_factory
            ->getNewCancelBuildRequest($this->_api, $this->_order)
            ->build();
        return $this;
    }
977415
private function buildRequest()
	{
		// template example:
		// -----------------
		// {METHOD} {URI} HTTP-{1.0|1.1}CRLF
		// {headers}CRLF
		// CRLF
		// {message-body}
		$method = 'GET';
		$httpVersion = '1.0';
		$headers = '';
		$body = '';
		$page = ( \array_key_exists('path', $this->url) ) ? $this->url[ 'path' ] : '/';
		$options = \stream_context_get_options( $this->context );

		$httpOptions = [];
		if ( \array_key_exists('http', $options) )
		{
			$httpOptions = $options[ 'http' ];
		}
		// Get method verb.
		if ( \array_key_exists('method', $httpOptions) )
		{
			$method = $httpOptions[ 'method' ];
		}
		// Get content body.
		if ( \array_key_exists('content', $httpOptions) )
		{
			$body = $httpOptions[ 'content' ];
		}
		// Get headers.
		if ( \array_key_exists('header', $httpOptions) )
		{
			$headers = $httpOptions[ 'header' ];
		}
		// Get protocol version.
		if ( \array_key_exists('protocol_version', $httpOptions) )
		{
			$httpVersion = $httpOptions[ 'protocol_version' ];
		}
		// When host header was not set using context for \fopen/\file_get_contents functions,
		// you must manually add the Host: header.
		if ( \strpos(strtolower($headers), 'host:') === FALSE )
		{
			$lineBreak = ( \strlen($headers) > 0 ) ? "\r\n" : '';
			$headers = "host: {$this->url['host']}{$lineBreak}{$headers}";
		}
		if ( \array_key_exists('query', $this->url) )
		{
			$page = $page . '?' . $this->url[ 'query' ];
		}
		// Build the request as a string.
		$request = \sprintf(
			"%s %s HTTP/%s\r\n%s\r\n\r\n%s",
			$method,
			$page,
			$httpVersion,
			$headers,
			$body
		);

		return $request;
	}
598761
public function request()
    {
        $this->getTransactions();
        if (! is_null($this->_PagSeguroPaymentList->getTransactions())) {
            $partiallyRefundedOrdersArray = $this->getPartiallyRefundedOrders();

            foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) {
                $order = $this->decryptOrderById($payment);

                if (!in_array($order->getId(), $partiallyRefundedOrdersArray)) {
                    if (! $this->addPayment($this->decryptOrderById($payment), $payment))
                        continue;
                }
            }
        }
        return $this->_arrayPayments;
    }
162191
public function build(): ReloadRequest
	{
		$instance = new ReloadRequest();
		$instance->ignoreCache = $this->ignoreCache;
		$instance->scriptToEvaluateOnLoad = $this->scriptToEvaluateOnLoad;
		return $instance;
	}
1343624
public function request()
    {
        //load payments by date
        $this->getPagSeguroAbandoned();

        if ($this->_PagSeguroPaymentList->getTransactions()) {
            foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) {
                date_default_timezone_set('UTC');
                $order = \UOL\PagSeguro\Helper\Data::getReferenceDecryptOrderID($payment->getReference());
                $order = $this->_order->load($order);
                if ($this->getStoreReference() == \UOL\PagSeguro\Helper\Data::getReferenceDecrypt(
                        $payment->getReference())
                ) {
                    if (!is_null($this->_session->getData('store_id'))) {
                        array_push($this->_arrayPayments, $this->build($payment, $order));
                    }
                    if ($order) {
                        array_push($this->_arrayPayments, $this->build($payment, $order));
                    }
                }
            }
        }
        date_default_timezone_set($this->_timezone->getConfigTimezone());

        return $this->_arrayPayments;
    }
241347
public function toProtobufRequest()
    {
        $request = new \POGOProtos\Networking\Requests\Request();
        $request->setRequestType($this->getType());

        if (($message = $this->getMessage()) !== null) {
            $request->setRequestMessage($message->toStream());
        }

        return $request;
    }
907831
public function build()
    {
        $uri = $this->trimTrailingSlashes($this->request->getUri()->getPath());
        $method = mb_strtoupper($this->request->getMethod());

        foreach ($this->routes[$method] as $routeUri => $action) {
            $arguments = $this->match($uri, $routeUri);

            if (!is_null($arguments)) {
                return $this->constructAction($action, $arguments);
            }
        }

        throw new HTTPException('Not found', 404);
    }
600157
public function getRequest()
    {
        if ($this->request === null) {
            $this->request = oxNew(\OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest::class);
        }

        return $this->request;
    }
573714
public function build(): RequestDatabaseNamesRequest
	{
		$instance = new RequestDatabaseNamesRequest();
		if ($this->securityOrigin === null) {
			throw new BuilderException('Property [securityOrigin] is required.');
		}
		$instance->securityOrigin = $this->securityOrigin;
		return $instance;
	}
1321740
public function buildStandardCheckoutRequest()
    {
        $this->addBaseParams();
        $this->addBasketParams();
        $this->addDescriptionParams();
        $this->disableSelectingDifferentAddressInPayPal();
        $this->setMaximumOrderAmount();

        if ($this->getShowCartInPayPal()) {
            $this->addBasketItemParams();
        } else {
            $this->addBasketGrandTotalParams();
        }
        $this->addAddressParams();

        return $this->getPayPalRequest();
    }
1143967
public function build(): GetEncodedResponseRequest
	{
		$instance = new GetEncodedResponseRequest();
		if ($this->requestId === null) {
			throw new BuilderException('Property [requestId] is required.');
		}
		$instance->requestId = $this->requestId;
		if ($this->encoding === null) {
			throw new BuilderException('Property [encoding] is required.');
		}
		$instance->encoding = $this->encoding;
		$instance->quality = $this->quality;
		$instance->sizeOnly = $this->sizeOnly;
		return $instance;
	}
343179
protected function requestProcessor()
    {
        $components = $this->builder->components();

        $processors     = $components->processors();
        $httpProcessors = $components->httpProcessors();

        return $processors->chain(array(
            $httpProcessors->parseBody(),
            $this->parseRouteProcessor(),
            $httpProcessors->buildRequest()
        ));
    }
810494
public function createRequest()
    {
        return $this->getHttpClient()
            ->createRequest()
            ->addOptions($this->defaultRequestOptions())
            ->addOptions($this->getRequestOptions());
    }
170346
public function buildAction() {
		$request = $this->getConsoleRequest();
		
		$types = [
			'datatable' => [
				'DataTable'],
			'abstract' => [
				'EntityAbstract'],
			'entity' => [
				'Entity'],
			'ALL' => [
				'DataTable',
				'EntityAbstract',
				'Entity']];
		
		$class = $request->getParam('class');
		$table = $request->getParam('table');
		$write = $request->getParam('write') || $request->getParam('w');
		
		$body = '';
		$classes = $types[$class];
		foreach ( $classes as $type ) {
			$getFunc = "get{$type}Code";
			$writeFunc = "write{$type}";
			
			$body .= "Generating $type for $table\n";
			
			if ($table == 'ALL') {
				$bm = new BuilderManager($this->getNameManager(true));
				
				while ( $bm->nextTable() ) {
					if ($write) {
						if ($bm->$writeFunc(true)) {
							$body .= "\tWritten {$bm->getTableName()}\n";
						}
					} else {
						$body .= "\n//TODO:NEWCLASS\n" . $bm->$getFunc();
					}
				}
			} else {
				$bm = new BuilderManager($this->getNameManager(true), $table);
				$code = $bm->$getFunc();
				
				if ($write) {
					if ($bm->$writeFunc(true)) {
						$body .= "\tWritten to file\n";
					}
				} else {
					$body .= $code;
				}
			}
			
			$body .= $this->getDeveloperFooter();
		}
		
		return "$body\n";
	}