_id; } /** * Устанавливает идентификатор возврата. * * @param string|null $id Идентификатор возврата * * @return self */ public function setId(?string $id = null): self { $this->_id = $this->validatePropertyValue('_id', $id); return $this; } /** * Возвращает идентификатор платежа. * * @return string|null Идентификатор платежа */ public function getPaymentId(): ?string { return $this->_payment_id; } /** * Устанавливает идентификатор платежа. * * @param string|null $payment_id Идентификатор платежа * * @return self */ public function setPaymentId(?string $payment_id = null): self { $this->_payment_id = $this->validatePropertyValue('_payment_id', $payment_id); return $this; } /** * Возвращает статус текущего возврата. * * @return string|null Статус возврата */ public function getStatus(): ?string { return $this->_status; } /** * Устанавливает статус возврата платежа. * * @param string|null $status Статус возврата платежа * * @return self */ public function setStatus(?string $status = null): self { $this->_status = $this->validatePropertyValue('_status', $status); return $this; } /** * Возвращает cancellation_details. * * @return CancellationDetailsInterface|null */ public function getCancellationDetails(): ?CancellationDetailsInterface { return $this->_cancellation_details; } /** * Устанавливает cancellation_details. * * @param CancellationDetailsInterface|array|null $cancellation_details * * @return self */ public function setCancellationDetails(mixed $cancellation_details = null): self { $this->_cancellation_details = $this->validatePropertyValue('_cancellation_details', $cancellation_details); return $this; } /** * Возвращает статус регистрации чека. * * @return string|null Статус регистрации чека */ public function getReceiptRegistration(): ?string { return $this->_receipt_registration; } /** * Устанавливает статус регистрации чека. * * @param string|null $receipt_registration Статус регистрации чека * * @return self */ public function setReceiptRegistration(?string $receipt_registration = null): self { $this->_receipt_registration = $this->validatePropertyValue('_receipt_registration', $receipt_registration); return $this; } /** * Возвращает дату создания возврата. * * @return DateTime|null Время создания возврата */ public function getCreatedAt(): ?DateTime { return $this->_created_at; } /** * Устанавливает время создания возврата. * * @param DateTime|string|null $created_at Время создания возврата * * @return self */ public function setCreatedAt(DateTime|string|null $created_at = null): self { $this->_created_at = $this->validatePropertyValue('_created_at', $created_at); 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; } /** * Возвращает комментарий к возврату. * * @return string|null Комментарий, основание для возврата средств покупателю */ public function getDescription(): ?string { return $this->_description; } /** * Устанавливает комментарий к возврату. * * @param string|null $description Комментарий, основание для возврата средств покупателю * * @return self */ public function setDescription(?string $description = null): self { $this->_description = $this->validatePropertyValue('_description', $description); return $this; } /** * Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. * * @return SourceInterface[]|ListObjectInterface */ public function getSources(): ListObjectInterface { if ($this->_sources === null) { $this->_sources = new ListObject(Source::class); } return $this->_sources; } /** * Устанавливает sources (массив распределения денег между магазинами). * * @param ListObjectInterface|array|null $sources * * @return self */ public function setSources(mixed $sources = null): self { $this->_sources = $this->validatePropertyValue('_sources', $sources); return $this; } /** * Возвращает данные о сделке, в составе которой проходит возврат * * @return null|RefundDealInfo Данные о сделке, в составе которой проходит возврат */ public function getDeal(): ?RefundDealInfo { return $this->_deal; } /** * Устанавливает данные о сделке, в составе которой проходит возврат. * * @param RefundDealInfo|array|null $deal Данные о сделке, в составе которой проходит возврат * * @return self */ public function setDeal(mixed $deal = null): self { $this->_deal = $this->validatePropertyValue('_deal', $deal); return $this; } /** * Возвращает метод возврата. * * @return AbstractRefundMethod|null */ public function getRefundMethod(): ?AbstractRefundMethod { return $this->_refund_method; } /** * Устанавливает метод возврата. * * @param AbstractRefundMethod|array|null $refund_method * * @return self */ public function setRefundMethod(mixed $refund_method = null): self { if (is_array($refund_method)) { $refund_method = (new RefundMethodFactory)->factoryFromArray($refund_method); } $this->_refund_method = $this->validatePropertyValue('_refund_method', $refund_method); return $this; } }