* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ namespace PrestaShop\Module\PrestashopCheckout\Order\Command; use PrestaShop\Module\PrestashopCheckout\PayPal\Order\Exception\PayPalOrderException; use PrestaShop\Module\PrestashopCheckout\PayPal\Order\ValueObject\PayPalOrderId; class CreateOrderCommand { /** * @var PayPalOrderId */ private $orderPayPalId; /** * @var array|null */ private $capturePayPal; /** * @param string $orderPayPalId * @param array|null $capturePayPal * * @throws PayPalOrderException */ public function __construct($orderPayPalId, $capturePayPal = null) { $this->orderPayPalId = new PayPalOrderId($orderPayPalId); $this->capturePayPal = $capturePayPal; } /** * @return PayPalOrderId */ public function getOrderPayPalId() { return $this->orderPayPalId; } /** * @return array|null */ public function getCapturePayPal() { return $this->capturePayPal; } }