| 1 | <?php |
||
| 4 | class ReceiptElement extends AbstractElement |
||
| 5 | { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * @var null|int |
||
| 9 | */ |
||
| 10 | protected $quantity; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var null|float |
||
| 14 | */ |
||
| 15 | protected $price; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var null|string |
||
| 19 | */ |
||
| 20 | protected $currency; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Element constructor. |
||
| 24 | * |
||
| 25 | * @param string $title |
||
| 26 | * @param float $price |
||
| 27 | */ |
||
| 28 | public function __construct(string $title, float $price) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param int $quantity |
||
| 37 | * @return ReceiptElement |
||
| 38 | */ |
||
| 39 | public function setQuantity(int $quantity): ReceiptElement |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $currency |
||
| 48 | * @return ReceiptElement |
||
| 49 | */ |
||
| 50 | public function setCurrency(string $currency): ReceiptElement |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return array |
||
| 60 | */ |
||
| 61 | public function jsonSerialize(): array |
||
| 74 | } |
||
| 75 |