_operation_id; } /** * Устанавливает идентификатор операции. * * @param int|null $operation_id Идентификатор операции * * @return self */ public function setOperationId(?int $operation_id = null): self { $this->_operation_id = $this->validatePropertyValue('_operation_id', $operation_id); return $this; } /** * Возвращает время создания операции. * * @return DateTime|null Время создания операции */ public function getCreatedAt(): ?DateTime { return $this->_created_at; } /** * Устанавливает время создания операции. * * @param DateTime|string|null $created_at Время создания операции * * @return self * * @throws Exception */ public function setCreatedAt(DateTime|string|null $created_at = null): self { $this->_created_at = $this->validatePropertyValue('_created_at', $created_at); return $this; } /** * Возвращает данные операции. * * @return string|null Данные операции */ public function getValue(): ?string { return $this->_value; } /** * Устанавливает данные операции. * * @param string|null $value Данные операции * * @return self */ public function setValue(?string $value = null): self { $this->_value = $this->validatePropertyValue('_value', $value); return $this; } /** * {@inheritdoc} */ public function jsonSerialize(): array { $result = parent::jsonSerialize(); $result['created_at'] = $this->getCreatedAt() ->setTimezone(new DateTimeZone('UTC')) ->format(YOOKASSA_DATE) ; return $result; } }