_type; } /** * Устанавливает вид оплаты в чеке. * * @param string|null $type Тип расчета. * * @return self */ public function setType(?string $type = null): self { $this->_type = $this->validatePropertyValue('_type', $type); return $this; } /** * Возвращает размер оплаты. * * @return AmountInterface|null Размер оплаты */ public function getAmount(): ?AmountInterface { return $this->_amount; } /** * Устанавливает сумму платежа. * * @param AmountInterface|array|null $amount Сумма платежа * * @return self */ public function setAmount(mixed $amount = null): self { $this->_amount = $this->validatePropertyValue('_amount', $amount); return $this; } /** * Фабричный метод создания суммы. * * @param array $options Сумма в виде ассоциативного массива * * @return AmountInterface Созданный инстанс суммы */ private function factoryAmount(array $options): AmountInterface { $amount = new MonetaryAmount(null, $options['currency']); if ($options['value'] > 0) { $amount->setValue($options['value']); } return $amount; } }