* @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\Query; use PrestaShop\Module\PrestashopCheckout\Cart\Exception\CartException; use PrestaShop\Module\PrestashopCheckout\Cart\ValueObject\CartId; use PrestaShop\Module\PrestashopCheckout\Order\Exception\OrderException; use PrestaShop\Module\PrestashopCheckout\Order\ValueObject\OrderId; class GetOrderForPaymentCompletedQueryResult { /** * @var OrderId */ private $orderId; /** * @var CartId */ private $cartId; /** * @var bool */ private $hasBeenPaid; /** * @var string */ private $totalAmount; /** * @var int */ private $currencyId; /** * @var string */ private $paymentMethod; /** * @var int|null */ private $orderPaymentId; /** * @param int $orderId * @param int $cartId * @param bool $hasBeenPaid * @param string $totalAmount * @param int $currencyId * @param string $paymentMethod * @param int|null $orderPaymentId * * @throws OrderException * @throws CartException */ public function __construct( $orderId, $cartId, $hasBeenPaid, $totalAmount, $currencyId, $paymentMethod, $orderPaymentId = null ) { $this->orderId = new OrderId($orderId); $this->cartId = new CartId($cartId); $this->hasBeenPaid = $hasBeenPaid; $this->totalAmount = $totalAmount; $this->currencyId = $currencyId; $this->paymentMethod = $paymentMethod; $this->orderPaymentId = $orderPaymentId; } /** * @return OrderId */ public function getOrderId() { return $this->orderId; } /** * @return CartId */ public function getCartId() { return $this->cartId; } /** * @return bool */ public function hasBeenPaid() { return $this->hasBeenPaid; } /** * @return string */ public function getTotalAmount() { return $this->totalAmount; } /** * @return int */ public function getCurrencyId() { return $this->currencyId; } /** * @return string */ public function getPaymentMethod() { return $this->paymentMethod; } /** * @return int|null */ public function getOrderPaymentId() { return $this->orderPaymentId; } }