currentObject->setPaymentId($value); return $this; } /** * Устанавливает комментарий к возврату * @param string $value Комментарий к возврату * @return CreateRefundRequestBuilder Инстанс текущего билдера * * @throws InvalidPropertyValueTypeException Выбрасывается если была передана не строка */ public function setDescription($value) { $this->currentObject->setDescription($value); return $this; } /** * Устанавливает источники возврата * * @param SourceInterface[]|array $value Массив трансферов * * @return self Инстанс билдера запросов */ public function setSources($value) { $this->currentObject->setSources($value); return $this; } /** * Строит объект запроса к API * @param array|null $options Устаналвиваемые параметры запроса * @return CreateRefundRequestInterface Инстанс сгенерированного объекта запроса к API */ public function build(array $options = null) { if (!empty($options)) { $this->setOptions($options); } $this->currentObject->setAmount($this->amount); if ($this->receipt->notEmpty()) { $this->currentObject->setReceipt($this->receipt); } return parent::build(); } }