Return, create object to call PayPal with.

@return \OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest
498603
public function getPayPalRequest()
    {
        if (is_null($this->payPalRequest)) {
            $this->payPalRequest = oxNew(\OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest::class);
        }

        return $this->payPalRequest;
    }
776705
public function getPayPalRequest()
    {
        if ($this->payPalRequest === null) {
            $this->payPalRequest = oxNew(\OxidEsales\PayPalModule\Core\Request::class);
        }

        return $this->payPalRequest;
    }
871212
public function getPayment()
    {
        if (is_null($this->payment)) {
            $payPalPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
            $payPalPayment->load('oxidpaypal');
            $this->setPayment($payPalPayment);
        }

        return $this->payment;
    }
558606
private function create()
    {
        $response = $this->sendRequest(
            self::METHOD_POST,
            self::$endPoints['create'],
            $this->requestData
        );
        $this->resetRequestData();
        return $response;
    }
870348
public function getPayPalPayment()
    {
        if ($this->payPalPayment === null) {
            $this->payPalPayment = false;
            $payPalPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);

            // payment is not available/active?
            if ($payPalPayment->load("oxidpaypal") && $payPalPayment->oxpayments__oxactive->value) {
                $this->payPalPayment = $payPalPayment;
            }
        }

        return $this->payPalPayment;
    }
19029
public function processPayment()
    {
        $gestpayMethod = new GestpayMethod();

        /*
         * At this point, order must be created given a cart, and placed in PaymentBridge.
         *
         * So, $this->paymentBridge->getOrder() must return an object
         */
        $this
            ->paymentEventDispatcher
            ->notifyPaymentOrderLoad(
                $this->paymentBridge,
                $gestpayMethod
            );

        /*
         * Order Not found Exception must be thrown just here.
         */
        if (!$this->paymentBridge->getOrder()) {
            throw new PaymentOrderNotFoundException();
        }

        /*
         * Order exists right here.
         */
        $this
            ->paymentEventDispatcher
            ->notifyPaymentOrderCreated(
                $this->paymentBridge,
                $gestpayMethod
            );

        return $this->gestpayEncrypter->encryptedUrl();
    }
937913
public function getPayPalService()
    {
        if ($this->payPalService === null) {
            $this->payPalService = oxNew(\OxidEsales\PayPalModule\Core\PayPalService::class);
        }

        return $this->payPalService;
    }
37553
public function create()
    {
        /**
         * @var OrderLine $orderLine
         */
        $classNamespace = $this->getEntityNamespace();
        $orderLine = new $classNamespace();

        $orderLine
            ->setWidth(0)
            ->setHeight(0)
            ->setWidth(0)
            ->setWeight(0)
            ->setAmount($this->createZeroAmountMoney())
            ->setPurchasableAmount($this->createZeroAmountMoney());

        return $orderLine;
    }
1205638
public function getPayment()
    {
        if (!$this->isPayPal()) {
            // removing PayPal payment type from session
            $this->getSession()->deleteVariable('oepaypal');
            $this->getSession()->deleteVariable('oepaypal-basketAmount');

            return parent::getPayment();
        }

        if ($this->payment === null) {
            // payment is set ?
            $payment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
            if ($payment->load('oxidpaypal')) {
                $this->payment = $payment;
            }
        }

        return $this->payment;
    }
607959
public function getUser()
    {
        if (is_null($this->user)) {
            /**
             * @var \OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException $exception
             */
            $exception = oxNew(\OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException::class);
            throw $exception;
        }

        return $this->user;
    }
135655
public function create()
    {
        /**
         * @var Order $order
         */
        $classNamespace = $this->getEntityNamespace();
        $order = new $classNamespace();
        $order
            ->setQuantity(0)
            ->setWidth(0)
            ->setHeight(0)
            ->setWidth(0)
            ->setWeight(0)
            ->setCreatedAt($this->now())
            ->setPurchasableAmount($this->createZeroAmountMoney())
            ->setAmount($this->createZeroAmountMoney())
            ->setCouponAmount($this->createZeroAmountMoney())
            ->setShippingAmount($this->createZeroAmountMoney());

        $paymentStateLineStack = $this
            ->paymentMachineManager
            ->initialize(
                $order,
                StateLineStack::create(
                    new ArrayCollection(),
                    null
                ),
                'Order not paid'
            );

        $order->setPaymentStateLineStack($paymentStateLineStack);

        $shippingStateLineStack = $this
            ->shippingMachineManager
            ->initialize(
                $order,
                StateLineStack::create(
                    new ArrayCollection(),
                    null
                ),
                'Preparing Order'
            );

        $order->setShippingStateLineStack($shippingStateLineStack);

        return $order;
    }
1044493
public function getBasket()
    {
        if (is_null($this->basket)) {
            /** @var \OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException $exception */
            $exception = oxNew(\OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException::class);
            throw $exception;
        }

        return $this->basket;
    }
646054
public function call() {
        $request = $this->createRequest();
        $response = $this->api->execute($request, $this);
        $this->response = $response;

        if ($this->shouldResponseBeProcessed($response)) {
            $instance = $this->api->instantiateResult($response, $this);

            return $instance;
        }
        return $response;
    }
716820
public function create()
    {
        $instance = self::createPaymentTransaction($this);
        $this->setId($instance->getId());
        return $instance;
    }
24859
protected function createResourceCallable()
    {
        return function (array $data, array $values, ErrorBag $errorBag) {
            $model = $this->getDataModel()->newInstance();

            foreach ($values as $attribute => $value) {
                $model->setAttribute($attribute, $value);
            }

            if (!empty($data['id'])) {
                $model->setAttribute($model->getKeyName(), $data['id']);
            }

            try {
                $model->save();

                //We need to load the model from the DB in case the user is utilizing getRequiredFields() on the transformer.
                $model = $model->fresh();
            } catch (\Exception $e) {
                $errorBag[] = new Error('creation_error', 'Resource could not be created');
                throw $e;
            }

            return $model;
        };
    }
833750
public function getPaymentCreator()
    {
        if (is_null($this->payPalIPNPaymentCreator)) {
            $payPalIPNPaymentCreator = oxNew(\OxidEsales\PayPalModule\Model\IPNPaymentCreator::class);
            $payPalIPNPaymentCreator->setRequest($this->getRequest());
            $this->setPaymentCreator($payPalIPNPaymentCreator);
        }

        return $this->payPalIPNPaymentCreator;
    }
64982
public function create()
  {
    $uses = [
      'Phrest\API\DI\PhrestDIInterface',
      'Phrest\SDK\PhrestSDK',
      'Phrest\SDK\Request\AbstractRequest',
      $this->namespace . '\\' . Generator::$name . 'API'
    ];

    foreach($this->requests as $request)
    {
      $uses[] = $request->getNamespace() . '\\' . $request->getName();
    }

    $class = ClassGen::classGen(
      $this->name,
      $this->namespace . '\\' . $this->version,
      $uses,
      'PhrestSDK'
    );

    $di = new ParameterGenerator('di', 'PhrestDIInterface');
    $constructor = ClassGen::constructor([$di]);
    $constructor->setBody($this->getConstructorBody());
    $class->addMethodFromGenerator($constructor);

    $abstractRequest = new ParameterGenerator('request', 'AbstractRequest');
    $injectDependencies = ClassGen::method(
      'injectDependencies',
      [$abstractRequest],
      'private',
      'return $request;'
    );
    $docBlock = $injectDependencies->getDocBlock();
    $docBlock->setTag(new GenericTag('return', 'AbstractRequest'));
    $class->addMethodFromGenerator($injectDependencies);

    foreach($this->requests as $request)
    {
      $getRequest = ClassGen::method(
        'get' . ucfirst($request->getName()),
        [],
        'public',
        'return $this->injectDependencies(new ' . $request->getName() . '());'
      );
      $getRequest->getDocBlock()->setTag(new GenericTag('return', $request->getName()));
      $class->addMethodFromGenerator($getRequest);
    }

    return $class;
  }