Files
yookassa-sdk-php/lib/Request/PersonalData/CreatePayoutStatementRecipientPersonalDataRequestBuilder.php
Антон Н. Николаев 2db9951ff6 Валидация payment_order.recipient.bank.name и payment_order.payment_period.year. Выплаты самозанятым теперь deprecated
Информация про чеки самозанятых в платежах и возвратах удалена - больше не поддерживаем сервисы для самозанятых
Добавлена возможность выставления счета по смс и email
Добавлена поддержка работы со списками выплат
Обновлен Copyright
2026-02-05 15:36:37 +03:00

142 lines
4.9 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/*
* The MIT License
*
* Copyright (c) 2026 "YooMoney", NBСO LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
namespace YooKassa\Request\PersonalData;
use DateTime;
use YooKassa\Common\AbstractRequestBuilder;
use YooKassa\Common\AbstractRequestInterface;
use YooKassa\Model\Metadata;
use YooKassa\Request\PersonalData\PersonalDataType\PayoutStatementRecipientPersonalDataRequest;
/**
* Класс, представляющий модель CreatePayoutStatementRecipientPersonalDataRequestBuilder.
*
* Класс билдера объектов запросов к API на создание платежа.
*
* @example 02-builder.php 210 19 Пример использования билдера
*
* @category Class
* @package YooKassa\Request
* @author cms@yoomoney.ru
* @link https://yookassa.ru/developers/api
*/
class CreatePayoutStatementRecipientPersonalDataRequestBuilder extends AbstractRequestBuilder
{
/**
* Собираемый объект запроса.
*
* @var PayoutStatementRecipientPersonalDataRequest|null
*/
protected ?AbstractRequestInterface $currentObject = null;
/**
* Устанавливает фамилию пользователя.
*
* @param string $value фамилия пользователя
*/
public function setLastName(string $value): self
{
$this->currentObject->setLastName($value);
return $this;
}
/**
* Устанавливает имя пользователя.
*
* @param string $value имя пользователя
*/
public function setFirstName(string $value): self
{
$this->currentObject->setFirstName($value);
return $this;
}
/**
* Устанавливает отчество пользователя.
*
* @param null|string $value Отчество пользователя
*/
public function setMiddleName(?string $value): self
{
$this->currentObject->setMiddleName($value);
return $this;
}
/**
* Устанавливает метаданные, привязанные к платежу.
*
* @param null|array|Metadata $value Метаданные платежа, устанавливаемые мерчантом
*
* @return self Инстанс текущего билдера
*/
public function setMetadata(mixed $value): self
{
$this->currentObject->setMetadata($value);
return $this;
}
/**
* Устанавливает дату рождения.
*
* @param DateTime|string|null $value Дата рождения. Передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
*
* @return self Инстанс текущего билдера
*/
public function setBirthdate(DateTime|string|null $value = null): self
{
$this->currentObject->setBirthdate($value);
return $this;
}
/**
* Строит и возвращает объект запроса для отправки в API ЮKassa.
*
* @param null|array $options Массив параметров для установки в объект запроса
*
* @return AbstractRequestInterface|PayoutStatementRecipientPersonalDataRequest Инстанс объекта запроса
*/
public function build(?array $options = null): AbstractRequestInterface
{
return parent::build($options);
}
/**
* Инициализирует объект запроса, который в дальнейшем будет собираться билдером
*
* @return PayoutStatementRecipientPersonalDataRequest Инстанс собираемого объекта запроса к API
*/
protected function initCurrentObject(): PayoutStatementRecipientPersonalDataRequest
{
return new PayoutStatementRecipientPersonalDataRequest();
}
}