58 lines
1.4 KiB
PHP
58 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace KupShop\POSBundle\Event;
|
|
|
|
use KupShop\POSBundle\Util\PosEntity;
|
|
use Symfony\Contracts\EventDispatcher\Event;
|
|
|
|
class PosPaymentEvent extends Event
|
|
{
|
|
/** Eventa volaná při výběru hotovosti z pokladny */
|
|
public const POS_SELECT_PAYMENT = 'kupshop.pos.select.payment';
|
|
|
|
/** Eventa volaná při vkladu hotovosti do pokladny */
|
|
public const POS_INSERT_PAYMENT = 'kupshop.pos.insert.payment';
|
|
/** Eventa volaná při platby pomocí nastavovatelného tlačítka (custom payment) */
|
|
public const POS_CUSTOM_PAYMENT = 'kupshop.pos.custom.payment';
|
|
|
|
private PosEntity $pos;
|
|
private string $price;
|
|
private int $method;
|
|
private ?\Order $order;
|
|
private ?string $note;
|
|
|
|
public function __construct(PosEntity $pos, string $price, int $method, ?\Order $order = null, ?string $note = null)
|
|
{
|
|
$this->pos = $pos;
|
|
$this->price = $price;
|
|
$this->method = $method;
|
|
$this->order = $order;
|
|
$this->note = $note;
|
|
}
|
|
|
|
public function getPos(): PosEntity
|
|
{
|
|
return $this->pos;
|
|
}
|
|
|
|
public function getPrice(): string
|
|
{
|
|
return $this->price;
|
|
}
|
|
|
|
public function getMethod(): int
|
|
{
|
|
return $this->method;
|
|
}
|
|
|
|
public function getOrder(): \Order
|
|
{
|
|
return $this->order;
|
|
}
|
|
|
|
public function getNote(): string
|
|
{
|
|
return $this->note;
|
|
}
|
|
}
|