_id; } /** * Устанавливает идентификатор самозанятого. * * @param string $id Идентификатор самозанятого в ЮKassa. * * @return $this */ public function setId($id) { if (!TypeCast::canCastToString($id)) { throw new InvalidPropertyValueTypeException('Invalid PayoutSelfEmployedInfo id value type', 0, 'PayoutSelfEmployedInfo.id', $id); } $length = mb_strlen($id, 'utf-8'); if ($length < SelfEmployedInterface::MIN_LENGTH_ID || $length > SelfEmployedInterface::MAX_LENGTH_ID) { throw new InvalidPropertyValueException('Invalid PayoutSelfEmployedInfo id value', 0, 'PayoutSelfEmployedInfo.id', $id); } $this->_id = (string)$id; return $this; } }